question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mark key as translated if it has translation for at least one derived key

See original GitHub issue

Is 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.

image

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:open
  • Created 2 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
bratziecommented, Aug 2, 2021

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.

image

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 😅

1reaction
antfucommented, Jul 27, 2021

@bratzie Sorry for the delay, do you see if we make the derivedKeyRules accept regex would solve the problem for you?

For example:

"i18n-ally.derivedKeyRules": [
  "{key}_plural",
  "{key}_\\d+",
  "{key}_meta_.*"
]

Will make foo_plural, foo_35, foo_meta_anything marked as used as long as the foo is presented?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lesson 2: Definition of Translation and Three Basic Properties
A translation of a plane along a given vector is a basic rigid motion of a plane. The three basic properties of translation...
Read more >
Propositional Logic
Translating from English to Propositional Logic takes practice. To do it efficiently is an art. Thankfully, you can do it systematically. Once ......
Read more >
Circular RNA, the Key for Translation - PMC - NCBI - NIH
CircRNAs have a strong impact on translational control via their sponge function, and form a new mRNA family as they are translated into ......
Read more >
2. “If…then….” and “It is not the case that….” - Milne Publishing
Then, use your key to translate the sentences into the propositional logic. Your translation key should contain only atomic sentences. These should be...
Read more >
Section 4 Using the Resource Translation Tool - Lsoft
Once you have obtained the Translation Kit for the correct Maestro version, ... and un-supplied parts, each supplied key is marked with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found