Moved generateTranslationDiffs.sh to tools folder.

This commit is contained in:
Wyatt Olson
2010-09-16 07:49:46 -06:00
parent 08885a7d77
commit a8b29e1000
2 changed files with 16 additions and 7 deletions

View File

@@ -8,7 +8,9 @@ Translations are loaded for a given term at three levels:
Developers who are adding a new feature should add new strings *only* to default. This file Developers who are adding a new feature should add new strings *only* to default. This file
should be comprised of basic English text. It will be used in the event that there are no should be comprised of basic English text. It will be used in the event that there are no
more specific languages specified. more specific languages specified. Once you have modified default, you should run
./tools/generateTranslationDiffs.sh (bash script) which will re-generate the localizations
with commented out additions which you have just added.
Translators should in general implement the <Language> file. This is the generic translation Translators should in general implement the <Language> file. This is the generic translation
for a given language; for instance, 'French', 'German', 'Norsk', etc. If a string exists in for a given language; for instance, 'French', 'German', 'Norsk', etc. If a string exists in
@@ -29,11 +31,11 @@ If a locale file is used, it is applied in the same manner as <Language> is to d
will override any keys present from the ones in the language file (and in turn, the default). will override any keys present from the ones in the language file (and in turn, the default).
It is recommended to look for differences from default using a text editor with compare cabailities. After the generateTranslationDiffs.sh has been run, all untranslated terms for a given language /
For ease of maintentance, you should insert new entries in alphabetical order. Comments *may* locale will exist at the end of the file, prefixed by a ! comment marker. Translators should
be included, but in general you should try to avoid them as they can confuse comparison editors. If go through this section of the file and translate all terms which they can. After you have translated
you do include comments, you should prefix each line with 00, 01, etc so that the file can be sorted a line, just remove the ! comment marker. Comments may bee included using the #xx comment marker, where
and still keep comments in correct order, e.g. xx is a numeric prefix used to make sure automated sorting keeps comments in the right order, e.g.:
#00 Comment line 1... #00 Comment line 1...
#01 Line 2... #01 Line 2...

View File

@@ -2,8 +2,15 @@
# #
# Append translation differences on the end of all files. Developers should run this script # Append translation differences on the end of all files. Developers should run this script
# after changing default, so that translators can easily see what items need to be translated. # after changing default, so that translators can easily see what items need to be translated.
#
# This script should be run from the project root, e.g:
# $ ./tools/generateTranslationDiffs.sh
#
#####################
TEMP=temp_file TEMP=temp_file
PATH=rtdata/languages
cd $PATH
#First thing, we want to strip default of any !s and duplicates. #First thing, we want to strip default of any !s and duplicates.
cat "default" | grep -v '^!' | sort | uniq > "$TEMP" cat "default" | grep -v '^!' | sort | uniq > "$TEMP"