-
Notifications
You must be signed in to change notification settings - Fork 44
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
ngettext definition not in resulting .po-file #200
Comments
OK, the problem is that I already defined a singular definition of "Woche" somewhere else. export const timespanTypeNameMap = {
[TimespanType.WEEK]: t`Woche`,
} So this seems to be conflicting then and the latter 'ngettext' gets ignored without warning.. Ok, sorry to be overhasty, this wasn't the problem. Even if I remove the singular variants, the plural still does not show up. |
Hi @aldipower! Seems like a bug, need to check that. Let's clarify the reproduce case. If I've got your point, this code block is not extracted by import { ngettext, msgid } from 'ttag.macro';
export const timespanTypePluralNameFunc = {
[TimespanType.WEEK]: count => ngettext(msgid`Woche`, `Wochen`, count),
[TimespanType.MONTH]: count => ngettext(msgid`Monat`, `Monate`, count),
[TimespanType.YEAR]: count => ngettext(msgid`Jahr`, `Jahre`, count),
}; It's CRA? |
Hi @AlexMost ! Yes, it's CRA with ttag.macro. Exactly, the above code block isn't extracted and does not show up in the .po.
to
it shows up as expected. When I run it with |
Hm, that sound's interesting. I will appreciate if you could create some example repo. That would simplify the reproduce case for me. |
Yes, let me try to reproduce it in a clean repo. Please hold the line. ;) Could take me a while.. |
Ok @AlexMost, that was easy to reproduce. https://github.com/aldipower/ttag-test Plural forms of src/test-map/index.js should show up in i18n/en.po after running npm run i18n-update, but the do not. |
Hi,
I have the following code-block in my application, which is not detected by the parser and thus not included in the resulting .po-file:
Other functions with ngettext are working perfectly fine, f.ex. this is included and working:
Maybe it's not a bug and I do not understand the upper scope correctly?
It is really unexpected anyway.
Acutally it is include in the .po file, but only as singular form:
The text was updated successfully, but these errors were encountered: