Skip to content

Commit 8ea3bee

Browse files
claude[bot]os-support-aiclaudeos-zhuang
authored
fix(plugin-chatbot): localize the build-progress panel's own copy (objectui#7388) (#8888)
* fix(plugin-chatbot): localize the build-progress panel's own copy (objectui#7388) Every label the build panel is HANDED was already localized: the console host passes `openBuiltAppLabel`, `designBuiltAppLabel`, `previewDraftLabel` and the three connection cues through its own `t()`. Every string the panel OWNED was a literal in the component, so a fully Chinese conversation watched its app get built under `Building your app…`, over `Objects` / `Views` / `Dashboards` / `App` / `Sample data` row headings — one per row, on every build — and a `+N more` overflow counter. All of them now resolve through the console's pack as `chatbot.build.*`, added to all ten locales. `BUILD_GROUP_LABEL`'s English `Record` becomes a static `useBuildGroupLabel()` switch: a computed key would be invisible to `check-i18n-call-site-keys`, and its `default` arm keeps the old `?? type` behaviour verbatim, so an unknown artifact type still renders its raw type and never a raw i18n key. Known-phase rendering in English is unchanged, pinned in both worlds by `buildPanelI18n-7388.test.tsx` plus the pre-existing provider-less pins in `ChatbotEnhanced.test.tsx`. Part of #7388 — the `verify` phase half is NOT here: nothing in the published `@objectstack/spec@17.4.0` (nor anywhere in objectui) declares or emits a `verify` phase on `data-build-progress`, so admitting one would build a receiver with no producer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH * fix(scripts): re-baseline the `i18n-locales` per-chunk ceiling onto both admitted claimants `PER_CHUNK_GZIP_CEILINGS['i18n-locales']` 455,000 -> 465,000 and `PER_CHUNK_BASELINE['i18n-locales']` 446,076 -> 456,196, moved together in one commit as that file requires. The ten locale packs' citation of the retired headroom is updated in the same change so it cannot go stale again: it now names no figure at all, which is the form the file's own anti-drift rule allows. Four console builds, one container, one instrument -- `i18n-locales` read out of the `apps/console/dist/eager-closure.json` each build writes: bbe285e main 454,602 (headroom 398) 3949cf3 main + objectui#8901 455,271 +669, over by 271 ea5eab7 main + objectui#8888 455,519 +917, over by 519 ba20b0bc0 main + BOTH 456,196 +1,594, over by 1,196 The two deltas sum to 1,586 against a measured 1,594: two independent claimants on this chunk are additive to within 8 bytes, which is the fact a shared budget needs and the one a per-pull-request reading cannot produce. Sized at 8,804 bytes of headroom = 0.10x REGRESSION_THIS_GATE_MUST_CATCH_BYTES, this key's own convention and marginally tighter than the 8,924 (0.10x) the retired pair carried. NOT sized at the 804 bytes the overage needed: a line with ~0 headroom is what objectui#8816 was filed about -- it reddens whichever in-flight pull request is weighed second and blames that diff for arithmetic that is not its own. Trimming was measured first and cannot reach 1,196 bytes inside these changes: best key reuse is 128 bytes for objectui#8888 and there is no reuse candidate at all for objectui#8901. The payload reduction that would make the next raise unnecessary is real but is not this: `check:i18n-dead-keys` reports 127 confirmed dead keys in ten packs, and `@object-ui/i18n` publishes them, so removing one is a published-surface decision that needs its own card. Nothing else moved: not REGRESSION_THIS_GATE_MUST_CATCH_BYTES, not the other three per-chunk ceilings, not MAX_EAGER_CLOSURE_GZIP_BYTES (the aggregate holds 23,507 bytes of headroom, 0.26x, with both claimants on it). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH --------- Co-authored-by: os-zhuang <support@objectstack.ai> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: os-zhuang <jack@objectstack.ai>
1 parent fffa30d commit 8ea3bee

13 files changed

Lines changed: 389 additions & 11 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@object-ui/plugin-chatbot": patch
3+
"@object-ui/i18n": patch
4+
---
5+
6+
fix(plugin-chatbot): localize the build-progress panel, which was an English island (objectui#7388)
7+
8+
Every label the build panel is HANDED was already localized — the host passes
9+
`openBuiltAppLabel`, `designBuiltAppLabel`, `previewDraftLabel` and the three
10+
connection cues through its own `t()`. Every string the panel OWNED was a
11+
literal in the component, so a fully Chinese conversation watched its app get
12+
built under `Building your app…`, over `Objects` / `Views` / `Dashboards` /
13+
`App` / `Sample data` row headings — one per row, on every build — and a
14+
`+N more` overflow counter.
15+
16+
All of them now resolve through the console's pack as `chatbot.build.*`, added
17+
to all ten locales. Behaviour for a known phase is unchanged in English, and
18+
the unknown-artifact-type fallback still renders the raw type rather than a
19+
raw i18n key.

‎packages/i18n/src/locales/ar.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3011,6 +3011,20 @@ const ar = {
30113011
countDashboards_one: "{{count}} لوحة معلومات",
30123012
countSeedData: "بيانات تجريبية",
30133013
},
3014+
build: {
3015+
building: "جارٍ إنشاء {{app}}…",
3016+
built: "تم إنشاء {{app}}",
3017+
appFallback: "تطبيقك",
3018+
addingSampleData: "جارٍ إضافة بيانات تجريبية",
3019+
group: {
3020+
object: "الكائنات",
3021+
view: "طرق العرض",
3022+
dashboard: "لوحات المعلومات",
3023+
app: "التطبيق",
3024+
seed: "بيانات تجريبية",
3025+
},
3026+
moreArtifacts: "+{{n}} أخرى",
3027+
},
30143028
},
30153029
chatbotError: {
30163030
title: "فشل الرد",

‎packages/i18n/src/locales/de.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3004,6 +3004,20 @@ const de = {
30043004
countDashboards_one: "{{count}} Dashboard",
30053005
countSeedData: "Beispieldaten",
30063006
},
3007+
build: {
3008+
building: "{{app}} wird erstellt…",
3009+
built: "{{app}} wurde erstellt",
3010+
appFallback: "Ihre App",
3011+
addingSampleData: "Beispieldaten werden hinzugefügt",
3012+
group: {
3013+
object: "Objekte",
3014+
view: "Ansichten",
3015+
dashboard: "Dashboards",
3016+
app: "App",
3017+
seed: "Beispieldaten",
3018+
},
3019+
moreArtifacts: "+{{n}} weitere",
3020+
},
30073021
},
30083022
chatbotError: {
30093023
title: "Antwort fehlgeschlagen",

‎packages/i18n/src/locales/en.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,6 +3343,13 @@ const en = {
33433343
// `toolState.*` — the card-header badge + activity-chip vocabulary. ONE
33443344
// set for both surfaces (they used to carry separate
33453345
// tables and disagreed on casing).
3346+
// `build.*` — the apply_blueprint BUILD PANEL's own copy (objectui#7388).
3347+
// Everything else on that panel is fed by the host as an
3348+
// already-translated prop; these strings were literals in
3349+
// the component, so they stayed English in every language.
3350+
// `building`/`built` interpolate `appFallback` when the
3351+
// build has no app label, so each pack must keep BOTH
3352+
// frames in the one case/gender that noun phrase is in.
33463353
// `plan.*` — the "N objects · N views · N dashboards" strip. Plural
33473354
// FAMILIES (base key + `_one`): i18next resolves every
33483355
// CLDR category a pack does not enumerate to the base key,
@@ -3413,6 +3420,20 @@ const en = {
34133420
countDashboards_one: '{{count}} dashboard',
34143421
countSeedData: 'sample data',
34153422
},
3423+
build: {
3424+
building: 'Building {{app}}…',
3425+
built: 'Built {{app}}',
3426+
appFallback: 'your app',
3427+
addingSampleData: 'adding sample data',
3428+
group: {
3429+
object: 'Objects',
3430+
view: 'Views',
3431+
dashboard: 'Dashboards',
3432+
app: 'App',
3433+
seed: 'Sample data',
3434+
},
3435+
moreArtifacts: '+{{n}} more',
3436+
},
34163437
},
34173438
chatbotError: {
34183439
title: 'Response failed',

‎packages/i18n/src/locales/es.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3008,6 +3008,20 @@ const es = {
30083008
countDashboards_one: "{{count}} panel",
30093009
countSeedData: "datos de ejemplo",
30103010
},
3011+
build: {
3012+
building: "Creando {{app}}…",
3013+
built: "Creación de {{app}} completada",
3014+
appFallback: "su aplicación",
3015+
addingSampleData: "añadiendo datos de ejemplo",
3016+
group: {
3017+
object: "Objetos",
3018+
view: "Vistas",
3019+
dashboard: "Paneles",
3020+
app: "Aplicación",
3021+
seed: "Datos de ejemplo",
3022+
},
3023+
moreArtifacts: "+{{n}} más",
3024+
},
30113025
},
30123026
chatbotError: {
30133027
title: "Error en la respuesta",

‎packages/i18n/src/locales/fr.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3006,6 +3006,20 @@ const fr = {
30063006
countDashboards_one: "{{count}} tableau de bord",
30073007
countSeedData: "données d’exemple",
30083008
},
3009+
build: {
3010+
building: "Création de {{app}}…",
3011+
built: "Création de {{app}} terminée",
3012+
appFallback: "votre application",
3013+
addingSampleData: "ajout de données d’exemple",
3014+
group: {
3015+
object: "Objets",
3016+
view: "Vues",
3017+
dashboard: "Tableaux de bord",
3018+
app: "Application",
3019+
seed: "Données d’exemple",
3020+
},
3021+
moreArtifacts: "+{{n}} autres",
3022+
},
30093023
},
30103024
chatbotError: {
30113025
title: "Échec de la réponse",

‎packages/i18n/src/locales/ja.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3006,6 +3006,20 @@ const ja = {
30063006
countDashboards_one: "{{count}} 件のダッシュボード",
30073007
countSeedData: "サンプルデータ",
30083008
},
3009+
build: {
3010+
building: "{{app}}を構築しています…",
3011+
built: "{{app}}を構築しました",
3012+
appFallback: "アプリ",
3013+
addingSampleData: "サンプルデータを追加中",
3014+
group: {
3015+
object: "オブジェクト",
3016+
view: "ビュー",
3017+
dashboard: "ダッシュボード",
3018+
app: "アプリ",
3019+
seed: "サンプルデータ",
3020+
},
3021+
moreArtifacts: "他 {{n}} 件",
3022+
},
30093023
},
30103024
chatbotError: {
30113025
title: "応答に失敗しました",

‎packages/i18n/src/locales/ko.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,20 @@ const ko = {
30033003
countDashboards_one: "대시보드 {{count}}개",
30043004
countSeedData: "샘플 데이터",
30053005
},
3006+
build: {
3007+
building: "{{app}} 빌드 중…",
3008+
built: "{{app}} 빌드 완료",
3009+
appFallback: "앱",
3010+
addingSampleData: "샘플 데이터 추가 중",
3011+
group: {
3012+
object: "오브젝트",
3013+
view: "뷰",
3014+
dashboard: "대시보드",
3015+
app: "앱",
3016+
seed: "샘플 데이터",
3017+
},
3018+
moreArtifacts: "외 {{n}}개",
3019+
},
30063020
},
30073021
chatbotError: {
30083022
title: "응답 실패",

‎packages/i18n/src/locales/pt.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,20 @@ const pt = {
30033003
countDashboards_one: "{{count}} painel",
30043004
countSeedData: "dados de exemplo",
30053005
},
3006+
build: {
3007+
building: "Criando {{app}}…",
3008+
built: "Criação de {{app}} concluída",
3009+
appFallback: "seu aplicativo",
3010+
addingSampleData: "adicionando dados de exemplo",
3011+
group: {
3012+
object: "Objetos",
3013+
view: "Visões",
3014+
dashboard: "Painéis",
3015+
app: "Aplicativo",
3016+
seed: "Dados de exemplo",
3017+
},
3018+
moreArtifacts: "+{{n}} mais",
3019+
},
30063020
},
30073021
chatbotError: {
30083022
title: "Falha na resposta",

‎packages/i18n/src/locales/ru.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3017,6 +3017,20 @@ const ru = {
30173017
countDashboards_one: "{{count}} дашборд",
30183018
countSeedData: "демоданные",
30193019
},
3020+
build: {
3021+
building: "Создание {{app}}…",
3022+
built: "Создание {{app}} завершено",
3023+
appFallback: "вашего приложения",
3024+
addingSampleData: "добавление демоданных",
3025+
group: {
3026+
object: "Объекты",
3027+
view: "Представления",
3028+
dashboard: "Дашборды",
3029+
app: "Приложение",
3030+
seed: "Демоданные",
3031+
},
3032+
moreArtifacts: "ещё {{n}}",
3033+
},
30203034
},
30213035
chatbotError: {
30223036
title: "Ошибка ответа",

0 commit comments

Comments
 (0)