From d9161f6be2596776e282f27054fff1260309b560 Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 5 Dec 2013 17:54:18 +0100 Subject: finally real bugfix for proper update of script and translation_projects.dat --- NEWS | 3 +++ README | 24 ++++++++++++++---------- check_for_translation_work.sh | 10 +++++----- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index cf4a4b44..10794e40 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ NEWS +2013/12/05 +finally real bugfix for proper update of script and translation_projects.dat + 2013/12/03 optionaly exclude working translations directory in list_of_resources_for_translation.txt added support for html software files NOTE: uncomment #copying_html_software_files=no line in your ~/.mageia-i18n-config file to exclude copying of html software resources diff --git a/README b/README index feac2917..01a01a47 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ FEATURES -create and show a list of resources with untranslated and fuzzy strings with statistics (numbers of translated, fuzzy and untranslated strings) -checking the syntax of po file from git if required -checking the syntax of pot file from git if required --copying the *.pot file, *.po file, *.desktop file and web page files for editing in working directory if required +-copying the *.pot file, *.po file, *.desktop file, *.html and web page files for editing in working directory if required -creation of working copy of po resource in working directory if required -testing for differences of *.po file from working copy if required -testing for differences of *.pot file from working copy if required @@ -21,19 +21,23 @@ FEATURES -searching for new *.pot files in svn (TODO also search from git) -INSTALATION AND CONFIGURATION -Please put the script check_for_translation_work.sh in your home directory ~/bin or create a symlink to it from git directory and make it executable. -That way it will be in your PATH so you can call it from any directory. After first run please adjust file ~/.mageia-i18n-config to suit your needs. +INSTALLATION AND CONFIGURATION +It's recommended to put the script check_for_translation_work.sh in the root of your git directory. There it will automatically update itself by default. +You must make it executable by giving it permission to execute. It's also recommended that you create a symlink in your home directory ~/bin to the script. +That way it will be in your PATH so you can call it from any directory. +After first run please adjust file ~/.mageia-i18n-config to suit your needs. Script will automatically copy or update list of translatable resources if check_updates is set to 1 (default) in config file. If you choose to disable update you should manually copy list (translation_projects.dat) to the location of git_directory in config file. -Remember to upload your public ssh key to mageia identity! Otherwise the script will prompty you for password everytime for every svn resource and git commit & push will be unavailable to you. +Remember to upload your public ssh key to mageia identity! Otherwise the script will prompt you for password every time for every svn resource and +git commit & push will be unavailable to you. See wiki (https://wiki.mageia.org/en/Git_usage_for_l10n_and_doc) for details. -It's recommended that you first try git clone and push without script to test if your setup is as it should be. +It's recommended that you first try git clone and push without script to test if your setup of ssh and git is as it should be. Same goes for svn commit if you need it (currently there are only translations for web pages left on svn). You can exclude all work on web pages translation with option work_on_web_pages_translation. In that case you don't need to configure svn at all. -At least you need to adjust following setings in configuration file named .mageia-i18n-config that has been made in your home directory on the first run of the script. +At least you need to adjust following setings in configuration file named .mageia-i18n-config that has been made in your home directory on the first run +of the script. Set this according to your language code: language_code=sl @@ -53,12 +57,12 @@ Other options should be obvious by its name or comment. USAGE -First time after your configuration the script will need some time to clone all the needed git repos. Just wait a bit. It will be much faster next time as it will only need to pull the changes from git since your last run. The script can show the differences from the last run by default but you can switch that off in your config. Script will show the list of resources for translation (with fuzzy and untranslated strings) on the end. +First time after your configuration the script will need some time to clone all the needed git repos. Just wait a bit. It will be much faster next time +as it will only need to pull the changes from git since your last run. The script can show the differences from the last run by default but you can +switch that off in your config. Script will show the list of resources for translation (with fuzzy and untranslated strings) on the end. TODO -add support for html files -check the html resources on list of translatable resources add searching for new *.pot files and other resources in git better configurability of messages shown better documentation diff --git a/check_for_translation_work.sh b/check_for_translation_work.sh index b85c4ad8..31efb83d 100755 --- a/check_for_translation_work.sh +++ b/check_for_translation_work.sh @@ -7,7 +7,7 @@ # # Filip Komar, 2012, 2013 # Remco Rijnders, 2012 -# $Id: check_for_translation_work.sh 2013-12-03 21:15:00 UTC filip $ +# $Id: check_for_translation_work.sh 2013-12-05 14:49:00 UTC filip $ # # Please see git for a list of changes to this script. # @@ -181,11 +181,11 @@ if [ $check_updates -eq 1 ]; then if [ -f "$git_directory"/translation_projects.dat ]; then cp "$git_directory"/translation_projects.dat "$git_directory"/translation_projects.dat_previous fi - wget -Nq http://gitweb.mageia.org/software/i18n/tools/plain/translation_projects.dat "$git_directory"/ + wget -Nq http://gitweb.mageia.org/software/i18n/tools/plain/translation_projects.dat -P "$git_directory"/ if [ -f "$git_directory"/check_for_translation_work.sh ]; then cp "$git_directory"/check_for_translation_work.sh "$git_directory"/check_for_translation_work.sh_previous fi - wget -Nq http://gitweb.mageia.org/software/i18n/tools/plain/check_for_translation_work.sh "$git_directory"/ + wget -Nq http://gitweb.mageia.org/software/i18n/tools/plain/check_for_translation_work.sh -P "$git_directory"/ if [ -f "$git_directory"/check_for_translation_work.sh_previous ]; then diff -q "$git_directory"/check_for_translation_work.sh "$git_directory"/check_for_translation_work.sh_previous > /dev/null if [ $? -eq 1 ]; then # there are differences @@ -210,8 +210,8 @@ if [ -f "$git_directory"/translation_projects.dat ]; then else echo -e "\E[31m" echo "Please set check_updates=1 in your configuration file first or copy" - echo "translation_projects.dat into $git_directory/ before running this" - echo "script again." + echo "translation_projects.dat file manually into $git_directory/ before" + echo "running this script again." echo -e "\E[m" exit 2 fi -- cgit v1.2.1