summaryrefslogtreecommitdiff
path: root/bin/importgettext.sh
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-05-22 12:31:37 +0200
committerAleksander Machniak <alec@alec.pl>2012-05-22 12:31:37 +0200
commit041c93ce0bc00cb6417ce2e4bdce2ed84d37f50a (patch)
treea33370fce8a023b3a5f4a32019adc41337dc638c /bin/importgettext.sh
parent0a1dd5b073f0dfc42439ab168246ae0ae6921414 (diff)
Removed $Id$
Diffstat (limited to 'bin/importgettext.sh')
-rwxr-xr-xbin/importgettext.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/importgettext.sh b/bin/importgettext.sh
index aab61013b..a63ac0054 100755
--- a/bin/importgettext.sh
+++ b/bin/importgettext.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env php
<?php
/*
-
+-----------------------------------------------------------------------+
| bin/importgettext.sh |
| |
@@ -14,9 +13,6 @@
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
-
- $Id$
-
*/
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
@@ -39,7 +35,7 @@ else if (is_file($srcdir)) {
foreach ($out as $outfn => $texts) {
$lang = preg_match('!/([a-z]{2}(_[A-Z]{2})?)[./]!', $outfn, $m) ? $m[1] : '';
$varname = strpos($outfn, 'messages.inc') !== false ? 'messages' : 'labels';
-
+
$header = <<<EOF
<?php
@@ -54,14 +50,13 @@ foreach ($out as $outfn => $texts) {
+-----------------------------------------------------------------------+
| Author: %-62s|
+-----------------------------------------------------------------------+
- @version %s$
*/
$%s = array();
EOF;
- $output = sprintf($header, $lang, $varname.'.inc', date('Y'), $texts['_translator'], '$Id', $varname);
+ $output = sprintf($header, $lang, $varname.'.inc', date('Y'), $texts['_translator'], $varname);
foreach ($texts as $label => $value) {
if (is_array($value)) { var_dump($outfn, $label, $value); exit; }
@@ -131,7 +126,7 @@ function import_file($fn)
$out[$file][$label] = $msgstr;
}
}
-
+
$msgid = null;
$msgstr = '';
$dests = array();
@@ -167,7 +162,7 @@ function import_file($fn)
$out[$file]['_translator'] = $translator;
}
}
-
+
return $language ? $out : array();
}