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

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

Open
etx121 opened this issue Oct 30, 2024 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@etx121
Copy link

etx121 commented Oct 30, 2024

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)

@andrii-bodnar andrii-bodnar added the good first issue Good for newcomers label Oct 31, 2024
@timofei-iatsenko timofei-iatsenko changed the title linting issue: couldn't translate just a variable, remove t`` or add some text insideeslint linting issue: couldn't translate just a variable, remove t`` or add some text inside Nov 2, 2024
@timofei-iatsenko timofei-iatsenko changed the title linting issue: couldn't translate just a variable, remove t`` or add some text inside couldn't translate just a variable, remove t`` or add some text inside Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants