Skip to content

Commit 6701c08

Browse files
i18n(service-mailbox): ship the mailbox objects in all eleven platform languages (#30606)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgBxjikPH2bUin9o95gbAxsx)_ domain:server#2 · os-bill · session_01Utp6Cai5CRdAs4u9gTipWU Refs #30512 — package 3 of 11 (`@objectstack/service-mailbox`). The card stays open: the last PR of the series flips the bundle check to the platform locale table. Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么:** 邮箱三个对象(`sys_mailbox`、`sys_mail_message`、`sys_mail_association`)的名称、字段、选项、帮助文字和视图名补上 7 种语言:繁体中文、阿拉伯语、法语、巴西葡萄牙语、俄语、德语、韩语,共 11 种,与平台语言表一致。 - **为什么改:** 平台语言表(#29428 裁决 F)要求每个界面带齐 11 种语言;这是第 3 期按包补齐的第 3 个包(75 条)。 - **风险与回滚:** 只加翻译数据和注册行,不动逻辑、schema、接口;原有 4 种语言一字未改;无新的 stale-fill 巧合,基线未动。回滚即撤 PR。 - **先看:** `src/translations/index.ts`(按表标签注册,zh-CN 在 zh-Hant 前),再抽看 `ar.objects.generated.ts`。 - **两分钟验证:** `node scripts/check-i18n-bundles.mjs` 输出 `services/service-mailbox in sync`,`node scripts/check-i18n-stale-fill.mjs` 退出 0。 - **需要你做的:** 无,席位落地。 ## What changes - Seven new locales for the mailbox objects under the platform locale table's tags (`zh-Hant`, `ar`, `fr`, `pt-BR`, `ru`, `de`, `ko`): each a `TAG.objects.generated.ts` with all 75 leaves plus its `TAG.source-hashes.generated.ts`, written by the repo's own `os i18n extract --fill=default --source-hashes` and served through `withSourceFallback` like the existing three. `zh-CN` stays ahead of `zh-Hant` in `index.ts`. - The extract command in `scripts/i18n-extract.config.ts` lists the seven tags and its merge baseline imports the seven bundles, so `check:i18n` covers them from this PR on. ## Acceptance notes - **Quality bar (#17508 / PR #19345):** every leaf written for the reader; placeholders, code spans and identifiers byte-identical, checked mechanically per leaf against `en`. Arabic is RTL prose with identifiers left in Latin script. - **Leaves equal to English, on purpose:** the RFC 5322 header names `Message-ID`, `In-Reply-To`, `References`, `Sender`, `Reply-To` and the IMAP term `UIDVALIDITY`, in every locale, exactly as `zh-CN` already keeps them (a user matching a raw header needs the header's own name). Beyond those, native cognates only: `fr` `Cc`, `Association`, `Message`; `pt-BR` `Cc`; `de` `Cc`, `Name`. The extractor records each as a source copy (`zh-Hant`/`ar`/`ru`/`ko` 6 entries; `pt-BR` 7; `de` 8; `fr` 9). - No cross-locale coincidence: `check:i18n-stale-fill` passes with the baseline untouched. ## Verification <details><summary>Package suite, typecheck, build (verify lock)</summary> ``` turbo build (12-package i18n closure incl. @objectstack/service-mailbox): 63 tasks successful, exit 0 pnpm --filter @objectstack/service-mailbox test && typecheck Test Files 10 passed (10) Tests 152 passed (152) os-verify-lock: VERDICT command-exit 0 ``` </details> <details><summary>i18n gates</summary> ``` node scripts/check-i18n-bundles.mjs services/service-mailbox in sync check-i18n-bundles: OK (10 package(s) — all bundles in sync, no undeclared authoring keys). EXIT 0 node scripts/check-i18n-stale-fill.mjs check-i18n-stale-fill: OK (11 bundle set(s) — no new stale fills, 1 baselined). EXIT 0 (the 1 baselined entry is #30586's webhooks plural, already on main; none added here) ``` </details> <details><summary>Derived gate families at head 34c094b (dispatch-gates --commands, reconciled with --ran)</summary> ``` dispatch-gates --ran: 56 derived famil(ies) accounted for — 56 run, 0 NOT-MEASURED (a DERIVED zero). Every family exit 0, including pnpm check:i18n and pnpm check:i18n-stale-fill. Run at 1c191347 (base 2ffdb64); the head 34c094b is the same tree re-based onto main 4831d50 after #30586 merged, re-checked there: check:i18n in sync, check:i18n-stale-fill OK. eslint on the changed .ts files: exit 0 · check-nul-bytes: exit 0 changed lines 1481 (+1480 / -1), 17 files: under the 3000-line human-merge threshold ``` Full record: the seat's project folder, `server-seat2/30512/gates-mailbox-ran.txt`. </details> Dogfood: not run — content-only package PR, no `!` in the title and no `(narrowing)` arm (dispatch order: package suite + `check:i18n` + typecheck suffice). --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6Cai5CRdAs4u9gTipWU)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent b6ae87c commit 6701c08

17 files changed

Lines changed: 1480 additions & 1 deletion
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/service-mailbox': patch
3+
---
4+
5+
i18n(service-mailbox): the mailbox objects' labels, help, options and views ship in all eleven platform languages
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The mailbox objects (`sys_mailbox`, `sys_mail_message` and `sys_mail_association`) now carry Traditional Chinese (`zh-Hant`), Arabic (`ar`), French (`fr`), Brazilian Portuguese (`pt-BR`), Russian (`ru`), German (`de`) and Korean (`ko`) beside the existing `en`, `zh-CN`, `ja-JP` and `es-ES`, so a user reading the app in one of those languages sees the mailbox screens in their own language instead of English. RFC 5322 header names (`Message-ID`, `In-Reply-To`, `Reply-To`, …) and the IMAP `UIDVALIDITY` term stay as written, as they already do in `zh-CN`. Each new locale is registered under its platform-table tag with its source-hash companion, and the package's extract command lists the seven tags, so the existing `check:i18n` bundle check covers them. Part of #30512.

‎packages/services/service-mailbox/scripts/i18n-extract.config.ts‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* `--merge` preserves every hand-translated string.
88
*
99
* os i18n extract packages/services/service-mailbox/scripts/i18n-extract.config.ts \
10-
* --locales=zh-CN,ja-JP,es-ES --fill=default --objects-only --no-metadata-forms \
10+
* --locales=zh-CN,ja-JP,es-ES,zh-Hant,ar,fr,pt-BR,ru,de,ko --fill=default --objects-only --no-metadata-forms \
1111
* --source-hashes \
1212
* --out=packages/services/service-mailbox/src/translations
1313
*
@@ -41,6 +41,13 @@ import { enObjects } from '../src/translations/en.objects.generated.js';
4141
import { zhCNObjects } from '../src/translations/zh-CN.objects.generated.js';
4242
import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
4343
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
44+
import { zhHantObjects } from '../src/translations/zh-Hant.objects.generated.js';
45+
import { arObjects } from '../src/translations/ar.objects.generated.js';
46+
import { frObjects } from '../src/translations/fr.objects.generated.js';
47+
import { ptBRObjects } from '../src/translations/pt-BR.objects.generated.js';
48+
import { ruObjects } from '../src/translations/ru.objects.generated.js';
49+
import { deObjects } from '../src/translations/de.objects.generated.js';
50+
import { koObjects } from '../src/translations/ko.objects.generated.js';
4451

4552
/**
4653
* The annotation is load-bearing, not decoration (#10868). `defineStack`
@@ -63,6 +70,13 @@ const config: ObjectStackDefinition = defineStack({
6370
{ 'zh-CN': { objects: zhCNObjects } },
6471
{ 'ja-JP': { objects: jaJPObjects } },
6572
{ 'es-ES': { objects: esESObjects } },
73+
{ 'zh-Hant': { objects: zhHantObjects } },
74+
{ 'ar': { objects: arObjects } },
75+
{ 'fr': { objects: frObjects } },
76+
{ 'pt-BR': { objects: ptBRObjects } },
77+
{ 'ru': { objects: ruObjects } },
78+
{ 'de': { objects: deObjects } },
79+
{ 'ko': { objects: koObjects } },
6680
],
6781
});
6882

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* Auto-generated by 'os i18n extract' for locale 'ar'.
5+
* Edit translations in place; re-run extract (with --merge) to fill new gaps.
6+
* Do not hand-edit the structure — only the leaf string values.
7+
* Merge only fills gaps: correcting a source label/description does not
8+
* push the correction into a leaf here that already holds a translation —
9+
* a present-but-stale string is not a gap, so it is left as-is. Re-translate
10+
* it by hand when its source changes; nothing here or in `os i18n check`
11+
* tells a leaf a translator updated on purpose from one nobody has looked
12+
* at since the source moved.
13+
*/
14+
15+
import type { TranslationData } from '@objectstack/spec/system';
16+
17+
export const arObjects: NonNullable<TranslationData['objects']> = {
18+
sys_mailbox: {
19+
label: "صندوق البريد",
20+
pluralLabel: "صناديق البريد",
21+
description: "صندوق بريد وارد تنسخ المنصّة رسائله: عنوانه ومالكه",
22+
fields: {
23+
id: {
24+
label: "معرّف صندوق البريد"
25+
},
26+
name: {
27+
label: "الاسم",
28+
help: "الاسم المعروض لصندوق البريد (مثل \"بريد المبيعات\")"
29+
},
30+
address: {
31+
label: "العنوان",
32+
help: "عنوان صندوق البريد. لا يُطابَق أبدًا كمشارك: فالرسالة المرسلة إلى هذا الصندوق لا تخصّ الصندوق نفسه."
33+
},
34+
owner_user_id: {
35+
label: "المالك",
36+
help: "المستخدم الذي يملك صندوق البريد هذا. تُعرَض على المالك كل رسالة وصلت إليه، بما فيها غير المرتبطة."
37+
},
38+
imap_folder: {
39+
label: "المجلد المتزامن",
40+
help: "مجلد IMAP الذي يتبع له مؤشر المزامنة. عند مزامنة صندوق البريد من مجلد آخر، يبدأ المؤشر من جديد."
41+
},
42+
imap_uid_validity: {
43+
label: "UIDVALIDITY",
44+
help: "قيمة UIDVALIDITY للمجلد التي أُخذ المؤشر بموجبها. عندما يُبلغ الخادم قيمة أخرى، تشير معرّفات UID فيه إلى رسائل أخرى ويبدأ المؤشر من جديد."
45+
},
46+
imap_last_uid: {
47+
label: "آخر UID متزامن",
48+
help: "أعلى UID في المجلد سُلِّم بالفعل إلى الاستيعاب (خُزِّن، أو وُجد مخزَّنًا، أو حُجب، أو تُخطّي). تجلب المزامنة التالية معرّفات UID الأعلى منه."
49+
},
50+
imap_synced_at: {
51+
label: "وقت آخر مزامنة",
52+
help: "وقت انتهاء المزامنة آخر مرة من المرور على المجلد."
53+
}
54+
}
55+
},
56+
sys_mail_message: {
57+
label: "رسالة بريد",
58+
pluralLabel: "رسائل البريد",
59+
description: "رسالة بريد واردة منسوخة من صندوق بريد",
60+
fields: {
61+
id: {
62+
label: "معرّف الرسالة"
63+
},
64+
mailbox_id: {
65+
label: "صندوق البريد",
66+
help: "صندوق البريد الذي وصلت إليه الرسالة"
67+
},
68+
message_id: {
69+
label: "Message-ID",
70+
help: "ترويسة Message-ID بعد إزالة الأقواس الزاوية"
71+
},
72+
in_reply_to: {
73+
label: "In-Reply-To",
74+
help: "ترويسة In-Reply-To: معرّفات الرسائل التي تردّ عليها هذه الرسالة، مفصولة بمسافات"
75+
},
76+
reference_ids: {
77+
label: "References",
78+
help: "ترويسة References: معرّفات رسائل سلسلة المحادثة، مفصولة بمسافات"
79+
},
80+
from_address: {
81+
label: "المرسِل",
82+
help: "أول عنوان في From. تُنسخ الرسالة التي لا تحتوي عليه أيضًا ولا تُسقط أبدًا."
83+
},
84+
from_name: {
85+
label: "اسم المرسِل",
86+
help: "الاسم المعروض لأول عنوان في From"
87+
},
88+
sender_address: {
89+
label: "Sender",
90+
help: "ترويسة Sender، عندما تحملها الرسالة"
91+
},
92+
reply_to: {
93+
label: "Reply-To",
94+
help: "عناوين Reply-To مفصولة بفواصل"
95+
},
96+
to_addresses: {
97+
label: "إلى",
98+
help: "عناوين To مفصولة بفواصل"
99+
},
100+
cc_addresses: {
101+
label: "نسخة إلى",
102+
help: "عناوين Cc مفصولة بفواصل"
103+
},
104+
sent_at: {
105+
label: "وقت الإرسال",
106+
help: "ترويسة Date: الوقت الذي يقول المرسِل إن الرسالة كُتبت فيه"
107+
},
108+
received_at: {
109+
label: "وقت الاستلام",
110+
help: "وقت استلام صندوق البريد للرسالة"
111+
},
112+
subject: {
113+
label: "الموضوع"
114+
},
115+
body_text: {
116+
label: "النص (نص عادي)"
117+
},
118+
body_html: {
119+
label: "النص (HTML)",
120+
help: "جزء HTML كما كتبه المرسِل، يُخزَّن حرفيًا ولا يُعرض أبدًا دون تعقيم"
121+
},
122+
match_addresses: {
123+
label: "عناوين المطابقة",
124+
help: "عناوين المشاركين التي طوبقت معها السجلات، باستثناء عنوان صندوق البريد نفسه؛ تعيد إعادة المطابقة تشغيل هذه العناوين نفسها تمامًا"
125+
},
126+
association_state: {
127+
label: "الارتباط",
128+
help: "ما إذا كان أي سجل قد طابق الرسالة. تنتظر الرسالة غير المرتبطة في المجموعة المقيّدة.",
129+
options: {
130+
associated: "مرتبطة",
131+
unassociated: "غير مرتبطة"
132+
}
133+
},
134+
dedupe_key: {
135+
label: "مفتاح إزالة التكرار",
136+
help: "تجزئة Message-ID بعد التطبيع (أو تجزئة كتلة الترويسات إن لم يوجد)؛ صف واحد لكل رسالة في كل صندوق بريد"
137+
}
138+
}
139+
},
140+
sys_mail_association: {
141+
label: "ارتباط البريد",
142+
pluralLabel: "ارتباطات البريد",
143+
description: "يربط رسالة واردة منسوخة بالسجل الذي تنتمي إليه",
144+
fields: {
145+
id: {
146+
label: "معرّف الارتباط"
147+
},
148+
mail_message_id: {
149+
label: "الرسالة"
150+
},
151+
object_name: {
152+
label: "الكائن",
153+
help: "الاسم البرمجي للكائن الذي ينتمي إليه السجل المرتبط"
154+
},
155+
record_id: {
156+
label: "معرّف السجل",
157+
help: "معرّف السجل المرتبط، في الكائن المحدد في \"الكائن\""
158+
},
159+
matched_address: {
160+
label: "العنوان المطابق",
161+
help: "عنوان المشارك الذي طابق السجل"
162+
},
163+
matched_field: {
164+
label: "الحقل المطابق",
165+
help: "حقل البريد الإلكتروني في السجل الذي ساوت قيمته العنوان المطابق"
166+
},
167+
matched_by: {
168+
label: "طريقة المطابقة",
169+
help: "ما إذا كان الربط قد سُجّل عند وصول الرسالة أم أُضيف بإعادة مطابقة لاحقة",
170+
options: {
171+
ingest: "الاستيعاب",
172+
rematch: "إعادة المطابقة"
173+
}
174+
}
175+
}
176+
}
177+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* Auto-generated by 'os i18n extract' for locale 'ar'. Do not hand-edit.
5+
*
6+
* Each entry is the digest of the SOURCE REVISION that this locale's leaf at
7+
* that path is still a byte copy of — provenance for the generated half of the
8+
* bundles (commit 09b4f4e4e): a leaf whose digest no longer matches its source is stale and serves the source text instead.
9+
*
10+
* An entry exists only while the leaf IS such a copy. Re-translate the leaf in
11+
* `<locale>.objects.generated.ts` and the next extract drops its entry by
12+
* itself — the table makes no claim about text a translator wrote. A path with
13+
* no entry is LEGACY-TRUSTED and never reported stale.
14+
*
15+
* ⚠️ Do not "fix" a staleness report by editing this file. Refreshing a digest
16+
* records that the current text was copied from the current source, which is
17+
* the false claim the mechanism exists to detect. Fix the TRANSLATION.
18+
*/
19+
20+
export const arGeneratedSourceHashes: Readonly<Record<string, string>> = {
21+
"objects.sys_mail_message.fields.in_reply_to.label": "71bb10a36255d815",
22+
"objects.sys_mail_message.fields.message_id.label": "14cd089a4062f4b1",
23+
"objects.sys_mail_message.fields.reference_ids.label": "5102fd1664d35c0b",
24+
"objects.sys_mail_message.fields.reply_to.label": "90ad8f2ca791a95a",
25+
"objects.sys_mail_message.fields.sender_address.label": "89db06253eee9632",
26+
"objects.sys_mailbox.fields.imap_uid_validity.label": "5a2ec2b384b73bb0",
27+
};

0 commit comments

Comments
 (0)