Commit Graph

18 Commits

Author SHA1 Message Date
Loïc Guitaut
9c57be6403 DEV: Update Ruby I18n pluralization rules
The current pluralization rules used by the I18n system in Ruby are
obsolete and don’t follow the official rules available at
unicode.org/cldr/charts/45/supplemental/language_plural_rules.html.

Using https://github.com/ruby-i18n/ruby-cldr, new and updated ones have
been generated.
2024-07-29 15:44:52 +02:00
锦心
3bc459e178
FIX: Add plural definitions for Hungarian (#27933)
Hungarian actually has a plural form (See: https://meta.discourse.org/t/issue-with-pluralized-count-translation-override/316019/8)

In a past commit we introduced an external JS library to describe the
plural form of the language. (301713ef96)
But this JS library actually has a slightly different pluralization
definition than what we use in the backend (plurals.rb). ruby-i18n
incorrectly assumes that Hungarian does not have plural forms.
This resulted in singular text being used on the front end for
Hungarian, but admins were unable to find and edit the singular text in
customization.

This commit adds a singular definition for Hungarian to the backend,
compatible with the  "make-plural/cardinals" library, thus fixing the
above issue.
2024-07-16 15:17:18 +08:00
Discourse Translator Bot
9d8044a2ee
FEATURE: Add Uyghur language (#27183)
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2024-05-27 09:58:18 +02:00
David Taylor
7c77cc6a58
DEV: Apply syntax_tree formatting to config/* 2023-01-09 11:13:29 +00:00
Gerhard Schlager
4e42759caa
FIX: Use correct plural rules for Russian (#19467)
Previously this didn't work because Transifex didn't support "many".
2022-12-14 18:56:46 +01:00
Sam Saffron
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Gerhard Schlager
d43f4206c7 FEATURE: Add Armenian language 2019-03-28 14:24:14 +01:00
Gerhard Schlager
471f9927bb Fix Bosnian plural rules 2018-09-27 05:43:49 +02:00
blokovi
364e6fdd53 FIX: pluralization rules for Serbian language (#5453)
Updated SR pluralization to use 3 keys: one, few, other (as by Transifex)
2017-12-22 12:20:19 +01:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09: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
Tomas Ibarra
09ed2cdb2d FIX: Romanian pluralization rules using modules 2016-03-30 15:15:43 -07:00
Ionut Staicu
809ea42953 Updated plurals.rb to match romanian rules 2016-03-30 22:23:03 +03:00
Qasem Hajizadeh
f89b1002f0 change fa key to fa_IR in plurals.rb
change fa key to fa_IR in plurals.rb
2015-04-09 01:39:59 +04:30
riking
bc06b7f0aa FIX: 🈂️ Pluralization rules had wrong lang keys 2015-02-09 14:19:11 -08: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
Kuba Brecka
b1249df598 update i18n:stats task to count pluralization based on locale setting 2013-04-02 14:56:26 +02:00
Kuba Brecka
af0a772629 implement pluralization for server-side and js 2013-03-31 19:55:02 +02:00