Skip to content
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

Can't use dynamic labels together with pluralization #54

Open
marcjoha opened this issue Jul 21, 2021 · 1 comment
Open

Can't use dynamic labels together with pluralization #54

marcjoha opened this issue Jul 21, 2021 · 1 comment

Comments

@marcjoha
Copy link

Dynamic labels in a plural value are not replaced. If i have the below definitions then {{count}} will not be expanded in the second translation.

key: selected(Plural.one)
en: 1 item selected 

key: selected(Plural.multiple)
en: {{count}} items selected

Not mentioned in the docs so unsure whether a bug or just not yet implemented.

@NikoBoerger
Copy link

NikoBoerger commented Oct 23, 2021

The way I use it is, that for the Plural.one version I also use the exact same dynamic label as for the Plural.multiple.
So you'd have "{{count}} item selected". Of course you always put the number 1 into it.

Looking at the how the code generation works, I think you need to do it that way in order for it to function correctly.
So when you have a key using a dynamic label, I think every pluralized form needs this dynamic label. Even if it's Plural.zero or Plural.one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants