Skip to content
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
15 changes: 15 additions & 0 deletions .changeset/39322-starter-eleven-locales.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@objectstack/example-starter': patch
---

feat(example-starter): the Starter ships all 11 platform locales, one translation file per locale, and writes Simplified Chinese as `zh-Hans`

Clause-②: no
Metadata-protocol: none

Who sees it: an organization that installs the Starter from the marketplace and works in a language other than English or Simplified Chinese.

- **`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.
- **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.
- **`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`.
- `os i18n check --strict` reads 100% for all eleven locales (95 keys each).
5 changes: 4 additions & 1 deletion examples/app-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ notes in one menu.
- `src/knowledge/` — `biz_articles`, a knowledge source over the published
help articles: each `##` section of an article is one passage. See
[Searching the help articles](#searching-the-help-articles).
- `src/translations/` — English and Simplified Chinese.
- `src/translations/` — one file per platform locale, all 11: English
(`en`, the source), Simplified and Traditional Chinese (`zh-Hans`,
`zh-Hant`), Spanish, Arabic, French, Brazilian Portuguese, Russian, German,
Japanese and Korean. `os i18n check --strict` holds them complete.

The API names carry the `biz_` namespace, so a tenant can install this
starter beside a CRM package without a name clash. Uninstalling the package
Expand Down
5 changes: 4 additions & 1 deletion examples/app-starter/objectstack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ export default defineStack({
// is held and nothing is indexed or offered to AI clients.
knowledgeSources: [ArticlesKnowledge],

// Every platform locale (`PLATFORM_LOCALE_TAGS`), written out: the Console's
// language menu offers only the locales an app lists. `zh-Hans` is the write
// tag for Simplified Chinese; `zh-CN` is only read as an alias of it.
i18n: {
defaultLocale: 'en',
supportedLocales: ['en', 'zh-CN'],
supportedLocales: ['en', 'zh-Hans', 'zh-Hant', 'es', 'ar', 'fr', 'pt-BR', 'ru', 'de', 'ja', 'ko'],
fallbackLocale: 'en',
},
translations: Object.values(translations),
Expand Down
166 changes: 166 additions & 0 deletions examples/app-starter/src/translations/ar.translation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

import type { TranslationData } from '@objectstack/spec/system';

/**
* Starter translations — Arabic (`ar`).
*
* AI-written from the English source. The tasks and notes entries of
* the menu carry no label of their own, so they show the platform's
* translations of `sys_task` and `sys_note`.
*/
export const ar: TranslationData = {
packages: {
'com.example.starter': {
name: 'تطبيق البداية',
description: 'الشركات وجهات الاتصال ومقالات المساعدة، مع مهام المنصة وملاحظاتها في القائمة.',
},
},
objects: {
biz_company: {
label: 'شركة',
pluralLabel: 'الشركات',
description: 'شركة تتعامل معها المؤسسة.',
fields: {
name: { label: 'اسم الشركة' },
type: {
label: 'النوع',
options: { prospect: 'عميل محتمل', customer: 'عميل', partner: 'شريك', supplier: 'مورّد', other: 'أخرى' },
},
industry: {
label: 'القطاع',
options: {
technology: 'التقنية',
manufacturing: 'التصنيع',
retail: 'التجزئة',
finance: 'المالية',
healthcare: 'الرعاية الصحية',
education: 'التعليم',
other: 'أخرى',
},
},
website: { label: 'الموقع الإلكتروني' },
phone: { label: 'الهاتف' },
address: { label: 'العنوان' },
description: { label: 'الوصف' },
owner_id: { label: 'المالك' },
},
_views: {
all: { label: 'جميع الشركات' },
by_type: { label: 'الشركات حسب النوع' },
},
_sections: {
basic: { label: 'المعلومات الأساسية' },
contact_info: { label: 'معلومات الاتصال' },
more: { label: 'المزيد' },
},
},
biz_contact: {
label: 'جهة اتصال',
pluralLabel: 'جهات الاتصال',
description: 'شخص في شركة تتعامل معها المؤسسة.',
fields: {
name: { label: 'الاسم' },
company: { label: 'الشركة' },
title: { label: 'المسمى الوظيفي' },
influence: {
label: 'التأثير',
options: { decision_maker: 'صاحب القرار', influencer: 'مؤثر', user: 'مستخدم', other: 'أخرى' },
},
email: { label: 'البريد الإلكتروني' },
phone: { label: 'الهاتف' },
notes: { label: 'ملاحظات' },
owner_id: { label: 'المالك' },
},
_views: {
all: { label: 'جميع جهات الاتصال' },
by_influence: { label: 'جهات الاتصال حسب التأثير' },
},
_sections: {
basic: { label: 'المعلومات الأساسية' },
contact_info: { label: 'معلومات الاتصال' },
more: { label: 'المزيد' },
},
},
biz_article: {
label: 'مقالة',
pluralLabel: 'المقالات',
description: 'مقالة مساعدة: دليل إرشادي أو سؤال شائع أو صفحة مرجعية.',
fields: {
title: { label: 'العنوان' },
body: { label: 'النص' },
category: {
label: 'الفئة',
options: { how_to: 'دليل إرشادي', faq: 'الأسئلة الشائعة', reference: 'مرجع' },
},
status: {
label: 'الحالة',
options: { draft: 'مسودة', published: 'منشور' },
},
owner_id: { label: 'المالك' },
},
_views: {
all: { label: 'جميع المقالات' },
},
_sections: {
basic: { label: 'المقالة' },
},
},
},
apps: {
biz_app: {
label: 'تطبيق البداية',
description: 'الشركات وجهات الاتصال ومقالات المساعدة، مع مهام المنصة وملاحظاتها في القائمة.',
},
},
datasets: {
biz_company_metrics: {
label: 'مقاييس الشركات',
description: 'عدد الشركات حسب النوع والقطاع',
dimensions: {
type: { label: 'النوع', description: 'علاقة الشركة بالمؤسسة: عميل محتمل أو عميل أو شريك أو مورّد أو أخرى.' },
industry: {
label: 'القطاع',
description: 'القطاع الذي تعمل فيه الشركة: التقنية أو التصنيع أو التجزئة أو المالية أو الرعاية الصحية أو التعليم أو أخرى. تُحتسب الشركة التي لم يُحدَّد قطاعها ضمن «بلا قطاع».',
},
},
measures: {
company_count: { label: 'عدد الشركات', description: 'عدد الشركات بغض النظر عن نوعها.' },
},
},
biz_contact_metrics: {
label: 'مقاييس جهات الاتصال',
description: 'عدد جهات الاتصال حسب الشركة والتأثير',
dimensions: {
company: {
label: 'الشركة',
description: 'الشركة التي تعمل فيها جهة الاتصال؛ وتعرض النتائج اسم الشركة. تُحتسب جهة الاتصال التي لا شركة لها ضمن «بلا شركة».',
},
influence: {
label: 'التأثير',
description: 'مدى تأثير جهة الاتصال في قرارات الشركة: صاحب القرار أو مؤثر أو مستخدم أو أخرى.',
},
},
measures: {
contact_count: { label: 'عدد جهات الاتصال', description: 'عدد جهات الاتصال.' },
},
},
},
dashboards: {
biz_overview_dashboard: {
label: 'نظرة عامة',
description: 'الشركات وجهات الاتصال في لمحة.',
widgets: {
total_companies: { title: 'الشركات', description: 'كل الشركات بغض النظر عن نوعها.' },
customers: { title: 'العملاء', description: 'الشركات من نوع «عميل».' },
total_contacts: { title: 'جهات الاتصال', description: 'كل جهات الاتصال.' },
companies_by_type: { title: 'الشركات حسب النوع', description: 'عدد الشركات من كل نوع.' },
companies_by_industry: { title: 'الشركات حسب القطاع', description: 'توزيع الشركات على القطاعات.' },
contacts_by_company: { title: 'جهات الاتصال حسب الشركة', description: 'عدد جهات الاتصال في كل شركة.' },
},
},
},
permissions: {
biz_staff: { label: 'موظفو تطبيق البداية', description: 'يعرض الشركات وجهات الاتصال ومقالات المساعدة ويصدّرها.' },
},
};
184 changes: 184 additions & 0 deletions examples/app-starter/src/translations/de.translation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

import type { TranslationData } from '@objectstack/spec/system';

/**
* Starter translations — German (`de`).
*
* AI-written from the English source. The tasks and notes entries of
* the menu carry no label of their own, so they show the platform's
* translations of `sys_task` and `sys_note`.
*/
export const de: TranslationData = {
packages: {
'com.example.starter': {
name: 'Starter-App',
description: 'Unternehmen, Kontakte und Hilfeartikel, mit den Aufgaben und Notizen der Plattform im Menü.',
},
},
objects: {
biz_company: {
label: 'Unternehmen',
pluralLabel: 'Unternehmen',
description: 'Ein Unternehmen, mit dem die Organisation zusammenarbeitet.',
fields: {
name: { label: 'Firmenname' },
type: {
label: 'Typ',
options: {
prospect: 'Interessent',
customer: 'Kunde',
partner: 'Partner',
supplier: 'Lieferant',
other: 'Sonstige',
},
},
industry: {
label: 'Branche',
options: {
technology: 'Technologie',
manufacturing: 'Fertigung',
retail: 'Einzelhandel',
finance: 'Finanzen',
healthcare: 'Gesundheitswesen',
education: 'Bildung',
other: 'Sonstige',
},
},
website: { label: 'Website' },
phone: { label: 'Telefon' },
address: { label: 'Adresse' },
description: { label: 'Beschreibung' },
owner_id: { label: 'Verantwortlich' },
},
_views: {
all: { label: 'Alle Unternehmen' },
by_type: { label: 'Unternehmen nach Typ' },
},
_sections: {
basic: { label: 'Grunddaten' },
contact_info: { label: 'Kontaktdaten' },
more: { label: 'Weitere' },
},
},
biz_contact: {
label: 'Kontakt',
pluralLabel: 'Kontakte',
description: 'Eine Person bei einem Unternehmen, mit dem die Organisation zusammenarbeitet.',
fields: {
name: { label: 'Name' },
company: { label: 'Unternehmen' },
title: { label: 'Position' },
influence: {
label: 'Einfluss',
options: { decision_maker: 'Entscheider', influencer: 'Beeinflusser', user: 'Anwender', other: 'Sonstige' },
},
email: { label: 'E-Mail' },
phone: { label: 'Telefon' },
notes: { label: 'Notizen' },
owner_id: { label: 'Verantwortlich' },
},
_views: {
all: { label: 'Alle Kontakte' },
by_influence: { label: 'Kontakte nach Einfluss' },
},
_sections: {
basic: { label: 'Grunddaten' },
contact_info: { label: 'Kontaktdaten' },
more: { label: 'Weitere' },
},
},
biz_article: {
label: 'Artikel',
pluralLabel: 'Artikel',
description: 'Ein Hilfeartikel: eine Anleitung, eine häufige Frage oder eine Referenzseite.',
fields: {
title: { label: 'Titel' },
body: { label: 'Inhalt' },
category: {
label: 'Kategorie',
options: { how_to: 'Anleitung', faq: 'FAQ', reference: 'Referenz' },
},
status: {
label: 'Status',
options: { draft: 'Entwurf', published: 'Veröffentlicht' },
},
owner_id: { label: 'Verantwortlich' },
},
_views: {
all: { label: 'Alle Artikel' },
},
_sections: {
basic: { label: 'Artikel' },
},
},
},
apps: {
biz_app: {
label: 'Starter-App',
description: 'Unternehmen, Kontakte und Hilfeartikel, mit den Aufgaben und Notizen der Plattform im Menü.',
},
},
datasets: {
biz_company_metrics: {
label: 'Unternehmenskennzahlen',
description: 'Wie viele Unternehmen es gibt, nach Typ und Branche',
dimensions: {
type: {
label: 'Typ',
description: 'Was das Unternehmen für die Organisation ist: Interessent, Kunde, Partner, Lieferant oder Sonstige.',
},
industry: {
label: 'Branche',
description: 'Die Branche des Unternehmens: Technologie, Fertigung, Einzelhandel, Finanzen, Gesundheitswesen, Bildung oder Sonstige. Ein Unternehmen ohne Branche wird unter „keine Branche“ gezählt.',
},
},
measures: {
company_count: { label: 'Unternehmen', description: 'Wie viele Unternehmen es gibt, unabhängig vom Typ.' },
},
},
biz_contact_metrics: {
label: 'Kontaktkennzahlen',
description: 'Wie viele Kontakte es gibt, nach Unternehmen und Einfluss',
dimensions: {
company: {
label: 'Unternehmen',
description: 'Das Unternehmen, bei dem der Kontakt arbeitet; die Ergebnisse zeigen den Firmennamen. Ein Kontakt ohne Unternehmen wird unter „kein Unternehmen“ gezählt.',
},
influence: {
label: 'Einfluss',
description: 'Wie viel der Kontakt bei Entscheidungen des Unternehmens mitredet: Entscheider, Beeinflusser, Anwender oder Sonstige.',
},
},
measures: {
contact_count: { label: 'Kontakte', description: 'Wie viele Kontakte es gibt.' },
},
},
},
dashboards: {
biz_overview_dashboard: {
label: 'Übersicht',
description: 'Unternehmen und Kontakte auf einen Blick.',
widgets: {
total_companies: { title: 'Unternehmen', description: 'Alle Unternehmen, unabhängig vom Typ.' },
customers: { title: 'Kunden', description: 'Unternehmen vom Typ Kunde.' },
total_contacts: { title: 'Kontakte', description: 'Alle Kontakte.' },
companies_by_type: { title: 'Unternehmen nach Typ', description: 'Wie viele Unternehmen es je Typ gibt.' },
companies_by_industry: {
title: 'Unternehmen nach Branche',
description: 'Wie sich die Unternehmen auf Branchen verteilen.',
},
contacts_by_company: {
title: 'Kontakte nach Unternehmen',
description: 'Wie viele Kontakte jedes Unternehmen hat.',
},
},
},
},
permissions: {
biz_staff: {
label: 'Starter-App-Mitarbeitende',
description: 'Liest und exportiert Unternehmen, Kontakte und Hilfeartikel.',
},
},
};
Loading
Loading