summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-03-02 17:57:32 +0300
committerAndrew Dolgov <[email protected]>2019-03-02 17:57:32 +0300
commit79945082b31689f6bbb8e074336ad20a96c81a64 (patch)
tree9f3d2425c4843838ef37437ed7d26dad29318ed7 /include/functions.php
parentda1b3e3ba151945eb8574b37d4f0231335c9faee (diff)
parent72fcc81919b76a73624bac67d6d71cae6a50033b (diff)
Merge branch 'master' of git.tt-rss.org:fox/tt-rss
Diffstat (limited to 'include/functions.php')
-rwxr-xr-xinclude/functions.php26
1 files changed, 15 insertions, 11 deletions
diff --git a/include/functions.php b/include/functions.php
index 6a612115e..8c0654f3c 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -141,7 +141,6 @@
}
_bindtextdomain("messages", "locale");
-
_textdomain("messages");
_bind_textdomain_codeset("messages", "UTF-8");
}
@@ -2403,18 +2402,23 @@
return __((parseInt(n) > 1) ? msg2 : msg1);
}';
- $l10n = _get_reader();
+ global $text_domains;
- for ($i = 0; $i < $l10n->total; $i++) {
- $orig = $l10n->get_original_string($i);
- if(strpos($orig, "\000") !== FALSE) { // Plural forms
- $key = explode(chr(0), $orig);
- print T_js_decl($key[0], _ngettext($key[0], $key[1], 1)); // Singular
- print T_js_decl($key[1], _ngettext($key[0], $key[1], 2)); // Plural
- } else {
- $translation = __($orig);
- print T_js_decl($orig, $translation);
+ foreach (array_keys($text_domains) as $domain) {
+ $l10n = _get_reader($domain);
+
+ for ($i = 0; $i < $l10n->total; $i++) {
+ $orig = $l10n->get_original_string($i);
+ if(strpos($orig, "\000") !== FALSE) { // Plural forms
+ $key = explode(chr(0), $orig);
+ print T_js_decl($key[0], _ngettext($key[0], $key[1], 1)); // Singular
+ print T_js_decl($key[1], _ngettext($key[0], $key[1], 2)); // Plural
+ } else {
+ $translation = _dgettext($domain,$orig);
+ print T_js_decl($orig, $translation);
+ }
}
+
}
}