[icinga-checkins] icinga.org: icingaweb2/feature/po-file-parser-13011: CatalogParser: Rename plurar indicators

git at icinga.org git at icinga.org
Fri Nov 4 11:04:49 CET 2016


Module: icingaweb2
Branch: feature/po-file-parser-13011
Commit: cce89f07ae4ba6e94cfb4c93c89873ad22ccfeee
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=cce89f07ae4ba6e94cfb4c93c89873ad22ccfeee

Author: Noah Hilverling <noah.hilverling at netways.de>
Date:   Fri Nov  4 10:58:08 2016 +0100

CatalogParser: Rename plurar indicators

refs #13011

---

 .../translation/library/Translation/Catalog/CatalogParser.php  |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/translation/library/Translation/Catalog/CatalogParser.php b/modules/translation/library/Translation/Catalog/CatalogParser.php
index 4323fdb..a559327 100644
--- a/modules/translation/library/Translation/Catalog/CatalogParser.php
+++ b/modules/translation/library/Translation/Catalog/CatalogParser.php
@@ -23,7 +23,7 @@ class CatalogParser
         'msgid'                 => 'msgid ',
         'msgid_plural'          => 'msgid_plural ',
         'msgstr'                => 'msgstr ',
-        'msgstr['               => 'msgstr[',
+        'msgstr_plural'         => 'msgstr[',
         'translator_comment'    => '# ',
         'extracted_comment'     => '#. ',
         'path'                  => '#: ',
@@ -34,7 +34,7 @@ class CatalogParser
         'obsolete_msgid'        => '#~ msgid ',
         'obsolete_msgid_plural' => '#~ msgid_plural ',
         'obsolete_msgstr'       => '#~ msgstr ',
-        'obsolete_msgstr['      => '#~ msgstr[',
+        'obsolete_msgstr_plural'=> '#~ msgstr[',
         'quote'                 => '"',
         'fuzzy_quote'           => '#| "',
         'obsolete_quote'        => '#~ "'
@@ -147,10 +147,10 @@ class CatalogParser
                         $currentEntry[$lastDefault] = $currentEntry[$lastDefault] . $line;
                         break;
                     default:
-                        if ($key === 'msgstr[' || 'obsolete_msgstr[') {
+                        if ($key === 'msgstr_plural' || $key === 'obsolete_msgstr_plural') {
                             $number = substr($line, 0, 1);
                             $line = substr($line, strlen($number . '] '));
-                            $key = $key . $number . ']';
+                            $key = $key . '[' . $number . ']';
                         }
                         $lastDefault = $key;
                         $currentEntry[$key] = $line;



More information about the icinga-checkins mailing list