Skip to content

ngettext with a regular string #281

@uladzimirdev

Description

@uladzimirdev

Hi, I couldn't find the answer from the code, so maybe you can help me to understand how to handle such simple case

ngettext(msgid`record`, "records", n);

babel plugin doesn't like such strings and raises an error

at template2Msgid (/node_modules/babel-plugin-ttag/dist/utils.js:116:32)
at /node_modules/babel-plugin-ttag/dist/extractors/ngettext.js:55:38

is it a bug or just unexpected usage? is there any workaround?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions