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

False positive with missing space warning #861

Open
nkosi23 opened this issue Sep 9, 2024 · 2 comments
Open

False positive with missing space warning #861

nkosi23 opened this issue Sep 9, 2024 · 2 comments

Comments

@nkosi23
Copy link

nkosi23 commented Sep 9, 2024

i've got a warning for the following translation from English to French while everything is actually correct:

Original string:
{VAR_PLURAL, plural, =1 {project} other {projects}}

Translated String:
{VAR_PLURAL, plural, =1 {projet} other {projets}}

image

@vslavik
Copy link
Owner

vslavik commented Sep 10, 2024

This is, I think, unfortunate translation of Placeholder “{project}” is missing from translation.

That it triggers on ICU MessageFormat syntax is unfortunate, but well, that will require proper support for that syntax in Poedit to be handled.

@nkosi23
Copy link
Author

nkosi23 commented Sep 10, 2024

Oh I see, thanks for the insights!

This is indeed an xlf file from an angular project (sorry for not mentioning it)
This syntax is needed to pluralize translations, but supporting it may be tricky since any number of cases can be specified: for example:

{VAR_PLURAL, plural, =1 {project} other {projects}}

could also be

{VAR_PLURAL, plural, =1 {project} =2 {large project} =3 {mega project} other {corporate programs}}

However the below seems to be properly supported by poedit as I do not have this warning:

{VAR_SELECT, select, 1 {today } 2 {by the day of delivery } other {no later than {INTERPOLATION} months after delivery }}

So maybe the code handling VAR_SELECT could be reused for the most part.

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