fix(i18n): label the contact name field with its own key - #447
Merged
Conversation
The Details tab rendered `t("company")` above the name input, so the
panel showed "Company" twice and the name field carried the wrong
label — in English as well as Korean. There was no
`Contacts.detailView.name` key at all; the call papered over it with
`{ fallback: "Name" }`, which next-intl ignores (the second argument
is ICU values, not options).
Add the missing key to both catalogues, point the label at it, and
drop the two decorative `fallback` arguments so the remaining call
sites read as what they are.
ArnasDon
approved these changes
Jul 29, 2026
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.
Summary
The contact Details tab labels the name field with the
companykey, so it renders "Company" above the name input — and "Company" again above the actual company input. Wrong in English too, not justko.What changed
src/components/contacts/contact-detail-view.tsx:491read:The namespace is
Contacts.detailView, so that resolves toContacts.detailView.company—"Company"/"회사". There is noContacts.detailView.namekey in either catalogue; the{ fallback: 'Name' }looks like it covers that, but next-intl's second argument is ICU values, not options — confirmed against the installed 4.13.1 types, whereTranslateArgsis[values?, formats?]. So it was silently discarded and the wrong label won.messages/en.json— addContacts.detailView.name="Name".messages/ko.json— add"이름", the term already used for name in six other places in the file.contact-detail-view.tsx— point the label att('name'), and drop the two decorativefallbackarguments (:465had one too, harmless there since the key exists, but it reads like a guard and isn't one).Worth noting this is a class of drift the parity test from #419 can't catch: both catalogues have
company, so key parity is satisfied — the bug is the call site reaching for the wrong key. Flagging it in case it shapes what else is worth guarding.Test plan
npm run typecheckclean.npm run lint— 39 warnings, same asmain, no new ones.npm run buildsucceeds.npm test—src/i18n/messages.test.tspasses both directions (no missing keys, no orphans); the 5 failures incurrency/date-utilsare the known non-UTC/ICU artifacts of a local machine and are identical onmain.t('…')in the touched file against both catalogues: 34 keys, all resolving inenandko.Note:
messages/en.json,messages/ko.jsonandcontact-detail-view.tsxalready failprettier --checkonmain, so I left formatting alone rather than bury a two-line fix in a reformat. My additions follow the surrounding style.Related
Follows the
{ fallback: … }observation in #418.