blob: 18609ef98ef6b0fd7e5d1032c873dc394bd52939 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
diff -up Zend/I18n/Translator/Loader/Gettext.php.glpi Zend/I18n/Translator/Loader/Gettext.php
--- library/Zend/I18n/Translator/Loader/Gettext.php.glpi 2013-10-02 09:41:18.572098028 +0200
+++ library/Zend/I18n/Translator/Loader/Gettext.php 2013-10-02 09:41:56.658244928 +0200
@@ -126,9 +126,11 @@ class Gettext implements FileLoaderInter
array_shift($originalString);
- foreach ($originalString as $string) {
- $textDomain[$string] = '';
- }
+/// PROBLEM WITH GLPI WHEN singular = plural
+/// opened bug http://framework.zend.com/issues/browse/ZF-11974
+// foreach ($originalString as $string) {
+// $textDomain[$string] = '';
+// }
} else {
$textDomain[$originalString[0]] = $translationString[0];
}
diff -up Zend/I18n/Translator/Translator.php.glpi Zend/I18n/Translator/Translator.php
--- library/Zend/I18n/Translator/Translator.php.glpi 2013-10-02 09:32:05.331918805 +0200
+++ library/Zend/I18n/Translator/Translator.php 2013-10-02 09:32:42.679067978 +0200
@@ -403,6 +403,11 @@ class Translator
return ($number == 1 ? $singular : $plural);
}
+ /// GLPI Hack for languages with 1 plural form (chinese)
+ if (!is_array($translation)) {
+ return $translation;
+ }
+
$index = $this->messages[$textDomain][$locale]
->getPluralRule()
->evaluate($number);
|