diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-11-19 15:51:48 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-11-19 15:51:48 +0100 |
commit | de1040731b1c5660b2fc0db7ad7e26337b4e05eb (patch) | |
tree | c3b873fd5ab96b8bdb0203def0607cc5ff946c98 | |
parent | b6add5aed0cfe2ca5597b71abafe4cadc3405310 (diff) |
Properly add author name from gettext files
-rwxr-xr-x | bin/importgettext.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/importgettext.sh b/bin/importgettext.sh index 9ffb71d04..285f5680f 100755 --- a/bin/importgettext.sh +++ b/bin/importgettext.sh @@ -56,11 +56,11 @@ $%s = array(); EOF; - $author = preg_replace('/\s*<Unknown>/i', '', $texts['_translator']); + $author = preg_replace('/\s*<Unknown>/i', '', $texts['_translator']); $output = sprintf($header, $lang, $varname.'.inc', date('Y'), $author, $varname); foreach ($texts as $label => $value) { - if (is_array($value)) { var_dump($outfn, $label, $value); exit; } + if (is_array($value)) { var_dump($outfn, $label, $value); exit; } if ($label[0] != '_' && strlen($value)) $output .= sprintf("\$%s['%s'] = '%s';\n", $varname, $label, strtr(addcslashes($value, "'"), array("\r" => '', "\n" => '\n'))); } @@ -125,6 +125,7 @@ function import_file($fn) foreach ($dests as $dest) { list($file, $label) = explode(':', $dest); $out[$file][$label] = $msgstr; + $out[$file]['_translator'] = $translator; } } |