aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-04 21:39:29 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-04 21:39:29 +0000
commitee4a7b7100b09045f870c160d238342f4bd4ffbe (patch)
treec70eec8d72f043771c319a469309edbbbfd1496b
parent540b80bc0c7b90ab9cde1c9058001a765d5ec613 (diff)
downloadsemanticscuttle-ee4a7b7100b09045f870c160d238342f4bd4ffbe.tar.gz
semanticscuttle-ee4a7b7100b09045f870c160d238342f4bd4ffbe.tar.bz2
add script to update language translation file from master file
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@519 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--scripts/update-translation.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/update-translation.php b/scripts/update-translation.php
new file mode 100644
index 0000000..4c950f1
--- /dev/null
+++ b/scripts/update-translation.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Update single gettext translation from
+ * gettext base file
+ */
+chdir(dirname(dirname(__FILE__)));
+
+if ($argc < 2) {
+ die("pass language name to update, i.e 'de_DE'\n");
+}
+$lang = $argv[1];
+
+$langdir = 'data/locales/' . $lang;
+if (!is_dir($langdir)) {
+ die('There is no language directory: ' . $langdir . "\n");
+}
+
+
+passthru(
+ 'msgmerge --update --backup=off'
+ . ' ' . $langdir . '/LC_MESSAGES/messages.po'
+ . ' data/locales/messages.po'
+);
+
+?> \ No newline at end of file