Skip to content

i18next plugin parser does not support plurals #1069

@NilsJacobsen

Description

@NilsJacobsen

This problem was comming up in this PR: mifi/lossless-cut#1653

Problem

i18next has pluarls support -> https://www.i18next.com/translation-function/plurals

  • You need to suffix the key with _one, _many ... (there are multiple options)
  • The frontend code should look for a count option in the t function t('key', {count: 1})

The current implementation of the parser is just passing the key, causing the ide extension to handle the wrong key.

Proposal

Improve the plugin parser to recognize the count option as the ns option and suffix the key.

@inlang/plugins @inlang/ide-extension

Metadata

Metadata

Assignees

Labels

scope: inlang/pluginsRelated to plugins (not necessarily inlang source code).type: improvementSomething that can be improved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions