messages.ts
8.94 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
// vibe_erp SPA message bundles.
//
// Each locale is a flat key→string map. Keys use dot-notation
// grouped by area (nav.*, page.*, action.*, status.*, label.*).
//
// The framework's backend i18n uses ICU4J with MessageFormat
// patterns. The SPA uses plain strings for v1 — ICU MessageFormat
// in the browser (via @formatjs/intl-messageformat) is a v1.x
// enhancement when plural/gender/number formatting is needed
// client-side.
export type MessageKey = keyof typeof en
export const en = {
// ─── Navigation ────────────────────────────────────────────
'nav.overview': 'Overview',
'nav.dashboard': 'Dashboard',
'nav.catalog': 'Catalog & Partners',
'nav.items': 'Items',
'nav.uoms': 'Units of Measure',
'nav.partners': 'Partners',
'nav.inventory': 'Inventory',
'nav.locations': 'Locations',
'nav.balances': 'Stock Balances',
'nav.movements': 'Stock Movements',
'nav.orders': 'Orders',
'nav.salesOrders': 'Sales Orders',
'nav.purchaseOrders': 'Purchase Orders',
'nav.production': 'Production',
'nav.workOrders': 'Work Orders',
'nav.shopFloor': 'Shop Floor',
'nav.finance': 'Finance',
'nav.accounts': 'Chart of Accounts',
'nav.journalEntries': 'Journal Entries',
'nav.system': 'System',
'nav.users': 'Users',
'nav.roles': 'Roles',
'nav.metadataAdmin': 'Metadata',
// ─── Actions ───────────────────────────────────────────────
'action.confirm': 'Confirm',
'action.ship': 'Ship',
'action.receive': 'Receive',
'action.cancel': 'Cancel',
'action.start': 'Start',
'action.complete': 'Complete',
'action.create': 'Create',
'action.save': 'Save',
'action.back': '← Back',
'action.logout': 'Logout',
'action.signIn': 'Sign in',
'action.signingIn': 'Signing in…',
'action.creating': 'Creating…',
'action.addLine': '+ Add line',
'action.assign': 'Assign',
'action.revoke': 'Revoke',
'action.newItem': '+ New Item',
'action.newPartner': '+ New Partner',
'action.newLocation': '+ New Location',
'action.newOrder': '+ New Order',
'action.newWorkOrder': '+ New Work Order',
'action.newUser': '+ New User',
'action.newRole': '+ New Role',
'action.newAccount': '+ New Account',
'action.adjustStock': 'Adjust Stock',
'action.addField': 'Add Field',
'action.addSection': 'Add Section',
'action.discard': 'Discard',
'action.delete': 'Delete',
'action.newCustomField': 'New Custom Field',
// ─── Status badges ────────────────────────────────────────
'status.DRAFT': 'Draft',
'status.CONFIRMED': 'Confirmed',
'status.SHIPPED': 'Shipped',
'status.RECEIVED': 'Received',
'status.COMPLETED': 'Completed',
'status.CANCELLED': 'Cancelled',
'status.IN_PROGRESS': 'In Progress',
'status.PENDING': 'Pending',
'status.POSTED': 'Posted',
'status.SETTLED': 'Settled',
'status.REVERSED': 'Reversed',
// ─── Common labels ────────────────────────────────────────
'label.code': 'Code',
'label.name': 'Name',
'label.type': 'Type',
'label.status': 'Status',
'label.active': 'Active',
'label.email': 'Email',
'label.phone': 'Phone',
'label.total': 'Total',
'label.quantity': 'Quantity',
'label.unitPrice': 'Unit Price',
'label.date': 'Date',
'label.currency': 'Currency',
'label.description': 'Description',
'label.username': 'Username',
'label.password': 'Password',
'label.signedInAs': 'Signed in as',
'label.noRows': 'No rows.',
'label.loading': 'Loading…',
'label.error': 'Error',
// ─── Metadata admin ───────────────────────────────────────
'page.metadataAdmin.title': 'Metadata Admin',
'tab.entities': 'Entities',
'tab.customFields': 'Custom Fields',
'tab.permissions': 'Permissions',
'tab.menus': 'Menus',
'tab.forms': 'Forms',
'tab.listViews': 'List Views',
'page.formDesigner.title': 'Form Designer',
'page.listViewDesigner.title': 'List View Designer',
'label.slug': 'Slug',
'label.entity': 'Entity',
'label.purpose': 'Purpose',
'label.preview': 'Preview',
'label.source': 'Source',
'label.columns': 'Columns',
'label.filters': 'Filters',
'label.sorting': 'Sorting',
'label.pageSize': 'Page Size',
'label.fieldKey': 'Field Key',
'label.targetEntity': 'Target Entity',
'label.fieldType': 'Field Type',
'confirm.delete': 'Are you sure?',
} as const
export const zhCN: Record<MessageKey, string> = {
// ─── 导航 ──────────────────────────────────────────────────
'nav.overview': '概览',
'nav.dashboard': '仪表盘',
'nav.catalog': '产品与合作伙伴',
'nav.items': '物料',
'nav.uoms': '计量单位',
'nav.partners': '合作伙伴',
'nav.inventory': '库存',
'nav.locations': '库位',
'nav.balances': '库存余额',
'nav.movements': '库存变动',
'nav.orders': '订单',
'nav.salesOrders': '销售订单',
'nav.purchaseOrders': '采购订单',
'nav.production': '生产',
'nav.workOrders': '工单',
'nav.shopFloor': '车间看板',
'nav.finance': '财务',
'nav.accounts': '科目表',
'nav.journalEntries': '日记账',
'nav.system': '系统',
'nav.users': '用户',
'nav.roles': '角色',
'nav.metadataAdmin': '元数据',
// ─── 操作 ──────────────────────────────────────────────────
'action.confirm': '确认',
'action.ship': '发货',
'action.receive': '收货',
'action.cancel': '取消',
'action.start': '开始',
'action.complete': '完成',
'action.create': '创建',
'action.save': '保存',
'action.back': '← 返回',
'action.logout': '退出',
'action.signIn': '登录',
'action.signingIn': '登录中…',
'action.creating': '创建中…',
'action.addLine': '+ 添加行',
'action.assign': '分配',
'action.revoke': '撤销',
'action.newItem': '+ 新物料',
'action.newPartner': '+ 新合作伙伴',
'action.newLocation': '+ 新库位',
'action.newOrder': '+ 新订单',
'action.newWorkOrder': '+ 新工单',
'action.newUser': '+ 新用户',
'action.newRole': '+ 新角色',
'action.newAccount': '+ 新科目',
'action.adjustStock': '库存调整',
'action.addField': '添加字段',
'action.addSection': '添加分区',
'action.discard': '放弃',
'action.delete': '删除',
'action.newCustomField': '新建自定义字段',
// ─── 状态 ──────────────────────────────────────────────────
'status.DRAFT': '草稿',
'status.CONFIRMED': '已确认',
'status.SHIPPED': '已发货',
'status.RECEIVED': '已收货',
'status.COMPLETED': '已完成',
'status.CANCELLED': '已取消',
'status.IN_PROGRESS': '进行中',
'status.PENDING': '待处理',
'status.POSTED': '已过账',
'status.SETTLED': '已结算',
'status.REVERSED': '已冲销',
// ─── 通用标签 ──────────────────────────────────────────────
'label.code': '编码',
'label.name': '名称',
'label.type': '类型',
'label.status': '状态',
'label.active': '启用',
'label.email': '邮箱',
'label.phone': '电话',
'label.total': '合计',
'label.quantity': '数量',
'label.unitPrice': '单价',
'label.date': '日期',
'label.currency': '币种',
'label.description': '描述',
'label.username': '用户名',
'label.password': '密码',
'label.signedInAs': '当前用户',
'label.noRows': '暂无数据',
'label.loading': '加载中…',
'label.error': '错误',
// ─── 元数据管理 ────────────────────────────────────────────
'page.metadataAdmin.title': '元数据管理',
'tab.entities': '实体',
'tab.customFields': '自定义字段',
'tab.permissions': '权限',
'tab.menus': '菜单',
'tab.forms': '表单',
'tab.listViews': '列表视图',
'page.formDesigner.title': '表单设计器',
'page.listViewDesigner.title': '列表视图设计器',
'label.slug': '标识',
'label.entity': '实体',
'label.purpose': '用途',
'label.preview': '预览',
'label.source': '来源',
'label.columns': '列',
'label.filters': '筛选',
'label.sorting': '排序',
'label.pageSize': '每页行数',
'label.fieldKey': '字段键',
'label.targetEntity': '目标实体',
'label.fieldType': '字段类型',
'confirm.delete': '确定删除?',
}
export const locales = {
'en-US': en,
'zh-CN': zhCN,
} as const
export type LocaleCode = keyof typeof locales