ngettext definition not in resulting .po-file
See original GitHub issueHi,
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:
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),
};
Other functions with ngettext are working perfectly fine, f.ex. this is included and working:
import { ngettext, msgid } from 'ttag.macro';
getDaysLine() {
const { days = 0 } = this.props.entry;
return (
<span>
{days} {ngettext(msgid`Tag`, `Tage`, days)}
</span>
);
}
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:
#: src/maps/index.js:75
msgid "Woche"
msgstr "Woche"
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
GNU gettext utilities
Concatenating the empty string does not change the resulting overall string, but it is a way for us to comply with the necessity...
Read more >Analyzing Queries Using Query Profile
A query whose result is computed based purely on metadata, without accessing any data. These queries are not processed by a virtual warehouse....
Read more >sp_send_dbmail (Transact-SQL) - SQL Server - Microsoft Learn
When no profile_name is specified, sp_send_dbmail uses the default private profile for the current user. If the user does not have a default...
Read more >Data definition language (DDL) statements in ... - Google Cloud
The following example creates a clustered table named myclusteredtable in mydataset using the result of a query. The table is not partitioned. CREATE...
Read more >13.7.7.30 SHOW PROFILE Statement
The SHOW PROFILE and SHOW PROFILES statements display profiling information that indicates resource usage for ... MEMORY is not currently implemented.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Yes, let me try to reproduce it in a clean repo. Please hold the line. 😉 Could take me a while…