diff options
Diffstat (limited to 'check_for_translation_work.sh')
-rwxr-xr-x | check_for_translation_work.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/check_for_translation_work.sh b/check_for_translation_work.sh index d6060cb7..33733008 100755 --- a/check_for_translation_work.sh +++ b/check_for_translation_work.sh @@ -104,6 +104,12 @@ color_for_differences=31 # uncomment next line to prevent creation of working copy of po file #create_a_working_copy_of_po_file=no +# check for any language file without any translated string +# check_for_empty_translations=1 + +# delete all language files without any translated string +# delete_empty_translations=1 + EOF echo -e "\E[31m" @@ -290,6 +296,20 @@ do 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 + if [ $check_for_empty_translations -eq 1 ]; then + for filename in *.po + do + msgattrib $filename --translated | grep . >> /dev/null + if [ $? -eq 1 ]; then + msgfmt --statistics --verbose -o /dev/null $filename + echo "Filename $filename has no translated strings." + if [ $delete_empty_translations -eq 1 ]; then + rm $filename + fi + echo '' + fi + done + fi fi # checking for fuzzy and untranslated strings in git $language_code.po |