Moin
21 يوليو 2024، 3:39م
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)
david
(David Taylor)
22 يوليو 2024، 12:10م
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 إعجابًا
loic
(Loïc Guitaut)
25 يوليو 2024، 12:32م
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 إعجابات
loic
(Loïc Guitaut)
26 يوليو 2024، 10:27ص
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 إعجابات
loic
(Loïc Guitaut)
29 يوليو 2024، 1:46م
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 إعجابات
j.jaffeux
(Joffrey Jaffeux)
تم إغلاقه في
3 أغسطس 2024، 1:46م
8
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.