aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcheck_for_translation_work.sh792
-rw-r--r--translation_projects.dat171
2 files changed, 482 insertions, 481 deletions
diff --git a/check_for_translation_work.sh b/check_for_translation_work.sh
index 2f1b3947..12eb76c6 100755
--- a/check_for_translation_work.sh
+++ b/check_for_translation_work.sh
@@ -7,16 +7,16 @@
#
# Filip Komar, 2012, 2013
# Remco Rijnders, 2012
-# $Id: check_for_translation_work.sh 2013-11-01 22:19:00 UTC filip $
+# $Id: check_for_translation_work.sh 2013-11-02 13:28:00 UTC filip $
#
# Please see git for a list of changes to this script.
#
# More information about this script is in README file.
if [ -f ~/.mageia-i18n-config ]; then
- source ~/.mageia-i18n-config
+ source ~/.mageia-i18n-config
else
- cat > ~/.mageia-i18n-config << "EOF"
+ cat > ~/.mageia-i18n-config << "EOF"
# Please change the below values to match your needs:
language_code=xx
@@ -102,44 +102,44 @@ color_for_differences=31
EOF
- echo -e "\E[31m"
- echo "This script has not been configured yet for you. A template"
- echo "configuration file named .mageia-i18n-config has been made in your"
- echo "home directory. Please edit it according to your needs and remember"
- echo "to create apropriate directories before running this script again."
- echo
- echo "For more information about this script please read README file."
- echo -e "\E[m"
- exit 1
+ echo -e "\E[31m"
+ echo "This script has not been configured yet for you. A template"
+ echo "configuration file named .mageia-i18n-config has been made in your"
+ echo "home directory. Please edit it according to your needs and remember"
+ echo "to create apropriate directories before running this script again."
+ echo
+ echo "For more information about this script please read README file."
+ echo -e "\E[m"
+ exit 1
fi
if [ -z "$git_directory" ]; then
- echo -e "\E[31m"
- echo "Please first set git_directory variable in your configuration file"
- echo "named .mageia-i18n-config in your home directory before running"
- echo "this script again."
- echo -e "\E[m"
- exit 2
+ echo -e "\E[31m"
+ echo "Please first set git_directory variable in your configuration file"
+ echo "named .mageia-i18n-config in your home directory before running"
+ echo "this script again."
+ echo -e "\E[m"
+ exit 2
fi
# save pwd to saved_dir
saved_dir=$(pwd)
if [ -f "$logfile"_this_run.log ]; then
- mv "$logfile"_this_run.log "$logfile"_previous_run.log
+ mv "$logfile"_this_run.log "$logfile"_previous_run.log
fi
separator="-----------------------------------------------------"
+# Check if directories exist and create them if not
if [ -z "$work_on_web_pages_translation" ]; then
- # Check if directories exist and create them if not
- if [ ! -d "$svn_directory" ]; then
- mkdir -vp "$svn_directory/" # | tee -a "$logfile"_this_run.log
- fi
+ if [ ! -d "$svn_directory" ]; then
+ mkdir -vp "$svn_directory/" # | tee -a "$logfile"_this_run.log
+ fi
fi
if [ ! -d "$git_directory" ]; then
- mkdir -vp "$git_directory/" # | tee -a "$logfile"_this_run.log
+ mkdir -vp "$git_directory/" # | tee -a "$logfile"_this_run.log
fi
if [ ! -d "$working_translations_directory" ]; then
- mkdir -vp "$working_translations_directory/" | tee -a "$logfile"_this_run.log
+ mkdir -vp "$working_translations_directory/" | tee -a "$logfile"_this_run.log
fi
echo "" | tee -a "$logfile"_this_run.log
@@ -147,26 +147,26 @@ date | tee -a "$logfile"_this_run.log
# Check if a newer version of this script is available. If yes, show the changes.
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"/
- 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"/
- 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
- echo -e "\E[33m"
- echo $separator | tee -a "$logfile"_this_run.log
- echo You are running an old revision of this script. You may consider updating. Changes are: | tee -a "$logfile"_this_run.log
- diff "$git_directory"/check_for_translation_work.sh "$git_directory"/check_for_translation_work.sh_previous | tee -a "$logfile".log
- echo -e "\E[m"
- echo "" | tee -a "$logfile"_this_run.log
- fi
- fi
- echo ""
+ 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"/
+ 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"/
+ 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
+ echo -e "\E[33m"
+ echo $separator | tee -a "$logfile"_this_run.log
+ echo You are running an old revision of this script. You may consider updating. Changes are: | tee -a "$logfile"_this_run.log
+ diff "$git_directory"/check_for_translation_work.sh "$git_directory"/check_for_translation_work.sh_previous | tee -a "$logfile".log
+ echo -e "\E[m"
+ echo "" | tee -a "$logfile"_this_run.log
+ fi
+ fi
+ echo ""
fi
declare -A git_addresses
@@ -175,14 +175,14 @@ declare -A translate_projects_desktop
declare -A translate_projects_help
declare -A web_pages
if [ -f "$git_directory"/translation_projects.dat ]; then
- source "$git_directory/translation_projects.dat"
+ source "$git_directory/translation_projects.dat"
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 -e "\E[m"
- exit 2
+ 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 -e "\E[m"
+ exit 2
fi
echo "LIST OF RESOURCES WITH FUZZY OR EMPTY STRINGS (in $language_code language)" > "$log_directory"/list_of_resources_for_translation.txt
@@ -193,20 +193,20 @@ echo "Clone / pull git repositories:" | tee -a "$logfile"_this_run.log
echo -e "\E[m"
for git_address in "${!git_addresses[@]}"
do
- echo $separator | tee -a "$logfile"_this_run.log
- if [ -d "$git_directory/$git_address" ]; then
- echo Pull git repository "${git_addresses[$git_address]}" to "$git_address". | tee -a "$logfile"_this_run.log
- cd "$git_directory/$git_address"
-# just echo $language_code.po or *.pot file line if they are updated
- git pull --stat --rebase | grep -E "$language_code.po$|.pot$|.desktop$|.html$" | tee -a "$logfile"_this_run.log
-# git diff --name-status ORIG_HEAD.. | grep -E "$language_code.po|[\.]pot"
- else
- echo Clone git repository "${git_addresses[$git_address]}" to "$git_address". | tee -a "$logfile"_this_run.log
- cd "$git_directory/"
-# echo "${git_addresses[$git_address]}" # debug
- git clone -q --single-branch mga:${git_addresses[$git_address]} $git_address | tee -a "$logfile"_this_run.log
-# cd "$git_directory/$git_address"
- fi
+ echo $separator | tee -a "$logfile"_this_run.log
+ if [ -d "$git_directory/$git_address" ]; then
+ echo Pull git repository "${git_addresses[$git_address]}" to "$git_address". | tee -a "$logfile"_this_run.log
+ cd "$git_directory/$git_address"
+# just echo $language_code.po or *.pot file line if they are updated
+ git pull --stat --rebase | grep -E "$language_code.po$|.pot$|.desktop$|.html$" | tee -a "$logfile"_this_run.log
+# git diff --name-status ORIG_HEAD.. | grep -E "$language_code.po|[\.]pot"
+ else
+ echo Clone git repository "${git_addresses[$git_address]}" to "$git_address". | tee -a "$logfile"_this_run.log
+ cd "$git_directory/"
+# echo "${git_addresses[$git_address]}" # debug
+ git clone -q --single-branch mga:${git_addresses[$git_address]} $git_address | tee -a "$logfile"_this_run.log
+# cd "$git_directory/$git_address"
+ fi
done
echo $separator | tee -a "$logfile"_this_run.log
@@ -218,194 +218,194 @@ echo "Po and pot files:" | tee -a "$logfile"_this_run.log
echo "Translate po files in working directories ($working_translations_directory/):" >> "$log_directory"/list_of_resources_for_translation.txt
echo -e "\E[m"
-# echo about checking the syntax of po file if required
+# echo about checking the syntax of po file if required
if [ $check_po_syntax -eq 1 ]; then
- echo "Syntax of $language_code.po in git will be tested."
+ echo "Syntax of $language_code.po in git will be tested."
fi
-# echo about copying the *.pot file and $language_code.po for editing in apropriate directory if required
+# echo about copying the *.pot file and $language_code.po for editing in apropriate directory if required
if [ $copying_po -eq 1 ]; then
- echo "Files *.pot and $language_code.po will be copied into apropriate directory."
+ echo "Files *.pot and $language_code.po will be copied into apropriate directory."
fi
for translate_project_name_po in "${!translate_projects_po[@]}"
do
- echo $separator | tee -a "$logfile"_this_run.log
- unexisted_po="no"
- translate_this="no"
- statistics_git_po=""
- statistics_wd_po=""
- pot_filename="*.pot"
- echo "Working on $language_code.po file in working translations directory: $translate_project_name_po and local git directory: ${translate_projects_po[$translate_project_name_po]}." | tee -a "$logfile"_this_run.log
- if [ ! -d "$git_directory/${translate_projects_po[$translate_project_name_po]}/" ]; then
- echo "Directory $git_directory/${translate_projects_po[$translate_project_name_po]}/ doesn't exist."
- echo "It seems that something wen't wrong in git clone operation. Other operations in $translate_project_name_po will be aborted."
- echo "All operations in $translate_project_name_po was aborted! Check script output or logs." >> "$log_directory"/list_of_resources_for_translation.txt
- continue
- else
- cd "$git_directory/${translate_projects_po[$translate_project_name_po]}/" # $translate_project_name_po"
- pot_filename=`ls *.pot`
- wip_po_filename="$pot_filename"_$language_code.po
- if [ $? -ne 0 ]; then
- echo "Pot file not found in $git_directory/${translate_projects_po[$translate_project_name_po]}/. Please report that on our mailing list." | tee -a "$logfile"_this_run.log
- fi
- fi
-
-# checking for fuzzy and untranslated strings in git $language_code.po
- if [ -f $language_code.po ]; then
- msgattrib $language_code.po --only-fuzzy --no-obsolete | grep . >> /dev/null
- if [ $? -eq 0 ]; then
- translate_this="yes"
- fi
- msgattrib $language_code.po --untranslated --no-obsolete | grep . >> /dev/null
- if [ $? -eq 0 ]; then
- translate_this="yes"
- fi
- else # $language_code.po not in git yet
- translate_this="yes"
- fi
- # creating statistics
- if [ -f $language_code.po ]; then
- statistics_git_po=`msgfmt --statistics --verbose $language_code.po -o /dev/null 2>&1 | tail -1`
- fi
- if [ -f $pot_filename ]; then
- statistics_git_pot=`msgfmt --statistics --verbose $pot_filename -o /dev/null 2>&1 | tail -1`
- fi
-
-# checking the syntax of po file from git if required
- if [ $check_po_syntax -eq 1 ]; then
- if [ -f $language_code.po ]; then
- msgfmt --statistics --verbose -c $language_code.po -o /dev/null 2>&1 | tee -a "$logfile"_this_run.log
- else # Automatic test is not possible.
- echo "File $language_code.po is not present yet in ${translate_projects_po[$translate_project_name_po]} for msgfmt test. Please translate it and commit & push it to git." | tee -a "$logfile"_this_run.log
- unexisted_po="yes"
- fi
-# checking the syntax of pot file from git if required
- if [ $check_pot_syntax -eq 1 ]; then
- if [ -f $pot_filename ]; then
- msgfmt -c $pot_filename -o /dev/null 2>&1 | tee -a "$logfile"_this_run.log
- else # Automatic test is not possible.
- echo "File *.pot is not present in ${translate_projects_po[$translate_project_name_po]}. Please report that on our mailing list." | tee -a "$logfile"_this_run.log
- fi
- fi
- fi
-
-# copying the *.pot file and $language_code.po for editing in working directory if required
- if [ $copying_po -eq 1 ]; then
- if [ ! -d "$working_translations_directory/$translate_project_name_po/" ]; then
- mkdir -vp "$working_translations_directory/$translate_project_name_po/" | tee -a "$logfile"_this_run.log
- fi
- if [ "$unexisted_po" != "yes" ]; then
-# testing for differences of *.po file from git and working copy
- if [ -f "$working_translations_directory/$translate_project_name_po/$language_code.po" ]; then
- diff -q "$git_directory/${translate_projects_po[$translate_project_name_po]}/"$language_code.po "$working_translations_directory/$translate_project_name_po/$language_code.po" | tee -a "$logfile"_this_run.log
- fi
- cp $copy_options $language_code.po "$working_translations_directory/$translate_project_name_po/" | tee -a "$logfile"_this_run.log
- else
-# echo "File $language_code.po is not present yet in ${translate_projects_po[$translate_project_name_po]}. Copying to working directory is not possible." | tee -a "$logfile"_this_run.log
- echo -n # nop
- fi
- if [ -f $pot_filename ]; then
-# testing for differences of *.pot file from git and working copy
- if [ -f "$working_translations_directory/$translate_project_name_po/$pot_filename" ]; then
- diff -q "$git_directory/${translate_projects_po[$translate_project_name_po]}/$pot_filename" "$working_translations_directory/$translate_project_name_po/$pot_filename" | tee -a "$logfile"_this_run.log
- fi
- cp $copy_options $pot_filename "$working_translations_directory/$translate_project_name_po/" | tee -a "$logfile"_this_run.log
- cd "$working_translations_directory/$translate_project_name_po/"
-# rm sl.po # debug
- if [ -f "$working_translations_directory/$translate_project_name_po/$wip_po_filename" ]; then
-# creating new_pot_lang.po from latest *.pot file
- msgmerge -q $wip_po_filename $pot_filename > new_pot_$language_code.po | tee -a "$logfile"_this_run.log # || rm new_pot_$language_code.po # msgmerge *.pot_lang.po *.pot > new_pot_lang.po
- if [ ${PIPESTATUS[0]} -ne 0 ]; then
- msgfmt -c "$git_directory/${translate_projects_po[$translate_project_name_po]}/$pot_filename" -o /dev/null
- if [ ${PIPESTATUS[0]} -ne 0 ]; then
- echo Test with msgfmt -c discovered a problem with "$git_directory/${translate_projects_po[$translate_project_name_po]}/$pot_filename" file. | tee -a "$logfile"_this_run.log
- echo Please report on our mailing list that msgfmt -c test has a problem with "$translate_project_name_po/$pot_filename" file. >> "$log_directory"/list_of_resources_for_translation.txt
- fi
- msgfmt -c "$git_directory/${translate_projects_po[$translate_project_name_po]}/"$language_code.po -o /dev/null
- if [ ${PIPESTATUS[0]} -ne 0 ]; then
- echo Test with msgfmt -c discovered a problem with "$git_directory/${translate_projects_po[$translate_project_name_po]}/"$language_code.po file. | tee -a "$logfile"_this_run.log
- echo Test with msgfmt -c discovered a problem with $language_code.po file. Check script output or logs. >> "$log_directory"/list_of_resources_for_translation.txt
- fi
- rm new_pot_$language_code.po # remove it as it's no good anyway
- fi
-# comparing new_pot_lang.po from working copy
- if [ -f new_pot_$language_code.po ]; then
- statistics_wd_po=`msgfmt --statistics --verbose new_pot_$language_code.po -o /dev/null 2>&1 | tail -1`
- # checking for fuzzy and untranslated strings in fresh new_pot_$language_code.po
- msgattrib new_pot_$language_code.po --only-fuzzy --no-obsolete 2>&1 | grep . >> /dev/null
- if [ $? -eq 0 ]; then
- translate_this="yes"
- fi
- msgattrib new_pot_$language_code.po --untranslated --no-obsolete 2>&1 | grep . >> /dev/null
- if [ $? -eq 0 ]; then
- translate_this="yes"
- fi
- diff -q $wip_po_filename new_pot_$language_code.po >> /dev/null #| tee -a "$logfile"_this_run.log
-# diff -q $language_code.po new_pot_$language_code.po | tee -a "$logfile"_this_run.log
- diff_exit_status_1=${PIPESTATUS[0]} # this reads and remembers exit status of first command in pipe (diff in this case)
-# if [ $? -eq 0 ]; then
- if [ $diff_exit_status_1 -eq 0 ]; then # no differences
- rm new_pot_$language_code.po # remove resulting file
-# echo There are no differences between $wip_po_filename and new_pot_$language_code.po. # debug
- else
- if [ $diff_exit_status_1 -eq 1 ]; then # there are differences
- echo Replace existing file $wip_po_filename with new_pot_$language_code.po in working directory $translate_project_name_po since they differ. | tee -a "$logfile"_this_run.log
- else
- echo There was an error in diff between $wip_po_filename and new_pot_$language_code.po in working directory $translate_project_name_po.
- fi
- fi
- else
-# echo There is no new_pot_$language_code.po. # debug
- echo -n # nop
- fi
-# comparing git lang.po from working copy lang.po
- if [ -f $language_code.po ]; then
- diff -q $wip_po_filename $language_code.po | tee -a "$logfile"_this_run.log
- diff_exit_status_2=${PIPESTATUS[0]} # this reads and remembers exit status of first command in pipe (diff in this case)
- # if [ $? -eq 0 ]; then
- if [ $diff_exit_status_2 -eq 1 ]; then # there are differences
- echo New commit will be needed when the file $wip_po_filename will be ready in working directory $translate_project_name_po. | tee -a "$logfile"_this_run.log
- else
- if [ $diff_exit_status_2 -eq 2 ]; then # there was an error
- echo There was an error in diff between file $wip_po_filename and $language_code.po in working directory $translate_project_name_po.
- fi
- fi
- fi
- else
- if [ "$unexisted_po" != "yes" ]; then
- echo "File $wip_po_filename is not present in working directory $translate_project_name_po. Comparing is not possible." | tee -a "$logfile"_this_run.log
- fi
- if [ -z "$create_a_working_copy_of_po_file" ]; then
- if [ "$unexisted_po" != "yes" ]; then
- cp $copy_options $language_code.po $wip_po_filename | tee -a "$logfile"_this_run.log
- echo "File $language_code.po in working directory $translate_project_name_po copied to $wip_po_filename." | tee -a "$logfile"_this_run.log
- else
- cp $copy_options $pot_filename $wip_po_filename | tee -a "$logfile"_this_run.log
- echo "Template file $pot_filename in working directory $translate_project_name_po copied to $wip_po_filename." | tee -a "$logfile"_this_run.log
- fi
- fi
- fi
- else
- echo "File $pot_filename is not present in ${translate_projects_po[$translate_project_name_po]}. Copying is not possible." | tee -a "$logfile"_this_run.log
- fi
-# echo "Files *.pot and $language_code.po copied into $working_translations_directory/$translate_project_name_po/."
- fi
- if [ -n "$statistics_wd_po" ]; then
- statistics_po=$statistics_wd_po
- else
- statistics_po=$statistics_git_po
- fi
- if [ -n "$statistics_po" ]; then
- statistics=$statistics_po
- else
- statistics=$statistics_git_pot
- fi
- if [ "$translate_this" = "yes" ]; then
- echo $translate_project_name_po, $statistics >> "$log_directory"/list_of_resources_for_translation.txt
- fi
-# cd "$git_directory/"
-# echo "" | tee -a "$logfile"_this_run.log
+ echo $separator | tee -a "$logfile"_this_run.log
+ unexisted_po="no"
+ translate_this="no"
+ statistics_git_po=""
+ statistics_wd_po=""
+ pot_filename="*.pot"
+ echo "Working on $language_code.po file in working translations directory: $translate_project_name_po and local git directory: ${translate_projects_po[$translate_project_name_po]}." | tee -a "$logfile"_this_run.log
+ if [ ! -d "$git_directory/${translate_projects_po[$translate_project_name_po]}/" ]; then
+ echo "Directory $git_directory/${translate_projects_po[$translate_project_name_po]}/ doesn't exist."
+ echo "It seems that something wen't wrong in git clone operation. Other operations in $translate_project_name_po will be aborted."
+ echo "All operations in $translate_project_name_po was aborted! Check script output or logs." >> "$log_directory"/list_of_resources_for_translation.txt
+ continue
+ else
+ cd "$git_directory/${translate_projects_po[$translate_project_name_po]}/" # $translate_project_name_po"
+ pot_filename=`ls *.pot`
+ wip_po_filename="$pot_filename"_$language_code.po
+ if [ $? -ne 0 ]; then
+ echo "Pot file not found in $git_directory/${translate_projects_po[$translate_project_name_po]}/. Please report that on our mailing list." | tee -a "$logfile"_this_run.log
+ fi
+ fi
+
+# checking for fuzzy and untranslated strings in git $language_code.po
+ if [ -f $language_code.po ]; then
+ msgattrib $language_code.po --only-fuzzy --no-obsolete | grep . >> /dev/null
+ if [ $? -eq 0 ]; then
+ translate_this="yes"
+ fi
+ msgattrib $language_code.po --untranslated --no-obsolete | grep . >> /dev/null
+ if [ $? -eq 0 ]; then
+ translate_this="yes"
+ fi
+ else # $language_code.po not in git yet
+ translate_this="yes"
+ fi
+# creating statistics
+ if [ -f $language_code.po ]; then
+ statistics_git_po=`msgfmt --statistics --verbose $language_code.po -o /dev/null 2>&1 | tail -1`
+ fi
+ if [ -f $pot_filename ]; then
+ statistics_git_pot=`msgfmt --statistics --verbose $pot_filename -o /dev/null 2>&1 | tail -1`
+ fi
+
+# checking the syntax of po file from git if required
+ if [ $check_po_syntax -eq 1 ]; then
+ if [ -f $language_code.po ]; then
+ msgfmt --statistics --verbose -c $language_code.po -o /dev/null 2>&1 | tee -a "$logfile"_this_run.log
+ else # Automatic test is not possible.
+ echo "File $language_code.po is not present yet in ${translate_projects_po[$translate_project_name_po]} for msgfmt test. Please translate it and commit & push it to git." | tee -a "$logfile"_this_run.log
+ unexisted_po="yes"
+ fi
+# checking the syntax of pot file from git if required
+ if [ $check_pot_syntax -eq 1 ]; then
+ if [ -f $pot_filename ]; then
+ msgfmt -c $pot_filename -o /dev/null 2>&1 | tee -a "$logfile"_this_run.log
+ else # Automatic test is not possible.
+ echo "File *.pot is not present in ${translate_projects_po[$translate_project_name_po]}. Please report that on our mailing list." | tee -a "$logfile"_this_run.log
+ fi
+ fi
+ fi
+
+# copying the *.pot file and $language_code.po for editing in working directory if required
+ if [ $copying_po -eq 1 ]; then
+ if [ ! -d "$working_translations_directory/$translate_project_name_po/" ]; then
+ mkdir -vp "$working_translations_directory/$translate_project_name_po/" | tee -a "$logfile"_this_run.log
+ fi
+ if [ "$unexisted_po" != "yes" ]; then
+# testing for differences of *.po file from git and working copy
+ if [ -f "$working_translations_directory/$translate_project_name_po/$language_code.po" ]; then
+ diff -q "$git_directory/${translate_projects_po[$translate_project_name_po]}/"$language_code.po "$working_translations_directory/$translate_project_name_po/$language_code.po" | tee -a "$logfile"_this_run.log
+ fi
+ cp $copy_options $language_code.po "$working_translations_directory/$translate_project_name_po/" | tee -a "$logfile"_this_run.log
+ else
+# echo "File $language_code.po is not present yet in ${translate_projects_po[$translate_project_name_po]}. Copying to working directory is not possible." | tee -a "$logfile"_this_run.log
+ echo -n # nop
+ fi
+ if [ -f $pot_filename ]; then
+# testing for differences of *.pot file from git and working copy
+ if [ -f "$working_translations_directory/$translate_project_name_po/$pot_filename" ]; then
+ diff -q "$git_directory/${translate_projects_po[$translate_project_name_po]}/$pot_filename" "$working_translations_directory/$translate_project_name_po/$pot_filename" | tee -a "$logfile"_this_run.log
+ fi
+ cp $copy_options $pot_filename "$working_translations_directory/$translate_project_name_po/" | tee -a "$logfile"_this_run.log
+ cd "$working_translations_directory/$translate_project_name_po/"
+# rm sl.po # debug
+ if [ -f "$working_translations_directory/$translate_project_name_po/$wip_po_filename" ]; then
+# creating new_pot_lang.po from latest *.pot file
+ msgmerge -q $wip_po_filename $pot_filename > new_pot_$language_code.po | tee -a "$logfile"_this_run.log # || rm new_pot_$language_code.po # msgmerge *.pot_lang.po *.pot > new_pot_lang.po
+ if [ ${PIPESTATUS[0]} -ne 0 ]; then
+ msgfmt -c "$git_directory/${translate_projects_po[$translate_project_name_po]}/$pot_filename" -o /dev/null
+ if [ ${PIPESTATUS[0]} -ne 0 ]; then
+ echo Test with msgfmt -c discovered a problem with "$git_directory/${translate_projects_po[$translate_project_name_po]}/$pot_filename" file. | tee -a "$logfile"_this_run.log
+ echo Please report on our mailing list that msgfmt -c test has a problem with "$translate_project_name_po/$pot_filename" file. >> "$log_directory"/list_of_resources_for_translation.txt
+ fi
+ msgfmt -c "$git_directory/${translate_projects_po[$translate_project_name_po]}/"$language_code.po -o /dev/null
+ if [ ${PIPESTATUS[0]} -ne 0 ]; then
+ echo Test with msgfmt -c discovered a problem with "$git_directory/${translate_projects_po[$translate_project_name_po]}/"$language_code.po file. | tee -a "$logfile"_this_run.log
+ echo Test with msgfmt -c discovered a problem with $language_code.po file. Check script output or logs. >> "$log_directory"/list_of_resources_for_translation.txt
+ fi
+ rm new_pot_$language_code.po # remove it as it's no good anyway
+ fi
+# comparing new_pot_lang.po from working copy
+ if [ -f new_pot_$language_code.po ]; then
+ statistics_wd_po=`msgfmt --statistics --verbose new_pot_$language_code.po -o /dev/null 2>&1 | tail -1`
+# checking for fuzzy and untranslated strings in fresh new_pot_$language_code.po
+ msgattrib new_pot_$language_code.po --only-fuzzy --no-obsolete 2>&1 | grep . >> /dev/null
+ if [ $? -eq 0 ]; then
+ translate_this="yes"
+ fi
+ msgattrib new_pot_$language_code.po --untranslated --no-obsolete 2>&1 | grep . >> /dev/null
+ if [ $? -eq 0 ]; then
+ translate_this="yes"
+ fi
+ diff -q $wip_po_filename new_pot_$language_code.po >> /dev/null #| tee -a "$logfile"_this_run.log
+# diff -q $language_code.po new_pot_$language_code.po | tee -a "$logfile"_this_run.log
+ diff_exit_status_1=${PIPESTATUS[0]} # this reads and remembers exit status of first command in pipe (diff in this case)
+# if [ $? -eq 0 ]; then
+ if [ $diff_exit_status_1 -eq 0 ]; then # no differences
+ rm new_pot_$language_code.po # remove resulting file
+# echo There are no differences between $wip_po_filename and new_pot_$language_code.po. # debug
+ else
+ if [ $diff_exit_status_1 -eq 1 ]; then # there are differences
+ echo Replace existing file $wip_po_filename with new_pot_$language_code.po in working directory $translate_project_name_po since they differ. | tee -a "$logfile"_this_run.log
+ else
+ echo There was an error in diff between $wip_po_filename and new_pot_$language_code.po in working directory $translate_project_name_po.
+ fi
+ fi
+ else
+# echo There is no new_pot_$language_code.po. # debug
+ echo -n # nop
+ fi
+# comparing git lang.po from working copy lang.po
+ if [ -f $language_code.po ]; then
+ diff -q $wip_po_filename $language_code.po | tee -a "$logfile"_this_run.log
+ diff_exit_status_2=${PIPESTATUS[0]} # this reads and remembers exit status of first command in pipe (diff in this case)
+# if [ $? -eq 0 ]; then
+ if [ $diff_exit_status_2 -eq 1 ]; then # there are differences
+ echo New commit will be needed when the file $wip_po_filename will be ready in working directory $translate_project_name_po. | tee -a "$logfile"_this_run.log
+ else
+ if [ $diff_exit_status_2 -eq 2 ]; then # there was an error
+ echo There was an error in diff between file $wip_po_filename and $language_code.po in working directory $translate_project_name_po.
+ fi
+ fi
+ fi
+ else
+ if [ "$unexisted_po" != "yes" ]; then
+ echo "File $wip_po_filename is not present in working directory $translate_project_name_po. Comparing is not possible." | tee -a "$logfile"_this_run.log
+ fi
+ if [ -z "$create_a_working_copy_of_po_file" ]; then
+ if [ "$unexisted_po" != "yes" ]; then
+ cp $copy_options $language_code.po $wip_po_filename | tee -a "$logfile"_this_run.log
+ echo "File $language_code.po in working directory $translate_project_name_po copied to $wip_po_filename." | tee -a "$logfile"_this_run.log
+ else
+ cp $copy_options $pot_filename $wip_po_filename | tee -a "$logfile"_this_run.log
+ echo "Template file $pot_filename in working directory $translate_project_name_po copied to $wip_po_filename." | tee -a "$logfile"_this_run.log
+ fi
+ fi
+ fi
+ else
+ echo "File $pot_filename is not present in ${translate_projects_po[$translate_project_name_po]}. Copying is not possible." | tee -a "$logfile"_this_run.log
+ fi
+# echo "Files *.pot and $language_code.po copied into $working_translations_directory/$translate_project_name_po/."
+ fi
+ if [ -n "$statistics_wd_po" ]; then
+ statistics_po=$statistics_wd_po
+ else
+ statistics_po=$statistics_git_po
+ fi
+ if [ -n "$statistics_po" ]; then
+ statistics=$statistics_po
+ else
+ statistics=$statistics_git_pot
+ fi
+ if [ "$translate_this" = "yes" ]; then
+ echo $translate_project_name_po, $statistics >> "$log_directory"/list_of_resources_for_translation.txt
+ fi
+# cd "$git_directory/"
+# echo "" | tee -a "$logfile"_this_run.log
done
echo "" | tee -a "$logfile"_this_run.log
@@ -416,154 +416,154 @@ echo "Translate *.desktop files in working directories ($working_translations_di
echo -e "\E[m"
for translate_project_name_desktop in "${!translate_projects_desktop[@]}"
do
- if [ ! -f "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" ]; then
- echo "File $git_directory/${translate_projects_desktop[$translate_project_name_desktop]} doesn't exist."
- echo "It seems that something wen't wrong in git clone operation. Other operations in $translate_project_name_desktop will be aborted."
- echo "All operations in $translate_project_name_desktop was aborted! Check script output or logs." >> "$log_directory"/list_of_resources_for_translation.txt
- continue
- fi
- echo $separator | tee -a "$logfile"_this_run.log
- copy_this_desktop_file="no"
- untranslated_name="Name, "
- untranslated_comment="Comment,"
- echo "Working on *.desktop file in working translations directory: $translate_project_name_desktop and local git directory: ${translate_projects_desktop[$translate_project_name_desktop]}." | tee -a "$logfile"_this_run.log
-# cd "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}/" # $translate_project_name_desktop"
- names_and_comments=`cat "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" #| grep -E "^Name=|^Name\[$language_code\]=|^Comment=|^Comment\[$language_code\]="`
-# echo names_and_comments: "$names_and_comments" # debug
- eng_name=`echo "$names_and_comments" | grep -E "^Name=" | sed 's/^Name=//'`
- lang_name=`echo "$names_and_comments" | grep -E "^Name\[$language_code\]=" | sed 's/^Name\['$language_code'\]=//'`
- eng_comment=`echo "$names_and_comments" | grep -E "^Comment=" | sed 's/^Comment=//'`
- lang_comment=`echo "$names_and_comments" | grep -E "^Comment\[$language_code\]=" | sed 's/^Comment\['$language_code'\]=//'`
-
- if [ -n "$eng_name" ]; then # Name string present in original desktop file
- if [ -n "$lang_name" ]; then # Name string present in your language
- if [ "$lang_name" != "$eng_name" ]; then # both strings differ
-# echo Name string \"$eng_name\" present in $language_code language: \"$lang_name\" # debug
-# echo -n # nop
- untranslated_name=""
- else # both strings are equal
- copy_this_desktop_file="yes"
- echo Name string \"$eng_name\" in $language_code language present but untranslated | tee -a "$logfile"_this_run.log
- fi
- else # Name string not present in your language
- copy_this_desktop_file="yes"
- echo Name string \"$eng_name\" not present in $language_code language | tee -a "$logfile"_this_run.log
- fi
- fi
- if [ -n "$eng_comment" ]; then # Comment string present in original desktop file
- if [ -n "$lang_comment" ]; then # Comment string present in your language
- if [ "$lang_comment" != "$eng_comment" ]; then # both strings differ
-# echo Comment string \"$eng_comment\" in $language_code language present: \"$lang_comment\" # debug
-# echo -n # nop
- untranslated_comment=""
- else # both strings are equal
- copy_this_desktop_file="yes"
- echo Comment string \"$eng_comment\" in $language_code language present but untranslated | tee -a "$logfile"_this_run.log
- fi
- else # Comment string not present in your language
- copy_this_desktop_file="yes"
- echo Comment string \"$eng_comment\" not present in $language_code language | tee -a "$logfile"_this_run.log
- fi
- fi
-
-# copying the *.desktop file for editing in working directory if required
- if [ -z $copying_desktop_files ]; then
- if [ "$copy_this_desktop_file" = "yes" ]; then
- if [ ! -d "$working_translations_directory/desktop/$translate_project_name_desktop/" ]; then
- mkdir -vp "$working_translations_directory/desktop/$translate_project_name_desktop/" | tee -a "$logfile"_this_run.log
- fi
- cp $copy_options "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" "$working_translations_directory/desktop/$translate_project_name_desktop/" | tee -a "$logfile"_this_run.log
- fi
- fi
- if [ "$copy_this_desktop_file" = "yes" ]; then
- echo $translate_project_name_desktop, untranslated line: $untranslated_name $untranslated_comment >> "$log_directory"/list_of_resources_for_translation.txt
- fi
+ if [ ! -f "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" ]; then
+ echo "File $git_directory/${translate_projects_desktop[$translate_project_name_desktop]} doesn't exist."
+ echo "It seems that something wen't wrong in git clone operation. Other operations in $translate_project_name_desktop will be aborted."
+ echo "All operations in $translate_project_name_desktop was aborted! Check script output or logs." >> "$log_directory"/list_of_resources_for_translation.txt
+ continue
+ fi
+ echo $separator | tee -a "$logfile"_this_run.log
+ copy_this_desktop_file="no"
+ untranslated_name="Name, "
+ untranslated_comment="Comment,"
+ echo "Working on *.desktop file in working translations directory: $translate_project_name_desktop and local git directory: ${translate_projects_desktop[$translate_project_name_desktop]}." | tee -a "$logfile"_this_run.log
+# cd "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}/" # $translate_project_name_desktop"
+ names_and_comments=`cat "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" #| grep -E "^Name=|^Name\[$language_code\]=|^Comment=|^Comment\[$language_code\]="`
+# echo names_and_comments: "$names_and_comments" # debug
+ eng_name=`echo "$names_and_comments" | grep -E "^Name=" | sed 's/^Name=//'`
+ lang_name=`echo "$names_and_comments" | grep -E "^Name\[$language_code\]=" | sed 's/^Name\['$language_code'\]=//'`
+ eng_comment=`echo "$names_and_comments" | grep -E "^Comment=" | sed 's/^Comment=//'`
+ lang_comment=`echo "$names_and_comments" | grep -E "^Comment\[$language_code\]=" | sed 's/^Comment\['$language_code'\]=//'`
+
+ if [ -n "$eng_name" ]; then # Name string present in original desktop file
+ if [ -n "$lang_name" ]; then # Name string present in your language
+ if [ "$lang_name" != "$eng_name" ]; then # both strings differ
+# echo Name string \"$eng_name\" present in $language_code language: \"$lang_name\" # debug
+# echo -n # nop
+ untranslated_name=""
+ else # both strings are equal
+ copy_this_desktop_file="yes"
+ echo Name string \"$eng_name\" in $language_code language present but untranslated | tee -a "$logfile"_this_run.log
+ fi
+ else # Name string not present in your language
+ copy_this_desktop_file="yes"
+ echo Name string \"$eng_name\" not present in $language_code language | tee -a "$logfile"_this_run.log
+ fi
+ fi
+ if [ -n "$eng_comment" ]; then # Comment string present in original desktop file
+ if [ -n "$lang_comment" ]; then # Comment string present in your language
+ if [ "$lang_comment" != "$eng_comment" ]; then # both strings differ
+# echo Comment string \"$eng_comment\" in $language_code language present: \"$lang_comment\" # debug
+# echo -n # nop
+ untranslated_comment=""
+ else # both strings are equal
+ copy_this_desktop_file="yes"
+ echo Comment string \"$eng_comment\" in $language_code language present but untranslated | tee -a "$logfile"_this_run.log
+ fi
+ else # Comment string not present in your language
+ copy_this_desktop_file="yes"
+ echo Comment string \"$eng_comment\" not present in $language_code language | tee -a "$logfile"_this_run.log
+ fi
+ fi
+
+# copying the *.desktop file for editing in working directory if required
+ if [ -z $copying_desktop_files ]; then
+ if [ "$copy_this_desktop_file" = "yes" ]; then
+ if [ ! -d "$working_translations_directory/desktop/$translate_project_name_desktop/" ]; then
+ mkdir -vp "$working_translations_directory/desktop/$translate_project_name_desktop/" | tee -a "$logfile"_this_run.log
+ fi
+ cp $copy_options "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" "$working_translations_directory/desktop/$translate_project_name_desktop/" | tee -a "$logfile"_this_run.log
+ fi
+ fi
+ if [ "$copy_this_desktop_file" = "yes" ]; then
+ echo $translate_project_name_desktop, untranslated line: $untranslated_name $untranslated_comment >> "$log_directory"/list_of_resources_for_translation.txt
+ fi
done
if [ -z "$work_on_web_pages_translation" ]; then
- # Check out / update web_page files
- echo -e "\E[32m"
- echo "Check out / update web page files:" | tee -a "$logfile"_this_run.log
- echo "" >> "$log_directory"/list_of_resources_for_translation.txt
- echo "Please check http://www.mageia.org/langs/report.php for details about translation of web page files in $language_code language." >> "$log_directory"/list_of_resources_for_translation.txt
- echo -e "\E[m"
- for web_page_name in "${!web_pages[@]}"
- do
- echo $separator | tee -a "$logfile"_this_run.log
- echo Working on: "$web_page_name" from "${web_pages[$web_page_name]}". | tee -a "$logfile"_this_run.log # \'
- if [ -d "$svn_directory/$web_page_name/" ]; then
- cd "$svn_directory/$web_page_name/"
- # just echo $language_code.lang or *.php file line if they are updated
- svn up | grep -E "$language_code.lang|en.lang|.php" | tee -a "$logfile"_this_run.log
- # echo -n "" # debug
- else
- cd "$svn_directory/"
- # just echo $language_code.lang or *.php file line if they are updated
- svn co $svn_method${web_pages[$web_page_name]} $web_page_name | grep -E "$language_code.lang|en.lang|.php" | tee -a "$logfile"_this_run.log
- echo -n "" | tee -a "$logfile"_this_run.log
- cd "$svn_directory/$web_page_name/"
- fi
- # echo "" | tee -a "$logfile"_this_run.log
- done
-
-
- #copying the english files and $language_code.lang files for editing in working directory if required
- if [ $copying_wp -eq 1 ]; then
- echo $separator | tee -a "$logfile"_this_run.log
- echo -e "\E[32m"
- echo "Web files will be copied (updated) into working translations directory."
- echo -e "\E[m"
- cd "$svn_directory/"
-
- if [ ! -d "$working_translations_directory/web_pages_lang/en/" ]; then
- mkdir -vp "$working_translations_directory/web_pages_lang/en/" | tee -a "$logfile"_this_run.log
- fi
- cp $copy_options ./web_pages_lang/en/* "$working_translations_directory/web_pages_lang/en/" | tee -a "$logfile"_this_run.log
- if [ ! -d "$working_translations_directory/web_pages_lang/$language_code/" ]; then
- mkdir -vp "$working_translations_directory/web_pages_lang/$language_code/" | tee -a "$logfile"_this_run.log
- fi
- cp $copy_options ./web_pages_lang/$language_code/* "$working_translations_directory/web_pages_lang/$language_code/" | tee -a "$logfile"_this_run.log
- if [ ! -d "$working_translations_directory/web_page_navigation/" ]; then
- mkdir -vp "$working_translations_directory/web_page_navigation/" | tee -a "$logfile"_this_run.log
- fi
- cp $copy_options ./web_page_navigation/en.lang "$working_translations_directory/web_page_navigation/" | tee -a "$logfile"_this_run.log
- cp $copy_options ./web_page_navigation/$language_code.lang "$working_translations_directory/web_page_navigation/" | tee -a "$logfile"_this_run.log
- fi
-
- if [ -d "$svn_directory/web_page_navigation/" ]; then
- if [ -d "$svn_directory/web_page_navigation_2/" ]; then
- diff -rq "$svn_directory/web_page_navigation" "$svn_directory/web_page_navigation_2" | grep -E ".lang" | tee -a "$logfile"_this_run.log
- else
- echo "Both navigation directories ($svn_directory/web_page_navigation and $svn_directory/web_page_navigation_2) are not present. Comparing is not possible." | tee -a "$logfile"_this_run.log
- fi
- else
- echo "Both navigation directories ($svn_directory/web_page_navigation and $svn_directory/web_page_navigation_2) are not present. Comparing is not possible." | tee -a "$logfile"_this_run.log
- fi
- echo "" | tee -a "$logfile"_this_run.log
+# Check out / update web_page files
+ echo -e "\E[32m"
+ echo "Check out / update web page files:" | tee -a "$logfile"_this_run.log
+ echo "" >> "$log_directory"/list_of_resources_for_translation.txt
+ echo "Please check http://www.mageia.org/langs/report.php for details about translation of web page files in $language_code language." >> "$log_directory"/list_of_resources_for_translation.txt
+ echo -e "\E[m"
+ for web_page_name in "${!web_pages[@]}"
+ do
+ echo $separator | tee -a "$logfile"_this_run.log
+ echo Working on: "$web_page_name" from "${web_pages[$web_page_name]}". | tee -a "$logfile"_this_run.log # \'
+ if [ -d "$svn_directory/$web_page_name/" ]; then
+ cd "$svn_directory/$web_page_name/"
+# just echo $language_code.lang or *.php file line if they are updated
+ svn up | grep -E "$language_code.lang|en.lang|.php" | tee -a "$logfile"_this_run.log
+# echo -n "" # debug
+ else
+ cd "$svn_directory/"
+# just echo $language_code.lang or *.php file line if they are updated
+ svn co $svn_method${web_pages[$web_page_name]} $web_page_name | grep -E "$language_code.lang|en.lang|.php" | tee -a "$logfile"_this_run.log
+ echo -n "" | tee -a "$logfile"_this_run.log
+ cd "$svn_directory/$web_page_name/"
+ fi
+# echo "" | tee -a "$logfile"_this_run.log
+ done
+
+
+# copying the english files and $language_code.lang files for editing in working directory if required
+ if [ $copying_wp -eq 1 ]; then
+ echo $separator | tee -a "$logfile"_this_run.log
+ echo -e "\E[32m"
+ echo "Web files will be copied (updated) into working translations directory."
+ echo -e "\E[m"
+ cd "$svn_directory/"
+
+ if [ ! -d "$working_translations_directory/web_pages_lang/en/" ]; then
+ mkdir -vp "$working_translations_directory/web_pages_lang/en/" | tee -a "$logfile"_this_run.log
+ fi
+ cp $copy_options ./web_pages_lang/en/* "$working_translations_directory/web_pages_lang/en/" | tee -a "$logfile"_this_run.log
+ if [ ! -d "$working_translations_directory/web_pages_lang/$language_code/" ]; then
+ mkdir -vp "$working_translations_directory/web_pages_lang/$language_code/" | tee -a "$logfile"_this_run.log
+ fi
+ cp $copy_options ./web_pages_lang/$language_code/* "$working_translations_directory/web_pages_lang/$language_code/" | tee -a "$logfile"_this_run.log
+ if [ ! -d "$working_translations_directory/web_page_navigation/" ]; then
+ mkdir -vp "$working_translations_directory/web_page_navigation/" | tee -a "$logfile"_this_run.log
+ fi
+ cp $copy_options ./web_page_navigation/en.lang "$working_translations_directory/web_page_navigation/" | tee -a "$logfile"_this_run.log
+ cp $copy_options ./web_page_navigation/$language_code.lang "$working_translations_directory/web_page_navigation/" | tee -a "$logfile"_this_run.log
+ fi
+
+ if [ -d "$svn_directory/web_page_navigation/" ]; then
+ if [ -d "$svn_directory/web_page_navigation_2/" ]; then
+ diff -rq "$svn_directory/web_page_navigation" "$svn_directory/web_page_navigation_2" | grep -E ".lang" | tee -a "$logfile"_this_run.log
+ else
+ echo "Both navigation directories ($svn_directory/web_page_navigation and $svn_directory/web_page_navigation_2) are not present. Comparing is not possible." | tee -a "$logfile"_this_run.log
+ fi
+ else
+ echo "Both navigation directories ($svn_directory/web_page_navigation and $svn_directory/web_page_navigation_2) are not present. Comparing is not possible." | tee -a "$logfile"_this_run.log
+ fi
+ echo "" | tee -a "$logfile"_this_run.log
fi
cd "$git_directory/"
##################################### TODO START change searching for new *.pot files and other resources in git
if [ $searching_for_new_pot_files_in_svn -eq 1 ]; then
- if [ "when_this_works_on_git" = "true" ]; then
- echo $separator | tee -a "$logfile"_this_run.log
- echo -e "\E[32m"
- echo "Searching for new *.pot files in svn." | tee -a "$logfile"_this_run.log
- echo -e "\E[m"
- if [ -f "$log_directory"/new_svn_list_of_pot_files ]; then
- mv "$log_directory"/new_svn_list_of_pot_files "$log_directory"/old_svn_list_of_pot_files # -f
- fi
- svn list -R svn://svn.mageia.org/svn/soft/ > "$log_directory"/svn_list
- cat "$log_directory"/svn_list | grep [\.]pot > "$log_directory"/new_svn_list_of_pot_files
- # svn list -R svn://svn.mageia.org/svn/soft/ | grep [\.]pot > new_svn_list_of_pot_files
- if [ -f "$log_directory"/old_svn_list_of_pot_files ]; then
- diff new_svn_list_of_pot_files old_svn_list_of_pot_files | tee -a "$logfile"_this_run.log
- if [ ${PIPESTATUS[0]} -eq 0 ]; then # this reads exit status of first command in pipe
- echo "No new *.pot files found." | tee -a "$logfile"_this_run.log
- fi
- fi
- echo "" | tee -a "$logfile"_this_run.log
- fi
+ if [ "when_this_works_on_git" = "true" ]; then
+ echo $separator | tee -a "$logfile"_this_run.log
+ echo -e "\E[32m"
+ echo "Searching for new *.pot files in svn." | tee -a "$logfile"_this_run.log
+ echo -e "\E[m"
+ if [ -f "$log_directory"/new_svn_list_of_pot_files ]; then
+ mv "$log_directory"/new_svn_list_of_pot_files "$log_directory"/old_svn_list_of_pot_files # -f
+ fi
+ svn list -R svn://svn.mageia.org/svn/soft/ > "$log_directory"/svn_list
+ cat "$log_directory"/svn_list | grep [\.]pot > "$log_directory"/new_svn_list_of_pot_files
+# svn list -R svn://svn.mageia.org/svn/soft/ | grep [\.]pot > new_svn_list_of_pot_files
+ if [ -f "$log_directory"/old_svn_list_of_pot_files ]; then
+ diff new_svn_list_of_pot_files old_svn_list_of_pot_files | tee -a "$logfile"_this_run.log
+ if [ ${PIPESTATUS[0]} -eq 0 ]; then # this reads exit status of first command in pipe
+ echo "No new *.pot files found." | tee -a "$logfile"_this_run.log
+ fi
+ fi
+ echo "" | tee -a "$logfile"_this_run.log
+ fi
fi
##################################### TODO END
@@ -573,20 +573,20 @@ echo "" | tee -a "$logfile".log
echo $separator | tee -a "$logfile".log
if [ -z "$stop_showing_differences_from_last_run" ]; then
- if [ -f "$logfile"_previous_run.log ]; then
- # show only differences and log them
- echo -e "\E[32m"
- echo "Differences from last run:" | tee -a "$logfile".log
- echo -e "\E[m"
- echo -e "\E["$color_for_differences"m"
- diff "$logfile"_this_run.log "$logfile"_previous_run.log | tee -a "$logfile".log
- echo -e "\E[m"
- fi
+ if [ -f "$logfile"_previous_run.log ]; then
+# show only differences and log them
+ echo -e "\E[32m"
+ echo "Differences from last run:" | tee -a "$logfile".log
+ echo -e "\E[m"
+ echo -e "\E["$color_for_differences"m"
+ diff "$logfile"_this_run.log "$logfile"_previous_run.log | tee -a "$logfile".log
+ echo -e "\E[m"
+ fi
fi
echo $separator
echo -e "\E[33m"
-#echo "List of resources for translation:"
+# echo "List of resources for translation:"
cat "$log_directory"/list_of_resources_for_translation.txt
echo -e "\E[m"
diff --git a/translation_projects.dat b/translation_projects.dat
index d06b0e2b..f54ded8e 100644
--- a/translation_projects.dat
+++ b/translation_projects.dat
@@ -1,3 +1,4 @@
+# database for script check_for_translation_work.sh 2013-11-02 13:36:00 UTC filip
# GIT ADDRESSES
# Repositories of resources for Cauldron and the next released version of Mageia
git_addresses[control-center]="software/control-center"
@@ -25,27 +26,27 @@ git_addresses[userdrake]="software/userdrake"
# REPOSITORIY FOR MCC-HELP AND INSTALLER DOCUMENTATION + SOME I18N TOOLS
if [ -z "$work_on_docs_and_tools" ]; then
- git_addresses[docs_and_tools]="software/i18n/tools"
+ git_addresses[docs_and_tools]="software/i18n/tools"
fi
# UNOFFICIAL LIST OF REPOSITORIES OF ONE LINE TO TRANSLATE .DESKTOP FILES (NOT NEEDED AFTER FINISHED TRANSLATION)
if [ -z "$work_on_desktop_files" ]; then
- git_addresses[mageia-kde-config]="software/desktop/kde/config"
- git_addresses[mageia-xfce-config]="software/desktop/xfce/config"
-# no translations?? git_addresses[draklive]="software/build-system/draklive"
- git_addresses[draklive-config]="software/build-system/draklive-config"
+ git_addresses[mageia-kde-config]="software/desktop/kde/config"
+ git_addresses[mageia-xfce-config]="software/desktop/xfce/config"
+# no translations?? git_addresses[draklive]="software/build-system/draklive"
+ git_addresses[draklive-config]="software/build-system/draklive-config"
fi
# REPOSITORIES OF RESOURCES BRANCHED FOR MAGEIA 3 (git clone --single-branch)
if [ -z "$work_on_mga3" ]; then
- git_addresses[drakx_mga3]="software/drakx -b distro/mga3"
+ git_addresses[drakx_mga3]="software/drakx -b distro/mga3"
fi
# UNOFFICIAL LIST OF REPOSITORIES OF OTHER RESOURCES FOR TRANSLATION
if [ -z "$work_on_unofficial" ]; then
- git_addresses[copyiso2usb]="software/copyiso2usb"
- git_addresses[net_monitor]="software/net_monitor"
- git_addresses[usbdumper]="software/usbdumper"
+ git_addresses[copyiso2usb]="software/copyiso2usb"
+ git_addresses[net_monitor]="software/net_monitor"
+ git_addresses[usbdumper]="software/usbdumper"
fi
# NOT YET ON OUR GIT
@@ -71,11 +72,11 @@ translate_projects_po[drakx_standalone]="drakx/perl-install/standalone/po"
# translate_projects_po[Identity (CatDap)]="NA"
translate_projects_po[indexhtml]="indexhtml/po"
translate_projects_po[kde4-splash-mga]="kde4-splash-mga/po"
-#translate_projects_po[mageia-doc]="NA"
+# translate_projects_po[mageia-doc]="NA"
translate_projects_po[mageia-gfxboot-theme]="mageia-gfxboot-theme/po"
translate_projects_po[mageia-kde-translation]="mageia-kde-translation/po"
translate_projects_po[mgaonline]="mgaonline/po"
-#translate_projects_po[msec]="NA"
+# translate_projects_po[msec]="NA"
translate_projects_po[rpmdrake]="rpmdrake/po"
translate_projects_po[system-config-printer]="system-config-printer/po"
translate_projects_po[transfugdrake]="transfugdrake/po"
@@ -84,99 +85,99 @@ translate_projects_po[userdrake2]="userdrake/po"
# REPOSITORIY FOR MCC-HELP AND INSTALLER DOCUMENTATION + SOME I18N TOOLS
if [ -z "$work_on_docs_and_tools" ]; then
- translate_projects_po[doc_installer]="docs_and_tools/docs/installer"
- translate_projects_po[doc_mcc-help]="docs_and_tools/docs/mcc-help"
+ translate_projects_po[doc_installer]="docs_and_tools/docs/installer"
+ translate_projects_po[doc_mcc-help]="docs_and_tools/docs/mcc-help"
fi
# REPOSITORIES OF RESOURCES BRANCHED FOR MAGEIA 3
if [ -z "$work_on_mga3" ]; then
- translate_projects_po[drakx_help_mga3]="drakx_mga3/perl-install/install/help/po"
- translate_projects_po[drakx_install_mga3]="drakx_mga3/perl-install/install/share/po"
- translate_projects_po[drakx_share_mga3]="drakx_mga3/perl-install/share/po"
- translate_projects_po[drakx_standalone_mga3]="drakx_mga3/perl-install/standalone/po"
+ translate_projects_po[drakx_help_mga3]="drakx_mga3/perl-install/install/help/po"
+ translate_projects_po[drakx_install_mga3]="drakx_mga3/perl-install/install/share/po"
+ translate_projects_po[drakx_share_mga3]="drakx_mga3/perl-install/share/po"
+ translate_projects_po[drakx_standalone_mga3]="drakx_mga3/perl-install/standalone/po"
fi
# UNOFFICIAL LIST OF REPOSITORIES OF OTHER RESOURCES FOR TRANSLATION
if [ -z "$work_on_unofficial" ]; then
- translate_projects_po[copyiso2usb]="copyiso2usb/po"
- translate_projects_po[drakx_help]="drakx/perl-install/install/help/po"
- #translate_projects_po[epoll]="NA"
- translate_projects_po[indexhtml_about]="indexhtml/about/po"
- # translate_projects_po[isodumper]="NA"
- translate_projects_po[net_monitor]="net_monitor/po"
- translate_projects_po[usbdumper]="usbdumper/po"
+ translate_projects_po[copyiso2usb]="copyiso2usb/po"
+ translate_projects_po[drakx_help]="drakx/perl-install/install/help/po"
+# translate_projects_po[epoll]="NA"
+ translate_projects_po[indexhtml_about]="indexhtml/about/po"
+# translate_projects_po[isodumper]="NA"
+ translate_projects_po[net_monitor]="net_monitor/po"
+ translate_projects_po[usbdumper]="usbdumper/po"
fi
# .DESKTOP FILES
# Repositories of one line to translate .desktop files (not needed after finished translation)
if [ -z "$work_on_desktop_files" ]; then
- # "not really a .desktop file" translate_projects_desktop[desktop-common-data-GdmGreeterTheme-nolist]="desktop-common-data/dm/GdmGreeterTheme-nolist.desktop"
- # "not really a .desktop file" translate_projects_desktop[desktop-common-data-GdmGreeterTheme]="desktop-common-data/dm/GdmGreeterTheme.desktop"
- # "not really a .desktop file" translate_projects_desktop[desktop-common-data-KdmGreeterTheme]="desktop-common-data/dm/KdmGreeterTheme.desktop"
- # no translations?? translate_projects_desktop[draklive-copy-wizard]="draklive/draklive-copy-wizard.desktop"
- # translate_projects_desktop[draklive-GUADEC-booklet]="draklive-config/files/GUADEC-booklet.desktop"
- translate_projects_desktop[draklive-install]="draklive-config/files/draklive-install.desktop"
- translate_projects_desktop[draklive-register]="draklive-config/files/register.desktop"
- # no translations?? translate_projects_desktop[drakx-net-net_applet]="drakx-net/data/net_applet.desktop"
- # not yet on git mageia-doc/trunk/mcc/en/mageia-doc-mcc-en.desktop
- # not yet on git mageia-doc/trunk/mcc/et/mageia-doc-mcc-et.desktop
- # not yet on git mageia-doc/trunk/mcc/fr/mageia-doc-mcc-fr.desktop
- # no translations?? mgaonline/trunk/gnome-mandrakeonline.desktop
- translate_projects_desktop[mageia-kde-banshee-play-audiocd]="mageia-kde-translation/solid/banshee-play-audiocd.desktop"
- translate_projects_desktop[mageia-kde-brasero_copy_disc]="mageia-kde-translation/solid/brasero_copy_disc.desktop"
- translate_projects_desktop[mageia-kde-brasero_create_audio_cd_from_blank_medium]="mageia-kde-translation/solid/brasero_create_audio_cd_from_blank_medium.desktop"
- translate_projects_desktop[mageia-kde-brasero_create_data_project_from_blank_medium]="mageia-kde-translation/solid/brasero_create_data_project_from_blank_medium.desktop"
- translate_projects_desktop[mageia-kde-classicPanel]="mageia-kde-config/kde4-profiles/Default/share/apps/plasma/layout-templates/org.mageia.plasma-desktop.classicPanel/metadata.desktop"
- translate_projects_desktop[mageia-kde-defaultPanel]="mageia-kde-config/kde4-profiles/Default/share/apps/plasma/layout-templates/org.mageia.plasma-desktop.defaultPanel/metadata.desktop"
- # no translations?? Mageia customization of the Air theme translate_projects_desktop[mageia-kde-desktoptheme]="mageia-kde-config/kde4-profiles/common/share/apps/desktoptheme/default/metadata.desktop"
- # theme/ia_ora-kde4/trunk/kwin-client/iaora.desktop
- # "not really a .desktop file" translate_projects_desktop[mageia-kde-KdmGreeterTheme-common]="mageia-kde-config/kde4-profiles/common/share/config/kdm/themes/mageia-kde4/KdmGreeterTheme.desktop"
- # "not really a .desktop file" translate_projects_desktop[mageia-kde-KdmGreeterTheme-Default]="mageia-kde-config/kde4-profiles/Default/share/config/kdm/themes/mageia-kde4/KdmGreeterTheme.desktop"
- # no translations?? translate_projects_desktop[mageia-kde-KdmGreeterTheme-netbook]="mageia-kde-config/kde4-profiles/netbook/share/config/kdm/themes/mageia-kde4/KdmGreeterTheme.desktop"
- # no translations?? translate_projects_desktop[mageia-kde-ksplashplugin]="kde4-splash-mga/ksplashplugin.desktop"
- # no translations?? translate_projects_desktop[mageia-kde-plasma-desktop]="mageia-kde-config/kde4-profiles/netbook/share/autostart/plasma-desktop.desktop"
- # no translations?? translate_projects_desktop[mageia-kde-plasma-netbook]="mageia-kde-config/kde4-profiles/netbook/share/autostart/plasma-netbook.desktop"
- # translate_projects_desktop[mageia-kde-sample]="mageia-kde-translation/solid/sample.desktop"
- translate_projects_desktop[mageia-kde-sendmail]="mageia-kde-translation/services/sendmail.desktop"
- # no translations?? translate_projects_desktop[mageia-kde-splash-mga]="kde4-splash-mga/kde4-splash-mga.desktop"
- translate_projects_desktop[mageia-kde-totem-opendvd]="mageia-kde-translation/solid/totem-opendvd.desktop"
- # usbdumper/trunk/data/mandriva-seed.desktop
- translate_projects_desktop[mageia-xfce-appfinder]="mageia-xfce-config/data/xfce4/panel/launcher-2/xfce4-appfinder.desktop"
- translate_projects_desktop[mageia-xfce-file-manager]="mageia-xfce-config/data/xfce4/panel/launcher-6/file-manager.desktop"
- translate_projects_desktop[mageia-xfce-mcc]="mageia-xfce-config/data/xfce4/panel/launcher-9/mcc.desktop"
- translate_projects_desktop[mageia-xfce-terminal-emulator]="mageia-xfce-config/data/xfce4/panel/launcher-4/terminal-emulator.desktop"
- translate_projects_desktop[mageia-xfce-text-editor]="mageia-xfce-config/data/xfce4/panel/launcher-5/text-editor.desktop"
- translate_projects_desktop[mageia-xfce-web-browser]="mageia-xfce-config/data/xfce4/panel/launcher-8/web-browser.desktop"
- # no translations?? mgaonline/trunk/x-mga-exec.desktop
+# "not really a .desktop file" translate_projects_desktop[desktop-common-data-GdmGreeterTheme-nolist]="desktop-common-data/dm/GdmGreeterTheme-nolist.desktop"
+# "not really a .desktop file" translate_projects_desktop[desktop-common-data-GdmGreeterTheme]="desktop-common-data/dm/GdmGreeterTheme.desktop"
+# "not really a .desktop file" translate_projects_desktop[desktop-common-data-KdmGreeterTheme]="desktop-common-data/dm/KdmGreeterTheme.desktop"
+# no translations?? translate_projects_desktop[draklive-copy-wizard]="draklive/draklive-copy-wizard.desktop"
+# translate_projects_desktop[draklive-GUADEC-booklet]="draklive-config/files/GUADEC-booklet.desktop"
+ translate_projects_desktop[draklive-install]="draklive-config/files/draklive-install.desktop"
+ translate_projects_desktop[draklive-register]="draklive-config/files/register.desktop"
+# no translations?? translate_projects_desktop[drakx-net-net_applet]="drakx-net/data/net_applet.desktop"
+# not yet on git mageia-doc/trunk/mcc/en/mageia-doc-mcc-en.desktop
+# not yet on git mageia-doc/trunk/mcc/et/mageia-doc-mcc-et.desktop
+# not yet on git mageia-doc/trunk/mcc/fr/mageia-doc-mcc-fr.desktop
+# no translations?? mgaonline/trunk/gnome-mandrakeonline.desktop
+ translate_projects_desktop[mageia-kde-banshee-play-audiocd]="mageia-kde-translation/solid/banshee-play-audiocd.desktop"
+ translate_projects_desktop[mageia-kde-brasero_copy_disc]="mageia-kde-translation/solid/brasero_copy_disc.desktop"
+ translate_projects_desktop[mageia-kde-brasero_create_audio_cd_from_blank_medium]="mageia-kde-translation/solid/brasero_create_audio_cd_from_blank_medium.desktop"
+ translate_projects_desktop[mageia-kde-brasero_create_data_project_from_blank_medium]="mageia-kde-translation/solid/brasero_create_data_project_from_blank_medium.desktop"
+ translate_projects_desktop[mageia-kde-classicPanel]="mageia-kde-config/kde4-profiles/Default/share/apps/plasma/layout-templates/org.mageia.plasma-desktop.classicPanel/metadata.desktop"
+ translate_projects_desktop[mageia-kde-defaultPanel]="mageia-kde-config/kde4-profiles/Default/share/apps/plasma/layout-templates/org.mageia.plasma-desktop.defaultPanel/metadata.desktop"
+# no translations?? Mageia customization of the Air theme translate_projects_desktop[mageia-kde-desktoptheme]="mageia-kde-config/kde4-profiles/common/share/apps/desktoptheme/default/metadata.desktop"
+# theme/ia_ora-kde4/trunk/kwin-client/iaora.desktop
+# "not really a .desktop file" translate_projects_desktop[mageia-kde-KdmGreeterTheme-common]="mageia-kde-config/kde4-profiles/common/share/config/kdm/themes/mageia-kde4/KdmGreeterTheme.desktop"
+# "not really a .desktop file" translate_projects_desktop[mageia-kde-KdmGreeterTheme-Default]="mageia-kde-config/kde4-profiles/Default/share/config/kdm/themes/mageia-kde4/KdmGreeterTheme.desktop"
+# no translations?? translate_projects_desktop[mageia-kde-KdmGreeterTheme-netbook]="mageia-kde-config/kde4-profiles/netbook/share/config/kdm/themes/mageia-kde4/KdmGreeterTheme.desktop"
+# no translations?? translate_projects_desktop[mageia-kde-ksplashplugin]="kde4-splash-mga/ksplashplugin.desktop"
+# no translations?? translate_projects_desktop[mageia-kde-plasma-desktop]="mageia-kde-config/kde4-profiles/netbook/share/autostart/plasma-desktop.desktop"
+# no translations?? translate_projects_desktop[mageia-kde-plasma-netbook]="mageia-kde-config/kde4-profiles/netbook/share/autostart/plasma-netbook.desktop"
+# translate_projects_desktop[mageia-kde-sample]="mageia-kde-translation/solid/sample.desktop"
+ translate_projects_desktop[mageia-kde-sendmail]="mageia-kde-translation/services/sendmail.desktop"
+# no translations?? translate_projects_desktop[mageia-kde-splash-mga]="kde4-splash-mga/kde4-splash-mga.desktop"
+ translate_projects_desktop[mageia-kde-totem-opendvd]="mageia-kde-translation/solid/totem-opendvd.desktop"
+# usbdumper/trunk/data/mandriva-seed.desktop
+ translate_projects_desktop[mageia-xfce-appfinder]="mageia-xfce-config/data/xfce4/panel/launcher-2/xfce4-appfinder.desktop"
+ translate_projects_desktop[mageia-xfce-file-manager]="mageia-xfce-config/data/xfce4/panel/launcher-6/file-manager.desktop"
+ translate_projects_desktop[mageia-xfce-mcc]="mageia-xfce-config/data/xfce4/panel/launcher-9/mcc.desktop"
+ translate_projects_desktop[mageia-xfce-terminal-emulator]="mageia-xfce-config/data/xfce4/panel/launcher-4/terminal-emulator.desktop"
+ translate_projects_desktop[mageia-xfce-text-editor]="mageia-xfce-config/data/xfce4/panel/launcher-5/text-editor.desktop"
+ translate_projects_desktop[mageia-xfce-web-browser]="mageia-xfce-config/data/xfce4/panel/launcher-8/web-browser.desktop"
+# no translations?? mgaonline/trunk/x-mga-exec.desktop
fi
# HTML FILES # TODO add them also in script
if [ -z "$work_on_html_software_files" ]; then
- translate_projects_help[mageia-gfxboot-theme_help-boot]="bootloader-theme/help-boot"
- translate_projects_help[mageia-gfxboot-theme_help-install]="bootloader-theme/help-install"
-
-# TODO check this list
- # cat svn_list | grep trunk | egrep html$ | fgrep .html
- # no translations Mandrake!! control-center/trunk/doc/DrakConf.html
- # no translations desktop-common-data/trunk/bookmarks/mozilla/mozilla-download.html
- # no translations desktop-common-data/trunk/bookmarks/mozilla/mozilla-one.html
- # drakx-installer-help/trunk/*.html
- # indexhtml/trunk/HTML/index.html
- # indexhtml/trunk/mail/mail-en.html
- # indexhtml/trunk/mail/mail-fr.html
- # indexhtml/trunk/mail/mail-pt.html
- # mageia-doc/trunk/mcc/en/*.html
- # mga-advisories/trunk/tmpl/*.html
- # mga-treasurer/trunk/tmpl/*.html
- # mgapeople/trunk/tmpl/*.html
- # perl-MDK-Common/trunk/tutorial.html
- # theme/mageia-gfxboot-theme/trunk/help-boot/en/*.html
- # theme/mageia-gfxboot-theme/trunk/help-install/en/*.html
+ translate_projects_help[mageia-gfxboot-theme_help-boot]="bootloader-theme/help-boot"
+ translate_projects_help[mageia-gfxboot-theme_help-install]="bootloader-theme/help-install"
+
+# TODO check this list
+# cat svn_list | grep trunk | egrep html$ | fgrep .html
+# no translations Mandrake!! control-center/trunk/doc/DrakConf.html
+# no translations desktop-common-data/trunk/bookmarks/mozilla/mozilla-download.html
+# no translations desktop-common-data/trunk/bookmarks/mozilla/mozilla-one.html
+# drakx-installer-help/trunk/*.html
+# indexhtml/trunk/HTML/index.html
+# indexhtml/trunk/mail/mail-en.html
+# indexhtml/trunk/mail/mail-fr.html
+# indexhtml/trunk/mail/mail-pt.html
+# mageia-doc/trunk/mcc/en/*.html
+# mga-advisories/trunk/tmpl/*.html
+# mga-treasurer/trunk/tmpl/*.html
+# mgapeople/trunk/tmpl/*.html
+# perl-MDK-Common/trunk/tutorial.html
+# theme/mageia-gfxboot-theme/trunk/help-boot/en/*.html
+# theme/mageia-gfxboot-theme/trunk/help-install/en/*.html
fi
-# WEB PAGES:
+# WEB PAGES:
web_pages[web_page_navigation]="svn.mageia.org/svn/web/www/trunk/_nav/langs"
web_pages[web_page_navigation_2]="svn.mageia.org/svn/web/nav/langs"
web_pages[web_page_english]="svn.mageia.org/svn/web/www/trunk/en"
@@ -185,6 +186,6 @@ web_pages[web_pages_lang]="svn.mageia.org/svn/web/www/trunk/langs"
# whole website www.mageia.org and mognase navigation
if [ $checkout_whole_website -eq 1 ]; then
- web_pages[web_mognase]="svn.mageia.org/svn/web/nav"
- web_pages[web]="svn.mageia.org/svn/web/www/trunk"
+ web_pages[web_mognase]="svn.mageia.org/svn/web/nav"
+ web_pages[web]="svn.mageia.org/svn/web/www/trunk"
fi