WeblateOrg/weblate

Support i18next keys that do not match the source file

Opened this issue · 3 comments

Describe the problem

Currently there is no possibility to define units that do not match the source file while using monolingual localization framework. This feature could be used to support word cases which are different for every language inside glossary.

For example:

// ru.json
{
    "word-nominative":    "слово",
    "word-genitive":      "слова",
    "word-dative":        "слову",
    "word-accusative":    "слово",
    "word-instrumental":  "словом",
    "word-prepositional": "слове",
}

// en.json
{
    "word": "word",
}

Describe the solution you would like

Enhance multistrings not only with plurals, but also with cases: "word_one#nominative": "слово".

Describe alternatives you have considered

Allow manually configure component not to drop units that don't match the source file.

Screenshots

No response

Additional context

No response

nijel commented

How these units should be displayed if there is no matching key with the source string? Is there some specification available for this?

This issue has been put aside. It is currently unclear if it will ever be implemented as it seems to cover too narrow of a use case or doesn't seem to fit into Weblate.

Please try to clarify the use case or consider proposing something more generic to make it useful to more users.

I didn't find the specifications, but there are a lot of languages that use grammatical cases. I tnink, it's not a narrow case, and many developers will face this problem using glossary in weblate.