You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: this is a very minor issue you might not want to fix, but I wanted to report it since I came across it during my wrapper unit tests.
Issue: if the translation is unknown PHP's built-in gettext function will use English plural rules (fallback language) while Translator (translations loaded from PO file) will use the destination language plural rules.
Example:
English > French
French doesn't pluralize zero, while English does.
sandwich is an unknown key but a French translation is loaded
// with GettextTranslatorn__('sandwich', 'sandwiches', 0); // => sandwiches// with Translatorn__('sandwich', 'sandwiches', 0); // => sandwich
The text was updated successfully, but these errors were encountered:
It's interesting. I think we should unify the behaviours between two implementations, so GettextTranslator should be changed to mimic the native gettext.
I don't have enought time these days to face this. Do you want to work in a pull request?
Note: this is a very minor issue you might not want to fix, but I wanted to report it since I came across it during my wrapper unit tests.
Issue: if the translation is unknown PHP's built-in gettext function will use English plural rules (fallback language) while
Translator
(translations loaded from PO file) will use the destination language plural rules.Example:
sandwich
is an unknown key but a French translation is loadedThe text was updated successfully, but these errors were encountered: