User tests: Successful: Unsuccessful:
The Translator of the Welsh language pack noticed that his suffixes specified in the localise.php file are ignored by Joomla. Another suffix is used.
After investigation, we found that Joomla actually tries first to find a plural string with the actual number of items as suffix (eg for 3 items it tries with _3
) and only if that doesn't exist it tries with the suffix specified by the language pack.
This PR changes the behavior so the suffix from the language pack (localise.php) takes priority over the actual number.
You should get the response Wedi dad-gyhoeddi %d categori.(FEW)
from string COM_CATEGORIES_N_ITEMS_UNPUBLISHED_4
You get the response Wedi dad-gyhoeddi %d gategori.(TWO)
from string COM_CATEGORIES_N_ITEMS_UNPUBLISHED_3
Don't know.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
I found the original source of that line of code in a PR on the (old) platform: joomla/joomla-platform#726
The idea was that you can specify strings for specific numbers. Eg for 7 days you could say DAYS_7="A week"
or you could specify for 12 items ITEMS_12
="A dozen items"`.
I have no clue if that was ever used as it very likely was an unknown, hidden feature.
But this PR would actually break that feature.
On the other hand I don't see a way to fix the regular plural for languages with more complex plural forms. Especially for those that have a specific one for zero items (eg Welsh and Latvian).
Especially with Crowdin we can't customise how the plural suffixes are done. They just number it (like we do in core as well).
I've asked Crowdin if we could switch to string based suffixes like "ZERO", "ONE", "TWO", "FEW", "MANY" (eg those used by http://cldr.unicode.org/index/cldr-spec/plural-rules).
That would make things much simpler.
I'm closing this as Crowdin offered a solution with string based suffixes which solves the issue in a better way.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-13 07:55:56 |
Closed_By | ⇒ | Bakual |
By the way, current code was introduced for 2.5.0 (d918bd9).