Repository navigation
Translate the four keys that render as their own name - #264
Merged
Merged
Conversation
A sweep of every t("...") in the frontend against the
locale files found five keys with no translation. Two of
the seven matches were i18next plural forms and one was a
JSDoc example; four were real.
The visible one is the Settings > General language
heading. It renders as the literal lower-case string
"language", in all four languages, and its guard could not
have helped:
{t("language") || "Language"}
i18next returns the key when it cannot find a translation,
and "language" is truthy, so the fallback never ran. The
same shape sits two hundred lines up on t("tray"), where
it is harmless only because that key happens to exist.
Both are gone now that the keys are there.
clocks:capture reached an iconOnly button, where the Button
component passes children through as aria-label. Nothing
looked wrong; a screen reader simply said "capture".
customers:editContract and projects:taskLabel used
i18next's defaultValue argument, which does work, so they
read correctly in English and were untranslated in the
other three.
The JSDoc example in ToggleField pointed at
externalEditorEnableHint, which does not exist; the real
key is externalEditorHelp.
All four keys added in en, de, es and ru. Parity holds,
and no t() in the source is now unresolved apart from the
plural forms, which is what they should be.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A sweep of every
t("...")in the frontend against the locale files found five keys with no translation. Two of the seven matches were i18next plural forms and one was a JSDoc example; four were real.The visible one is the Settings → General language heading. It renders as the literal lower-case string
language, in all four languages, and its guard could not have helped:i18next returns the key when it cannot find a translation, so this evaluates to
"language", which is truthy — the fallback never ran. Confirmed against the real library:The same shape sits two hundred lines up on
t("tray"), harmless only because that key happens to exist. Both are gone now that the keys are there.clocks:capturereached aniconOnlybutton, whereButtonpasses children through asaria-label. Nothing looked wrong; a screen reader simply said "capture".customers:editContractandprojects:taskLabelused i18next'sdefaultValueargument, which does work, so they read correctly in English and were untranslated in the other three.The JSDoc example in
ToggleFieldpointed atexternalEditorEnableHint, which does not exist; the real key isexternalEditorHelp.All four keys added in en, de, es and ru. Parity holds at 0 missing per language, no
t()in the source is unresolved apart from the plural forms,tscis clean, and the four strings are in the built bundle.