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

Weird ngettext behaviour for strings with no singular form expressions #197

Open
clrnd opened this issue Apr 28, 2020 · 1 comment
Open
Assignees
Labels

Comments

@clrnd
Copy link

clrnd commented Apr 28, 2020

Strings are not being translated if the msgid tagged string doesn't have any expression in it.

I've set up a minimum working example here: https://github.com/alvare/ttag-bug-mwe

If you do npm run counter-uk you'll get the string with the placeholders and no replacement.

✔ uk.po updated
починаємо рахунок до 3
something again ${ i }
something
something again ${ i }
something again ${ i }

This happens because the t function iterates over the msgid to find replacements when translating, and if it has none then it doesn't do any replacement on the plural string.

@AlexMost
Copy link
Member

Hi @Alvare! Seems like a bug, thanks for the report, will take a look ASAP.

@AlexMost AlexMost self-assigned this Apr 29, 2020
@AlexMost AlexMost added the bug label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants