summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2006-10-04 14:48:03 +0200
committerOliver Tappe2006-10-04 14:48:03 +0200
commitae3de905c27b44eb9b0e521fce1af37e9569a543 (patch)
tree878870e78b661ea29f49468d469a7c353d58f97d /config-db
parent* minor cleanup (diff)
downloadcore-ae3de905c27b44eb9b0e521fce1af37e9569a543.tar.gz
core-ae3de905c27b44eb9b0e521fce1af37e9569a543.tar.xz
core-ae3de905c27b44eb9b0e521fce1af37e9569a543.zip
* corrected typo
* added support for marking new translations strings as such (prepending 'NEW:') git-svn-id: http://svn.openslx.org/svn/openslx/trunk@439 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-xconfig-db/tools/extractTranslations.pl19
1 files changed, 14 insertions, 5 deletions
diff --git a/config-db/tools/extractTranslations.pl b/config-db/tools/extractTranslations.pl
index 57a819a5..f90d5f98 100755
--- a/config-db/tools/extractTranslations.pl
+++ b/config-db/tools/extractTranslations.pl
@@ -84,13 +84,22 @@ sub UpdateTrModule
}
my %translations;
if (!eval "$&") {
- print "\t*** Something No translations found (?!?) file will be skipped! ***\n";
+ print "\t*** translations can't be evaluated (?!?) file will be skipped! ***\n";
+ return;
+ }
my $updatedTranslations = "%translations = (\n";
foreach my $tr (sort {lc($a) cmp lc($b)} keys %translatableStrings) {
- if (!exists $translations{$tr} && $useKeyAsTranslation) {
- # POSIX language: use key as translation:
- $updatedTranslations
- .= "\tqq{$tr}\n\t\t => qq{$tr},\n\n";
+ if (!length($translations{$tr})) {
+ if ($useKeyAsTranslation) {
+ # POSIX language: use key as translation:
+ $updatedTranslations
+ .= "\tqq{$tr}\n\t\t => qq{$tr},\n\n";
+ } else {
+ # no translation available, we mark the key, such that a
+ # search for this key will fall back to the english message:
+ $updatedTranslations
+ .= "\tqq{NEW:$tr}\n\t\t => qq{$translations{$tr}},\n\n";
+ }
} else {
# use existing translation for key:
$updatedTranslations