-
-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plural count and formula not saved on reboot for built-in locales #4487
Comments
The shipped language definitions are always synced on container startup using setuplang. The language and plurals definitions are built on expectation that either file format includes the plural definition and if not, it sticks to CLDR. |
This issue looks like a support question. We try to answer these reasonably fast, but in case you are looking for faster resolution, please consider purchasing support subscription and make Weblate stronger. |
Our plugin uses eval() for plural formula. It is written in PHP. We need to put brackets to the formula manually. Every time we reboot the service, we need to change it again. Is it possible to skip |
@dada-amater patches are welcome to make it configurable. Asking same question on several places is not that welcome.
Your plugin is broken if it needs changing plural formula from Gettext. Use something that handles it correctly. For example, https://github.com/phpmyadmin/motranslator does it properly and safely (without using eval). |
Otherwise we miss language name updates. See WeblateOrg/language-data#3
Revising this again and I think found the issue. There is implicit setuplang invocation on database migration which is supposed to add newly defined languages and not updating existing ones. This flag is however not honored for plurals, so these are updated always... |
Thank you for your report, the issue you have reported has just been fixed.
|
Describe the bug
Plural count and formula not saved on reboot for built-in locales.
To Reproduce
(n == 0) ? 0 : (n == 1 ? 1 : 2)
Please note that I created a new locale (fr_US). For this locale, count and formula are persisted after reboot.
Screenshots
Server configuration and status
The text was updated successfully, but these errors were encountered: