smarthr-ui 96.1.2 → 97.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Combobox/helper.cjs +29 -13
- package/lib/components/Combobox/helper.cjs.map +1 -1
- package/lib/components/Combobox/helper.d.ts +1 -1
- package/lib/components/Combobox/helper.js +29 -13
- package/lib/components/Combobox/helper.js.map +1 -1
- package/lib/components/Combobox/useOptions.cjs +21 -17
- package/lib/components/Combobox/useOptions.cjs.map +1 -1
- package/lib/components/Combobox/useOptions.js +21 -17
- package/lib/components/Combobox/useOptions.js.map +1 -1
- package/lib/components/Dialog/DialogContentInner.cjs +8 -1
- package/lib/components/Dialog/DialogContentInner.cjs.map +1 -1
- package/lib/components/Dialog/DialogContentInner.js +9 -2
- package/lib/components/Dialog/DialogContentInner.js.map +1 -1
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.cjs +13 -11
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.cjs.map +1 -1
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.js +13 -11
- package/lib/components/Dialog/ModelessDialog/ModelessDialog.js.map +1 -1
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.cjs +5 -2
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.cjs.map +1 -1
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.js +5 -2
- package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.js.map +1 -1
- package/lib/components/Disclosure/DisclosureTrigger.cjs +39 -18
- package/lib/components/Disclosure/DisclosureTrigger.cjs.map +1 -1
- package/lib/components/Disclosure/DisclosureTrigger.js +40 -19
- package/lib/components/Disclosure/DisclosureTrigger.js.map +1 -1
- package/lib/components/Disclosure/useDisclosure.cjs +8 -14
- package/lib/components/Disclosure/useDisclosure.cjs.map +1 -1
- package/lib/components/Disclosure/useDisclosure.js +8 -14
- package/lib/components/Disclosure/useDisclosure.js.map +1 -1
- package/lib/components/DropZone/DropZone.cjs +3 -0
- package/lib/components/DropZone/DropZone.cjs.map +1 -1
- package/lib/components/DropZone/DropZone.js +3 -0
- package/lib/components/DropZone/DropZone.js.map +1 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.cjs +4 -2
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.cjs.map +1 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js +4 -2
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
- package/lib/components/Dropdown/DropdownTrigger.cjs +3 -0
- package/lib/components/Dropdown/DropdownTrigger.cjs.map +1 -1
- package/lib/components/Dropdown/DropdownTrigger.js +3 -0
- package/lib/components/Dropdown/DropdownTrigger.js.map +1 -1
- package/lib/components/InputFile/InputFileMultiplyAppendable.cjs +12 -17
- package/lib/components/InputFile/InputFileMultiplyAppendable.cjs.map +1 -1
- package/lib/components/InputFile/InputFileMultiplyAppendable.js +12 -17
- package/lib/components/InputFile/InputFileMultiplyAppendable.js.map +1 -1
- package/lib/components/LineClamp/LineClamp.cjs +14 -3
- package/lib/components/LineClamp/LineClamp.cjs.map +1 -1
- package/lib/components/LineClamp/LineClamp.js +14 -3
- package/lib/components/LineClamp/LineClamp.js.map +1 -1
- package/lib/components/Select/Select.cjs +11 -11
- package/lib/components/Select/Select.cjs.map +1 -1
- package/lib/components/Select/Select.js +12 -12
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/TabBar/TabItem.cjs +11 -9
- package/lib/components/TabBar/TabItem.cjs.map +1 -1
- package/lib/components/TabBar/TabItem.d.ts +2 -2
- package/lib/components/TabBar/TabItem.js +13 -11
- package/lib/components/TabBar/TabItem.js.map +1 -1
- package/lib/hooks/useHandleEscape.cjs +4 -4
- package/lib/hooks/useHandleEscape.cjs.map +1 -1
- package/lib/hooks/useHandleEscape.d.ts +1 -1
- package/lib/hooks/useHandleEscape.js +4 -4
- package/lib/hooks/useHandleEscape.js.map +1 -1
- package/lib/intl/Localizer.d.ts +3 -3
- package/lib/intl/locales/en_us.json.cjs +133 -0
- package/lib/intl/locales/en_us.json.cjs.map +1 -0
- package/lib/intl/locales/en_us.json.js +131 -0
- package/lib/intl/locales/en_us.json.js.map +1 -0
- package/lib/intl/locales/id_id.json.cjs +133 -0
- package/lib/intl/locales/id_id.json.cjs.map +1 -0
- package/lib/intl/locales/id_id.json.js +131 -0
- package/lib/intl/locales/id_id.json.js.map +1 -0
- package/lib/intl/locales/index.cjs +24 -18
- package/lib/intl/locales/index.cjs.map +1 -1
- package/lib/intl/locales/index.d.ts +1135 -1136
- package/lib/intl/locales/index.js +25 -19
- package/lib/intl/locales/index.js.map +1 -1
- package/lib/intl/locales/ja.json.cjs +133 -0
- package/lib/intl/locales/ja.json.cjs.map +1 -0
- package/lib/intl/locales/ja.json.js +131 -0
- package/lib/intl/locales/ja.json.js.map +1 -0
- package/lib/intl/locales/ja_easy.json.cjs +133 -0
- package/lib/intl/locales/ja_easy.json.cjs.map +1 -0
- package/lib/intl/locales/ja_easy.json.js +131 -0
- package/lib/intl/locales/ja_easy.json.js.map +1 -0
- package/lib/intl/locales/ko_kr.json.cjs +133 -0
- package/lib/intl/locales/ko_kr.json.cjs.map +1 -0
- package/lib/intl/locales/ko_kr.json.js +131 -0
- package/lib/intl/locales/ko_kr.json.js.map +1 -0
- package/lib/intl/locales/pt_br.json.cjs +133 -0
- package/lib/intl/locales/pt_br.json.cjs.map +1 -0
- package/lib/intl/locales/pt_br.json.js +131 -0
- package/lib/intl/locales/pt_br.json.js.map +1 -0
- package/lib/intl/locales/vi_vn.json.cjs +133 -0
- package/lib/intl/locales/vi_vn.json.cjs.map +1 -0
- package/lib/intl/locales/vi_vn.json.js +131 -0
- package/lib/intl/locales/vi_vn.json.js.map +1 -0
- package/lib/intl/locales/zh_hans_cn.json.cjs +133 -0
- package/lib/intl/locales/zh_hans_cn.json.cjs.map +1 -0
- package/lib/intl/locales/zh_hans_cn.json.js +131 -0
- package/lib/intl/locales/zh_hans_cn.json.js.map +1 -0
- package/lib/intl/locales/zh_hant_tw.json.cjs +133 -0
- package/lib/intl/locales/zh_hant_tw.json.cjs.map +1 -0
- package/lib/intl/locales/zh_hant_tw.json.js +131 -0
- package/lib/intl/locales/zh_hant_tw.json.js.map +1 -0
- package/lib/intl/useIntl.cjs.map +1 -1
- package/lib/intl/useIntl.d.ts +3 -3
- package/lib/intl/useIntl.js.map +1 -1
- package/metadata.json +1 -1
- package/package.json +2 -1
- package/lib/intl/locales/en_us.cjs +0 -135
- package/lib/intl/locales/en_us.cjs.map +0 -1
- package/lib/intl/locales/en_us.d.ts +0 -128
- package/lib/intl/locales/en_us.js +0 -133
- package/lib/intl/locales/en_us.js.map +0 -1
- package/lib/intl/locales/id_id.cjs +0 -135
- package/lib/intl/locales/id_id.cjs.map +0 -1
- package/lib/intl/locales/id_id.d.ts +0 -128
- package/lib/intl/locales/id_id.js +0 -133
- package/lib/intl/locales/id_id.js.map +0 -1
- package/lib/intl/locales/ja_easy.cjs +0 -135
- package/lib/intl/locales/ja_easy.cjs.map +0 -1
- package/lib/intl/locales/ja_easy.d.ts +0 -128
- package/lib/intl/locales/ja_easy.js +0 -133
- package/lib/intl/locales/ja_easy.js.map +0 -1
- package/lib/intl/locales/ko_kr.cjs +0 -135
- package/lib/intl/locales/ko_kr.cjs.map +0 -1
- package/lib/intl/locales/ko_kr.d.ts +0 -128
- package/lib/intl/locales/ko_kr.js +0 -133
- package/lib/intl/locales/ko_kr.js.map +0 -1
- package/lib/intl/locales/pt_br.cjs +0 -135
- package/lib/intl/locales/pt_br.cjs.map +0 -1
- package/lib/intl/locales/pt_br.d.ts +0 -128
- package/lib/intl/locales/pt_br.js +0 -133
- package/lib/intl/locales/pt_br.js.map +0 -1
- package/lib/intl/locales/vi_vn.cjs +0 -135
- package/lib/intl/locales/vi_vn.cjs.map +0 -1
- package/lib/intl/locales/vi_vn.d.ts +0 -128
- package/lib/intl/locales/vi_vn.js +0 -133
- package/lib/intl/locales/vi_vn.js.map +0 -1
- package/lib/intl/locales/zh_hans_cn.cjs +0 -135
- package/lib/intl/locales/zh_hans_cn.cjs.map +0 -1
- package/lib/intl/locales/zh_hans_cn.d.ts +0 -128
- package/lib/intl/locales/zh_hans_cn.js +0 -133
- package/lib/intl/locales/zh_hans_cn.js.map +0 -1
- package/lib/intl/locales/zh_hant_tw.cjs +0 -135
- package/lib/intl/locales/zh_hant_tw.cjs.map +0 -1
- package/lib/intl/locales/zh_hant_tw.d.ts +0 -128
- package/lib/intl/locales/zh_hant_tw.js +0 -133
- package/lib/intl/locales/zh_hant_tw.js.map +0 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
var zhCn = {
|
|
2
|
+
"smarthr-ui/common/language": "简体中文",
|
|
3
|
+
"smarthr-ui/ActionDialog/closeButtonLabel": "取消",
|
|
4
|
+
"smarthr-ui/AppHeader/school": "SmartHR 学堂",
|
|
5
|
+
"smarthr-ui/AppHeader/help": "帮助",
|
|
6
|
+
"smarthr-ui/AppHeader/userSettings": "个人设置",
|
|
7
|
+
"smarthr-ui/AppHeader/releaseNotes": "版本说明",
|
|
8
|
+
"smarthr-ui/AppHeader/releaseNotesLoadError": "版本更新说明读取失败。\n请稍后重新尝试。",
|
|
9
|
+
"smarthr-ui/AppHeader/seeAllReleaseNotes": "查看所有版本说明",
|
|
10
|
+
"smarthr-ui/AppHeader/DesktopHeader/appLauncherLabel": "应用",
|
|
11
|
+
"smarthr-ui/AppHeader/MobileHeader/account": "账号",
|
|
12
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenu": "打开菜单",
|
|
13
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenu": "关闭菜单",
|
|
14
|
+
"smarthr-ui/AppHeader/MobileHeader/allAppButton": "所有应用",
|
|
15
|
+
"smarthr-ui/AppHeader/MobileHeader/managementMenu": "管理菜单",
|
|
16
|
+
"smarthr-ui/AppHeader/MobileHeader/latestReleaseNotes": "最新版本说明",
|
|
17
|
+
"smarthr-ui/AppHeader/MobileHeader/back": "返回",
|
|
18
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenuAccordion": "展开",
|
|
19
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenuAccordion": "关闭",
|
|
20
|
+
"smarthr-ui/AppHeader/Launcher/searchInputTitle": "请输入应用名称。",
|
|
21
|
+
"smarthr-ui/AppHeader/Launcher/favoriteModeText": "常用应用",
|
|
22
|
+
"smarthr-ui/AppHeader/Launcher/allModeText": "所有应用",
|
|
23
|
+
"smarthr-ui/AppHeader/Launcher/listText": "应用列表",
|
|
24
|
+
"smarthr-ui/AppHeader/Launcher/helpText": "关于常用应用",
|
|
25
|
+
"smarthr-ui/AppHeader/Launcher/searchResultText": "搜索结果",
|
|
26
|
+
"smarthr-ui/AppHeader/Launcher/emptyText": "未找到匹配的应用。",
|
|
27
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownLabel": "显示排序",
|
|
28
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownSelected": "已选择",
|
|
29
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderDefault": "默认",
|
|
30
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameAsc": "以应用名称升序",
|
|
31
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameDesc": "以应用名称降序",
|
|
32
|
+
"smarthr-ui/AppLauncher/showAllText": "查看全部",
|
|
33
|
+
"smarthr-ui/AppLauncher/triggerLabel": "应用",
|
|
34
|
+
"smarthr-ui/Browser/notFoundDescription": "请尝试其他条件。",
|
|
35
|
+
"smarthr-ui/Browser/notFoundTitle": "暂无符合条件的项目。",
|
|
36
|
+
"smarthr-ui/Button/loading": "处理中",
|
|
37
|
+
"smarthr-ui/Calendar/currentYear": "当前年份",
|
|
38
|
+
"smarthr-ui/Calendar/nextMonth": "下一月",
|
|
39
|
+
"smarthr-ui/Calendar/previousMonth": "上一月",
|
|
40
|
+
"smarthr-ui/Calendar/selectYear": "选择年份",
|
|
41
|
+
"smarthr-ui/Combobox/addItemButtonLabel": "添加“{name}”",
|
|
42
|
+
"smarthr-ui/Combobox/loadingText": "处理中",
|
|
43
|
+
"smarthr-ui/Combobox/noResultsText": "暂无符合条件的选项。",
|
|
44
|
+
"smarthr-ui/DropdownMenuButton/triggerActive": "收起选项",
|
|
45
|
+
"smarthr-ui/DropdownMenuButton/triggerInactive": "展开选项",
|
|
46
|
+
"smarthr-ui/DropZone/selectButtonLabel": "选择文件",
|
|
47
|
+
"smarthr-ui/FileViewer/rotateAlt": "左转",
|
|
48
|
+
"smarthr-ui/FileViewer/scaleDownAlt": "缩小",
|
|
49
|
+
"smarthr-ui/FileViewer/scaleRateLabel": "放大率(%)",
|
|
50
|
+
"smarthr-ui/FileViewer/scaleUpAlt": "放大",
|
|
51
|
+
"smarthr-ui/FileViewer/unsupportedFileText": "不支持的文件格式。",
|
|
52
|
+
"smarthr-ui/FilterDropdown/applyText": "启用",
|
|
53
|
+
"smarthr-ui/FilterDropdown/cancelText": "取消",
|
|
54
|
+
"smarthr-ui/FilterDropdown/resetText": "解除筛选条件",
|
|
55
|
+
"smarthr-ui/FilterDropdown/status": "已启用",
|
|
56
|
+
"smarthr-ui/FilterDropdown/triggerText": "筛选",
|
|
57
|
+
"smarthr-ui/FormDialog/closeButtonLabel": "取消",
|
|
58
|
+
"smarthr-ui/InformationPanel/closeButtonLabel": "关闭",
|
|
59
|
+
"smarthr-ui/InformationPanel/openButtonLabel": "展开",
|
|
60
|
+
"smarthr-ui/InputFile/destroy": "删除",
|
|
61
|
+
"smarthr-ui/LanguageSwitcher/checkIconAlt": "已选择",
|
|
62
|
+
"smarthr-ui/Loader/alt": "处理中",
|
|
63
|
+
"smarthr-ui/MessageDialog/closeButtonLabel": "关闭",
|
|
64
|
+
"smarthr-ui/ModelessDialog/closeButtonIconAlt": "关闭",
|
|
65
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaLabel": "对话框的位置",
|
|
66
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaRoleDescription": "可拖动",
|
|
67
|
+
"smarthr-ui/ModelessDialog/dialogHandlerDescription": "按方向键可上下左右移动",
|
|
68
|
+
"smarthr-ui/ModelessDialog/dialogHandlerLiveRegionText": "上边距 {top} px,左边距 {left} px",
|
|
69
|
+
"smarthr-ui/MultiCombobox/destroyButtonIconAltSuffix": ":删除",
|
|
70
|
+
"smarthr-ui/MultiCombobox/selectedListAriaLabel": "已选项目",
|
|
71
|
+
"smarthr-ui/NotificationBar/closeButtonIconAlt": "关闭",
|
|
72
|
+
"smarthr-ui/Pagination/controllerItemButtonFirstLabel": "移至开头",
|
|
73
|
+
"smarthr-ui/Pagination/controllerItemButtonLastLabel": "移至末尾",
|
|
74
|
+
"smarthr-ui/Pagination/controllerItemButtonNextLabel": "下一步",
|
|
75
|
+
"smarthr-ui/Pagination/controllerItemButtonPreviousLabel": "上一步",
|
|
76
|
+
"smarthr-ui/Pagination/itemButtonLabel": "第 {page} 页",
|
|
77
|
+
"smarthr-ui/Pagination/navigationLabel": "分页",
|
|
78
|
+
"smarthr-ui/RequiredLabel/text": "必填",
|
|
79
|
+
"smarthr-ui/SearchInput/iconAlt": "搜索",
|
|
80
|
+
"smarthr-ui/SideMenu/navigationLabel": "侧边菜单",
|
|
81
|
+
"smarthr-ui/SingleCombobox/destroyButtonIconAlt": "清除",
|
|
82
|
+
"smarthr-ui/SortDropdown/applyText": "启用",
|
|
83
|
+
"smarthr-ui/SortDropdown/ascLabel": "升序",
|
|
84
|
+
"smarthr-ui/SortDropdown/cancelText": "取消",
|
|
85
|
+
"smarthr-ui/SortDropdown/descLabel": "降序",
|
|
86
|
+
"smarthr-ui/SortDropdown/sortFieldLabel": "排序项目",
|
|
87
|
+
"smarthr-ui/SortDropdown/sortOrderLegend": "排列顺序",
|
|
88
|
+
"smarthr-ui/StepFormDialog/backButtonLabel": "返回",
|
|
89
|
+
"smarthr-ui/StepFormDialog/closeButtonLabel": "取消",
|
|
90
|
+
"smarthr-ui/StepFormDialog/nextButtonLabel": "下一步",
|
|
91
|
+
"smarthr-ui/StepStatusIcon/closedAlt": "中断",
|
|
92
|
+
"smarthr-ui/StepStatusIcon/completedAlt": "已完成",
|
|
93
|
+
"smarthr-ui/Textarea/availableLetters": "还可输入 {availableLetters} 个字符",
|
|
94
|
+
"smarthr-ui/Textarea/maxLettersExceeded": "超出 {exceededLetters} 个字符",
|
|
95
|
+
"smarthr-ui/Textarea/screenReaderMaxLettersDescription": "最多可输入 {maxLetters} 个字符",
|
|
96
|
+
"smarthr-ui/OpenInNewTabIcon/openInNewTab": "在新标签页中打开",
|
|
97
|
+
"smarthr-ui/Th/sortDirectionAsc": "升序",
|
|
98
|
+
"smarthr-ui/Th/sortDirectionDesc": "降序",
|
|
99
|
+
"smarthr-ui/Th/sortDirectionNone": "无排序",
|
|
100
|
+
"smarthr-ui/ThCheckbox/checkAllInvisibleLabel": "选择/取消所有项目",
|
|
101
|
+
"smarthr-ui/ThCheckbox/checkColumnName": "选择",
|
|
102
|
+
"smarthr-ui/ErrorScreen/homeLink": "返回主页",
|
|
103
|
+
"smarthr-ui/ErrorScreen/smarthrLink": "返回 SmartHR",
|
|
104
|
+
"smarthr-ui/AuthErrorScreen/title": "认证过程中出现问题",
|
|
105
|
+
"smarthr-ui/ForbiddenErrorScreen/title": "您暂无查看本页面的权限",
|
|
106
|
+
"smarthr-ui/ForbiddenErrorScreen/description": "详情请咨询贵公司负责人或管理员。",
|
|
107
|
+
"smarthr-ui/NotFoundErrorScreen/title": "未找到您查找的页面",
|
|
108
|
+
"smarthr-ui/NotFoundErrorScreen/description": "您所查找的页面可能暂时无法访问,或已被移动或删除。",
|
|
109
|
+
"smarthr-ui/UnauthorizedErrorScreen/title": "由于长时间未操作,已退出登录",
|
|
110
|
+
"smarthr-ui/UnauthorizedErrorScreen/description1": "由于长时间未操作,系统已自动退出登录。",
|
|
111
|
+
"smarthr-ui/UnauthorizedErrorScreen/description2": "如需访问该页面,请重新登录。",
|
|
112
|
+
"smarthr-ui/UnauthorizedErrorScreen/reLoginButton": "重新登录",
|
|
113
|
+
"smarthr-ui/UnexpectedErrorScreen/title": "发生意外错误",
|
|
114
|
+
"smarthr-ui/UnexpectedErrorScreen/apology": "非常抱歉。",
|
|
115
|
+
"smarthr-ui/UnexpectedErrorScreen/possibleCause": "可能因临时网络问题、使用环境或上传文件内容等原因而出现错误。",
|
|
116
|
+
"smarthr-ui/UnexpectedErrorScreen/pleaseRetry": "请尝试以下操作。",
|
|
117
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem1": "请稍后重试。",
|
|
118
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem2": "请查看{maintenanceLink}(相关信息可能稍后更新)。",
|
|
119
|
+
"smarthr-ui/UnexpectedErrorScreen/ifNotResolved": "如果问题仍未解决,请确认以下内容。",
|
|
120
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem1": "请确认当前使用环境是否符合{environmentLink}。",
|
|
121
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem2": "请尝试删除浏览器的 Cookie 和缓存。详情请参阅{cookieCacheLink}。",
|
|
122
|
+
"smarthr-ui/UnexpectedErrorScreen/contactAdmin": "如果问题仍未解决,请将{errorInfoLink}中的信息提供给贵公司的劳务负责人或其他拥有 SmartHR 管理员权限的负责人。",
|
|
123
|
+
"smarthr-ui/UnexpectedErrorScreen/adminContact": "如果您是 SmartHR 管理员,请将{errorInfoLink}中的信息一并发送给我们,并通过右下角的聊天图标联系我们。",
|
|
124
|
+
"smarthr-ui/UnexpectedErrorScreen/maintenanceLink": "维护与故障",
|
|
125
|
+
"smarthr-ui/UnexpectedErrorScreen/environmentLink": "SmartHR 运行环境",
|
|
126
|
+
"smarthr-ui/UnexpectedErrorScreen/cookieCacheLink": "Q. 如何清除浏览器的 Cookie 和缓存?",
|
|
127
|
+
"smarthr-ui/UnexpectedErrorScreen/errorOccursInformation": "报错指引"
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export { zhCn as default };
|
|
131
|
+
//# sourceMappingURL=zh_hans_cn.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh_hans_cn.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zhTw = {
|
|
4
|
+
"smarthr-ui/common/language": "繁體中文",
|
|
5
|
+
"smarthr-ui/ActionDialog/closeButtonLabel": "取消",
|
|
6
|
+
"smarthr-ui/AppHeader/school": "SmartHR學習平台",
|
|
7
|
+
"smarthr-ui/AppHeader/help": "幫助",
|
|
8
|
+
"smarthr-ui/AppHeader/userSettings": "個人設定",
|
|
9
|
+
"smarthr-ui/AppHeader/releaseNotes": "版本更新說明",
|
|
10
|
+
"smarthr-ui/AppHeader/releaseNotesLoadError": "無法載入版本更新說明。\n請稍等片刻後再試。",
|
|
11
|
+
"smarthr-ui/AppHeader/seeAllReleaseNotes": "查看所有版本更新說明",
|
|
12
|
+
"smarthr-ui/AppHeader/DesktopHeader/appLauncherLabel": "功能",
|
|
13
|
+
"smarthr-ui/AppHeader/MobileHeader/account": "帳號",
|
|
14
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenu": "開啟選單",
|
|
15
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenu": "關閉選單",
|
|
16
|
+
"smarthr-ui/AppHeader/MobileHeader/allAppButton": "所有功能",
|
|
17
|
+
"smarthr-ui/AppHeader/MobileHeader/managementMenu": "管理選單",
|
|
18
|
+
"smarthr-ui/AppHeader/MobileHeader/latestReleaseNotes": "最新版本更新說明",
|
|
19
|
+
"smarthr-ui/AppHeader/MobileHeader/back": "返回",
|
|
20
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenuAccordion": "展開",
|
|
21
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenuAccordion": "收合",
|
|
22
|
+
"smarthr-ui/AppHeader/Launcher/searchInputTitle": "請輸入功能名稱。",
|
|
23
|
+
"smarthr-ui/AppHeader/Launcher/favoriteModeText": "常用功能",
|
|
24
|
+
"smarthr-ui/AppHeader/Launcher/allModeText": "所有功能",
|
|
25
|
+
"smarthr-ui/AppHeader/Launcher/listText": "功能列表",
|
|
26
|
+
"smarthr-ui/AppHeader/Launcher/helpText": "關於常用功能",
|
|
27
|
+
"smarthr-ui/AppHeader/Launcher/searchResultText": "搜尋結果",
|
|
28
|
+
"smarthr-ui/AppHeader/Launcher/emptyText": "找不到符合條件的功能。",
|
|
29
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownLabel": "顯示排序",
|
|
30
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownSelected": "選擇中",
|
|
31
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderDefault": "預設",
|
|
32
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameAsc": "以功能名稱遞增",
|
|
33
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameDesc": "以功能名稱遞減",
|
|
34
|
+
"smarthr-ui/AppLauncher/showAllText": "查看全部",
|
|
35
|
+
"smarthr-ui/AppLauncher/triggerLabel": "功能",
|
|
36
|
+
"smarthr-ui/Browser/notFoundDescription": "請嘗試其他條件。",
|
|
37
|
+
"smarthr-ui/Browser/notFoundTitle": "沒有符合條件的項目。",
|
|
38
|
+
"smarthr-ui/Button/loading": "處理中",
|
|
39
|
+
"smarthr-ui/Calendar/currentYear": "目前年份",
|
|
40
|
+
"smarthr-ui/Calendar/nextMonth": "下個月",
|
|
41
|
+
"smarthr-ui/Calendar/previousMonth": "上個月",
|
|
42
|
+
"smarthr-ui/Calendar/selectYear": "選擇年份",
|
|
43
|
+
"smarthr-ui/Combobox/addItemButtonLabel": "新增「{name}」",
|
|
44
|
+
"smarthr-ui/Combobox/loadingText": "處理中",
|
|
45
|
+
"smarthr-ui/Combobox/noResultsText": "沒有符合條件的選項。",
|
|
46
|
+
"smarthr-ui/DropdownMenuButton/triggerActive": "關閉選單",
|
|
47
|
+
"smarthr-ui/DropdownMenuButton/triggerInactive": "開啟選單",
|
|
48
|
+
"smarthr-ui/DropZone/selectButtonLabel": "選擇檔案",
|
|
49
|
+
"smarthr-ui/FileViewer/rotateAlt": "向左旋轉",
|
|
50
|
+
"smarthr-ui/FileViewer/scaleDownAlt": "縮小",
|
|
51
|
+
"smarthr-ui/FileViewer/scaleRateLabel": "縮放比例",
|
|
52
|
+
"smarthr-ui/FileViewer/scaleUpAlt": "放大",
|
|
53
|
+
"smarthr-ui/FileViewer/unsupportedFileText": "不支援的檔案格式。",
|
|
54
|
+
"smarthr-ui/FilterDropdown/applyText": "套用",
|
|
55
|
+
"smarthr-ui/FilterDropdown/cancelText": "取消",
|
|
56
|
+
"smarthr-ui/FilterDropdown/resetText": "清除篩選條件",
|
|
57
|
+
"smarthr-ui/FilterDropdown/status": "已套用",
|
|
58
|
+
"smarthr-ui/FilterDropdown/triggerText": "篩選",
|
|
59
|
+
"smarthr-ui/FormDialog/closeButtonLabel": "取消",
|
|
60
|
+
"smarthr-ui/InformationPanel/closeButtonLabel": "收合",
|
|
61
|
+
"smarthr-ui/InformationPanel/openButtonLabel": "展開",
|
|
62
|
+
"smarthr-ui/InputFile/destroy": "刪除",
|
|
63
|
+
"smarthr-ui/LanguageSwitcher/checkIconAlt": "已選擇",
|
|
64
|
+
"smarthr-ui/Loader/alt": "處理中",
|
|
65
|
+
"smarthr-ui/MessageDialog/closeButtonLabel": "關閉",
|
|
66
|
+
"smarthr-ui/ModelessDialog/closeButtonIconAlt": "關閉",
|
|
67
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaLabel": "對話框位置",
|
|
68
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaRoleDescription": "可拖曳",
|
|
69
|
+
"smarthr-ui/ModelessDialog/dialogHandlerDescription": "可以按箭頭鍵上下左右移動",
|
|
70
|
+
"smarthr-ui/ModelessDialog/dialogHandlerLiveRegionText": "距離上方{top}px,距離左側{left}px",
|
|
71
|
+
"smarthr-ui/MultiCombobox/destroyButtonIconAltSuffix": ":刪除",
|
|
72
|
+
"smarthr-ui/MultiCombobox/selectedListAriaLabel": "已選項目",
|
|
73
|
+
"smarthr-ui/NotificationBar/closeButtonIconAlt": "關閉",
|
|
74
|
+
"smarthr-ui/Pagination/controllerItemButtonFirstLabel": "移至最前頁",
|
|
75
|
+
"smarthr-ui/Pagination/controllerItemButtonLastLabel": "移至最後頁",
|
|
76
|
+
"smarthr-ui/Pagination/controllerItemButtonNextLabel": "下一步",
|
|
77
|
+
"smarthr-ui/Pagination/controllerItemButtonPreviousLabel": "上一步",
|
|
78
|
+
"smarthr-ui/Pagination/itemButtonLabel": "第{page}頁",
|
|
79
|
+
"smarthr-ui/Pagination/navigationLabel": "分頁",
|
|
80
|
+
"smarthr-ui/RequiredLabel/text": "必填",
|
|
81
|
+
"smarthr-ui/SearchInput/iconAlt": "搜尋",
|
|
82
|
+
"smarthr-ui/SideMenu/navigationLabel": "側邊選單",
|
|
83
|
+
"smarthr-ui/SingleCombobox/destroyButtonIconAlt": "清除",
|
|
84
|
+
"smarthr-ui/SortDropdown/applyText": "套用",
|
|
85
|
+
"smarthr-ui/SortDropdown/ascLabel": "遞增",
|
|
86
|
+
"smarthr-ui/SortDropdown/cancelText": "取消",
|
|
87
|
+
"smarthr-ui/SortDropdown/descLabel": "遞減",
|
|
88
|
+
"smarthr-ui/SortDropdown/sortFieldLabel": "排序項目",
|
|
89
|
+
"smarthr-ui/SortDropdown/sortOrderLegend": "排序方式",
|
|
90
|
+
"smarthr-ui/StepFormDialog/backButtonLabel": "返回",
|
|
91
|
+
"smarthr-ui/StepFormDialog/closeButtonLabel": "取消",
|
|
92
|
+
"smarthr-ui/StepFormDialog/nextButtonLabel": "下一步",
|
|
93
|
+
"smarthr-ui/StepStatusIcon/closedAlt": "中斷",
|
|
94
|
+
"smarthr-ui/StepStatusIcon/completedAlt": "已完成",
|
|
95
|
+
"smarthr-ui/Textarea/availableLetters": "還可輸入{availableLetters}字",
|
|
96
|
+
"smarthr-ui/Textarea/maxLettersExceeded": "超出{exceededLetters}字",
|
|
97
|
+
"smarthr-ui/Textarea/screenReaderMaxLettersDescription": "最多可輸入{maxLetters}字",
|
|
98
|
+
"smarthr-ui/OpenInNewTabIcon/openInNewTab": "另開分頁",
|
|
99
|
+
"smarthr-ui/Th/sortDirectionAsc": "遞增",
|
|
100
|
+
"smarthr-ui/Th/sortDirectionDesc": "遞減",
|
|
101
|
+
"smarthr-ui/Th/sortDirectionNone": "無排序",
|
|
102
|
+
"smarthr-ui/ThCheckbox/checkAllInvisibleLabel": "選擇/取消所有項目",
|
|
103
|
+
"smarthr-ui/ThCheckbox/checkColumnName": "選擇",
|
|
104
|
+
"smarthr-ui/ErrorScreen/homeLink": "返回首頁",
|
|
105
|
+
"smarthr-ui/ErrorScreen/smarthrLink": "返回SmartHR",
|
|
106
|
+
"smarthr-ui/AuthErrorScreen/title": "驗證時發生問題。",
|
|
107
|
+
"smarthr-ui/ForbiddenErrorScreen/title": "沒有權限查看此頁面",
|
|
108
|
+
"smarthr-ui/ForbiddenErrorScreen/description": "如需了解詳情,請聯絡公司管理者。",
|
|
109
|
+
"smarthr-ui/NotFoundErrorScreen/title": "找不到您要尋找的頁面",
|
|
110
|
+
"smarthr-ui/NotFoundErrorScreen/description": "您尋找的頁面暫時無法使用,可能已被移動或刪除。",
|
|
111
|
+
"smarthr-ui/UnauthorizedErrorScreen/title": "已自動登出",
|
|
112
|
+
"smarthr-ui/UnauthorizedErrorScreen/description1": "因長時間未操作,系統已自動將您登出。",
|
|
113
|
+
"smarthr-ui/UnauthorizedErrorScreen/description2": "若要存取該頁面,請重新登入。",
|
|
114
|
+
"smarthr-ui/UnauthorizedErrorScreen/reLoginButton": "重新登入",
|
|
115
|
+
"smarthr-ui/UnexpectedErrorScreen/title": "發生非預期的錯誤",
|
|
116
|
+
"smarthr-ui/UnexpectedErrorScreen/apology": "非常抱歉造成不便。",
|
|
117
|
+
"smarthr-ui/UnexpectedErrorScreen/possibleCause": "可能因為暫時的通訊問題、您的使用環境或上傳的檔案內容等原因而發生錯誤。",
|
|
118
|
+
"smarthr-ui/UnexpectedErrorScreen/pleaseRetry": "很抱歉,請您嘗試以下方法。",
|
|
119
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem1": "請稍等片刻,再次嘗試。",
|
|
120
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem2": "請確認{maintenanceLink}(資訊可能需要一些時間才能顯示)。",
|
|
121
|
+
"smarthr-ui/UnexpectedErrorScreen/ifNotResolved": "如果問題仍然存在,請您檢查以下內容。",
|
|
122
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem1": "請確認是否滿足{environmentLink}的條件。",
|
|
123
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem2": "請嘗試刪除瀏覽器的Cookie和快取。詳情請參閱{cookieCacheLink}。",
|
|
124
|
+
"smarthr-ui/UnexpectedErrorScreen/contactAdmin": "如果檢查上述內容後問題仍然存在,請聯繫公司內部的勞務負責人或擁有SmartHR管理者權限的人,並附上{errorInfoLink}的資訊。",
|
|
125
|
+
"smarthr-ui/UnexpectedErrorScreen/adminContact": "擁有SmartHR管理者權限的人,請附上{errorInfoLink}的資訊,並透過右下角的聊天圖示聯繫我們。",
|
|
126
|
+
"smarthr-ui/UnexpectedErrorScreen/maintenanceLink": "維護與故障資訊",
|
|
127
|
+
"smarthr-ui/UnexpectedErrorScreen/environmentLink": "SmartHR的系統需求環境",
|
|
128
|
+
"smarthr-ui/UnexpectedErrorScreen/cookieCacheLink": "Q. 如何刪除瀏覽器的Cookie和快取?",
|
|
129
|
+
"smarthr-ui/UnexpectedErrorScreen/errorOccursInformation": "希望您能告訴我們發生錯誤時的內容"
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
module.exports = zhTw;
|
|
133
|
+
//# sourceMappingURL=zh_hant_tw.json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh_hant_tw.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
var zhTw = {
|
|
2
|
+
"smarthr-ui/common/language": "繁體中文",
|
|
3
|
+
"smarthr-ui/ActionDialog/closeButtonLabel": "取消",
|
|
4
|
+
"smarthr-ui/AppHeader/school": "SmartHR學習平台",
|
|
5
|
+
"smarthr-ui/AppHeader/help": "幫助",
|
|
6
|
+
"smarthr-ui/AppHeader/userSettings": "個人設定",
|
|
7
|
+
"smarthr-ui/AppHeader/releaseNotes": "版本更新說明",
|
|
8
|
+
"smarthr-ui/AppHeader/releaseNotesLoadError": "無法載入版本更新說明。\n請稍等片刻後再試。",
|
|
9
|
+
"smarthr-ui/AppHeader/seeAllReleaseNotes": "查看所有版本更新說明",
|
|
10
|
+
"smarthr-ui/AppHeader/DesktopHeader/appLauncherLabel": "功能",
|
|
11
|
+
"smarthr-ui/AppHeader/MobileHeader/account": "帳號",
|
|
12
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenu": "開啟選單",
|
|
13
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenu": "關閉選單",
|
|
14
|
+
"smarthr-ui/AppHeader/MobileHeader/allAppButton": "所有功能",
|
|
15
|
+
"smarthr-ui/AppHeader/MobileHeader/managementMenu": "管理選單",
|
|
16
|
+
"smarthr-ui/AppHeader/MobileHeader/latestReleaseNotes": "最新版本更新說明",
|
|
17
|
+
"smarthr-ui/AppHeader/MobileHeader/back": "返回",
|
|
18
|
+
"smarthr-ui/AppHeader/MobileHeader/openMenuAccordion": "展開",
|
|
19
|
+
"smarthr-ui/AppHeader/MobileHeader/closeMenuAccordion": "收合",
|
|
20
|
+
"smarthr-ui/AppHeader/Launcher/searchInputTitle": "請輸入功能名稱。",
|
|
21
|
+
"smarthr-ui/AppHeader/Launcher/favoriteModeText": "常用功能",
|
|
22
|
+
"smarthr-ui/AppHeader/Launcher/allModeText": "所有功能",
|
|
23
|
+
"smarthr-ui/AppHeader/Launcher/listText": "功能列表",
|
|
24
|
+
"smarthr-ui/AppHeader/Launcher/helpText": "關於常用功能",
|
|
25
|
+
"smarthr-ui/AppHeader/Launcher/searchResultText": "搜尋結果",
|
|
26
|
+
"smarthr-ui/AppHeader/Launcher/emptyText": "找不到符合條件的功能。",
|
|
27
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownLabel": "顯示排序",
|
|
28
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownSelected": "選擇中",
|
|
29
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderDefault": "預設",
|
|
30
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameAsc": "以功能名稱遞增",
|
|
31
|
+
"smarthr-ui/AppHeader/Launcher/sortDropdownOrderNameDesc": "以功能名稱遞減",
|
|
32
|
+
"smarthr-ui/AppLauncher/showAllText": "查看全部",
|
|
33
|
+
"smarthr-ui/AppLauncher/triggerLabel": "功能",
|
|
34
|
+
"smarthr-ui/Browser/notFoundDescription": "請嘗試其他條件。",
|
|
35
|
+
"smarthr-ui/Browser/notFoundTitle": "沒有符合條件的項目。",
|
|
36
|
+
"smarthr-ui/Button/loading": "處理中",
|
|
37
|
+
"smarthr-ui/Calendar/currentYear": "目前年份",
|
|
38
|
+
"smarthr-ui/Calendar/nextMonth": "下個月",
|
|
39
|
+
"smarthr-ui/Calendar/previousMonth": "上個月",
|
|
40
|
+
"smarthr-ui/Calendar/selectYear": "選擇年份",
|
|
41
|
+
"smarthr-ui/Combobox/addItemButtonLabel": "新增「{name}」",
|
|
42
|
+
"smarthr-ui/Combobox/loadingText": "處理中",
|
|
43
|
+
"smarthr-ui/Combobox/noResultsText": "沒有符合條件的選項。",
|
|
44
|
+
"smarthr-ui/DropdownMenuButton/triggerActive": "關閉選單",
|
|
45
|
+
"smarthr-ui/DropdownMenuButton/triggerInactive": "開啟選單",
|
|
46
|
+
"smarthr-ui/DropZone/selectButtonLabel": "選擇檔案",
|
|
47
|
+
"smarthr-ui/FileViewer/rotateAlt": "向左旋轉",
|
|
48
|
+
"smarthr-ui/FileViewer/scaleDownAlt": "縮小",
|
|
49
|
+
"smarthr-ui/FileViewer/scaleRateLabel": "縮放比例",
|
|
50
|
+
"smarthr-ui/FileViewer/scaleUpAlt": "放大",
|
|
51
|
+
"smarthr-ui/FileViewer/unsupportedFileText": "不支援的檔案格式。",
|
|
52
|
+
"smarthr-ui/FilterDropdown/applyText": "套用",
|
|
53
|
+
"smarthr-ui/FilterDropdown/cancelText": "取消",
|
|
54
|
+
"smarthr-ui/FilterDropdown/resetText": "清除篩選條件",
|
|
55
|
+
"smarthr-ui/FilterDropdown/status": "已套用",
|
|
56
|
+
"smarthr-ui/FilterDropdown/triggerText": "篩選",
|
|
57
|
+
"smarthr-ui/FormDialog/closeButtonLabel": "取消",
|
|
58
|
+
"smarthr-ui/InformationPanel/closeButtonLabel": "收合",
|
|
59
|
+
"smarthr-ui/InformationPanel/openButtonLabel": "展開",
|
|
60
|
+
"smarthr-ui/InputFile/destroy": "刪除",
|
|
61
|
+
"smarthr-ui/LanguageSwitcher/checkIconAlt": "已選擇",
|
|
62
|
+
"smarthr-ui/Loader/alt": "處理中",
|
|
63
|
+
"smarthr-ui/MessageDialog/closeButtonLabel": "關閉",
|
|
64
|
+
"smarthr-ui/ModelessDialog/closeButtonIconAlt": "關閉",
|
|
65
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaLabel": "對話框位置",
|
|
66
|
+
"smarthr-ui/ModelessDialog/dialogHandlerAriaRoleDescription": "可拖曳",
|
|
67
|
+
"smarthr-ui/ModelessDialog/dialogHandlerDescription": "可以按箭頭鍵上下左右移動",
|
|
68
|
+
"smarthr-ui/ModelessDialog/dialogHandlerLiveRegionText": "距離上方{top}px,距離左側{left}px",
|
|
69
|
+
"smarthr-ui/MultiCombobox/destroyButtonIconAltSuffix": ":刪除",
|
|
70
|
+
"smarthr-ui/MultiCombobox/selectedListAriaLabel": "已選項目",
|
|
71
|
+
"smarthr-ui/NotificationBar/closeButtonIconAlt": "關閉",
|
|
72
|
+
"smarthr-ui/Pagination/controllerItemButtonFirstLabel": "移至最前頁",
|
|
73
|
+
"smarthr-ui/Pagination/controllerItemButtonLastLabel": "移至最後頁",
|
|
74
|
+
"smarthr-ui/Pagination/controllerItemButtonNextLabel": "下一步",
|
|
75
|
+
"smarthr-ui/Pagination/controllerItemButtonPreviousLabel": "上一步",
|
|
76
|
+
"smarthr-ui/Pagination/itemButtonLabel": "第{page}頁",
|
|
77
|
+
"smarthr-ui/Pagination/navigationLabel": "分頁",
|
|
78
|
+
"smarthr-ui/RequiredLabel/text": "必填",
|
|
79
|
+
"smarthr-ui/SearchInput/iconAlt": "搜尋",
|
|
80
|
+
"smarthr-ui/SideMenu/navigationLabel": "側邊選單",
|
|
81
|
+
"smarthr-ui/SingleCombobox/destroyButtonIconAlt": "清除",
|
|
82
|
+
"smarthr-ui/SortDropdown/applyText": "套用",
|
|
83
|
+
"smarthr-ui/SortDropdown/ascLabel": "遞增",
|
|
84
|
+
"smarthr-ui/SortDropdown/cancelText": "取消",
|
|
85
|
+
"smarthr-ui/SortDropdown/descLabel": "遞減",
|
|
86
|
+
"smarthr-ui/SortDropdown/sortFieldLabel": "排序項目",
|
|
87
|
+
"smarthr-ui/SortDropdown/sortOrderLegend": "排序方式",
|
|
88
|
+
"smarthr-ui/StepFormDialog/backButtonLabel": "返回",
|
|
89
|
+
"smarthr-ui/StepFormDialog/closeButtonLabel": "取消",
|
|
90
|
+
"smarthr-ui/StepFormDialog/nextButtonLabel": "下一步",
|
|
91
|
+
"smarthr-ui/StepStatusIcon/closedAlt": "中斷",
|
|
92
|
+
"smarthr-ui/StepStatusIcon/completedAlt": "已完成",
|
|
93
|
+
"smarthr-ui/Textarea/availableLetters": "還可輸入{availableLetters}字",
|
|
94
|
+
"smarthr-ui/Textarea/maxLettersExceeded": "超出{exceededLetters}字",
|
|
95
|
+
"smarthr-ui/Textarea/screenReaderMaxLettersDescription": "最多可輸入{maxLetters}字",
|
|
96
|
+
"smarthr-ui/OpenInNewTabIcon/openInNewTab": "另開分頁",
|
|
97
|
+
"smarthr-ui/Th/sortDirectionAsc": "遞增",
|
|
98
|
+
"smarthr-ui/Th/sortDirectionDesc": "遞減",
|
|
99
|
+
"smarthr-ui/Th/sortDirectionNone": "無排序",
|
|
100
|
+
"smarthr-ui/ThCheckbox/checkAllInvisibleLabel": "選擇/取消所有項目",
|
|
101
|
+
"smarthr-ui/ThCheckbox/checkColumnName": "選擇",
|
|
102
|
+
"smarthr-ui/ErrorScreen/homeLink": "返回首頁",
|
|
103
|
+
"smarthr-ui/ErrorScreen/smarthrLink": "返回SmartHR",
|
|
104
|
+
"smarthr-ui/AuthErrorScreen/title": "驗證時發生問題。",
|
|
105
|
+
"smarthr-ui/ForbiddenErrorScreen/title": "沒有權限查看此頁面",
|
|
106
|
+
"smarthr-ui/ForbiddenErrorScreen/description": "如需了解詳情,請聯絡公司管理者。",
|
|
107
|
+
"smarthr-ui/NotFoundErrorScreen/title": "找不到您要尋找的頁面",
|
|
108
|
+
"smarthr-ui/NotFoundErrorScreen/description": "您尋找的頁面暫時無法使用,可能已被移動或刪除。",
|
|
109
|
+
"smarthr-ui/UnauthorizedErrorScreen/title": "已自動登出",
|
|
110
|
+
"smarthr-ui/UnauthorizedErrorScreen/description1": "因長時間未操作,系統已自動將您登出。",
|
|
111
|
+
"smarthr-ui/UnauthorizedErrorScreen/description2": "若要存取該頁面,請重新登入。",
|
|
112
|
+
"smarthr-ui/UnauthorizedErrorScreen/reLoginButton": "重新登入",
|
|
113
|
+
"smarthr-ui/UnexpectedErrorScreen/title": "發生非預期的錯誤",
|
|
114
|
+
"smarthr-ui/UnexpectedErrorScreen/apology": "非常抱歉造成不便。",
|
|
115
|
+
"smarthr-ui/UnexpectedErrorScreen/possibleCause": "可能因為暫時的通訊問題、您的使用環境或上傳的檔案內容等原因而發生錯誤。",
|
|
116
|
+
"smarthr-ui/UnexpectedErrorScreen/pleaseRetry": "很抱歉,請您嘗試以下方法。",
|
|
117
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem1": "請稍等片刻,再次嘗試。",
|
|
118
|
+
"smarthr-ui/UnexpectedErrorScreen/retryItem2": "請確認{maintenanceLink}(資訊可能需要一些時間才能顯示)。",
|
|
119
|
+
"smarthr-ui/UnexpectedErrorScreen/ifNotResolved": "如果問題仍然存在,請您檢查以下內容。",
|
|
120
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem1": "請確認是否滿足{environmentLink}的條件。",
|
|
121
|
+
"smarthr-ui/UnexpectedErrorScreen/checkItem2": "請嘗試刪除瀏覽器的Cookie和快取。詳情請參閱{cookieCacheLink}。",
|
|
122
|
+
"smarthr-ui/UnexpectedErrorScreen/contactAdmin": "如果檢查上述內容後問題仍然存在,請聯繫公司內部的勞務負責人或擁有SmartHR管理者權限的人,並附上{errorInfoLink}的資訊。",
|
|
123
|
+
"smarthr-ui/UnexpectedErrorScreen/adminContact": "擁有SmartHR管理者權限的人,請附上{errorInfoLink}的資訊,並透過右下角的聊天圖示聯繫我們。",
|
|
124
|
+
"smarthr-ui/UnexpectedErrorScreen/maintenanceLink": "維護與故障資訊",
|
|
125
|
+
"smarthr-ui/UnexpectedErrorScreen/environmentLink": "SmartHR的系統需求環境",
|
|
126
|
+
"smarthr-ui/UnexpectedErrorScreen/cookieCacheLink": "Q. 如何刪除瀏覽器的Cookie和快取?",
|
|
127
|
+
"smarthr-ui/UnexpectedErrorScreen/errorOccursInformation": "希望您能告訴我們發生錯誤時的內容"
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export { zhTw as default };
|
|
131
|
+
//# sourceMappingURL=zh_hant_tw.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh_hant_tw.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/intl/useIntl.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.cjs","sources":["../../src/intl/useIntl.ts"],"sourcesContent":["'use client'\n\nimport { useCallback } from 'react'\nimport {\n type PrimitiveType,\n type MessageDescriptor as ReactIntlMessageDescriptor,\n useIntl as useReactIntl,\n} from 'react-intl'\n\nimport { useAvailableLocales } from './IntlProvider'\nimport { locales } from './locales'\n\nimport type { FormatXMLElementFn, Options as IntlMessageFormatOptions } from 'intl-messageformat'\n\ntype Messages = Record<keyof typeof locales.ja, string>\n\ntype MessageDescriptor<T extends keyof Messages> = Omit<ReactIntlMessageDescriptor, 'id'> & {\n id: T\n defaultText: (typeof locales.ja)[T]\n}\n\ntype DatePart = 'year' | 'month' | 'day' | 'weekday'\n\ntype TimePart = 'hour' | 'minute' | 'second'\n\nexport type FormatDateProps = {\n /**\n * フォーマット対象の日付\n */\n date: Date\n\n /**\n * 表示する日付のパーツ。指定しない場合は全て表示\n */\n parts?: readonly [DatePart, ...DatePart[]]\n\n /**\n * フォーマットオプション\n */\n options?: Intl.DateTimeFormatOptions & {\n /**\n * 日本語ロケールでスラッシュを無効化し、月を長形式で表示する\n * @example\n * // 通常: \"2025/01\"\n * // disableSlashInJa: true の場合: \"2025年1月\"\n */\n disableSlashInJa?: boolean\n\n /**\n * 最初の文字を大文字化する\n * @example\n * // 通常: \"seg.\" (pt)\n * // capitalizeFirstLetter: true の場合: \"Seg.\" (pt)\n */\n capitalizeFirstLetter?: boolean\n }\n}\n\nexport type FormatTimeProps = {\n /**\n * フォーマット対象の日付\n */\n date: Date\n\n /**\n * 表示する時刻のパーツ。指定しない場合は ['hour', 'minute'] がデフォルト\n */\n parts?: readonly [TimePart, ...TimePart[]]\n\n /**\n * フォーマットオプション\n */\n options?: Intl.DateTimeFormatOptions\n}\n\nexport type FormatTimestampProps = {\n /**\n * フォーマット対象の日付\n */\n date: Date\n\n /**\n * 表示する時刻のパーツ。指定しない場合は ['hour', 'minute'] がデフォルト\n */\n timeParts?: readonly [TimePart, ...TimePart[]]\n}\n\n/**\n * useIntlフックの戻り値の型定義\n */\nexport type UseIntlReturn = {\n /** 利用可能なロケールのリスト */\n availableLocales: string[]\n /** メッセージのローカライズ関数 */\n localize: <T extends keyof Messages>(\n descriptor: MessageDescriptor<T>,\n values?: Record<string, PrimitiveType | FormatXMLElementFn<string, string>>,\n opts?: IntlMessageFormatOptions,\n ) => string\n\n /**\n * 日付をロケールに応じた形式でフォーマットする関数\n * @param props - フォーマットのオプション\n * @param props.date - フォーマット対象の日付\n * @param props.parts - 表示する日付のパーツ。デフォルトは ['year', 'month', 'day', 'weekday']\n * @param props.options - フォーマットオプション\n * @param props.options.disableSlashInJa - 日本語ロケールでスラッシュを無効化し、月を長形式で表示する\n * @param props.options.capitalizeFirstLetter - 最初の文字を大文字化する\n * @returns フォーマットされた日付文字列\n * @example\n * // 基本的な使用法(ロケールのデフォルト形式:曜日なし)\n * formatDate({ date: new Date() }) // \"2024/01/15\" (ja)\n *\n * // 日付を曜日ありで表示\n * formatDate({ date: new Date(), parts: ['year', 'month', 'day', 'weekday'] }) // \"2024/01/15(水)\" (ja)\n *\n * // 特定のフィールドのみ表示\n * formatDate({ date: new Date(), parts: ['year', 'month'] }) // \"2024/01\" (ja)\n * formatDate({ date: new Date(), parts: ['weekday'] }) // \"月\" (ja)\n *\n * // 日本語でスラッシュを無効化(月を長形式で表示)\n * formatDate({ date: new Date(), parts: ['year', 'month'], options: { disableSlashInJa: true } }) // \"2024年1月\" (ja)\n *\n * // 最初の文字を大文字化\n * formatDate({ date: new Date(), parts: ['weekday'], options: { capitalizeFirstLetter: true } }) // \"Seg.\" (pt)(指定しなければ \"seg.\")\n */\n formatDate(props: FormatDateProps): string\n\n /**\n * 時刻をロケールに応じた形式でフォーマットする関数\n * @param props - フォーマットのオプション\n * @param props.date - フォーマット対象の日付\n * @param props.parts - 表示する時刻のパーツ。デフォルトは ['hour', 'minute']\n * @param props.options - フォーマットオプション\n * @returns フォーマットされた時刻文字列\n * @example\n * // 基本的な使用法(ロケールのデフォルト形式)\n * formatTime({ date: new Date() }) // \"10:30\" (ja)\n *\n * // 秒を含めて表示\n * formatTime({ date: new Date(), parts: ['hour', 'minute', 'second'] }) // \"10:30:45\" (ja)\n *\n * // 時のみ表示\n * formatTime({ date: new Date(), parts: ['hour'] }) // \"10\" (ja)\n *\n * // 12時間形式で表示\n * formatTime({ date: new Date(), options: { hour12: true } }) // \"午前10:30\" (ja)\n */\n formatTime(props: FormatTimeProps): string\n\n /**\n * タイムスタンプ(日付+時刻)をフォーマットする関数\n * 日付はスラッシュ形式、時刻は24時間形式で表示されます\n * @param props - フォーマットのオプション\n * @param props.date - フォーマット対象の日付\n * @param props.timeParts - 表示する時刻のパーツ。デフォルトは ['hour', 'minute']\n * @returns フォーマットされたタイムスタンプ文字列\n * @example\n * // 基本的な使用法\n * formatTimestamp({ date: new Date() }) // \"2024/01/15 10:30\" (ja)\n *\n * // 秒を含めて表示\n * formatTimestamp({ date: new Date(), timeParts: ['hour', 'minute', 'second'] }) // \"2024/01/15 10:30:45\" (ja)\n */\n formatTimestamp(props: FormatTimestampProps): string\n\n /**\n * 現在のロケールに基づいて週の開始日を決定する関数\n * Intl.Locale.prototype.getWeekInfo()の動作を再現\n * getWeekInfo()を使わない理由は、Firefoxでは動作しないため\n *\n * @returns 週の開始日(0 = 日曜日, 1 = 月曜日, ..., 6 = 土曜日)\n */\n getWeekStartDay: () => number\n /** 現在のロケール */\n locale: keyof typeof locales\n}\n\nconst WEEK_START_DAYS = {\n SUNDAY: 0,\n MONDAY: 1,\n TUESDAY: 2,\n WEDNESDAY: 3,\n THURSDAY: 4,\n FRIDAY: 5,\n SATURDAY: 6,\n} as const\n\nconst DATE_FORMATS: Record<\n keyof typeof locales,\n Intl.DateTimeFormatOptions & { weekStartDay: number }\n> = {\n // localeがja, ja-easyの場合、フォーマットを YYYY/MM/DD 形式にする\n // 曜日が含まれている場合は括弧を追加する\n // 参考: https://smarthr.design/products/contents/idiomatic-usage/count/#h2-3\n ja: {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'ja-easy': {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'en-us': {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'id-id': {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.MONDAY,\n },\n ko: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n pt: {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.MONDAY,\n },\n vi: {\n year: 'numeric',\n month: 'long',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.MONDAY,\n },\n 'zh-cn': {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'zh-tw': {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n} as const\n\n/**\n * 各ロケールの括弧設定マップ\n * ロケールに応じて適切な括弧スタイル(半角/全角)と配置を定義\n */\nconst WEEKDAY_FORMATS: Record<keyof typeof locales, { replacer: (base: string) => string }> = {\n ja: { replacer: (base) => base.replace(/(.+?)\\(([月火水木金土日])\\)$/, '$1($2)') },\n 'ja-easy': { replacer: (base) => base.replace(/(.+?)\\(([月火水木金土日])\\)$/, '$1($2)') },\n 'en-us': { replacer: (base) => base.replace(/^([A-Za-z]{3}), (.+)$/, '$2 ($1)') },\n 'id-id': { replacer: (base) => base.replace(/^([A-Za-z]{3}), (.+)$/, '$2 ($1)') },\n ko: {\n replacer: (base) => base.replace(/\\s{2,}/g, ' ').replace(/([월화수목금토일])$/, '($1)'),\n },\n pt: { replacer: (base) => base.replace(/^([A-Za-z]{3}\\.), (.+)$/, '$2 ($1)') },\n vi: { replacer: (base) => base.replace(/^(\\S+ \\d+), (.+)$/, '$2 ($1)') },\n 'zh-cn': { replacer: (base) => base.replace(/(.+?)\\s*([周][一二三四五六日])$/, '$1($2)') },\n 'zh-tw': { replacer: (base) => base.replace(/(.+?)\\s*([週][一二三四五六日])$/, '$1($2)') },\n} as const\n\nconst COMMON_TIME_FORMAT: Intl.DateTimeFormatOptions = {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n}\n\nconst TIME_FORMATS: Record<keyof typeof locales, Intl.DateTimeFormatOptions> = {\n ja: COMMON_TIME_FORMAT,\n 'ja-easy': COMMON_TIME_FORMAT,\n 'en-us': {\n ...COMMON_TIME_FORMAT,\n hour: 'numeric',\n hour12: true,\n },\n 'id-id': COMMON_TIME_FORMAT,\n ko: COMMON_TIME_FORMAT,\n pt: COMMON_TIME_FORMAT,\n vi: COMMON_TIME_FORMAT,\n 'zh-cn': COMMON_TIME_FORMAT,\n 'zh-tw': COMMON_TIME_FORMAT,\n} as const\n\nconst isValidLocale = (locale: string): locale is keyof typeof locales => locale in locales\n\nconst applyCapitalization = (text: string, shouldCapitalize: boolean) =>\n shouldCapitalize ? text.charAt(0).toUpperCase() + text.slice(1) : text\n\n/**\n * 多言語化機能を提供するフック\n * react-intlをベースにした国際化機能を提供します\n *\n * @returns {UseIntlReturn} 国際化に関連する関数とプロパティを含むオブジェクト\n * @example\n * // 基本的な使用法(メッセージのローカライズ)\n * const Component = () => {\n * const { localize } = useIntl()\n * return <span>{localize({ id: 'smarthr-ui/common/language', defaultText: '日本語' })}</span>\n * }\n *\n * @example\n * // 日付のフォーマット\n * const Component = () => {\n * const { formatDate } = useIntl()\n * return <span>{formatDate({ date: new Date(2024, 1 - 1, 15) })}</span> // \"2024/01/15\" (ja)\n * }\n *\n * @example\n * // 時刻のフォーマット\n * const Component = () => {\n * const { formatTime } = useIntl()\n * return <span>{formatTime({ date: new Date(2024, 1 - 1, 15, 10, 30, 0) })}</span> // \"10:30\" (ja)\n * }\n *\n * @example\n * // 利用可能なロケールの確認\n * const Component = () => {\n * const { availableLocales, locale } = useIntl()\n * return <div>現在のロケール: {locale}</div>\n * }\n */\nexport const useIntl = (): UseIntlReturn => {\n const intl = useReactIntl()\n const locale = isValidLocale(intl.locale) ? intl.locale : 'ja'\n const availableLocales = useAvailableLocales()\n\n const localize = useCallback(\n <T extends keyof Messages>(\n descriptor: MessageDescriptor<T>,\n values?: Record<string, PrimitiveType | FormatXMLElementFn<string, string>>,\n opts?: IntlMessageFormatOptions,\n ): string =>\n intl.formatMessage({ ...descriptor, defaultMessage: descriptor.defaultText }, values, opts),\n [intl],\n )\n\n const formatDate = useCallback(\n ({ date, parts = ['year', 'month', 'day'], options }: FormatDateProps): string => {\n const {\n disableSlashInJa = false,\n capitalizeFirstLetter = false,\n year,\n month,\n day,\n weekday,\n ...rest\n } = options || {}\n\n // パーツの存在を事前に計算\n const hasPart = parts.reduce(\n (prev, part) => {\n prev[part] = true\n return prev\n },\n { year: false, month: false, day: false, weekday: false } as {\n year: boolean\n month: boolean\n day: boolean\n weekday: boolean\n },\n )\n\n // ロケールのデフォルト形式を取得\n const isJaKanjiFormat = disableSlashInJa && locale === 'ja'\n const defaultFormats = DATE_FORMATS[locale]\n\n // local が 'ja' で漢字表記の場合はゼロ埋めをしないようにする\n const defaultMonth = isJaKanjiFormat ? 'long' : defaultFormats.month\n const defaultDay = isJaKanjiFormat ? 'numeric' : defaultFormats.day\n\n const actualFormatOptions: Intl.DateTimeFormatOptions = {\n ...rest,\n year: year ?? (hasPart.year ? defaultFormats.year : undefined),\n month: month ?? (hasPart.month ? defaultMonth : undefined),\n day: day ?? (hasPart.day ? defaultDay : undefined),\n weekday: weekday ?? (hasPart.weekday ? defaultFormats.weekday : undefined),\n }\n\n const formattedDate = intl.formatDate(date, actualFormatOptions)\n\n // 曜日をロケールに応じてフォーマットする\n let formattedResult = formattedDate\n const config = WEEKDAY_FORMATS[locale]\n // 曜日が含まれており、かつ曜日のみの表示でない場合は括弧を追加\n // 例: \"2025/01/01(水)\" → 括弧あり, \"水\" → 括弧なし\n if (config && hasPart.weekday && (parts.length !== 1 || parts[0] !== 'weekday')) {\n formattedResult = config.replacer(formattedDate)\n }\n\n return applyCapitalization(formattedResult, capitalizeFirstLetter)\n },\n [intl, locale],\n )\n\n const formatTime = useCallback(\n ({ date, parts = ['hour', 'minute'], options }: FormatTimeProps): string => {\n const formatOptions = options || {}\n\n const hasPart = parts.reduce(\n (prev, part) => {\n prev[part] = true\n return prev\n },\n { hour: false, minute: false, second: false } as {\n hour: boolean\n minute: boolean\n second: boolean\n },\n )\n\n const actualFormatOptions: Intl.DateTimeFormatOptions = {\n ...formatOptions,\n hour: formatOptions.hour ?? (hasPart.hour ? TIME_FORMATS[locale].hour : undefined),\n minute: formatOptions.minute ?? (hasPart.minute ? TIME_FORMATS[locale].minute : undefined),\n second: formatOptions.second ?? (hasPart.second ? '2-digit' : undefined),\n hour12: formatOptions.hour12 ?? TIME_FORMATS[locale].hour12,\n }\n\n return intl.formatDate(date, actualFormatOptions)\n },\n [intl, locale],\n )\n\n const formatTimestamp = useCallback(\n ({ date, timeParts = ['hour', 'minute'] }: FormatTimestampProps): string => {\n const formattedDate = formatDate({ date, parts: ['year', 'month', 'day'] })\n const formattedTime = formatTime({ date, parts: timeParts })\n return `${formattedDate} ${formattedTime}`\n },\n [formatDate, formatTime],\n )\n\n const getWeekStartDay = (): number => DATE_FORMATS[locale].weekStartDay\n\n return {\n availableLocales,\n localize,\n formatDate,\n formatTime,\n formatTimestamp,\n locale,\n getWeekStartDay,\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAkLA;AACE;AACA;AAQF;;;;AAOE;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;;AAGH;;;AAGG;AACH;AACE;AACA;AACA;AACA;AACA;;AAEC;AACD;AACA;AACA;AACA;;AAGF;AACE;AACA;AACA;;AAGF;AACE;AACA;AACA;AACE;AACA;AACA;AACD;AACD;AACA;AACA;AACA;AACA;AACA;;AAGF;AAEA;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACI;AACL;AACA;AACA;AAEA;;;;;AAyBQ;AACA;AACF;;AAUF;AACA;;AAGA;AACA;AAEA;AACE;AACA;AACA;AACA;AACA;;;;;AAOF;;;;AAIE;;AAGF;AACF;AAIF;AAEI;;AAII;AACA;AACF;AAQF;AACE;;;AAGA;;;;AAKJ;AAIF;AAEI;AACA;AACA;AACF;;;;;;;;;;;AAeJ;;"}
|
|
1
|
+
{"version":3,"file":"useIntl.cjs","sources":["../../src/intl/useIntl.ts"],"sourcesContent":["'use client'\n\nimport { useCallback } from 'react'\nimport {\n type PrimitiveType,\n type MessageDescriptor as ReactIntlMessageDescriptor,\n useIntl as useReactIntl,\n} from 'react-intl'\n\nimport { useAvailableLocales } from './IntlProvider'\nimport { locales, type typedJa } from './locales'\n\nimport type { FormatXMLElementFn, Options as IntlMessageFormatOptions } from 'intl-messageformat'\n\ntype Messages = Record<keyof typeof typedJa, string>\n\ntype MessageDescriptor<T extends keyof Messages> = Omit<ReactIntlMessageDescriptor, 'id'> & {\n id: T\n defaultText: (typeof typedJa)[T]\n}\n\ntype DatePart = 'year' | 'month' | 'day' | 'weekday'\n\ntype TimePart = 'hour' | 'minute' | 'second'\n\nexport type FormatDateProps = {\n /**\n * フォーマット対象の日付\n */\n date: Date\n\n /**\n * 表示する日付のパーツ。指定しない場合は全て表示\n */\n parts?: readonly [DatePart, ...DatePart[]]\n\n /**\n * フォーマットオプション\n */\n options?: Intl.DateTimeFormatOptions & {\n /**\n * 日本語ロケールでスラッシュを無効化し、月を長形式で表示する\n * @example\n * // 通常: \"2025/01\"\n * // disableSlashInJa: true の場合: \"2025年1月\"\n */\n disableSlashInJa?: boolean\n\n /**\n * 最初の文字を大文字化する\n * @example\n * // 通常: \"seg.\" (pt)\n * // capitalizeFirstLetter: true の場合: \"Seg.\" (pt)\n */\n capitalizeFirstLetter?: boolean\n }\n}\n\nexport type FormatTimeProps = {\n /**\n * フォーマット対象の日付\n */\n date: Date\n\n /**\n * 表示する時刻のパーツ。指定しない場合は ['hour', 'minute'] がデフォルト\n */\n parts?: readonly [TimePart, ...TimePart[]]\n\n /**\n * フォーマットオプション\n */\n options?: Intl.DateTimeFormatOptions\n}\n\nexport type FormatTimestampProps = {\n /**\n * フォーマット対象の日付\n */\n date: Date\n\n /**\n * 表示する時刻のパーツ。指定しない場合は ['hour', 'minute'] がデフォルト\n */\n timeParts?: readonly [TimePart, ...TimePart[]]\n}\n\n/**\n * useIntlフックの戻り値の型定義\n */\nexport type UseIntlReturn = {\n /** 利用可能なロケールのリスト */\n availableLocales: string[]\n /** メッセージのローカライズ関数 */\n localize: <T extends keyof Messages>(\n descriptor: MessageDescriptor<T>,\n values?: Record<string, PrimitiveType | FormatXMLElementFn<string, string>>,\n opts?: IntlMessageFormatOptions,\n ) => string\n\n /**\n * 日付をロケールに応じた形式でフォーマットする関数\n * @param props - フォーマットのオプション\n * @param props.date - フォーマット対象の日付\n * @param props.parts - 表示する日付のパーツ。デフォルトは ['year', 'month', 'day', 'weekday']\n * @param props.options - フォーマットオプション\n * @param props.options.disableSlashInJa - 日本語ロケールでスラッシュを無効化し、月を長形式で表示する\n * @param props.options.capitalizeFirstLetter - 最初の文字を大文字化する\n * @returns フォーマットされた日付文字列\n * @example\n * // 基本的な使用法(ロケールのデフォルト形式:曜日なし)\n * formatDate({ date: new Date() }) // \"2024/01/15\" (ja)\n *\n * // 日付を曜日ありで表示\n * formatDate({ date: new Date(), parts: ['year', 'month', 'day', 'weekday'] }) // \"2024/01/15(水)\" (ja)\n *\n * // 特定のフィールドのみ表示\n * formatDate({ date: new Date(), parts: ['year', 'month'] }) // \"2024/01\" (ja)\n * formatDate({ date: new Date(), parts: ['weekday'] }) // \"月\" (ja)\n *\n * // 日本語でスラッシュを無効化(月を長形式で表示)\n * formatDate({ date: new Date(), parts: ['year', 'month'], options: { disableSlashInJa: true } }) // \"2024年1月\" (ja)\n *\n * // 最初の文字を大文字化\n * formatDate({ date: new Date(), parts: ['weekday'], options: { capitalizeFirstLetter: true } }) // \"Seg.\" (pt)(指定しなければ \"seg.\")\n */\n formatDate(props: FormatDateProps): string\n\n /**\n * 時刻をロケールに応じた形式でフォーマットする関数\n * @param props - フォーマットのオプション\n * @param props.date - フォーマット対象の日付\n * @param props.parts - 表示する時刻のパーツ。デフォルトは ['hour', 'minute']\n * @param props.options - フォーマットオプション\n * @returns フォーマットされた時刻文字列\n * @example\n * // 基本的な使用法(ロケールのデフォルト形式)\n * formatTime({ date: new Date() }) // \"10:30\" (ja)\n *\n * // 秒を含めて表示\n * formatTime({ date: new Date(), parts: ['hour', 'minute', 'second'] }) // \"10:30:45\" (ja)\n *\n * // 時のみ表示\n * formatTime({ date: new Date(), parts: ['hour'] }) // \"10\" (ja)\n *\n * // 12時間形式で表示\n * formatTime({ date: new Date(), options: { hour12: true } }) // \"午前10:30\" (ja)\n */\n formatTime(props: FormatTimeProps): string\n\n /**\n * タイムスタンプ(日付+時刻)をフォーマットする関数\n * 日付はスラッシュ形式、時刻は24時間形式で表示されます\n * @param props - フォーマットのオプション\n * @param props.date - フォーマット対象の日付\n * @param props.timeParts - 表示する時刻のパーツ。デフォルトは ['hour', 'minute']\n * @returns フォーマットされたタイムスタンプ文字列\n * @example\n * // 基本的な使用法\n * formatTimestamp({ date: new Date() }) // \"2024/01/15 10:30\" (ja)\n *\n * // 秒を含めて表示\n * formatTimestamp({ date: new Date(), timeParts: ['hour', 'minute', 'second'] }) // \"2024/01/15 10:30:45\" (ja)\n */\n formatTimestamp(props: FormatTimestampProps): string\n\n /**\n * 現在のロケールに基づいて週の開始日を決定する関数\n * Intl.Locale.prototype.getWeekInfo()の動作を再現\n * getWeekInfo()を使わない理由は、Firefoxでは動作しないため\n *\n * @returns 週の開始日(0 = 日曜日, 1 = 月曜日, ..., 6 = 土曜日)\n */\n getWeekStartDay: () => number\n /** 現在のロケール */\n locale: keyof typeof locales\n}\n\nconst WEEK_START_DAYS = {\n SUNDAY: 0,\n MONDAY: 1,\n TUESDAY: 2,\n WEDNESDAY: 3,\n THURSDAY: 4,\n FRIDAY: 5,\n SATURDAY: 6,\n} as const\n\nconst DATE_FORMATS: Record<\n keyof typeof locales,\n Intl.DateTimeFormatOptions & { weekStartDay: number }\n> = {\n // localeがja, ja-easyの場合、フォーマットを YYYY/MM/DD 形式にする\n // 曜日が含まれている場合は括弧を追加する\n // 参考: https://smarthr.design/products/contents/idiomatic-usage/count/#h2-3\n ja: {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'ja-easy': {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'en-us': {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'id-id': {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.MONDAY,\n },\n ko: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n pt: {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.MONDAY,\n },\n vi: {\n year: 'numeric',\n month: 'long',\n day: '2-digit',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.MONDAY,\n },\n 'zh-cn': {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n 'zh-tw': {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'short',\n weekStartDay: WEEK_START_DAYS.SUNDAY,\n },\n} as const\n\n/**\n * 各ロケールの括弧設定マップ\n * ロケールに応じて適切な括弧スタイル(半角/全角)と配置を定義\n */\nconst WEEKDAY_FORMATS: Record<keyof typeof locales, { replacer: (base: string) => string }> = {\n ja: { replacer: (base) => base.replace(/(.+?)\\(([月火水木金土日])\\)$/, '$1($2)') },\n 'ja-easy': { replacer: (base) => base.replace(/(.+?)\\(([月火水木金土日])\\)$/, '$1($2)') },\n 'en-us': { replacer: (base) => base.replace(/^([A-Za-z]{3}), (.+)$/, '$2 ($1)') },\n 'id-id': { replacer: (base) => base.replace(/^([A-Za-z]{3}), (.+)$/, '$2 ($1)') },\n ko: {\n replacer: (base) => base.replace(/\\s{2,}/g, ' ').replace(/([월화수목금토일])$/, '($1)'),\n },\n pt: { replacer: (base) => base.replace(/^([A-Za-z]{3}\\.), (.+)$/, '$2 ($1)') },\n vi: { replacer: (base) => base.replace(/^(\\S+ \\d+), (.+)$/, '$2 ($1)') },\n 'zh-cn': { replacer: (base) => base.replace(/(.+?)\\s*([周][一二三四五六日])$/, '$1($2)') },\n 'zh-tw': { replacer: (base) => base.replace(/(.+?)\\s*([週][一二三四五六日])$/, '$1($2)') },\n} as const\n\nconst COMMON_TIME_FORMAT: Intl.DateTimeFormatOptions = {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n}\n\nconst TIME_FORMATS: Record<keyof typeof locales, Intl.DateTimeFormatOptions> = {\n ja: COMMON_TIME_FORMAT,\n 'ja-easy': COMMON_TIME_FORMAT,\n 'en-us': {\n ...COMMON_TIME_FORMAT,\n hour: 'numeric',\n hour12: true,\n },\n 'id-id': COMMON_TIME_FORMAT,\n ko: COMMON_TIME_FORMAT,\n pt: COMMON_TIME_FORMAT,\n vi: COMMON_TIME_FORMAT,\n 'zh-cn': COMMON_TIME_FORMAT,\n 'zh-tw': COMMON_TIME_FORMAT,\n} as const\n\nconst isValidLocale = (locale: string): locale is keyof typeof locales => locale in locales\n\nconst applyCapitalization = (text: string, shouldCapitalize: boolean) =>\n shouldCapitalize ? text.charAt(0).toUpperCase() + text.slice(1) : text\n\n/**\n * 多言語化機能を提供するフック\n * react-intlをベースにした国際化機能を提供します\n *\n * @returns {UseIntlReturn} 国際化に関連する関数とプロパティを含むオブジェクト\n * @example\n * // 基本的な使用法(メッセージのローカライズ)\n * const Component = () => {\n * const { localize } = useIntl()\n * return <span>{localize({ id: 'smarthr-ui/common/language', defaultText: '日本語' })}</span>\n * }\n *\n * @example\n * // 日付のフォーマット\n * const Component = () => {\n * const { formatDate } = useIntl()\n * return <span>{formatDate({ date: new Date(2024, 1 - 1, 15) })}</span> // \"2024/01/15\" (ja)\n * }\n *\n * @example\n * // 時刻のフォーマット\n * const Component = () => {\n * const { formatTime } = useIntl()\n * return <span>{formatTime({ date: new Date(2024, 1 - 1, 15, 10, 30, 0) })}</span> // \"10:30\" (ja)\n * }\n *\n * @example\n * // 利用可能なロケールの確認\n * const Component = () => {\n * const { availableLocales, locale } = useIntl()\n * return <div>現在のロケール: {locale}</div>\n * }\n */\nexport const useIntl = (): UseIntlReturn => {\n const intl = useReactIntl()\n const locale = isValidLocale(intl.locale) ? intl.locale : 'ja'\n const availableLocales = useAvailableLocales()\n\n const localize = useCallback(\n <T extends keyof Messages>(\n descriptor: MessageDescriptor<T>,\n values?: Record<string, PrimitiveType | FormatXMLElementFn<string, string>>,\n opts?: IntlMessageFormatOptions,\n ): string =>\n intl.formatMessage({ ...descriptor, defaultMessage: descriptor.defaultText }, values, opts),\n [intl],\n )\n\n const formatDate = useCallback(\n ({ date, parts = ['year', 'month', 'day'], options }: FormatDateProps): string => {\n const {\n disableSlashInJa = false,\n capitalizeFirstLetter = false,\n year,\n month,\n day,\n weekday,\n ...rest\n } = options || {}\n\n // パーツの存在を事前に計算\n const hasPart = parts.reduce(\n (prev, part) => {\n prev[part] = true\n return prev\n },\n { year: false, month: false, day: false, weekday: false } as {\n year: boolean\n month: boolean\n day: boolean\n weekday: boolean\n },\n )\n\n // ロケールのデフォルト形式を取得\n const isJaKanjiFormat = disableSlashInJa && locale === 'ja'\n const defaultFormats = DATE_FORMATS[locale]\n\n // local が 'ja' で漢字表記の場合はゼロ埋めをしないようにする\n const defaultMonth = isJaKanjiFormat ? 'long' : defaultFormats.month\n const defaultDay = isJaKanjiFormat ? 'numeric' : defaultFormats.day\n\n const actualFormatOptions: Intl.DateTimeFormatOptions = {\n ...rest,\n year: year ?? (hasPart.year ? defaultFormats.year : undefined),\n month: month ?? (hasPart.month ? defaultMonth : undefined),\n day: day ?? (hasPart.day ? defaultDay : undefined),\n weekday: weekday ?? (hasPart.weekday ? defaultFormats.weekday : undefined),\n }\n\n const formattedDate = intl.formatDate(date, actualFormatOptions)\n\n // 曜日をロケールに応じてフォーマットする\n let formattedResult = formattedDate\n const config = WEEKDAY_FORMATS[locale]\n // 曜日が含まれており、かつ曜日のみの表示でない場合は括弧を追加\n // 例: \"2025/01/01(水)\" → 括弧あり, \"水\" → 括弧なし\n if (config && hasPart.weekday && (parts.length !== 1 || parts[0] !== 'weekday')) {\n formattedResult = config.replacer(formattedDate)\n }\n\n return applyCapitalization(formattedResult, capitalizeFirstLetter)\n },\n [intl, locale],\n )\n\n const formatTime = useCallback(\n ({ date, parts = ['hour', 'minute'], options }: FormatTimeProps): string => {\n const formatOptions = options || {}\n\n const hasPart = parts.reduce(\n (prev, part) => {\n prev[part] = true\n return prev\n },\n { hour: false, minute: false, second: false } as {\n hour: boolean\n minute: boolean\n second: boolean\n },\n )\n\n const actualFormatOptions: Intl.DateTimeFormatOptions = {\n ...formatOptions,\n hour: formatOptions.hour ?? (hasPart.hour ? TIME_FORMATS[locale].hour : undefined),\n minute: formatOptions.minute ?? (hasPart.minute ? TIME_FORMATS[locale].minute : undefined),\n second: formatOptions.second ?? (hasPart.second ? '2-digit' : undefined),\n hour12: formatOptions.hour12 ?? TIME_FORMATS[locale].hour12,\n }\n\n return intl.formatDate(date, actualFormatOptions)\n },\n [intl, locale],\n )\n\n const formatTimestamp = useCallback(\n ({ date, timeParts = ['hour', 'minute'] }: FormatTimestampProps): string => {\n const formattedDate = formatDate({ date, parts: ['year', 'month', 'day'] })\n const formattedTime = formatTime({ date, parts: timeParts })\n return `${formattedDate} ${formattedTime}`\n },\n [formatDate, formatTime],\n )\n\n const getWeekStartDay = (): number => DATE_FORMATS[locale].weekStartDay\n\n return {\n availableLocales,\n localize,\n formatDate,\n formatTime,\n formatTimestamp,\n locale,\n getWeekStartDay,\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAkLA;AACE;AACA;AAQF;;;;AAOE;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;AACD;AACE;AACA;AACA;AACA;;AAED;;AAGH;;;AAGG;AACH;AACE;AACA;AACA;AACA;AACA;;AAEC;AACD;AACA;AACA;AACA;;AAGF;AACE;AACA;AACA;;AAGF;AACE;AACA;AACA;AACE;AACA;AACA;AACD;AACD;AACA;AACA;AACA;AACA;AACA;;AAGF;AAEA;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACI;AACL;AACA;AACA;AAEA;;;;;AAyBQ;AACA;AACF;;AAUF;AACA;;AAGA;AACA;AAEA;AACE;AACA;AACA;AACA;AACA;;;;;AAOF;;;;AAIE;;AAGF;AACF;AAIF;AAEI;;AAII;AACA;AACF;AAQF;AACE;;;AAGA;;;;AAKJ;AAIF;AAEI;AACA;AACA;AACF;;;;;;;;;;;AAeJ;;"}
|
package/lib/intl/useIntl.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type PrimitiveType, type MessageDescriptor as ReactIntlMessageDescriptor } from 'react-intl';
|
|
2
|
-
import { locales } from './locales';
|
|
2
|
+
import { locales, type typedJa } from './locales';
|
|
3
3
|
import type { FormatXMLElementFn, Options as IntlMessageFormatOptions } from 'intl-messageformat';
|
|
4
|
-
type Messages = Record<keyof typeof
|
|
4
|
+
type Messages = Record<keyof typeof typedJa, string>;
|
|
5
5
|
type MessageDescriptor<T extends keyof Messages> = Omit<ReactIntlMessageDescriptor, 'id'> & {
|
|
6
6
|
id: T;
|
|
7
|
-
defaultText: (typeof
|
|
7
|
+
defaultText: (typeof typedJa)[T];
|
|
8
8
|
};
|
|
9
9
|
type DatePart = 'year' | 'month' | 'day' | 'weekday';
|
|
10
10
|
type TimePart = 'hour' | 'minute' | 'second';
|