-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathi18n-extract.config.ts
More file actions
37 lines (34 loc) · 1.81 KB
/
Copy pathi18n-extract.config.ts
File metadata and controls
37 lines (34 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
/**
* Build-time only config for `os i18n extract` (ADR-0029 D8). Not deployed.
* The plugin owns the i18n extraction for the objects it owns; the
* `translations` baseline is this plugin's OWN generated bundles so re-running
* `--merge` preserves every hand-translated string. (Initial zh-CN/ja-JP/es-ES
* strings were seeded from @objectstack/platform-objects.)
*
* os i18n extract packages/plugins/plugin-approvals/scripts/i18n-extract.config.ts \
* --locales=zh-CN,ja-JP,es-ES --fill=default --objects-only --no-metadata-forms \
* --out=packages/plugins/plugin-approvals/src/translations
*
* `--no-metadata-forms` because the Studio metadata-form baseline is owned by
* `@objectstack/platform-objects` — this plugin translates only the objects it
* owns, so it must not commit a second copy. Add `--check` to run the same
* command as a drift gate.
*/
import { defineStack } from '@objectstack/spec';
import { SysApprovalRequest } from '../src/sys-approval-request.object.js';
import { SysApprovalAction } from '../src/sys-approval-action.object.js';
import { SysApprovalDelegation } from '../src/sys-approval-delegation.object.js';
import { enObjects } from '../src/translations/en.objects.generated.js';
import { zhCNObjects } from '../src/translations/zh-CN.objects.generated.js';
import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
export default defineStack({
objects: [SysApprovalRequest, SysApprovalAction, SysApprovalDelegation] as any,
translations: [
{ en: { objects: enObjects } },
{ 'zh-CN': { objects: zhCNObjects } },
{ 'ja-JP': { objects: jaJPObjects } },
{ 'es-ES': { objects: esESObjects } },
],
});