From 3d0d5dbd0f35c47b21e2e574703a08f07ce677dd Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 08 May 2016 08:27:56 -0400 Subject: [PATCH] Performance improvements in format_flowed() and unfold_flowed() --- bin/importgettext.sh | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/importgettext.sh b/bin/importgettext.sh index 9ffb71d..5a91e6b 100755 --- a/bin/importgettext.sh +++ b/bin/importgettext.sh @@ -15,7 +15,7 @@ +-----------------------------------------------------------------------+ */ -define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' ); +define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' ); require INSTALL_PATH.'program/include/clisetup.php'; if ($argc < 2) { @@ -56,11 +56,11 @@ 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 @@ foreach ($dests as $dest) { list($file, $label) = explode(':', $dest); $out[$file][$label] = $msgstr; + $out[$file]['_translator'] = $translator; } } -- Gitblit v1.9.1