eslint-plugin icon indicating copy to clipboard operation
eslint-plugin copied to clipboard

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

Open etx121 opened this issue 1 year ago • 0 comments

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 https://github.com/lingui/js-lingui/issues/2074#issuecomment-2446988265

etx121 avatar Oct 30 '24 12:10 etx121