Commit Graph

77 Commits

Author SHA1 Message Date
Neil Lalonde d848916357 FEATURE: Greek language support, thanks to Vasilis Vlachokyriakos 2017-03-01 15:52:55 -05:00
Régis Hanol b20b568039 FIX: allow for empty translated strings 2017-03-01 11:30:44 +01:00
Régis Hanol 5738253998 FIX: locale fallback with pluralized strings 2017-02-28 10:02:29 +01:00
Régis Hanol a2c04be718 FIX: eradicate I18n fallback issues 💣
FIX: client's translation overrides were not working when the current locale was missing a key
FIX: ExtraLocalesController.show was not properly handling multiple translations
FIX: JsLocaleHelper#output_locale was not properly handling multiple translations

FIX: ExtraLocalesController.show's spec which was randomly failing
FIX: JsLocaleHelper#output_locale was muting cached translations hashes

REFACTOR: move 'enableVerboseLocalization' to the 'localization' initializer
REFACTOR: remove unused I18n.js methods (getFallbacks, localize, parseDate, toTime, strftime, toCurrency, toPercentage)
REFACTOR: remove all I18n.pluralizationRules and instead use MessageFormat's pluralization rules

TEST: add tests for localization initializer
TEST: add tests for I18n.js
2017-02-24 11:31:21 +01:00
Neil Lalonde 477b237e45 FIX: use 'other' instead of 'many' for Ukrainian pluralization until translations are fixed 2016-12-30 11:49:25 -05:00
Mohamad Abras e20e765afe Fix Arabic Pluralization Rules for Client 2016-12-17 17:50:35 +02:00
Sawood Alam 49fc54aac6 Add initial Urdu support with RTL direction 2016-12-03 23:17:51 -05:00
Sam 843c7a21c9 FIX: properly handle blank localizations 2016-10-05 18:08:54 +11:00
Robin Ward 3a4615c205 Wizard: Step 1 2016-09-22 09:48:58 -04:00
Robin Ward 6070939daa Support for other i18n bundles 2016-09-22 09:48:58 -04:00
safaalfulaij 75f6548710 Add Arabic Pluralization Rules for Client 2016-08-26 22:52:15 +03:00
Arpit Jalan e489af0b50 add Estonian language files 2016-06-01 15:25:21 +05:30
Gerhard Schlager 95155cda64 Fix Romanian pluralization rules (#4151) 2016-04-08 11:35:04 +02:00
Ionut Staicu 07fb0c4106 Updated ro.js.erb to match romanian plurals 2016-03-30 22:24:33 +03:00
Manel Villar ec004fc66a Support for Galician language js bundle added 2016-03-22 16:48:00 +01:00
Arpit Jalan f0653563ee add Vietnamese locale js file 2016-03-01 10:49:50 +05:30
Gerhard Schlager e56f8fa471 Add Slovak locale 2015-12-14 21:55:36 +01:00
Kane York 728845d008 FEATURE: Localization fallbacks (client)
This patch sets I18n.defaultLocale in the Discourse.start() script block (it
was formerly always 'en') to SiteSetting.default_locale, and patches
translate() to perform fallback to defaultLocale followed by english.
Additionally, when enable_verbose_localization() is called, no fallbacks will
be performed.

It also memoizes the file loading operations in JsLocaleHelper and strips out
translations from the fallbacks that are also present in a prefered language,
to minimize file size.
2015-07-15 10:17:28 -07:00
k0uki 612a318db4 pluralizationRules for Japanese translation 2015-07-05 21:23:19 +09:00
Qasem Hajizadeh ac6e66e0b2 Create bs_BA.js.erb 2015-05-12 16:16:10 +04:30
Qasem Hajizadeh cbbe60e66e Add pluralization rule to fa_IR.js.erb
Persian does not distinguish between the singular and plural forms
of nouns in the same way as English does. For numbered elements,
always return the 'other' key from the translation file.
2015-04-07 20:15:30 +04:30
Qasem Hajizadeh d88f291152 Create fa_IR.js.erb 2015-04-02 02:56:16 +04:30
riking 31d2098dc6 FIX: Reenable console output for verbose localization 2015-02-24 12:20:51 -08:00
Arpit Jalan 4c602f60c6 Add Telugu translation files 2015-02-09 20:46:31 +05:30
Jeff Atwood 3d0e59942c IE9 doesn't support console.log 2015-01-19 00:33:51 -08:00
Kane York 31c8b5763f Set Turkish pluralization rules
Turkish does not have different forms for singulars next to numerals
https://meta.discourse.org/t/turkish-translation-missing-many-singular-strings/23334/
2015-01-14 10:39:31 -08:00
Arpit Jalan 02e1d17ac7 Add Turkish translation files 2014-12-12 12:13:12 +05:30
khalid al-hussayen 9fc0a3f6f9 add arabic local files 2014-12-07 23:05:24 +03:00
Neil Lalonde c74225b5a6 Merge pull request #2964 from lirent/master
New "sq" language files for Discourse
2014-11-14 11:07:24 -05:00
Lirent d07c6c8cbb erb file for sq lang 2014-11-12 22:08:09 +01:00
Erick Guan bd59a5caba return true when invoke verbose_localization_session 2014-09-14 10:10:48 +08:00
Luca Daniel 2cf92dbe7b Add translation for Romanian. 2014-08-28 14:01:14 +03:00
Sam f48b78c0bb FEATURE: Allow localization sessions
use: I18n.verbose_localization_session()
2014-08-27 17:50:29 +10:00
Sam 3ea76815e4 Merge pull request #2686 from meglio/ru-plurals
Update RU pluralization to use 3 keys: one, few, other (as by Transifex)
2014-08-26 12:42:59 +10:00
Anton Andriyevskyy c42a5551a1 Update RU pluralization to use 3 keys: one, few, other (as by Transifex) 2014-08-23 15:28:14 +03:00
probus 1a28fcf486 Add Finnish 2014-08-21 13:48:42 +03:00
Janusz Skonieczny ff8f70cb1d New translation per instructions:
https://github.com/discourse/discourse/pull/2383#issuecomment-44501238
2014-05-29 09:54:44 +02:00
Neil Lalonde df538f63d9 Add Hebrew 2014-05-01 11:00:53 -04:00
Jong Eun Lee 00ff3f8953 add pluralization rules in ember for Korean (ko) 2014-04-23 08:08:39 +09:00
Erick Guan 2c6b7d8bed add pluralization rules in ember for Chinese 2014-04-15 19:59:20 +08:00
Neil Lalonde cb11967715 Add transifex config. Reconcile client.yml and server.yml translations in github and transifex. Transifex is now the source of all client.yml and server.yml files. 2014-04-10 15:42:38 -04:00
riking 3f35d1062e Remove trailing commas, add trailing semicolons 2014-03-18 18:21:10 -07:00
Nick Schonning 635c0dbf7a JSHint i18n.js
- Mark the I18n object as an overridable global
- Normalize comma first style rather than turning on lax comma
- Add missing semicolons
- Remove unnecessary semicolons
- Fix options overloading in “lookup”
- Use strict comparison for typeof checks and remove unnecessary parens
2014-03-11 03:01:12 -04:00
Nick Schonning 96bf38757d Update indexOf polyfill
Updated from the same source as the original comment. If IE8 isn’t
supported then this can be removed.
2014-03-08 00:37:28 -05:00
Régis Hanol c6bc324259 CLEANUP: remove unused pseudo locale 2014-02-26 19:03:04 +01:00
German Viscuso 3f049f4853 Provides Japanese locales 2013-11-19 22:20:19 +01:00
Régis Hanol 934ede7d91 shorter message for untranslated strings 2013-11-04 11:52:12 +01:00
Sam 589e9916f2 fix so some half working locales boot 2013-07-25 11:25:30 +10:00
Sam d0f50cb266 fixing up moment locales, they were not set up properly 2013-07-25 11:09:29 +10:00
premprakash 8c5e0e7550 Adding Portuguese-Brazil language 2013-07-15 14:45:16 -03:00