aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-07-29 14:20:01 +0200
committerMax Kostikov <max@kostikov.co>2018-07-29 14:20:01 +0200
commite078caffd86feca160633778f884007acae6a9fa (patch)
tree74914907686640e469711f7940ef9646b770ecfe /util
parent90a9febb6cf6a42c9da1c16c2da6f8cbde1921b7 (diff)
downloadvolse-hubzilla-e078caffd86feca160633778f884007acae6a9fa.tar.gz
volse-hubzilla-e078caffd86feca160633778f884007acae6a9fa.tar.bz2
volse-hubzilla-e078caffd86feca160633778f884007acae6a9fa.zip
Update php2po.php
Diffstat (limited to 'util')
-rw-r--r--util/php2po.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/php2po.php b/util/php2po.php
index 17feafa5d..a29ba7459 100644
--- a/util/php2po.php
+++ b/util/php2po.php
@@ -31,6 +31,7 @@
$ink = False;
foreach ($infile as $l) {
+ $l = trim($l, " ");
if (!preg_match("/^msgstr\[[1-9]/",$l)) {
if ($k!="" && (substr($l,0,7)=="msgstr " || substr($l,0,8)=="msgstr[0")){
$ink = False;
@@ -66,13 +67,13 @@
}
if (substr($l,0,6)=="msgid ") {
- preg_match('/^msgid "(.*)"/',$l,$m);
+ preg_match('/^msgid "(.*)"$/',$l,$m);
$k = $m[1];
$ink = True;
}
if (substr($l,0,8)=="msgctxt ") {
- preg_match('/^msgctxt "(.*)"/',$l,$m);
+ preg_match('/^msgctxt "(.*)"$/',$l,$m);
$c = $m[1];
}