You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#17610 introduced linting of the usage of translation keys in i18n/label expressions through clj-kondo. #17735 created a script to find missing, probably non-namespaced, and probably unused translation keys. Since there were so many of the latter two, their removal/fixing was extracted to separate issues.
In particular, there are 364 probably unused translation keys in translations/en.json that we would like to remove (and probably remove them from other translation files as well).
List of keys
Here are the keys in translation/en.json that are most likely not used inside src:
Uncomment the relevant expressions in scripts/lint_translations.clj, in particular the line to print out the unused translation keys, or simply use the list above.
Remove them from translations/en.json and probably from other translation files as well.
Notes
Translation keys in src can theoretically be generated at runtime (e.g. using keyword), and, if we're not careful, we may by accident remove a key that's actually needed.
There may be translation keys (like months, weekdays, etc.) that are currently not used inside src, but which we may still want to keep around.
These problems should be addressed once this issue is worked on.
Future Steps
Once actually unused keywords have been removed, and all invocations of i18n/label have been fixed to only use keywords namespaced with t:/, then the translation lint script returning an "unused translation keyword" would probably mean that the translation key has been misspelled inside tranlsations/en.json, and we may want to adjust the warning.
The text was updated successfully, but these errors were encountered:
@ilmotta - I can't recall - is this issue already handled?
@J-Son89, I think this issue is still valuable. The lint/translation.clj script still contains instructions about how to analyze and eliminate remaining unused translations. But we may prefer to close this issue because I don't see core contributors working on this anytime soon, unless we want to keep it open for external contribution.
Problem
#17610 introduced linting of the usage of translation keys in
i18n/label
expressions through clj-kondo. #17735 created a script to find missing, probably non-namespaced, and probably unused translation keys. Since there were so many of the latter two, their removal/fixing was extracted to separate issues.In particular, there are 364 probably unused translation keys in
translations/en.json
that we would like to remove (and probably remove them from other translation files as well).List of keys
Here are the keys in
translation/en.json
that are most likely not used insidesrc
:Implementation
Uncomment the relevant expressions in scripts/lint_translations.clj, in particular the line to print out the unused translation keys, or simply use the list above.
Remove them from
translations/en.json
and probably from other translation files as well.Notes
src
can theoretically be generated at runtime (e.g. usingkeyword
), and, if we're not careful, we may by accident remove a key that's actually needed.src
, but which we may still want to keep around.These problems should be addressed once this issue is worked on.
Future Steps
Once actually unused keywords have been removed, and all invocations of
i18n/label
have been fixed to only use keywords namespaced witht:/
, then the translation lint script returning an "unused translation keyword" would probably mean that the translation key has been misspelled insidetranlsations/en.json
, and we may want to adjust the warning.The text was updated successfully, but these errors were encountered: