summaryrefslogtreecommitdiff
path: root/bin/importgettext.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/importgettext.sh')
-rwxr-xr-xbin/importgettext.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/importgettext.sh b/bin/importgettext.sh
index cc01c3382..aab61013b 100755
--- a/bin/importgettext.sh
+++ b/bin/importgettext.sh
@@ -71,7 +71,7 @@ EOF;
$output .= "\n";
$dir = dirname($outfn);
- @mkdir($dir, 664, true);
+ @mkdir($dir, 0755, true);
if (file_put_contents($outfn, $output))
echo "-> $outfn\n";
}
@@ -99,6 +99,10 @@ function import_file($fn)
$language = '';
$translator = '';
+ // get language code from file name
+ if (preg_match('/-([a-z_]+).po$/i', $fn, $m))
+ $language = expand_langcode($m[1]);
+
$is_header = true;
$msgid = null;
$msgstr = '';