aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README5
-rwxr-xr-xcheck_for_translation_work.sh31
2 files changed, 32 insertions, 4 deletions
diff --git a/README b/README
index 2e922c9f..1e798b8a 100644
--- a/README
+++ b/README
@@ -1,9 +1,11 @@
NEWS
+2013/11/03
+added warning about configuration excluding the work on desktop files in list_of_resources_for_translation.txt
+added test for GenericName for *.desktop file
2013/11/02
added check and addition of git configuration thanks to Алексей Логинов
2013/11/01
added option to exclude all work on web pages translation
-
2013/10/31
added support for git NOTE: you need to add git_directory variable in your ~/.mageia-i18n-config file
added creation of list_of_resources_for_translation.txt with statistics
@@ -11,7 +13,6 @@ added support for *.desktop
added support for doc team resources
removed support for mga2 since it's EOL is almost here
added creation of working copy of po resource
-
2012/10/03
First script by Remco Rijnders
diff --git a/check_for_translation_work.sh b/check_for_translation_work.sh
index 55b31256..ee6a6089 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-11-02 20:16:00 UTC filip $
+# $Id: check_for_translation_work.sh 2013-11-03 20:17:00 UTC filip $
#
# Please see git for a list of changes to this script.
#
@@ -444,6 +444,7 @@ echo "" >> "$log_directory"/list_of_resources_for_translation.txt
echo "*.desktop files:" | tee -a "$logfile"_this_run.log
echo "Translate *.desktop files in working directories ($working_translations_directory/desktop/$translate_project_name_desktop):" >> "$log_directory"/list_of_resources_for_translation.txt
echo -e "\E[m"
+empty_list_of_desktop_file=""
for translate_project_name_desktop in "${!translate_projects_desktop[@]}"
do
if [ ! -f "$git_directory/${translate_projects_desktop[$translate_project_name_desktop]}" ]; then
@@ -456,6 +457,7 @@ do
copy_this_desktop_file="no"
untranslated_name="Name, "
untranslated_comment="Comment,"
+ untranslated_generic_name="GenericName, "
names_and_comments=""
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"
@@ -465,6 +467,8 @@ do
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'\]=//'`
+ eng_generic_name=`echo "$names_and_comments" | grep -E "^GenericName=" | sed 's/^GenericName=//'`
+ lang_generic_name=`echo "$names_and_comments" | grep -E "^GenericName\[$language_code\]=" | sed 's/^GenericName\['$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
@@ -496,6 +500,21 @@ do
echo Comment string \"$eng_comment\" not present in $language_code language | tee -a "$logfile"_this_run.log
fi
fi
+ if [ -n "$eng_generic_name" ]; then # GenericName string present in original desktop file
+ if [ -n "$lang_generic_name" ]; then # GenericName string present in your language
+ if [ "$lang_generic_name" != "$eng_generic_name" ]; then # both strings differ
+# echo GenericName string \"$eng_generic_name\" in $language_code language present: \"$lang_generic_name\" # debug
+# echo -n # nop
+ untranslated_generic_name=""
+ else # both strings are equal
+ copy_this_desktop_file="yes"
+ echo GenericName string \"$eng_generic_name\" in $language_code language present but untranslated | tee -a "$logfile"_this_run.log
+ fi
+ else # GenericName string not present in your language
+ copy_this_desktop_file="yes"
+ echo GenericName string \"$eng_generic_name\" 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
@@ -507,9 +526,17 @@ do
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
+ echo $translate_project_name_desktop, untranslated line: $untranslated_name $untranslated_comment $untranslated_generic_name >> "$log_directory"/list_of_resources_for_translation.txt
+ empty_list_of_desktop_file="no"
fi
done
+if [ -n "$work_on_desktop_files" ]; then
+ echo Your configuration exclude work on desktop files >> "$log_directory"/list_of_resources_for_translation.txt
+else
+ if [ -z "$empty_list_of_desktop_file" ]; then
+ echo Congratulations. All desktop files are translated in $language_code language. >> "$log_directory"/list_of_resources_for_translation.txt
+ fi
+fi
if [ -z "$work_on_web_pages_translation" ]; then
# Check out / update web_page files