Skip to content

Commit 51db5fa

Browse files
committed
feat(example-starter): ship all 11 platform locales, one translation file per locale
supportedLocales lists every PLATFORM_LOCALE_TAGS tag; Simplified Chinese moves from zh-CN to the zh-Hans write tag; nine AI-written bundles added (zh-Hant derived from zh-Hans); a pin holds the list, files and key parity. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvqSPRf68vj73hQF3s
1 parent 44cf0fc commit 51db5fa

17 files changed

Lines changed: 1862 additions & 230 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/example-starter': patch
3+
---
4+
5+
feat(example-starter): the Starter ships all 11 platform locales, one translation file per locale, and writes Simplified Chinese as `zh-Hans`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Who sees it: an organization that installs the Starter from the marketplace and works in a language other than English or Simplified Chinese.
11+
12+
- **`supportedLocales` lists every platform locale**, written out: `en`, `zh-Hans`, `zh-Hant`, `es`, `ar`, `fr`, `pt-BR`, `ru`, `de`, `ja`, `ko`. The Console's language menu offers only the locales an app lists, so all eleven now appear for the Starter.
13+
- **Simplified Chinese moves from `zh-CN` to `zh-Hans`**, the platform's write tag; `zh-CN` stays readable as an alias of it. The Chinese text is unchanged.
14+
- **`src/translations/` holds one file per locale** (`en.translation.ts`, `zh-Hans.translation.ts`, …) and `index.ts` puts them into one bundle. The nine new languages are AI-written from the English source; `zh-Hant` is derived from `zh-Hans`.
15+
- `os i18n check --strict` reads 100% for all eleven locales (95 keys each).

‎examples/app-starter/README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ notes in one menu.
2222
- `src/knowledge/` — `biz_articles`, a knowledge source over the published
2323
help articles: each `##` section of an article is one passage. See
2424
[Searching the help articles](#searching-the-help-articles).
25-
- `src/translations/` — English and Simplified Chinese.
25+
- `src/translations/` — one file per platform locale, all 11: English
26+
(`en`, the source), Simplified and Traditional Chinese (`zh-Hans`,
27+
`zh-Hant`), Spanish, Arabic, French, Brazilian Portuguese, Russian, German,
28+
Japanese and Korean. `os i18n check --strict` holds them complete.
2629

2730
The API names carry the `biz_` namespace, so a tenant can install this
2831
starter beside a CRM package without a name clash. Uninstalling the package

‎examples/app-starter/objectstack.config.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,12 @@ export default defineStack({
5858
// is held and nothing is indexed or offered to AI clients.
5959
knowledgeSources: [ArticlesKnowledge],
6060

61+
// Every platform locale (`PLATFORM_LOCALE_TAGS`), written out: the Console's
62+
// language menu offers only the locales an app lists. `zh-Hans` is the write
63+
// tag for Simplified Chinese; `zh-CN` is only read as an alias of it.
6164
i18n: {
6265
defaultLocale: 'en',
63-
supportedLocales: ['en', 'zh-CN'],
66+
supportedLocales: ['en', 'zh-Hans', 'zh-Hant', 'es', 'ar', 'fr', 'pt-BR', 'ru', 'de', 'ja', 'ko'],
6467
fallbackLocale: 'en',
6568
},
6669
translations: Object.values(translations),
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import type { TranslationData } from '@objectstack/spec/system';
4+
5+
/**
6+
* Starter translations — Arabic (`ar`).
7+
*
8+
* AI-written from the English source. The tasks and notes entries of
9+
* the menu carry no label of their own, so they show the platform's
10+
* translations of `sys_task` and `sys_note`.
11+
*/
12+
export const ar: TranslationData = {
13+
packages: {
14+
'com.example.starter': {
15+
name: 'تطبيق البداية',
16+
description: 'الشركات وجهات الاتصال ومقالات المساعدة، مع مهام المنصة وملاحظاتها في القائمة.',
17+
},
18+
},
19+
objects: {
20+
biz_company: {
21+
label: 'شركة',
22+
pluralLabel: 'الشركات',
23+
description: 'شركة تتعامل معها المؤسسة.',
24+
fields: {
25+
name: { label: 'اسم الشركة' },
26+
type: {
27+
label: 'النوع',
28+
options: { prospect: 'عميل محتمل', customer: 'عميل', partner: 'شريك', supplier: 'مورّد', other: 'أخرى' },
29+
},
30+
industry: {
31+
label: 'القطاع',
32+
options: {
33+
technology: 'التقنية',
34+
manufacturing: 'التصنيع',
35+
retail: 'التجزئة',
36+
finance: 'المالية',
37+
healthcare: 'الرعاية الصحية',
38+
education: 'التعليم',
39+
other: 'أخرى',
40+
},
41+
},
42+
website: { label: 'الموقع الإلكتروني' },
43+
phone: { label: 'الهاتف' },
44+
address: { label: 'العنوان' },
45+
description: { label: 'الوصف' },
46+
owner_id: { label: 'المالك' },
47+
},
48+
_views: {
49+
all: { label: 'جميع الشركات' },
50+
by_type: { label: 'الشركات حسب النوع' },
51+
},
52+
_sections: {
53+
basic: { label: 'المعلومات الأساسية' },
54+
contact_info: { label: 'معلومات الاتصال' },
55+
more: { label: 'المزيد' },
56+
},
57+
},
58+
biz_contact: {
59+
label: 'جهة اتصال',
60+
pluralLabel: 'جهات الاتصال',
61+
description: 'شخص في شركة تتعامل معها المؤسسة.',
62+
fields: {
63+
name: { label: 'الاسم' },
64+
company: { label: 'الشركة' },
65+
title: { label: 'المسمى الوظيفي' },
66+
influence: {
67+
label: 'التأثير',
68+
options: { decision_maker: 'صاحب القرار', influencer: 'مؤثر', user: 'مستخدم', other: 'أخرى' },
69+
},
70+
email: { label: 'البريد الإلكتروني' },
71+
phone: { label: 'الهاتف' },
72+
notes: { label: 'ملاحظات' },
73+
owner_id: { label: 'المالك' },
74+
},
75+
_views: {
76+
all: { label: 'جميع جهات الاتصال' },
77+
by_influence: { label: 'جهات الاتصال حسب التأثير' },
78+
},
79+
_sections: {
80+
basic: { label: 'المعلومات الأساسية' },
81+
contact_info: { label: 'معلومات الاتصال' },
82+
more: { label: 'المزيد' },
83+
},
84+
},
85+
biz_article: {
86+
label: 'مقالة',
87+
pluralLabel: 'المقالات',
88+
description: 'مقالة مساعدة: دليل إرشادي أو سؤال شائع أو صفحة مرجعية.',
89+
fields: {
90+
title: { label: 'العنوان' },
91+
body: { label: 'النص' },
92+
category: {
93+
label: 'الفئة',
94+
options: { how_to: 'دليل إرشادي', faq: 'الأسئلة الشائعة', reference: 'مرجع' },
95+
},
96+
status: {
97+
label: 'الحالة',
98+
options: { draft: 'مسودة', published: 'منشور' },
99+
},
100+
owner_id: { label: 'المالك' },
101+
},
102+
_views: {
103+
all: { label: 'جميع المقالات' },
104+
},
105+
_sections: {
106+
basic: { label: 'المقالة' },
107+
},
108+
},
109+
},
110+
apps: {
111+
biz_app: {
112+
label: 'تطبيق البداية',
113+
description: 'الشركات وجهات الاتصال ومقالات المساعدة، مع مهام المنصة وملاحظاتها في القائمة.',
114+
},
115+
},
116+
datasets: {
117+
biz_company_metrics: {
118+
label: 'مقاييس الشركات',
119+
description: 'عدد الشركات حسب النوع والقطاع',
120+
dimensions: {
121+
type: { label: 'النوع', description: 'علاقة الشركة بالمؤسسة: عميل محتمل أو عميل أو شريك أو مورّد أو أخرى.' },
122+
industry: {
123+
label: 'القطاع',
124+
description: 'القطاع الذي تعمل فيه الشركة: التقنية أو التصنيع أو التجزئة أو المالية أو الرعاية الصحية أو التعليم أو أخرى. تُحتسب الشركة التي لم يُحدَّد قطاعها ضمن «بلا قطاع».',
125+
},
126+
},
127+
measures: {
128+
company_count: { label: 'عدد الشركات', description: 'عدد الشركات بغض النظر عن نوعها.' },
129+
},
130+
},
131+
biz_contact_metrics: {
132+
label: 'مقاييس جهات الاتصال',
133+
description: 'عدد جهات الاتصال حسب الشركة والتأثير',
134+
dimensions: {
135+
company: {
136+
label: 'الشركة',
137+
description: 'الشركة التي تعمل فيها جهة الاتصال؛ وتعرض النتائج اسم الشركة. تُحتسب جهة الاتصال التي لا شركة لها ضمن «بلا شركة».',
138+
},
139+
influence: {
140+
label: 'التأثير',
141+
description: 'مدى تأثير جهة الاتصال في قرارات الشركة: صاحب القرار أو مؤثر أو مستخدم أو أخرى.',
142+
},
143+
},
144+
measures: {
145+
contact_count: { label: 'عدد جهات الاتصال', description: 'عدد جهات الاتصال.' },
146+
},
147+
},
148+
},
149+
dashboards: {
150+
biz_overview_dashboard: {
151+
label: 'نظرة عامة',
152+
description: 'الشركات وجهات الاتصال في لمحة.',
153+
widgets: {
154+
total_companies: { title: 'الشركات', description: 'كل الشركات بغض النظر عن نوعها.' },
155+
customers: { title: 'العملاء', description: 'الشركات من نوع «عميل».' },
156+
total_contacts: { title: 'جهات الاتصال', description: 'كل جهات الاتصال.' },
157+
companies_by_type: { title: 'الشركات حسب النوع', description: 'عدد الشركات من كل نوع.' },
158+
companies_by_industry: { title: 'الشركات حسب القطاع', description: 'توزيع الشركات على القطاعات.' },
159+
contacts_by_company: { title: 'جهات الاتصال حسب الشركة', description: 'عدد جهات الاتصال في كل شركة.' },
160+
},
161+
},
162+
},
163+
permissions: {
164+
biz_staff: { label: 'موظفو تطبيق البداية', description: 'يعرض الشركات وجهات الاتصال ومقالات المساعدة ويصدّرها.' },
165+
},
166+
};
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import type { TranslationData } from '@objectstack/spec/system';
4+
5+
/**
6+
* Starter translations — German (`de`).
7+
*
8+
* AI-written from the English source. The tasks and notes entries of
9+
* the menu carry no label of their own, so they show the platform's
10+
* translations of `sys_task` and `sys_note`.
11+
*/
12+
export const de: TranslationData = {
13+
packages: {
14+
'com.example.starter': {
15+
name: 'Starter-App',
16+
description: 'Unternehmen, Kontakte und Hilfeartikel, mit den Aufgaben und Notizen der Plattform im Menü.',
17+
},
18+
},
19+
objects: {
20+
biz_company: {
21+
label: 'Unternehmen',
22+
pluralLabel: 'Unternehmen',
23+
description: 'Ein Unternehmen, mit dem die Organisation zusammenarbeitet.',
24+
fields: {
25+
name: { label: 'Firmenname' },
26+
type: {
27+
label: 'Typ',
28+
options: {
29+
prospect: 'Interessent',
30+
customer: 'Kunde',
31+
partner: 'Partner',
32+
supplier: 'Lieferant',
33+
other: 'Sonstige',
34+
},
35+
},
36+
industry: {
37+
label: 'Branche',
38+
options: {
39+
technology: 'Technologie',
40+
manufacturing: 'Fertigung',
41+
retail: 'Einzelhandel',
42+
finance: 'Finanzen',
43+
healthcare: 'Gesundheitswesen',
44+
education: 'Bildung',
45+
other: 'Sonstige',
46+
},
47+
},
48+
website: { label: 'Website' },
49+
phone: { label: 'Telefon' },
50+
address: { label: 'Adresse' },
51+
description: { label: 'Beschreibung' },
52+
owner_id: { label: 'Verantwortlich' },
53+
},
54+
_views: {
55+
all: { label: 'Alle Unternehmen' },
56+
by_type: { label: 'Unternehmen nach Typ' },
57+
},
58+
_sections: {
59+
basic: { label: 'Grunddaten' },
60+
contact_info: { label: 'Kontaktdaten' },
61+
more: { label: 'Weitere' },
62+
},
63+
},
64+
biz_contact: {
65+
label: 'Kontakt',
66+
pluralLabel: 'Kontakte',
67+
description: 'Eine Person bei einem Unternehmen, mit dem die Organisation zusammenarbeitet.',
68+
fields: {
69+
name: { label: 'Name' },
70+
company: { label: 'Unternehmen' },
71+
title: { label: 'Position' },
72+
influence: {
73+
label: 'Einfluss',
74+
options: { decision_maker: 'Entscheider', influencer: 'Beeinflusser', user: 'Anwender', other: 'Sonstige' },
75+
},
76+
email: { label: 'E-Mail' },
77+
phone: { label: 'Telefon' },
78+
notes: { label: 'Notizen' },
79+
owner_id: { label: 'Verantwortlich' },
80+
},
81+
_views: {
82+
all: { label: 'Alle Kontakte' },
83+
by_influence: { label: 'Kontakte nach Einfluss' },
84+
},
85+
_sections: {
86+
basic: { label: 'Grunddaten' },
87+
contact_info: { label: 'Kontaktdaten' },
88+
more: { label: 'Weitere' },
89+
},
90+
},
91+
biz_article: {
92+
label: 'Artikel',
93+
pluralLabel: 'Artikel',
94+
description: 'Ein Hilfeartikel: eine Anleitung, eine häufige Frage oder eine Referenzseite.',
95+
fields: {
96+
title: { label: 'Titel' },
97+
body: { label: 'Inhalt' },
98+
category: {
99+
label: 'Kategorie',
100+
options: { how_to: 'Anleitung', faq: 'FAQ', reference: 'Referenz' },
101+
},
102+
status: {
103+
label: 'Status',
104+
options: { draft: 'Entwurf', published: 'Veröffentlicht' },
105+
},
106+
owner_id: { label: 'Verantwortlich' },
107+
},
108+
_views: {
109+
all: { label: 'Alle Artikel' },
110+
},
111+
_sections: {
112+
basic: { label: 'Artikel' },
113+
},
114+
},
115+
},
116+
apps: {
117+
biz_app: {
118+
label: 'Starter-App',
119+
description: 'Unternehmen, Kontakte und Hilfeartikel, mit den Aufgaben und Notizen der Plattform im Menü.',
120+
},
121+
},
122+
datasets: {
123+
biz_company_metrics: {
124+
label: 'Unternehmenskennzahlen',
125+
description: 'Wie viele Unternehmen es gibt, nach Typ und Branche',
126+
dimensions: {
127+
type: {
128+
label: 'Typ',
129+
description: 'Was das Unternehmen für die Organisation ist: Interessent, Kunde, Partner, Lieferant oder Sonstige.',
130+
},
131+
industry: {
132+
label: 'Branche',
133+
description: 'Die Branche des Unternehmens: Technologie, Fertigung, Einzelhandel, Finanzen, Gesundheitswesen, Bildung oder Sonstige. Ein Unternehmen ohne Branche wird unter „keine Branche“ gezählt.',
134+
},
135+
},
136+
measures: {
137+
company_count: { label: 'Unternehmen', description: 'Wie viele Unternehmen es gibt, unabhängig vom Typ.' },
138+
},
139+
},
140+
biz_contact_metrics: {
141+
label: 'Kontaktkennzahlen',
142+
description: 'Wie viele Kontakte es gibt, nach Unternehmen und Einfluss',
143+
dimensions: {
144+
company: {
145+
label: 'Unternehmen',
146+
description: 'Das Unternehmen, bei dem der Kontakt arbeitet; die Ergebnisse zeigen den Firmennamen. Ein Kontakt ohne Unternehmen wird unter „kein Unternehmen“ gezählt.',
147+
},
148+
influence: {
149+
label: 'Einfluss',
150+
description: 'Wie viel der Kontakt bei Entscheidungen des Unternehmens mitredet: Entscheider, Beeinflusser, Anwender oder Sonstige.',
151+
},
152+
},
153+
measures: {
154+
contact_count: { label: 'Kontakte', description: 'Wie viele Kontakte es gibt.' },
155+
},
156+
},
157+
},
158+
dashboards: {
159+
biz_overview_dashboard: {
160+
label: 'Übersicht',
161+
description: 'Unternehmen und Kontakte auf einen Blick.',
162+
widgets: {
163+
total_companies: { title: 'Unternehmen', description: 'Alle Unternehmen, unabhängig vom Typ.' },
164+
customers: { title: 'Kunden', description: 'Unternehmen vom Typ Kunde.' },
165+
total_contacts: { title: 'Kontakte', description: 'Alle Kontakte.' },
166+
companies_by_type: { title: 'Unternehmen nach Typ', description: 'Wie viele Unternehmen es je Typ gibt.' },
167+
companies_by_industry: {
168+
title: 'Unternehmen nach Branche',
169+
description: 'Wie sich die Unternehmen auf Branchen verteilen.',
170+
},
171+
contacts_by_company: {
172+
title: 'Kontakte nach Unternehmen',
173+
description: 'Wie viele Kontakte jedes Unternehmen hat.',
174+
},
175+
},
176+
},
177+
},
178+
permissions: {
179+
biz_staff: {
180+
label: 'Starter-App-Mitarbeitende',
181+
description: 'Liest und exportiert Unternehmen, Kontakte und Hilfeartikel.',
182+
},
183+
},
184+
};

0 commit comments

Comments
 (0)