Skip to content

couldn't translate just a variable, remove t`` or add some text inside #72

@etx121

Description

@etx121

I tried the code:

const count = 0; 

const messages = {
  'testPlural': msg`${plural(count,  {
      one: '# friend',
      other: '# friends',
    })}`
}

However I got the linting error:
You couldn't translate just a variable, remove t`` or add some text insideeslint[lingui/no-single-variables-to-translate](https://github.com/lingui/eslint-plugin/blob/main/docs/rules/no-single-variables-to-translate.md)

I report the issue, following @timofei-iatsenko 's recommendation lingui/js-lingui#2074 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions