Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other sub-key in translation may cause a key to be marked as unused #516

Open
ClearlyClaire opened this issue Jul 18, 2023 · 0 comments
Open

Comments

@ClearlyClaire
Copy link

I'm running into an issue similar to #473, but with the unused check.

This occurs when a source item has an other, and a translation is partial and has only the other key:

en.yml:

---
en:
  preferences:
    other: Other
    posting_defaults: Posting defaults

ga.yml:

---
ga:
  preferences:
    other: Eile

This causes i18n-tasks unused to incorrectly flag the translation as unused:

Unused keys (58) | i18n-tasks v1.0.12
+--------+-------------+--------------------+
| Locale | Key         | Value              |
+--------+-------------+--------------------+
|   ga   | preferences | {"other"=>"Eile"}  |
+--------+-------------+--------------------+

Adding 'preferences.other' to ignore_unused works, but it would be preferable if i18n-tasks could detect this is not a plural key based on use or reference locale, or failing that, have an option to mark known keys as non-plural, but not preventing the unused key check if they truly get unused at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant