aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-03-29 14:12:50 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-03-29 14:12:50 +0200
commite2b975065c2f55a4e3c3798b4c36df44e112fdd0 (patch)
tree6cf84e4b5ce1773918cfa0e9de5bc6aa7eb516b3 /util
parent2a23147042f568c2b6957b81355c0123033f1854 (diff)
parent920396e4024e56c3e00f1f159268c2aba16e4609 (diff)
downloadvolse-hubzilla-e2b975065c2f55a4e3c3798b4c36df44e112fdd0.tar.gz
volse-hubzilla-e2b975065c2f55a4e3c3798b4c36df44e112fdd0.tar.bz2
volse-hubzilla-e2b975065c2f55a4e3c3798b4c36df44e112fdd0.zip
Merge remote-tracking branch 'friendika-master/master'
Diffstat (limited to 'util')
-rw-r--r--util/README5
-rw-r--r--util/typo.php8
-rw-r--r--util/typohelper.php11
3 files changed, 23 insertions, 1 deletions
diff --git a/util/README b/util/README
index cb2fd9b55..a6f7e59a6 100644
--- a/util/README
+++ b/util/README
@@ -81,6 +81,11 @@ Xgettext and .po workflow
1. Run util/run_xgettext.sh script (on *unix sistems, with GNU xgettext installed)
This script runs xgettext on source tree, extracting strings from t() and tt()
functions, and creates a util/messages.po file.
+
+ % cd util; ./run_xgettext.sh ../view/{language}/messages.po
+
+ Replace {language} with the language you are working on - e.g. 'es', 'fr', 'de', etc.
+
2. copy util/messages.po to view/<langauage>/messages.po
3. open view/<langauage>/messages.po with a text editor and fill in infos in
"Last-Translator: FULL NAME <EMAIL@ADDRESS>"
diff --git a/util/typo.php b/util/typo.php
index 84a50e15e..e20cce86a 100644
--- a/util/typo.php
+++ b/util/typo.php
@@ -37,6 +37,11 @@
}
}
+ if(x($a->config,'php_path'))
+ $phpath = $a->config['php_path'];
+ else
+ $phpath = 'php';
+
echo "String files\n";
echo 'util/strings.php' . "\n";
@@ -47,5 +52,6 @@
foreach($files as $file) {
echo $file . "\n";
- include_once($file);
+ passthru($phpath . ' util/typohelper.php ' . $file);
+// include_once($file);
}
diff --git a/util/typohelper.php b/util/typohelper.php
new file mode 100644
index 000000000..589702a02
--- /dev/null
+++ b/util/typohelper.php
@@ -0,0 +1,11 @@
+<?php
+
+$str = <<< EOT
+ error_reporting(E_ERROR | E_WARNING | E_PARSE );
+ ini_set('display_errors', '1');
+ ini_set('log_errors','0');
+EOT;
+
+ $str .= str_replace('<?php', '', file_get_contents($argv[1]));
+
+ eval($str);