From e90f9aa1b93bc0c6fc739eaabe3b133f9577b954 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 05:06:28 +0000 Subject: [PATCH 1/3] chore(i18n)!: declare the 67 keys @object-ui/i18n@18.6.0 shipped and main no longer has A reproduction script diffs the package's published catalogues at the release tag against a ref, and one major changeset lists every key it reports under "Removed translation keys". Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H --- .../37223-i18n-removed-released-keys.md | 97 +++++++ .../i18n/scripts/released-keys-removed.mjs | 251 ++++++++++++++++++ 2 files changed, 348 insertions(+) create mode 100644 .changeset/37223-i18n-removed-released-keys.md create mode 100644 ui/packages/i18n/scripts/released-keys-removed.mjs diff --git a/.changeset/37223-i18n-removed-released-keys.md b/.changeset/37223-i18n-removed-released-keys.md new file mode 100644 index 00000000000..ecbc50daa3e --- /dev/null +++ b/.changeset/37223-i18n-removed-released-keys.md @@ -0,0 +1,97 @@ +--- +'@object-ui/i18n': major +--- + +feat(i18n)!: the 67 translation keys `@object-ui/i18n@18.6.0` shipped that no code reads any more are retired in 19.0.0 + +**BREAKING**: released keys are retired in 19.0.0. `@object-ui/i18n@18.6.0` shipped every key listed below; none of them is in the package any more, in any locale. No code in the platform reads them. + +Clause-②: yes (narrowing) +Metadata-protocol: none + + + +If a deployment overrides one of these keys (in its own i18next resources, or a Studio catalogue it registers), that override no longer applies: nothing in the console or Studio asks for the key, so the overriding text is never shown. Remove the override, or move the text to the key the surface reads now. + +`@object-ui/i18n` is in the changesets `fixed` group, so this one `major` moves every package in that group to 19.0.0 at the next version step, every `@objectstack/*` package included. + +The list is reproduced by `node ui/packages/i18n/scripts/released-keys-removed.mjs` (the tag against `origin/main`, every locale and namespace the package publishes, nested keys flattened). + +## Removed translation keys + +### Language packs (`@object-ui/i18n`, `@object-ui/i18n/locales`), 32 keys + +Each key below is removed from all eleven locales: ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant. + +- `appDesigner.fieldDesigner.trackHistory` +- `console.firstRunChecklist.confirm` +- `console.firstRunChecklist.currency.saved` +- `console.firstRunChecklist.currency.title` +- `console.firstRunChecklist.currency.todo` +- `console.firstRunChecklist.languageCountry.saved` +- `console.firstRunChecklist.languageCountry.title` +- `console.firstRunChecklist.languageCountry.todo` +- `console.firstRunChecklist.organizationName.action` +- `console.firstRunChecklist.organizationName.title` +- `console.firstRunChecklist.organizationName.todo` +- `console.firstRunChecklist.prefilled` +- `console.firstRunChecklist.timezone.saved` +- `console.firstRunChecklist.timezone.title` +- `console.firstRunChecklist.timezone.todo` +- `console.nav.design` +- `console.nav.phoneBarHint` +- `console.nav.searchMenu` +- `console.objectView.openAsPage` +- `console.objectView.personalizedParts.rowNumbers` +- `dashboard.exportCsv` +- `detail.collapseToDrawer` +- `filterBuilder.where` +- `list.recordOpen` +- `list.recordOpenDeclaredPage` +- `list.recordOpenDrawer` +- `list.recordOpenNote` +- `list.recordOpenPage` +- `list.rowNumbers` +- `sidebar.keepOpen` +- `view.switcher.all` +- `view.switcher.saveAsMyView` + +### Studio namespace (`@object-ui/i18n/namespaces/studio`), 35 keys + +Each key below is removed from both locales the namespace ships: en, zh. + +- `designer.field.relatedList.parentFallback` +- `designer.field.trackHistory` +- `engine.edit.autoSaveOff` +- `engine.edit.autoSaveOn` +- `engine.edit.autoSavingShortly` +- `engine.edit.related` +- `engine.packages.installedApps.description` +- `engine.packages.installedApps.title` +- `engine.studio.autoSaved` +- `engine.studio.data.form.flowCreate` +- `engine.studio.data.form.flowEdit` +- `engine.studio.data.form.flowLabel` +- `engine.studio.data.form.layoutSource.fieldGroups` +- `engine.studio.data.form.layoutSource.fieldGroupsTitle` +- `engine.studio.data.form.layoutSource.formView` +- `engine.studio.data.form.layoutSource.formViewTitle` +- `engine.studio.designer.offForm` +- `engine.studio.designer.sectionDeleteTitle` +- `engine.studio.flowSavedNamed` +- `engine.studio.flowSaveFailed` +- `engine.studio.inspector.listView.kanbanCard.mode.drawer` +- `engine.studio.inspector.listView.kanbanCard.mode.newWindow` +- `engine.studio.inspector.listView.kanbanCard.mode.page` +- `engine.studio.openApp` +- `engine.studio.openAppPick` +- `engine.studio.openAppTitle` +- `engine.studio.owd.save` +- `engine.studio.owd.saved` +- `engine.studio.owd.saveNone` +- `engine.studio.pillar.access` +- `engine.studio.pillar.automations` +- `engine.studio.pillar.data` +- `engine.studio.pillar.interfaces` +- `engine.studio.pillar.metadata` +- `engine.studio.settings.highlightPreview` diff --git a/ui/packages/i18n/scripts/released-keys-removed.mjs b/ui/packages/i18n/scripts/released-keys-removed.mjs new file mode 100644 index 00000000000..37a39a869aa --- /dev/null +++ b/ui/packages/i18n/scripts/released-keys-removed.mjs @@ -0,0 +1,251 @@ +#!/usr/bin/env node +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +/** + * released-keys-removed.mjs — every translation key a released `@object-ui/i18n` + * shipped that a later tree no longer carries. + * + * Usage (from anywhere inside the repository): + * + * node ui/packages/i18n/scripts/released-keys-removed.mjs \ + * [--tag @object-ui/i18n@18.6.0] [--ref origin/main] [--json] + * + * It reads the package's catalogue sources out of git at BOTH refs (never the + * working tree), so it answers the same on any checkout. Zero third-party + * dependencies: git for the blobs, Node's own type stripping to evaluate the + * catalogue modules (they import nothing, so each one evaluates alone). + * + * ## Which files are the published catalogues — read from the package, not listed here + * + * - `package.json` `exports`: every `./namespaces/NAME` subpath is a published + * namespace; `./locales` is the all-packs door. + * - `src/locales/index.ts` (the all-packs door): each DEFAULT import of a + * `./TAG.js` module is a language pack, and each default import of a + * `../namespaces/NAME/TAG.js` module is that language's catalogue in a + * pack-shaped namespace. The door deep-merges them into one catalogue per + * language, and at runtime they all land in i18next's default + * `translation` namespace, so they are ONE key space: a key that moved + * from a pack into a pack-shaped namespace (or back) is not removed. + * - Every other exported namespace (one whose `index.ts` does not build on + * `../packNamespace.js`, today `studio`) is a key space of its own; its + * catalogues are the `./TAG.js` modules its `index.ts` imports, statically + * or through a literal `import()` loader. + * + * A key is the dotted path to a leaf value (strings, plus any non-object + * value, arrays included), so plural forms (`KEY_one`, `KEY_other`, …) are + * separate keys. A key counts as removed in a language when that language's + * catalogue at the tag has it and the same key space at the ref does not. + */ +import { execFileSync } from 'node:child_process'; +import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, posix, relative } from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; + +const args = process.argv.slice(2); +const opt = (name, fallback) => { + const i = args.indexOf(name); + if (i === -1) return fallback; + const v = args[i + 1]; + if (!v || v.startsWith('--')) { + console.error(`released-keys-removed: ${name} needs a value`); + process.exit(2); + } + return v; +}; +const TAG = opt('--tag', '@object-ui/i18n@18.6.0'); +const REF = opt('--ref', 'origin/main'); +const AS_JSON = args.includes('--json'); + +const here = dirname(fileURLToPath(import.meta.url)); +const git = (...a) => execFileSync('git', a, { cwd: here, encoding: 'utf8', maxBuffer: 1 << 28 }); +const ROOT = git('rev-parse', '--show-toplevel').trim(); +const PKG = relative(ROOT, dirname(here)).split('\\').join('/'); // ui/packages/i18n + +const show = (ref, path) => git('show', `${ref}:${PKG}/${path}`); +const exists = (ref, path) => { + try { + git('cat-file', '-e', `${ref}:${PKG}/${path}`); + return true; + } catch { + return false; + } +}; + +for (const ref of [TAG, REF]) { + try { + git('rev-parse', '--verify', '--quiet', `${ref}^{commit}`); + } catch { + console.error(`released-keys-removed: ref '${ref}' does not resolve (fetch it first)`); + process.exit(2); + } +} + +const tmp = mkdtempSync(join(tmpdir(), 'released-keys-removed-')); +process.on('exit', () => rmSync(tmp, { recursive: true, force: true })); +let seq = 0; + +/** Evaluate one catalogue module's default export from its source at `ref`. */ +async function loadCatalogue(ref, path) { + const dir = join(tmp, String(seq++)); + mkdirSync(dir); + const file = join(dir, posix.basename(path)); + writeFileSync(file, show(ref, path)); + const mod = await import(pathToFileURL(file).href); + if (!mod.default || typeof mod.default !== 'object') { + throw new Error(`${ref}:${PKG}/${path} has no object default export`); + } + return mod.default; +} + +const isPlain = (v) => v !== null && typeof v === 'object' && !Array.isArray(v); +function flatten(obj, prefix = '', out = new Set()) { + for (const [k, v] of Object.entries(obj)) { + const key = prefix ? `${prefix}.${k}` : k; + if (isPlain(v)) flatten(v, key, out); + else out.add(key); + } + return out; +} + +/** `./x.js` / `../a/b.js` specifiers of default imports and literal `import()` calls. */ +function defaultImports(src) { + return [...src.matchAll(/^\s*import\s+[A-Za-z_$][\w$]*\s+from\s+'([^']+)'/gm)].map((m) => m[1]); +} +function dynamicImports(src) { + return [...src.matchAll(/import\(\s*'([^']+)'\s*\)/g)].map((m) => m[1]); +} +const tagOf = (spec) => posix.basename(spec).replace(/\.js$/, ''); +const toSrc = (fromDir, spec) => posix.normalize(posix.join(fromDir, spec)).replace(/\.js$/, '.ts'); + +/** + * The catalogues one ref publishes: + * Map>>, where `module` names the + * published group the file belongs to (`locales`, or the namespace name). + */ +function discover(ref) { + const pkg = JSON.parse(show(ref, 'package.json')); + const exp = Object.keys(pkg.exports ?? {}); + if (!exp.includes('./locales')) throw new Error(`${ref}: package.json exports no ./locales`); + const namespaces = exp + .filter((k) => k.startsWith('./namespaces/')) + .map((k) => k.slice('./namespaces/'.length)); + + const spaces = new Map(); + const add = (space, lang, module, path) => { + if (!spaces.has(space)) spaces.set(space, new Map()); + const langs = spaces.get(space); + if (!langs.has(lang)) langs.set(lang, []); + langs.get(lang).push({ module, path }); + }; + + // The all-packs door: packs + pack-shaped namespaces, one `translation` space. + const door = show(ref, 'src/locales/index.ts'); + const packShaped = new Set(); + for (const spec of defaultImports(door)) { + if (!spec.startsWith('.')) continue; + const path = toSrc('src/locales', spec); + const m = /^src\/namespaces\/([^/]+)\/[^/]+\.ts$/.exec(path); + if (m) { + packShaped.add(m[1]); + add('translation', tagOf(spec), m[1], path); + } else if (/^src\/locales\/[^/]+\.ts$/.test(path)) { + add('translation', tagOf(spec), 'locales', path); + } + } + + // Every exported namespace's own catalogue modules. + for (const ns of namespaces) { + const index = `src/namespaces/${ns}/index.ts`; + if (!exists(ref, index)) throw new Error(`${ref}: export ./namespaces/${ns} has no ${index}`); + const src = show(ref, index); + const isPackShaped = /from '\.\.\/packNamespace\.js'/.test(src); + const specs = [...defaultImports(src), ...dynamicImports(src)].filter((s) => /^\.\/[^/]+\.js$/.test(s)); + for (const spec of new Set(specs)) { + const path = toSrc(`src/namespaces/${ns}`, spec); + if (isPackShaped) { + // Already in the door; a catalogue the door does not merge would be a + // published file outside every key space this script knows: refuse. + const listed = spaces.get('translation')?.get(tagOf(spec))?.some((e) => e.path === path); + if (!listed) throw new Error(`${ref}: ${path} is loaded by ${index} but not merged by src/locales/index.ts`); + } else { + add(ns, tagOf(spec), ns, path); + } + } + } + return spaces; +} + +/** Map>> for one ref. */ +async function keysAt(ref) { + const out = new Map(); + for (const [space, langs] of discover(ref)) { + const perLang = new Map(); + for (const [lang, entries] of langs) { + const keys = new Map(); + for (const { module, path } of entries) { + for (const k of flatten(await loadCatalogue(ref, path))) keys.set(k, module); + } + perLang.set(lang, keys); + } + out.set(space, perLang); + } + return out; +} + +const before = await keysAt(TAG); +const after = await keysAt(REF); + +// removed: Map>>; group = space, or the module a +// `translation` key lived in at the tag. +const removed = new Map(); +let moved = 0; +for (const [space, langs] of before) { + for (const [lang, keys] of langs) { + const now = after.get(space)?.get(lang) ?? new Map(); + for (const [key, module] of keys) { + if (now.has(key)) { + if (now.get(key) !== module) moved++; + continue; + } + const group = space === 'translation' ? module : space; + if (!removed.has(group)) removed.set(group, new Map()); + const g = removed.get(group); + if (!g.has(key)) g.set(key, new Set()); + g.get(key).add(lang); + } + } +} + +const tagLangs = (space) => [...(before.get(space)?.keys() ?? [])]; +const total = [...removed.values()].reduce((n, g) => n + g.size, 0); +const groups = [...removed.keys()].sort(); + +if (AS_JSON) { + const body = { + tag: TAG, + ref: REF, + refSha: git('rev-parse', REF).trim(), + total, + movedBetweenModules: moved, + groups: Object.fromEntries( + groups.map((g) => [ + g, + Object.fromEntries([...removed.get(g)].sort(([a], [b]) => a.localeCompare(b)).map(([k, l]) => [k, [...l].sort()])), + ]), + ), + }; + console.log(JSON.stringify(body, null, 2)); +} else { + console.log(`Keys in ${TAG} absent at ${REF} (${git('rev-parse', '--short', REF).trim()}): ${total}`); + for (const g of groups) { + const space = before.has(g) ? g : 'translation'; + const all = tagLangs(space); + console.log(`\n## ${g} (${removed.get(g).size})`); + for (const [key, langs] of [...removed.get(g)].sort(([a], [b]) => a.localeCompare(b))) { + const l = [...langs].sort(); + const which = l.length === all.length ? `all ${all.length} locales (${l.join(', ')})` : l.join(', '); + console.log(`- ${key} — ${which}`); + } + } + if (moved) console.log(`\n(${moved} key×locale rows moved between modules inside one key space; not removals)`); +} From cb288f575999b77b7b5461adea65bb9c50a4a354 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 06:09:48 +0000 Subject: [PATCH 2/3] fix(i18n): the removed-keys script names blobs in git's cwd-relative form check-ui-root-lookups refuses a `--show-toplevel` lookup and a root-relative `REF:PATH` under ui/. git now runs in the package directory and reads `REF:./PATH`; the output is byte-identical. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H --- .../i18n/scripts/released-keys-removed.mjs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/packages/i18n/scripts/released-keys-removed.mjs b/ui/packages/i18n/scripts/released-keys-removed.mjs index 37a39a869aa..21a8e0647ba 100644 --- a/ui/packages/i18n/scripts/released-keys-removed.mjs +++ b/ui/packages/i18n/scripts/released-keys-removed.mjs @@ -38,7 +38,7 @@ import { execFileSync } from 'node:child_process'; import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs'; import { tmpdir } from 'node:os'; -import { dirname, join, posix, relative } from 'node:path'; +import { dirname, join, posix } from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; const args = process.argv.slice(2); @@ -56,15 +56,17 @@ const TAG = opt('--tag', '@object-ui/i18n@18.6.0'); const REF = opt('--ref', 'origin/main'); const AS_JSON = args.includes('--json'); -const here = dirname(fileURLToPath(import.meta.url)); -const git = (...a) => execFileSync('git', a, { cwd: here, encoding: 'utf8', maxBuffer: 1 << 28 }); -const ROOT = git('rev-parse', '--show-toplevel').trim(); -const PKG = relative(ROOT, dirname(here)).split('\\').join('/'); // ui/packages/i18n +// git runs in the package directory and every blob is named in git's own +// cwd-relative form (`REF:./PATH`), so the script needs no repository root and +// reads the same in the standalone and the monorepo layout. +const PKG_DIR = dirname(dirname(fileURLToPath(import.meta.url))); +const git = (...a) => execFileSync('git', a, { cwd: PKG_DIR, encoding: 'utf8', maxBuffer: 1 << 28 }); +const PKG = git('rev-parse', '--show-prefix').trim().replace(/\/$/, ''); // for messages only -const show = (ref, path) => git('show', `${ref}:${PKG}/${path}`); +const show = (ref, path) => git('show', `${ref}:./${path}`); const exists = (ref, path) => { try { - git('cat-file', '-e', `${ref}:${PKG}/${path}`); + git('cat-file', '-e', `${ref}:./${path}`); return true; } catch { return false; From e43e98994838d290f898bb2078a3f9ad45ee5b92 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 06:14:41 +0000 Subject: [PATCH 3/3] chore(release): enter Changesets pre mode (next) with a v19 line-opening major marker `pnpm changeset pre enter next` wrote .changeset/pre.json as committed. The @objectstack/spec major marker gives the protocol lockstep its pending spec major; the i18n changeset notes the two majors give one 19.0.0. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01QSeKYkkwuF6UuFtu85Yd5H --- .changeset/37223-i18n-removed-released-keys.md | 2 +- .changeset/37223-v19-line-opens.md | 14 ++++++++++++++ .changeset/pre.json | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .changeset/37223-v19-line-opens.md create mode 100644 .changeset/pre.json diff --git a/.changeset/37223-i18n-removed-released-keys.md b/.changeset/37223-i18n-removed-released-keys.md index ecbc50daa3e..c838a36e96e 100644 --- a/.changeset/37223-i18n-removed-released-keys.md +++ b/.changeset/37223-i18n-removed-released-keys.md @@ -13,7 +13,7 @@ Metadata-protocol: none If a deployment overrides one of these keys (in its own i18next resources, or a Studio catalogue it registers), that override no longer applies: nothing in the console or Studio asks for the key, so the overriding text is never shown. Remove the override, or move the text to the key the surface reads now. -`@object-ui/i18n` is in the changesets `fixed` group, so this one `major` moves every package in that group to 19.0.0 at the next version step, every `@objectstack/*` package included. +`@object-ui/i18n` is in the changesets `fixed` group, so this `major` moves every package in that group to 19, every `@objectstack/*` package included. The line's opening marker is a second `major` (on `@objectstack/spec`) in the same group; two majors in one fixed group still give one 19.0.0. In pre mode under `next` the first version step reads `19.0.0-next.0`. The list is reproduced by `node ui/packages/i18n/scripts/released-keys-removed.mjs` (the tag against `origin/main`, every locale and namespace the package publishes, nested keys flattened). diff --git a/.changeset/37223-v19-line-opens.md b/.changeset/37223-v19-line-opens.md new file mode 100644 index 00000000000..a45d72d0eab --- /dev/null +++ b/.changeset/37223-v19-line-opens.md @@ -0,0 +1,14 @@ +--- +"@objectstack/spec": major +--- + +The v19 line opens (maintainer rulings 7153326968 and 7153441862). Every release from here is a `19.0.0-next.N` prerelease on the npm dist-tag `next`, until 19.0 GA. + +Clause-②: no + +- **What this marks.** Changesets is in pre mode with the tag `next`. Every package in the `fixed` group versions together, so this `major` takes all of them to 19, and the first version cut is `19.0.0-next.0`. `PROTOCOL_VERSION` follows `@objectstack/spec`'s major at version time. The marker itself changes no code, key, export or stored shape. +- **What the line carries.** Each breaking change on the line says so in its own changeset. The first is `@object-ui/i18n`'s retirement of the translation keys 18.6.0 shipped and no code reads any more; a second `major` in the same `fixed` group still gives one 19.0.0. +- **Who receives it.** A plain install still resolves the dist-tag `latest`, which stays on 18.x until 19.0 GA. A prerelease is installed only on request: `@objectstack/spec@next`, or an exact `19.0.0-next.N`. +- **What ends it.** 19.0 GA exits pre mode and publishes to `latest`. + + diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000000..d20efa9e7db --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,4 @@ +{ + "mode": "pre", + "tag": "next" +}