fix(i18n): replace hardcoded UI strings with translation keys#173
Open
erikpach wants to merge 1 commit into
Open
fix(i18n): replace hardcoded UI strings with translation keys#173erikpach wants to merge 1 commit into
erikpach wants to merge 1 commit into
Conversation
Several user-facing strings were passed to __() as raw English text without a namespaced key, or rendered with no translation at all (the Visibility tab). They could not be localized and triggered missing-translation-key warnings under non-English locales. Replace them with custom-fields:: keys and add matching English entries (display text unchanged). The Visibility tab reuses the existing field.form.visibility_settings key.
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.
What
Replace hardcoded user facing strings with namespaced translation keys.
Why
A few strings were passed to
__()as raw English text without acustom-fields::key, and the Visibility tab label was rendered with no translation at all. As a result they could not be localized and triggered "missing translation key" warnings under non English locales.Changes
Added 8 English entries and reused the existing
field.form.visibility_settingskey. Updated 10 call sites. The displayed English text is unchanged.MultiValueInputComponentAddcommon.addMultiValueInputComponentClick to addcommon.click_to_addPhoneInputComponentAdd phone numberphone.add_labelPhoneInputComponentEnter phone numberphone.empty_state_labelRecordSelectInputComponentAddcommon.addRecordSelectInputComponentSelect record...record.empty_state_labelTypeFieldSearch field types...field.form.type_search_promptTypeFieldNo field types foundfield.form.type_no_resultsTypeFieldSearching...common.searchingFieldForm(tab)Visibilityfield.form.visibility_settings(existing)Notes
pestpasses (703 passed). Thetest:type-coveragestage reports 99.4% on3.xbefore this change too, so it is pre existing and unrelated to this PR.