Skip to content

Commit 41230cb

Browse files
committed
i18n(plugin-security): ship the security objects, built-in permission sets and positions in all eleven platform languages
The security objects, the built-in permission sets and the built-in positions gain zh-Hant, ar, fr, pt-BR, ru, de and ko under the platform locale table's tags. Each object bundle is written and hashed by the repo's own `os i18n extract --source-hashes` and served through withSourceFallback like the existing three; the hand-written permission-set and position tables carry an entry per locale; the extract command and its merge baseline list the seven tags, so check:i18n covers them. position-rename-consistency extends its stale-word scan to zh-Hant, fr, pt-BR, ru, de and ko. Carried from the released handover commit ff28e79 (written by session_01Utp6Cai5CRdAs4u9gTipWU) onto main 06cccd3 without change. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cya5ej5GQV86RPbRPK
1 parent 06cccd3 commit 41230cb

20 files changed

Lines changed: 1801 additions & 6 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
i18n(plugin-security): the security objects, built-in permission sets and built-in positions ship in all eleven platform languages
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The security objects, the names and descriptions of the built-in permission sets and the names of the built-in positions now carry `zh-Hant`, `ar`, `fr`, `pt-BR`, `ru`, `de` and `ko` beside the existing `en`, `zh-CN`, `ja-JP` and `es-ES`, so an administrator in one of those languages reads the security screens in their own language instead of English. Each new locale is registered under its platform-table tag with its source-hash companion, the hand-authored permission-set and position tables carry an entry in every locale, and the package's extract command lists the tags, so the existing `check:i18n` bundle check covers them. Package 7 of #30512.

‎packages/plugins/plugin-security/scripts/i18n-extract.config.ts‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* strings were seeded from @objectstack/platform-objects.)
99
*
1010
* os i18n extract packages/plugins/plugin-security/scripts/i18n-extract.config.ts \
11-
* --locales=zh-CN,ja-JP,es-ES --fill=default --objects-only --no-metadata-forms \
11+
* --locales=zh-CN,ja-JP,es-ES,zh-Hant,ar,fr,pt-BR,ru,de,ko --fill=default --objects-only --no-metadata-forms \
1212
* --source-hashes \
1313
* --out=packages/plugins/plugin-security/src/translations
1414
*
@@ -47,6 +47,13 @@ import { enObjects } from '../src/translations/en.objects.generated.js';
4747
import { zhCNObjects } from '../src/translations/zh-CN.objects.generated.js';
4848
import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
4949
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
50+
import { zhHantObjects } from '../src/translations/zh-Hant.objects.generated.js';
51+
import { arObjects } from '../src/translations/ar.objects.generated.js';
52+
import { frObjects } from '../src/translations/fr.objects.generated.js';
53+
import { ptBRObjects } from '../src/translations/pt-BR.objects.generated.js';
54+
import { ruObjects } from '../src/translations/ru.objects.generated.js';
55+
import { deObjects } from '../src/translations/de.objects.generated.js';
56+
import { koObjects } from '../src/translations/ko.objects.generated.js';
5057

5158
/**
5259
* The annotation is load-bearing, not decoration (#10868). `defineStack`
@@ -69,6 +76,13 @@ const config: ObjectStackDefinition = defineStack({
6976
{ 'zh-CN': { objects: zhCNObjects } },
7077
{ 'ja-JP': { objects: jaJPObjects } },
7178
{ 'es-ES': { objects: esESObjects } },
79+
{ 'zh-Hant': { objects: zhHantObjects } },
80+
{ 'ar': { objects: arObjects } },
81+
{ 'fr': { objects: frObjects } },
82+
{ 'pt-BR': { objects: ptBRObjects } },
83+
{ 'ru': { objects: ruObjects } },
84+
{ 'de': { objects: deObjects } },
85+
{ 'ko': { objects: koObjects } },
7286
],
7387
});
7488

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
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_user_permission_set: {
19+
label: "مجموعة أذونات المستخدم",
20+
pluralLabel: "مجموعات أذونات المستخدمين",
21+
description: "إسناد مباشر لمجموعة أذونات إلى مستخدم (ويمكن حصره في مؤسسة).",
22+
fields: {
23+
id: {
24+
label: "معرّف الإسناد",
25+
help: "معرّف UUID للإسناد."
26+
},
27+
display_title: {
28+
label: "العنوان",
29+
help: "عنوان السجل: المستخدم ومجموعة الأذونات المسندة إليه (يُحسب عند القراءة)"
30+
},
31+
user_id: {
32+
label: "المستخدم",
33+
help: "المستخدم الذي يتلقى مجموعة الأذونات هذه."
34+
},
35+
permission_set: {
36+
label: "مجموعة الأذونات",
37+
help: "مجموعة الأذونات التي يمنحها هذا الإسناد للمستخدم. اختر إحدى مجموعات الأذونات المعرّفة في الإعداد؛ ويُرفض الاسم الذي لا يطابق أي مجموعة."
38+
},
39+
organization_id: {
40+
label: "المؤسسة",
41+
help: "المؤسسة التي ينتمي إليها هذا المنح."
42+
},
43+
granted_by: {
44+
label: "مَن منحه",
45+
help: "المستخدم الذي منح مجموعة الأذونات هذه."
46+
},
47+
valid_from: {
48+
label: "صالح من",
49+
help: "يسري الإسناد في هذا الوقت. اتركه فارغًا ليسري فورًا. يبدأ في موعده دون انتظار أي مهمة مجدولة."
50+
},
51+
valid_until: {
52+
label: "صالح حتى",
53+
help: "ينتهي الإسناد في هذا الوقت (UTC). اتركه فارغًا لعدم تحديد تاريخ انتهاء. مطلوب في الوصول الطارئ وفي الإسناد إلى وكيل ذكاء اصطناعي. ينتهي في موعده دون انتظار أي مهمة مجدولة."
54+
},
55+
reason: {
56+
label: "السبب",
57+
help: "سبب وجود هذا الإسناد. مطلوب في الإسنادات المفوَّضة وإسنادات الوصول الطارئ. بالنسبة إلى وكيل ذكاء اصطناعي، اذكر المهمة التي مُنح الوصول من أجلها."
58+
},
59+
last_certified_at: {
60+
label: "آخر اعتماد في",
61+
help: "غير مستخدم بعد: محجوز لميزة مستقبلية لمراجعة الوصول. لا شيء يملأ هذا التاريخ أو يتحقق منه، لذا فالقيمة الفارغة لا تعني أن الإسناد لم يُراجَع."
62+
},
63+
certified_by: {
64+
label: "مَن اعتمده",
65+
help: "غير مستخدم بعد: محجوز لميزة مستقبلية لمراجعة الوصول. المراجِع المُدخَل هنا لا يُتحقق منه ولا يغيّر شيئًا مما يمنحه الإسناد."
66+
},
67+
created_at: {
68+
label: "تاريخ الإنشاء"
69+
},
70+
updated_at: {
71+
label: "تاريخ التحديث"
72+
}
73+
},
74+
_validations: {
75+
validity_window_order: {
76+
message: "يجب أن يكون «صالح حتى» بعد «صالح من». يسري المنح من «صالح من» حتى «صالح حتى» دون أن يشمله، لذا فالنافذة التي تنتهي عند بدايتها أو قبلها لا تمنح شيئًا. اترك أيًّا منهما فارغًا لنافذة مفتوحة."
77+
}
78+
}
79+
},
80+
sys_user_position: {
81+
label: "منصب المستخدم",
82+
pluralLabel: "مناصب المستخدمين",
83+
description: "المناصب التي يشغلها كل مستخدم، صف واحد لكل إسناد.",
84+
fields: {
85+
id: {
86+
label: "معرّف الإسناد",
87+
help: "معرّف UUID لإسناد المستخدم إلى المنصب."
88+
},
89+
display_title: {
90+
label: "العنوان",
91+
help: "عنوان السجل: المستخدم والمنصب الذي يشغله (يُحسب عند القراءة)"
92+
},
93+
user_id: {
94+
label: "المستخدم",
95+
help: "المستخدم الذي يشغل هذا المنصب."
96+
},
97+
position: {
98+
label: "المنصب",
99+
help: "الاسم الآلي للمنصب، ويُحلّ في كتالوج الأمان."
100+
},
101+
business_unit_id: {
102+
label: "وحدة الأعمال",
103+
help: "مرساة وحدة الأعمال على مستوى الإسناد: حيث ينطبق إسناد هذا المنصب. مرساة العمق لـ readScope/writeScope، وحدّ الإدارة المفوَّضة، وحقيقة تدقيق. القيمة الفارغة = غير مرسَى (قديم / على مستوى المستأجر)؛ ويجب على المسؤولين المفوَّضين إرساء الإسنادات داخل شجرتهم الفرعية."
104+
},
105+
organization_id: {
106+
label: "المؤسسة",
107+
help: "المؤسسة التي ينتمي إليها هذا الإسناد."
108+
},
109+
granted_by: {
110+
label: "مَن منحه",
111+
help: "المستخدم الذي منح إسناد هذا المنصب (يختمه حارس الإدارة المفوَّضة عند الكتابة المفوَّضة)."
112+
},
113+
valid_from: {
114+
label: "صالح من",
115+
help: "يسري الإسناد في هذا الوقت. اتركه فارغًا ليسري فورًا. يبدأ في موعده دون انتظار أي مهمة مجدولة."
116+
},
117+
valid_until: {
118+
label: "صالح حتى",
119+
help: "ينتهي الإسناد في هذا الوقت (UTC). اتركه فارغًا لعدم تحديد تاريخ انتهاء. مطلوب في الإسناد المفوَّض. ينتهي في موعده دون انتظار أي مهمة مجدولة."
120+
},
121+
reason: {
122+
label: "السبب",
123+
help: "سبب وجود هذا المنح. نص حر؛ مطلوب في صفوف التفويض والوصول الطارئ (كسر الزجاج)."
124+
},
125+
delegated_from: {
126+
label: "مفوَّض من",
127+
help: "المفوِّض الذي يحمل هذا الصف صلاحيته (职务代理). الصف الذي ضُبط فيه delegated_from لا يمكن تفويضه بدوره ولا تجديده ذاتيًا — تُقطع السلاسل في الاتجاهين."
128+
},
129+
last_certified_at: {
130+
label: "آخر اعتماد في",
131+
help: "غير مستخدم بعد: محجوز لميزة مستقبلية لمراجعة الوصول. لا شيء يملأ هذا التاريخ أو يتحقق منه، لذا فالقيمة الفارغة لا تعني أن الإسناد لم يُراجَع."
132+
},
133+
certified_by: {
134+
label: "مَن اعتمده",
135+
help: "غير مستخدم بعد: محجوز لميزة مستقبلية لمراجعة الوصول. المراجِع المُدخَل هنا لا يُتحقق منه ولا يغيّر شيئًا مما يمنحه الإسناد."
136+
},
137+
created_at: {
138+
label: "تاريخ الإنشاء"
139+
},
140+
updated_at: {
141+
label: "تاريخ التحديث"
142+
}
143+
},
144+
_validations: {
145+
reserved_identity_position: {
146+
message: "لا يمكن أن يكون «position» اسم هوية مدمجة محجوزًا للإطار (platform_admin، org_owner، org_admin، org_member، org_external). هذه الأسماء هويات مدمجة: تُسقطها المنصة في current_user.positions من مصادرها الموثوقة، والصف الذي يحمل أحدها ليس إسنادًا لتلك الهوية. اختر اسمًا آخر."
147+
}
148+
}
149+
}
150+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
};

0 commit comments

Comments
 (0)