Mark key as translated if it has translation for at least one derived key
See original GitHub issueIs your feature related to a specific framework or general for this extension General
Is your feature request related to a problem? Please describe.
After adding a russian with more than 2 plural forms, all of my languages will display missing keys, as the syntax for languages that use _plural
and languages that use _0
, _1
. _2
(and so on) differ. All my “normal” languages will say that they are missing keys like {key}_0
. The multiple plural form languages will say that they are missing _plural
forms.
Describe the solution you’d like
I feel like the framework knows which languages have certain settings, so I guess it would be cool there was a setting where languages utilizing _plural
would ignore keys with _{number}
(and vice versa) in order to see if a language is 100% covered.
Additional context In the following screenshot, you see the all languages at around 90%, since they are complaining about missing keys not applicable for their language.
Worth noting is that we noticed this when we started using Lokalise. We had been (wrongfully) using the _plural
syntax for Russian earlier. But files downloaded are correctly formatted for the appropriate language, leading to the above situation which doesn’t look good in the extension.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (10 by maintainers)
Top GitHub Comments
I think that proposed solution would solve #552 perfectly! That was about usage reports 😃
I don’t think that would help in this (#570) case though, Since the keys in the progress tab don’t seem to take those rules into account for what it shows. I have {key}_n (n = 0, 1, 2, 3) as rules and they still show up under “No Translation”. Hopefully the image makes it clearer.
This issue is rooted in the fact that once you have languages with 2 plural forms (key and key_plural) with other languages using more than 2 plural forms (key_0, key_1, key_2 and so on) you will have a lot of missing keys in either languages that aren’t really missing since it’s just using a different structure.
In my case, English has key and key_plural (which solves all cases for English, but it’s complaining that my English is missing Russian plural forms) and with Russian it’s vice-versa. I have the correct plural forms, but it’s complaining that I’m missing base-keys and _plural.
Sorry for the delay, I was on vacation 😅
@bratzie Sorry for the delay, do you see if we make the
derivedKeyRules
accept regex would solve the problem for you?For example:
Will make
foo_plural
,foo_35
,foo_meta_anything
marked as used as long as thefoo
is presented?