Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .changeset/grid-import-transform-i18n-3938.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
"@object-ui/i18n": patch
---

`grid.import.transform` is now translated in ko / de / fr / es / pt / ru / ar instead of served as English

The third column header of the import wizard's saved-mapping summary was
**byte-identical to `en`** — the literal string `Transform` — in seven of the
nine non-`en` packs. zh (`转换`) and ja (`変換`) had translated it, which is what
rules out the "deliberately untranslated term" reading; this is the sixth key of
the same six-line block objectui#3920 / PR #3936 fixed the other five of, and it
was left out of that card only to keep its 5-keys / 35-values census verifiable.

| pack | before | after | the pack's own anchor |
|------|--------|-------|----------------------|
| ko | `Transform` | `변환` | `savedMappingHint` "이름 변경 + 변환 + 형 변환" |
| de | `Transform` | `Transformation` | `savedMappingHint` "Umbenennung + Transformationen + Typkonvertierung" |
| fr | `Transform` | `Transformation` | `savedMappingHint` "le renommage + les transformations + la conversion de type" |
| es | `Transform` | `Transformación` | `savedMappingHint` "el cambio de nombre + las transformaciones + la conversión de tipos" |
| pt | `Transform` | `Transformação` | `savedMappingHint` "renomeação + transformações + conversão de tipos" |
| ru | `Transform` | `Преобразование` | `savedMappingHint` "переименование + преобразования + приведение типов" |
| ar | `Transform` | `التحويل` | `savedMappingHint` "إعادة التسمية + التحويلات + تحويل الأنواع" |

Each value is the **singular of the word the pack already uses** for `en`'s
plural "transforms" in `grid.import.savedMappingHint` — the sentence
`SavedMappingSummary` renders directly above this header. That is the anchor
rather than `legacyFallbackNotice`'s term, because `en`'s own sentence lists
"transforms" and "type coercion" as two different server-side operations and
`legacyFallbackNotice` is about the second: reusing de "Typkonvertierung", ko
"형 변환" or ar "تحويل الأنواع" for this header would name the wrong operation.

Why it was worth a card of its own rather than waiting for a general gate: this
value is not a hidden string. It is the third `TableHead` of
`SavedMappingSummary`, sitting in one row with `csvColumn` and `mapsTo`, which
were always translated — so a German user read `Spalte` / `Zugeordnet zu` /
`Transform`, two languages in a single header row, directly under the German
hint PR #3936 had just landed. Before that PR the whole panel was English and
therefore at least self-consistent.

The three i18n gates are value-blind here exactly as they were for
objectui#3920: `all-locales-key-parity` compares key sets and placeholder shapes
(the key was present with no placeholder, so English passed perfectly), the
call-site gate only asks whether a key resolves, and `check-i18n-en-drift.mjs`
fires on an `en` **value change** — this value entered the seven packs already
English, so no drift event ever existed. `en`, zh and ja are untouched, and the
pin PR #3936 left in `gridImportSavedMapping-i18n-3920.test.ts` asserting these
seven were "still English" has been replaced by the translated pin it asked for.
101 changes: 81 additions & 20 deletions packages/i18n/src/__tests__/gridImportSavedMapping-i18n-3920.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,27 +351,88 @@ describe('objectui#3920 — grid.import saved-mapping keys are translated in all
expect(value('ja', 'savedMappingHint')).toContain('+');
});

it('grid.import.transform is still English in these packs — objectui#3938, not fixed here', () => {
// Recorded, not repaired. `transform` sits between `manualMapping` and
// `savedMappingHint` in every one of these files and has the same defect
// shape, but objectui#3920 enumerated five keys and 35 values; widening the
// count here would make this file's own census unverifiable against the
// card. Pinned so the number cannot drift unnoticed while objectui#3938
// waits its turn — and so whoever fixes it has to come back and DELETE this
// test rather than flip its expectation.
it('grid.import.transform is translated too — objectui#3938 repaired what this file only recorded', () => {
// This block REPLACES objectui#3920's recording pin, which asserted that
// `still` was all seven packs and told whoever fixed objectui#3938 to come
// back and rewrite this rather than flip an expectation. That is what this
// is: the same key, pinned as repaired instead of as counted.
//
// It is the sharper half of the two, and objectui#3938 says why: this value
// is the third column header of `SavedMappingSummary`, rendered directly
// under the `savedMappingHint` this change just translated, next to two
// headers (`csvColumn`, `mapsTo`) that were always translated. Before this
// change the whole panel was English and therefore consistent; after it,
// the one English header stands alone.
const english = at(builtInLocales.en, `${NS}.transform`);
const still = PACKS.filter((lang) => at(builtInLocales[lang], `${NS}.transform`) === english);
expect(still).toEqual(['ko', 'de', 'fr', 'es', 'pt', 'ru', 'ar']);
// It stays in this file because that is where the defect was recorded and
// because `transform` sits between `manualMapping` and `savedMappingHint`
// in all ten packs. It is deliberately NOT folded into `KEYS` — that census
// is checked against objectui#3920's card at five keys / 35 values, and
// widening it would make the card unverifiable. Six keys are fixed in this
// namespace now; only five of them are that census.
const english = value('en', 'transform');

// Anti-vacuous guard first, as in this file's opening `it`: `not.toBe(en)`
// would pass on `undefined` versus a string if the key were ever renamed.
for (const lang of [...PACKS, 'en', 'zh', 'ja']) {
const v = value(lang, 'transform');
expect(typeof v, `${lang} ${NS}.transform`).toBe('string');
expect(v.trim().length, `${lang} ${NS}.transform is empty`).toBeGreaterThan(0);
}

// THE assertion, the mirror image of the one this replaced: 7 of 7 no
// longer serve the English header.
const englishStill = PACKS.filter((lang) => value(lang, 'transform') === english);
expect(englishStill, `packs still serving the en header:\n${englishStill.join('\n')}`).toEqual([]);

// en is untouched and zh/ja remain the control set that ruled out the
// "deliberately untranslated term" reading for this key as well.
expect(english).toBe('Transform');
// zh and ja did translate it, which is the same control set as above.
expect(at(builtInLocales.zh, `${NS}.transform`)).toBe('转换');
expect(at(builtInLocales.ja, `${NS}.transform`)).toBe('変換');
expect(value('zh', 'transform')).toBe('转换');
expect(value('ja', 'transform')).toBe('変換');

// objectui#3938's criterion is about the ROW, not the key: all three
// headers of the `SavedMappingSummary` table must read in one language.
// `csvColumn` and `mapsTo` were always translated, so pinning them here is
// what makes "two languages in one header row" the thing that goes red.
for (const lang of PACKS) {
for (const key of ['csvColumn', 'mapsTo', 'transform'] as const) {
expect(value(lang, key), `${lang} ${NS}.${key} serves the en header`).not.toBe(value('en', key));
}
}

// Terminology, same discipline as the ANCHORS block above. The header is
// the SINGULAR of the word each pack already uses for `en`'s plural
// "transforms" in `savedMappingHint` — the sentence rendered directly above
// this header in `SavedMappingSummary`, translated by objectui#3920.
//
// That is the anchor, and NOT the `legacyFallbackNotice` term the card
// suggested: `en`'s own sentence lists "transforms" and "type coercion" as
// two DIFFERENT server-side operations, and `legacyFallbackNotice` is about
// the second one. So each pack's coercion term is asserted present in the
// same sentence and absent from the header — the one substitution a
// translator reaching for the nearest glossary entry would make.
const HEADER: Record<
(typeof PACKS)[number],
{ header: string; stem: string; coercion: string }
> = {
ko: { header: '변환', stem: '변환', coercion: '형 변환' },
de: { header: 'Transformation', stem: 'transformation', coercion: 'Typkonvertierung' },
fr: { header: 'Transformation', stem: 'transformation', coercion: 'conversion de type' },
es: { header: 'Transformación', stem: 'transformaci', coercion: 'conversión de tipos' },
pt: { header: 'Transformação', stem: 'transforma', coercion: 'conversão de tipos' },
ru: { header: 'Преобразование', stem: 'преобразовани', coercion: 'приведение типов' },
ar: { header: 'التحويل', stem: 'التحويل', coercion: 'تحويل الأنواع' },
};
for (const lang of PACKS) {
const { header, stem, coercion } = HEADER[lang];
expect(value(lang, 'transform'), `${lang} header`).toBe(header);
expect(header.toLowerCase(), `${lang} header is not built on its own stem`).toContain(stem);
// The plural in the pack's own sentence carries the same stem…
expect(
value(lang, 'savedMappingHint').toLowerCase(),
`${lang} savedMappingHint dropped the stem "${stem}" the header follows`,
).toContain(stem);
// …and that sentence names type coercion separately, which is what makes
// "reuse the coercion term for the header" a wrong answer rather than a
// synonym. ko is the pack where this matters most mechanically: its
// coercion term CONTAINS the header word, so only the inequality below
// distinguishes them.
expect(value(lang, 'savedMappingHint'), `${lang} hint lost its coercion term`).toContain(coercion);
expect(header, `${lang} header reused the type-coercion term`).not.toBe(coercion);
}
});
});
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ const ar = {
savedMapping: 'التعيين المحفوظ:',
chooseSavedMapping: 'اختر تعييناً محفوظاً…',
manualMapping: '— تعيين الأعمدة يدويًا —',
transform: 'Transform',
transform: 'التحويل',
savedMappingHint: 'يطبّق التعيين "{{name}}" إعادة التسمية + التحويلات + تحويل الأنواع على الخادم. تعيين الأعمدة للقراءة فقط.',
savedMappingPreviewNote: 'تعرض المعاينة الأعمدة المصدر لديك؛ وعند الاستيراد يطبّق التعيين "{{name}}" إعادة التسمية والتحويلات وتحويل الأنواع على الخادم.',
csvColumn: "العمود",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const de = {
savedMapping: 'Gespeicherte Zuordnung:',
chooseSavedMapping: 'Gespeicherte Zuordnung auswählen…',
manualMapping: '— Spalten manuell zuordnen —',
transform: 'Transform',
transform: 'Transformation',
savedMappingHint: 'Die Zuordnung „{{name}}“ wendet auf dem Server Umbenennung + Transformationen + Typkonvertierung an. Die Spaltenzuordnung ist schreibgeschützt.',
savedMappingPreviewNote: 'Die Vorschau zeigt Ihre Quellspalten; beim Import wendet die Zuordnung „{{name}}“ auf dem Server Umbenennung, Transformationen und Typkonvertierung an.',
csvColumn: "Spalte",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ const es = {
savedMapping: 'Asignación guardada:',
chooseSavedMapping: 'Elegir una asignación guardada…',
manualMapping: '— Asignar columnas manualmente —',
transform: 'Transform',
transform: 'Transformación',
savedMappingHint: 'La asignación "{{name}}" aplica el cambio de nombre + las transformaciones + la conversión de tipos en el servidor. La asignación de columnas es de solo lectura.',
savedMappingPreviewNote: 'La vista previa muestra sus columnas de origen; al importar, la asignación "{{name}}" aplica el cambio de nombre, las transformaciones y la conversión de tipos en el servidor.',
csvColumn: "Columna",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const fr = {
savedMapping: "Correspondance enregistrée :",
chooseSavedMapping: "Choisir une correspondance enregistrée…",
manualMapping: "— Faire correspondre les colonnes manuellement —",
transform: 'Transform',
transform: 'Transformation',
savedMappingHint: "La correspondance « {{name}} » applique le renommage + les transformations + la conversion de type côté serveur. La correspondance des colonnes est en lecture seule.",
savedMappingPreviewNote: "L'aperçu affiche vos colonnes source ; à l'import, la correspondance « {{name}} » applique le renommage, les transformations et la conversion de type côté serveur.",
csvColumn: "Colonne",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const ko = {
savedMapping: '저장된 매핑:',
chooseSavedMapping: '저장된 매핑 선택…',
manualMapping: '— 열 수동 매핑 —',
transform: 'Transform',
transform: '변환',
savedMappingHint: '매핑 "{{name}}"은(는) 서버에서 이름 변경 + 변환 + 형 변환을 적용합니다. 열 매핑은 읽기 전용입니다.',
savedMappingPreviewNote: '미리보기에는 원본 열이 표시됩니다. 가져올 때 매핑 "{{name}}"이(가) 서버에서 이름 변경, 변환, 형 변환을 적용합니다.',
csvColumn: "열",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ const pt = {
savedMapping: 'Mapeamento salvo:',
chooseSavedMapping: 'Escolher um mapeamento salvo…',
manualMapping: '— Mapear colunas manualmente —',
transform: 'Transform',
transform: 'Transformação',
savedMappingHint: 'O mapeamento "{{name}}" aplica renomeação + transformações + conversão de tipos no servidor. O mapeamento de colunas é somente leitura.',
savedMappingPreviewNote: 'A pré-visualização mostra suas colunas de origem; na importação, o mapeamento "{{name}}" aplica renomeação, transformações e conversão de tipos no servidor.',
csvColumn: "Coluna",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ const ru = {
savedMapping: 'Сохранённое сопоставление:',
chooseSavedMapping: 'Выбрать сохранённое сопоставление…',
manualMapping: '— Сопоставить столбцы вручную —',
transform: 'Transform',
transform: 'Преобразование',
savedMappingHint: 'Сопоставление «{{name}}» применяет на сервере переименование + преобразования + приведение типов. Сопоставление столбцов доступно только для чтения.',
savedMappingPreviewNote: 'В предпросмотре показаны исходные столбцы; при импорте сопоставление «{{name}}» применяет на сервере переименование, преобразования и приведение типов.',
csvColumn: "Столбец",
Expand Down
Loading