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
Using v1.8.0 and doing testing in the test folder: if I enter at “Number of blocks” 0 then the message comes out “We have 0 blocks” instead of “We have no blocks”. This is weird. Somehow function plurals.getTranslationIndex returns 1 which extracts from the message array “We have 0 blocks”.
Am I wrong or could this be fixed? Thank you
The text was updated successfully, but these errors were encountered:
Thank you for reporting this. Actually the problem is due to the way that multiple languages handle translations and the fact we introduced this at a later stage in the project and forgot to clean up the testing.
In the file src/vuex-i18n-plurals.js the available plural forms for all languages are defined. By default – which includes English – it will return the first form for 1 and the second form for all others. I.e. returning "We have 0 blocks" instead of "We have no blocks". Which basically both would be correct translations.
To make the use case work again, we would probably need to check, whether the default language specification is used and then also check if there is a third translation available which would then be used to define the zero translation string.
Using v1.8.0 and doing testing in the test folder: if I enter at “Number of blocks” 0 then the message comes out “We have 0 blocks” instead of “We have no blocks”. This is weird. Somehow function plurals.getTranslationIndex returns 1 which extracts from the message array “We have 0 blocks”.
Am I wrong or could this be fixed? Thank you
The text was updated successfully, but these errors were encountered: