Moin
21 Luglio 2024, 3:39pm
1
Continuing the discussion from Issue with pluralized (count) translation override :
I think Hungarian is not the only language affected by this. After checking Hebrew because of this bug mentioning problems, I thought maybe even more languages are affected, so I started looking for more cases.
After finding another one, I expect that even more languages are affected.
2 Mi Piace
david
(David Taylor)
22 Luglio 2024, 12:10pm
3
Thanks @Moin !
Iāve made this change to stop the bleeding. This will limit the impact of failed compilations so that they only affect _MF
strings, rather than taking down the whole site.
Weāll keep digging into the root cause, and update here when we have a solution.
11 Mi Piace
loic
(LoĆÆc Guitaut)
25 Luglio 2024, 12:32pm
5
Weāve just merged a patch that relaxes the MessageFormat compiler, allowing invalid plural keys in the messages:
discourse:main
ā discourse:loic-handle-bad-mf-pluralization-rules
opened 04:08PM - 24 Jul 24 UTC
We can get translations with invalid plural keys from Crowdin or from custom ove⦠rrides. Currently, this will raise an error and the locales wonāt be outputted at all.
This PR addresses this issue by using the new `strict: false` option of our `messageformat-wrapper` gem, allowing to generate locales even if there are invalid plural keys present.
This should take care of most of the problems. Other patches should follow soon.
5 Mi Piace
loic
(LoĆÆc Guitaut)
26 Luglio 2024, 10:27am
6
Another patch has just been merged:
discourse:main
ā discourse:loic-validate-translation-overrides
opened 03:00PM - 25 Jul 24 UTC
Currently, when adding translation overrides, values arenāt validated for MF str⦠ings. This results in being able to add invalid plural keys or even strings containing invalid syntax.
This PR addresses this issue by compiling the string when saving an override if the key is detected as an MF one.
If thereās an error from the compiler, itās added to the model errors, which in turn is displayed to the user in the admin UI, helping them to understand what went wrong.
----


This will prevent creating invalid MF overrides in the admin UI.
5 Mi Piace
loic
(LoĆÆc Guitaut)
29 Luglio 2024, 1:46pm
7
Just merged this PR:
discourse:main
ā discourse:loic-update-ruby-i18n-pluralization-rules
opened 03:56PM - 26 Jul 24 UTC
The current pluralization rules used by the I18n system in Ruby are obsolete and⦠donāt follow the official rules available at https://www.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.
Pluralization rules in Ruby should now be up-to-date with the ones we have in JS
4 Mi Piace
j.jaffeux
(Joffrey Jaffeux)
Chiuso
3 Agosto 2024, 1:46pm
8
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.