From de1040731b1c5660b2fc0db7ad7e26337b4e05eb Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 19 Nov 2012 15:51:48 +0100 Subject: Properly add author name from gettext files --- bin/importgettext.sh | 5 +++-- 1 file 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*/i', '', $texts['_translator']); + $author = preg_replace('/\s*/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; } } -- cgit v1.2.3