[icinga-checkins] icinga.org: icingaweb2/feature/translation-catalog-object-13012: CatalogEntry: Update reformatAttributeString

git at icinga.org git at icinga.org
Tue Nov 22 11:54:21 CET 2016


Module: icingaweb2
Branch: feature/translation-catalog-object-13012
Commit: 6c0adc7d009da2711a634b5531dbbcb44779905a
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=6c0adc7d009da2711a634b5531dbbcb44779905a

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Tue Nov 22 11:54:04 2016 +0100

CatalogEntry: Update reformatAttributeString

---

 modules/translation/library/Translation/Catalog/CatalogEntry.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/translation/library/Translation/Catalog/CatalogEntry.php b/modules/translation/library/Translation/Catalog/CatalogEntry.php
index 851dc7b..99323b9 100644
--- a/modules/translation/library/Translation/Catalog/CatalogEntry.php
+++ b/modules/translation/library/Translation/Catalog/CatalogEntry.php
@@ -679,7 +679,7 @@ class CatalogEntry
         $additionalChars = $isPrevious ? 5 : 2;
         for ($i = 0; $i < strlen($string); $i++)
         {
-            if ($i == ($lastCut + self::MAX_LINE_LENGTH - $additionalChars)) {
+            if ($i - $lastCut + $additionalChars == self::MAX_LINE_LENGTH) {
                 $splitLines[] = ($isPrevious ? '#| "' : '"')
                     . substr($string, $lastCut, $lastSpace - $lastCut + 1)
                     . '"';



More information about the icinga-checkins mailing list