Skip to content

Commit 61ed5c7

Browse files
xuyushun441-sysos-zhuangclaude
authored
fix(platform-objects): complete ADR-0057 BU rename — Setup menu + i18n (Departments → Business Units / 业务单元) (#2129)
* fix(platform-objects): finish ADR-0057 rename in Setup nav — Departments → Business Units The sys_department → sys_business_unit rename (ADR-0057 D2) left the Setup menu entry and the non-English object labels on the old term. Rename nav id nav_departments → nav_business_units, label Departments → Business Units, and align the zh / ja / es object + nav labels to 业务单元 / ビジネスユニット / Unidad de negocio (English object label was already "Business Unit"). The deliberately multi-concept descriptions are left unchanged. Verified live in the console: Setup → 人员与组织 → 业务单元 (→ sys_business_unit); the object list page header also renders 业务单元. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(platform-objects): complete the ADR-0057 BU rename at the source (labels + descriptions + all locales) The earlier nav/label pass was a half-rename: the object DEFINITION (the source of truth) still said "department" in field labels (Parent Department / Department Head / Department ID) and field descriptions, and only the English *generated* labels had been hand-patched ahead of it — so the def was the silently-stale source and every non-English field label/help still read 部门 / 部門 / Departamento. This completes it end-to-end: - sys-business-unit.object.ts / sys-business-unit-member.object.ts: rename field labels + descriptions + comments to "business unit". - en/zh/ja/es .objects.generated.ts: align every field label, help string, and the member object to Business Unit / 业务单元 / ビジネスユニット / Unidad de negocio. Deliberately preserved: the `kind` enum value `department` (a BU can be OF KIND department), the multi-concept descriptions that list kinds, and the unrelated 部署 = "deployment" strings. The internal view id `all_departments` is left (renaming it orphans translation keys; it is not user-facing — label is "All"). Verified: object label + field labels render correctly in the console; a full cross-locale scan of the two object blocks is clean. (Field *help* text can render stale from a prebuilt console bundle — a known dev-bundle cache, not a source gap.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(changeset): BU rename i18n completion (patch) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a15b89a commit 61ed5c7

12 files changed

Lines changed: 63 additions & 52 deletions

.changeset/bu-rename-i18n.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@objectstack/platform-objects": patch
3+
---
4+
5+
Complete the ADR-0057 `sys_department``sys_business_unit` rename in the Setup app and across the object's i18n (en / zh / ja / es).
6+
7+
- Setup nav entry "Departments" → "Business Units" (`nav_departments``nav_business_units`).
8+
- `sys_business_unit` / `sys_business_unit_member` field **labels and descriptions** in the object definitions now read "business unit" instead of "department" (the generated `en` labels had been hand-updated ahead of the def; the def was the stale source).
9+
- All four locales' generated object translations aligned to 业务单元 / ビジネスユニット / Unidad de negocio.
10+
11+
Intentionally preserved: the `kind` enum value `department` (a business unit can be *of kind* department) and the multi-concept node descriptions that list kinds.

packages/platform-objects/src/apps/setup-nav.contributions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const SETUP_NAV_CONTRIBUTIONS: NavigationContribution[] = [
4747
priority: BASE_PRIORITY,
4848
items: [
4949
{ id: 'nav_users', type: 'object', label: 'Users', objectName: 'sys_user', icon: 'user' },
50-
{ id: 'nav_departments', type: 'object', label: 'Departments', objectName: 'sys_business_unit', icon: 'building', requiresObject: 'sys_business_unit' },
50+
{ id: 'nav_business_units', type: 'object', label: 'Business Units', objectName: 'sys_business_unit', icon: 'building', requiresObject: 'sys_business_unit' },
5151
{ id: 'nav_teams', type: 'object', label: 'Teams', objectName: 'sys_team', icon: 'users-round' },
5252
{ id: 'nav_organizations', type: 'object', label: 'Organizations', objectName: 'sys_organization', icon: 'building-2' },
5353
{ id: 'nav_invitations', type: 'object', label: 'Invitations', objectName: 'sys_invitation', icon: 'mail' },

packages/platform-objects/src/apps/translations/en.objects.generated.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,19 +611,19 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
611611
},
612612
manager_user_id: {
613613
label: "Business Unit Head",
614-
help: "User responsible for this org unit (department head / lead)."
614+
help: "User responsible for this org unit (business unit head / lead)."
615615
},
616616
active: {
617617
label: "Active",
618618
help: "When false, members are not expanded by graph queries."
619619
},
620620
effective_from: {
621621
label: "Effective From",
622-
help: "When this department came into existence (HRIS sync)."
622+
help: "When this business unit came into existence (HRIS sync)."
623623
},
624624
effective_to: {
625625
label: "Effective To",
626-
help: "When this department was retired (HRIS sync)."
626+
help: "When this business unit was retired (HRIS sync)."
627627
},
628628
external_ref: {
629629
label: "External Reference",
@@ -657,7 +657,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
657657
sys_business_unit_member: {
658658
label: "Business Unit Member",
659659
pluralLabel: "Business Unit Members",
660-
description: "User assignment to a department (matrix-org friendly, effective-dated).",
660+
description: "User assignment to a business unit (matrix-org friendly, effective-dated).",
661661
fields: {
662662
id: {
663663
label: "Member ID"

packages/platform-objects/src/apps/translations/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const en: TranslationData = {
6363

6464
// People & Organization
6565
nav_users: { label: 'Users' },
66-
nav_departments: { label: 'Departments' },
66+
nav_business_units: { label: 'Business Units' },
6767
nav_teams: { label: 'Teams' },
6868
nav_organizations: { label: 'Organizations' },
6969
nav_invitations: { label: 'Invitations' },

packages/platform-objects/src/apps/translations/es-ES.objects.generated.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
578578
}
579579
},
580580
sys_business_unit: {
581-
label: "Departamento",
582-
pluralLabel: "Departamentos",
581+
label: "Unidad de negocio",
582+
pluralLabel: "Unidades de negocio",
583583
description: "Nodo jerárquico de la estructura organizativa (departamento / división / unidad de negocio / oficina).",
584584
fields: {
585585
name: {
@@ -602,7 +602,7 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
602602
}
603603
},
604604
parent_business_unit_id: {
605-
label: "Departamento principal",
605+
label: "Unidad de negocio principal",
606606
help: "Autorreferencia para el árbol organizativo. Null = raíz del tenant."
607607
},
608608
organization_id: {
@@ -655,15 +655,15 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
655655
}
656656
},
657657
sys_business_unit_member: {
658-
label: "Miembro del departamento",
659-
pluralLabel: "Miembros del departamento",
658+
label: "Miembro de unidad de negocio",
659+
pluralLabel: "Miembros de unidad de negocio",
660660
description: "Asignación de usuario a un departamento (compatible con organizaciones matriciales y con vigencia temporal).",
661661
fields: {
662662
id: {
663663
label: "ID de miembro"
664664
},
665665
business_unit_id: {
666-
label: "Departamento"
666+
label: "Unidad de negocio"
667667
},
668668
user_id: {
669669
label: "Usuario"

packages/platform-objects/src/apps/translations/es-ES.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const esES: TranslationData = {
4545
nav_system_overview: { label: 'Resumen del Sistema' },
4646

4747
nav_users: { label: 'Usuarios' },
48-
nav_departments: { label: 'Departamentos' },
48+
nav_business_units: { label: 'Unidades de negocio' },
4949
nav_teams: { label: 'Equipos' },
5050
nav_organizations: { label: 'Organizaciones' },
5151
nav_invitations: { label: 'Invitaciones' },

packages/platform-objects/src/apps/translations/ja-JP.objects.generated.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
578578
}
579579
},
580580
sys_business_unit: {
581-
label: "部門",
582-
pluralLabel: "部門",
581+
label: "ビジネスユニット",
582+
pluralLabel: "ビジネスユニット",
583583
description: "階層的な組織ツリーノード(部門 / 事業部 / ビジネスユニット / オフィス)。",
584584
fields: {
585585
name: {
@@ -602,35 +602,35 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
602602
}
603603
},
604604
parent_business_unit_id: {
605-
label: "親部門",
605+
label: "親ビジネスユニット",
606606
help: "組織ツリーの自己参照。null = テナントのルート。"
607607
},
608608
organization_id: {
609609
label: "組織",
610610
help: "テナントスコープ。"
611611
},
612612
manager_user_id: {
613-
label: "部門長",
614-
help: "この組織単位の責任者(部門長 / リード)。"
613+
label: "ビジネスユニット長",
614+
help: "この組織単位の責任者(ビジネスユニット長 / リード)。"
615615
},
616616
active: {
617617
label: "有効",
618618
help: "false の場合、メンバーはグラフクエリで展開されません。"
619619
},
620620
effective_from: {
621621
label: "有効開始日",
622-
help: "この部門が設立された日時(HRIS 同期)。"
622+
help: "このビジネスユニットが設立された日時(HRIS 同期)。"
623623
},
624624
effective_to: {
625625
label: "有効終了日",
626-
help: "この部門が廃止された日時(HRIS 同期)。"
626+
help: "このビジネスユニットが廃止された日時(HRIS 同期)。"
627627
},
628628
external_ref: {
629629
label: "外部参照",
630630
help: "上流 HRIS(Workday / SAP HR / 北森)の ID。"
631631
},
632632
id: {
633-
label: "部門 ID"
633+
label: "ビジネスユニット ID"
634634
},
635635
created_at: {
636636
label: "作成日時"
@@ -655,21 +655,21 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
655655
}
656656
},
657657
sys_business_unit_member: {
658-
label: "部門メンバー",
659-
pluralLabel: "部門メンバー",
660-
description: "部門へのユーザー割り当て(マトリクス組織対応、有効期限付き)。",
658+
label: "ビジネスユニットメンバー",
659+
pluralLabel: "ビジネスユニットメンバー",
660+
description: "ビジネスユニットへのユーザー割り当て(マトリクス組織対応、有効期限付き)。",
661661
fields: {
662662
id: {
663663
label: "メンバー ID"
664664
},
665665
business_unit_id: {
666-
label: "部門"
666+
label: "ビジネスユニット"
667667
},
668668
user_id: {
669669
label: "ユーザー"
670670
},
671671
role_in_business_unit: {
672-
label: "部門内ロール",
672+
label: "ビジネスユニット内ロール",
673673
help: "`lead` は日常の責任者、`deputy` は承認ルーティングでリードの代理を務める場合があります。",
674674
options: {
675675
member: "メンバー",
@@ -679,7 +679,7 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
679679
},
680680
is_primary: {
681681
label: "主要割り当て",
682-
help: "ユーザーが複数の部門に所属する場合、レポーティングの正規部門をマークします。"
682+
help: "ユーザーが複数のビジネスユニットに所属する場合、レポーティングの正規ビジネスユニットをマークします。"
683683
},
684684
effective_from: {
685685
label: "有効開始日"

packages/platform-objects/src/apps/translations/ja-JP.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const jaJP: TranslationData = {
4545
nav_system_overview: { label: 'システム概要' },
4646

4747
nav_users: { label: 'ユーザー' },
48-
nav_departments: { label: '部署' },
48+
nav_business_units: { label: 'ビジネスユニット' },
4949
nav_teams: { label: 'チーム' },
5050
nav_organizations: { label: '組織' },
5151
nav_invitations: { label: '招待' },

packages/platform-objects/src/apps/translations/zh-CN.objects.generated.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
578578
}
579579
},
580580
sys_business_unit: {
581-
label: "部门",
582-
pluralLabel: "部门",
581+
label: "业务单元",
582+
pluralLabel: "业务单元",
583583
description: "层级化组织骨架节点(部门 / 事业部 / 业务单元 / 办公地点)。",
584584
fields: {
585585
name: {
@@ -602,35 +602,35 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
602602
}
603603
},
604604
parent_business_unit_id: {
605-
label: "上级部门",
605+
label: "上级业务单元",
606606
help: "组织树的自关联字段。Null 表示租户根节点。"
607607
},
608608
organization_id: {
609609
label: "组织",
610610
help: "租户范围。"
611611
},
612612
manager_user_id: {
613-
label: "部门负责人",
614-
help: "负责该组织单元的用户(部门负责人 / lead)。"
613+
label: "业务单元负责人",
614+
help: "负责该组织单元的用户(业务单元负责人 / lead)。"
615615
},
616616
active: {
617617
label: "启用",
618-
help: "为 false 时,图谱查询不会展开该部门成员。"
618+
help: "为 false 时,图谱查询不会展开该业务单元成员。"
619619
},
620620
effective_from: {
621621
label: "生效时间",
622-
help: "该部门生效的时间(HRIS 同步)。"
622+
help: "该业务单元生效的时间(HRIS 同步)。"
623623
},
624624
effective_to: {
625625
label: "失效时间",
626-
help: "该部门停用的时间(HRIS 同步)。"
626+
help: "该业务单元停用的时间(HRIS 同步)。"
627627
},
628628
external_ref: {
629629
label: "外部引用",
630630
help: "上游 HRIS 中的 ID(Workday / SAP HR / 北森)。"
631631
},
632632
id: {
633-
label: "部门 ID"
633+
label: "业务单元 ID"
634634
},
635635
created_at: {
636636
label: "创建时间"
@@ -655,21 +655,21 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
655655
}
656656
},
657657
sys_business_unit_member: {
658-
label: "部门成员",
659-
pluralLabel: "部门成员",
660-
description: "用户到部门的任职关系(适配矩阵组织并支持生效时间)。",
658+
label: "业务单元成员",
659+
pluralLabel: "业务单元成员",
660+
description: "用户到业务单元的任职关系(适配矩阵组织并支持生效时间)。",
661661
fields: {
662662
id: {
663663
label: "成员 ID"
664664
},
665665
business_unit_id: {
666-
label: "部门"
666+
label: "业务单元"
667667
},
668668
user_id: {
669669
label: "用户"
670670
},
671671
role_in_business_unit: {
672-
label: "部门内角色",
672+
label: "业务单元内角色",
673673
help: "`lead` 表示日常负责人;`deputy` 可在审批路由中代替负责人。",
674674
options: {
675675
member: "成员",
@@ -679,7 +679,7 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
679679
},
680680
is_primary: {
681681
label: "主任职",
682-
help: "当用户属于多个部门时,用于标记报表上的主部门。"
682+
help: "当用户属于多个业务单元时,用于标记报表上的主业务单元。"
683683
},
684684
effective_from: {
685685
label: "生效时间"

packages/platform-objects/src/apps/translations/zh-CN.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const zhCN: TranslationData = {
4545
nav_system_overview: { label: '系统概览' },
4646

4747
nav_users: { label: '用户' },
48-
nav_departments: { label: '部门' },
48+
nav_business_units: { label: '业务单元' },
4949
nav_teams: { label: '团队' },
5050
nav_organizations: { label: '组织' },
5151
nav_invitations: { label: '邀请' },

0 commit comments

Comments
 (0)