Skip to content

fix(i18n): replace hardcoded UI strings with translation keys#173

Open
erikpach wants to merge 1 commit into
relaticle:3.xfrom
erikpach:fix/hardcoded-i18n-strings
Open

fix(i18n): replace hardcoded UI strings with translation keys#173
erikpach wants to merge 1 commit into
relaticle:3.xfrom
erikpach:fix/hardcoded-i18n-strings

Conversation

@erikpach

Copy link
Copy Markdown
Contributor

What

Replace hardcoded user facing strings with namespaced translation keys.

Why

A few strings were passed to __() as raw English text without a custom-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_settings key. Updated 10 call sites. The displayed English text is unchanged.

File String Key
MultiValueInputComponent Add common.add
MultiValueInputComponent Click to add common.click_to_add
PhoneInputComponent Add phone number phone.add_label
PhoneInputComponent Enter phone number phone.empty_state_label
RecordSelectInputComponent Add common.add
RecordSelectInputComponent Select record... record.empty_state_label
TypeField Search field types... field.form.type_search_prompt
TypeField No field types found field.form.type_no_results
TypeField Searching... common.searching
FieldForm (tab) Visibility field.form.visibility_settings (existing)

Notes

pest passes (703 passed). The test:type-coverage stage reports 99.4% on 3.x before this change too, so it is pre existing and unrelated to this PR.

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

Successfully merging this pull request may close these issues.

1 participant