[icinga-checkins] icinga.org: icingaweb2/feature/po-file-parser-13011: CatalogParser: Remove quotes from msgstr_plural & obsolete_msgstr_plural

git at icinga.org git at icinga.org
Fri Nov 4 13:46:13 CET 2016


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

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Fri Nov  4 13:45:10 2016 +0100

CatalogParser: Remove quotes from msgstr_plural & obsolete_msgstr_plural

refs #13011

---

 modules/translation/library/Translation/Catalog/CatalogParser.php |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/translation/library/Translation/Catalog/CatalogParser.php b/modules/translation/library/Translation/Catalog/CatalogParser.php
index a559327..4c813f3 100644
--- a/modules/translation/library/Translation/Catalog/CatalogParser.php
+++ b/modules/translation/library/Translation/Catalog/CatalogParser.php
@@ -150,6 +150,9 @@ class CatalogParser
                         if ($key === 'msgstr_plural' || $key === 'obsolete_msgstr_plural') {
                             $number = substr($line, 0, 1);
                             $line = substr($line, strlen($number . '] '));
+                            if (substr($line, 0, 1) === '"') {
+                                $line = substr($line, 1, strlen($line)-2);
+                            }
                             $key = $key . '[' . $number . ']';
                         }
                         $lastDefault = $key;



More information about the icinga-checkins mailing list