diff options
author | Oliver Tappe | 2007-02-05 20:54:10 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-02-05 20:54:10 +0100 |
commit | 38a40fa09da4586092ff111c1b371890bfbc8e29 (patch) | |
tree | e822e498b7959ebf47fd0c4af54097fc186e6c36 /bin | |
parent | Fixed wrong error reporting on missing primary ethernet interface (in (diff) | |
download | core-38a40fa09da4586092ff111c1b371890bfbc8e29.tar.gz core-38a40fa09da4586092ff111c1b371890bfbc8e29.tar.xz core-38a40fa09da4586092ff111c1b371890bfbc8e29.zip |
* added check against scalar variables inside of the strings, as this causes
the 'posix' translations-Module to fail
* minor cleanup
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@682 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/devel-tools/extractTranslations.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/devel-tools/extractTranslations.pl b/bin/devel-tools/extractTranslations.pl index 0ef7de70..88ac4ede 100755 --- a/bin/devel-tools/extractTranslations.pl +++ b/bin/devel-tools/extractTranslations.pl @@ -98,10 +98,14 @@ sub ExtractTrStrings if (!($tr =~ m[^'([^']+)'\s*(,.+?)*\s*$]os || $tr =~ m[^\"([^"]+)\"\s*(,.+?)*\s*$]os || $tr =~ m{^qq?\[([^\]]+)\]\s*(,.+?)*\s*$}os)) { - die "$File::Find::name: could not parse _tr()-argument: \n" - ."$tr\nPlease correct and retry.\n"; + die "$File::Find::name: could not parse _tr()-argument \n" + ."\t$tr\nPlease correct and retry.\n"; } $tr = $1; + if ($tr =~ m[(\$\w+)]) { + die "$File::Find::name: _tr()-argument\n\t$tr\n" + ."contains variable '$1'.\nPlease correct and retry.\n"; + } $tr =~ s[\n][\\n]g; $tr =~ s[\t][\\t]g; $translatableStrings{$tr} = $tr; @@ -122,13 +126,13 @@ sub UpdateTrModule my $text = <F>; close(F); if ($text !~ m[%translations\s*=\s*\(\s*(.+)\s*\);]os) { - print "\t*** No translations found (?!?) file will be skipped! ***\n"; + print "\t*** No translations found - file will be skipped! ***\n"; return; } my %translations; # evaluate the hash read from file into %translations: if (!eval "$&") { - print "\t*** translations can't be evaluated (?!?) file will be skipped! ***\n"; + print "\t*** translations can't be evaluated - file will be skipped! ***\n"; return; } my $updatedTranslations = "%translations = (\n"; |