@astryx-vue/core 0.7.26 → 0.7.28
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/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-D7ik41g-.js → AppShell-CeFsQXNh.js} +8 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-D_C9RBJb.js → Avatar-76xnfD9n.js} +3 -2
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CFvNDgU-.js → AvatarGroup-Beuljwpu.js} +5 -3
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-C1B7DsHS.js → Banner-Dx2JtVc-.js} +3 -2
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-BgiZY7un.js → Breadcrumbs-Brgi3F8q.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-Bzgi-XyF.js → Calendar-DwFAzDky.js} +4 -3
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel--VycM-Sa.js → Carousel-CSsQ4GHW.js} +3 -2
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-C1DlnlCQ.js → Chat-j2m3Exwo.js} +21 -20
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-uk8nuCEf.js → CheckboxInput-iCg8FgRv.js} +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-Dr4kQ-BC.js → CheckboxList-Dr40y9ME.js} +5 -4
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-BAFsn6N1.js → Citation-CSgRYxGU.js} +3 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-lewtyQrO.js → CommandPalette-C1duZfmg.js} +8 -7
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BUnqjeW5.js → ComplexSelector-BgnhEjIN.js} +6 -5
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-IDkvorRp.js → ContextMenu-DN_nTBgW.js} +6 -5
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DTxxFz9-.js → DateInput-BY9qdl_H.js} +14 -9
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-D4Us58KW.js → DateRangeInput-C0vyG95Z.js} +13 -7
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-CliLnI7P.js → DateTimeInput-BmIljXWd.js} +15 -7
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +1 -1
- package/dist/{DialogHeader-Hk419KW1.js → DialogHeader-Dfegdd7v.js} +3 -2
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-DoQ9hjKz.js → Drawer-7LLlGQcE.js} +1 -1
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-B2iga1fe.js → DropdownMenu-B6SXhr61.js} +2 -3
- package/dist/{DropdownMenu-BF2Z5T4h.js → DropdownMenu-CJxA-kJ2.js} +4 -5
- package/dist/Field/index.js +3 -3
- package/dist/{Field-if5a58LO.js → Field-Dc15m78p.js} +1 -1
- package/dist/{FieldLabel-C-IaUcP4.js → FieldLabel-CfO3zaZ5.js} +4 -3
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-0zBWfO8h.js → FileInput-C6eX4nBl.js} +6 -5
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-DNQy7wqB.js → InfoTip-iKOp_vUV.js} +3 -2
- package/dist/{InputClearButton-DhvxPkK6.js → InputClearButton-DjIxNNH8.js} +4 -3
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-B1kG0rBN.js → InputGroup-CIKleAu8.js} +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-CUEIHCf4.js → InternationalizationProvider-CcEXq6fT.js} +2 -3
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-DyxKNYtE.js → Kbd-D4JPY4VI.js} +3 -2
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-B8uMFPOS.js → Lightbox-rY1XJs38.js} +4 -3
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-Kc2RQFHc.js → Link-k1Z20GSP.js} +3 -2
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-NVkHi_tk.js → Markdown-BQbchOad.js} +8 -3
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-4GnMi6s9.js → MetadataList-n3YXiP4a.js} +3 -2
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-TMDrnXfG.js → MobileNavToggle-_dutVRGj.js} +4 -3
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-CpGEXWCd.js → MoreMenu-C2ZrGrJ-.js} +3 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-Baca6xNx.js → MultiSelector-DWKh7ePj.js} +8 -7
- package/dist/{NavHeadingSurface-j2gzMVKt.js → NavHeadingSurface-Cjp2DHPt.js} +3 -2
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-BBFGZ4Fg.js → NumberInput-Bzc9v9oU.js} +5 -4
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-BgDOI3ar.js → Outline-BXu7HCHp.js} +3 -2
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-D4fC5s_q.js → OverflowList-CJZgNVSb.js} +3 -2
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-Do_MIlo4.js → Pagination-DOw8gHjL.js} +4 -3
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-Bd93LlDd.js → Popover-DaGcaKHo.js} +3 -2
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DyqItMHo.js → PowerSearch-CtC5P-zt.js} +18 -17
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Dzp4qSgm.js → RadioGroup-D3TXgdwV.js} +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-CAIgB1j_.js → RadioList-Boj8QfPe.js} +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-GAmiHb0-.js → ResizeHandle-Bon51yNV.js} +3 -2
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-B9lINQRM.js → Selector-DCrEaxnG.js} +6 -5
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DzZ12DIq.js → SideNav-YO-fBuwR.js} +7 -6
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-Cuk2ul9w.js → Slider-BFc5GTXb.js} +1 -1
- package/dist/Spinner/index.js +1 -1
- package/dist/{Spinner-ke63bQPv.js → Spinner-DEVPDsD0.js} +3 -2
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-C68f_iJG.js → Stepper-B_CDbhCW.js} +4 -3
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-bnxiN6Qe.js → Switch-B0E8cZy7.js} +4 -3
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-8dlO0Ws6.js → TabList-DBSXa5QT.js} +3 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-j_DCDbcI.js → Table-DkibnUnt.js} +23 -22
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Bzz_KcKT.js → TextArea-CKg-oybo.js} +9 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-givkH9HQ.js → TextInput-QnW6aidH.js} +5 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-CZOWP5HN.js → Thumbnail-Cqt2l_zO.js} +8 -3
- package/dist/{TimeField-ByoS5s_I.js → TimeField-2QBI5tU6.js} +9 -4
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D9kvMQso.js → TimeInput-DYAsRNAO.js} +2 -2
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-CEdNhKc5.js → Timestamp-CwNc1inn.js} +4 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-CnZrcU-G.js → Toast-cVNBdW-q.js} +3 -2
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DWCDMawn.js → Token-CtG_XE6z.js} +3 -2
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-R0eC1BOk.js → Tokenizer-XeyJuIJ7.js} +6 -5
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-DHunql9h.js → TopNav-zpU9w-mH.js} +5 -4
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-Dg5gtkOu.js → TreeList-DeknLfbQ.js} +3 -2
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-BkmCC6DX.js → Typeahead-GOdnQXcB.js} +7 -6
- package/dist/{TypeaheadMenu-CFeJCv-6.js → TypeaheadMenu-BOzaCvSb.js} +1 -1
- package/dist/avatar-group-Dcn6i_ne.js +13 -0
- package/dist/banner-Bv76b50U.js +17 -0
- package/dist/calendar-Cs2vIPsV.js +31 -0
- package/dist/carousel-BHUqW44m.js +18 -0
- package/dist/chat-mh_siWVp.js +94 -0
- package/dist/checkbox-list-uI6q4y3V.js +13 -0
- package/dist/citation-h6fyz-JH.js +7 -0
- package/dist/command-palette-DuNs5XAd.js +34 -0
- package/dist/composables/index.js +1 -1
- package/dist/{composables-DqJzanJ5.js → composables-lCxHhZQY.js} +4 -3
- package/dist/context-B8IEFCDR.js +51 -0
- package/dist/context-menu-9i6CObx3.js +7 -0
- package/dist/date-input-Bj3KSuoJ.js +38 -0
- package/dist/date-range-input-CoCiWt9_.js +18 -0
- package/dist/dialog-CNjGcdd1.js +7 -0
- package/dist/dropdown-menu-BDu4gWwQ.js +15 -0
- package/dist/field-CehUqCe0.js +15 -0
- package/dist/file-input-C2JFODtb.js +40 -0
- package/dist/{locale-BA52q_fh.js → format-CiN0Dt_H.js} +1 -30
- package/dist/{index-Cun6cXGP.d.ts → index--tm6L1ot.d.ts} +1 -1
- package/dist/{index-BngdKVro.d.ts → index-9tZJgo0R.d.ts} +2 -2
- package/dist/{index-9eluGe3a.d.ts → index-BBTU-TKb.d.ts} +1 -1
- package/dist/{index-BOCb89V9.d.ts → index-BO9TY87G.d.ts} +3 -3
- package/dist/{index-B7brdDVR.d.ts → index-BtuK-muv.d.ts} +4 -4
- package/dist/{index-DTfA4uE3.d.ts → index-BzZC2Y7c.d.ts} +1 -1
- package/dist/{index-B3yTdknp.d.ts → index-C1zwvxPH.d.ts} +1 -1
- package/dist/{index-BfSZhAVv.d.ts → index-CEHqYyz5.d.ts} +1 -1
- package/dist/{index-MEix_m1o.d.ts → index-CL6DNvOo.d.ts} +1 -1
- package/dist/{index-CdvmnNMH.d.ts → index-COgrQZIL.d.ts} +1 -1
- package/dist/{index-BqEPgwku.d.ts → index-CpG5Wql5.d.ts} +2 -2
- package/dist/{index-C8wfe0Mr.d.ts → index-D05JGsT3.d.ts} +1 -1
- package/dist/{index-B449gOMC.d.ts → index-D1JXm7Et.d.ts} +3 -3
- package/dist/{index-DFDadgys.d.ts → index-D44l1Esr.d.ts} +38 -38
- package/dist/{index-DneQgJfI.d.ts → index-O9y23OPJ.d.ts} +1 -1
- package/dist/{index-B-3EGjfQ.d.ts → index-Q1oG9yIT.d.ts} +2 -2
- package/dist/{index-mJ_aqK5M.d.ts → index-Ukeoz7_9.d.ts} +4 -4
- package/dist/{index-BnqDF_AX.d.ts → index-a1jCiQP7.d.ts} +2 -2
- package/dist/{index--uIQXVJ7.d.ts → index-dWlCpnua.d.ts} +1 -1
- package/dist/{index-BjbPK91B.d.ts → index-pACjRM0E.d.ts} +8 -2
- package/dist/{index-DZKv1WNB.d.ts → index-qayqGnJT.d.ts} +1 -1
- package/dist/{index-CtYlR9Cu.d.ts → index-rdwI-mcm.d.ts} +1 -1
- package/dist/{index-C89cIh4E.d.ts → index-waTkqxTz.d.ts} +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.js +70 -71
- package/dist/info-tip-BV42YsA4.js +7 -0
- package/dist/input-DUSvqqG_.js +17 -0
- package/dist/kbd-C-D_nOfU.js +41 -0
- package/dist/keyboard-hint-KWx0-7kD.js +7 -0
- package/dist/layout-DzxSsBe8.js +17 -0
- package/dist/lightbox-BrvPVD8I.js +32 -0
- package/dist/loadCatalog-BHlH2S6H.js +2349 -0
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +4 -4
- package/dist/{useTranslator-Q85hi4qz.js → locale-BGrZM4ow.js} +31 -3
- package/dist/markdown-JcCeKquw.js +23 -0
- package/dist/metadata-list-BEmAuMYs.js +13 -0
- package/dist/more-menu-B_dod4C-.js +7 -0
- package/dist/multi-selector-B_pe6KkZ.js +48 -0
- package/dist/nav-CoUOgByC.js +50 -0
- package/dist/number-input-Dw5NSQxh.js +18 -0
- package/dist/outline-BflaJV62.js +7 -0
- package/dist/pagination-Ds3yXCJw.js +58 -0
- package/dist/popover-DxCyd_Ua.js +7 -0
- package/dist/{searchResultMessage-CFmIy2Da.js → searchResultMessage-BEqDlHdV.js} +3 -2
- package/dist/selector-qWbffnIX.js +30 -0
- package/dist/shared-aoQdb_6V.js +23 -0
- package/dist/spinner-DVia-eDf.js +7 -0
- package/dist/stepper-BOgJs2Ht.js +32 -0
- package/dist/switch-B9xwxdOU.js +7 -0
- package/dist/tab-list-B_q2n-9d.js +7 -0
- package/dist/text-area-Co4Egt6b.js +14 -0
- package/dist/text-input-BtwGEoGv.js +8 -0
- package/dist/thumbnail-BI82Ijpj.js +15 -0
- package/dist/time-input-DL1_SV7j.js +68 -0
- package/dist/timestamp-CFBVCsHF.js +17 -0
- package/dist/toast-BvAnX6Vc.js +13 -0
- package/dist/token-DcbdjdZ2.js +7 -0
- package/dist/tokenizer-DD_UBzR7.js +29 -0
- package/dist/tree-list-NZ1EZhtd.js +7 -0
- package/dist/typeahead-BzrhssJi.js +24 -0
- package/dist/{useMenuDrillIn-C5eJCuO1.js → useMenuDrillIn-uQtOSny6.js} +9 -1
- package/package.json +1 -1
- package/styles/calendar.css +4 -0
- package/styles/chat.css +2 -0
- package/styles/code.css +4 -1
- package/styles/empty-state.css +2 -0
- package/styles/markdown.css +1 -0
- package/styles/more-menu.css +1 -0
- package/styles/multi-selector.css +2 -0
- package/styles/pagination.css +1 -0
- package/styles/power-search.css +2 -0
- package/styles/segmented-control.css +1 -0
- package/styles/side-nav.css +1 -0
- package/styles/slider.css +1 -0
- package/styles/stepper.css +1 -0
- package/styles/tab-list.css +3 -0
- package/styles/table.css +3 -0
- package/styles/text-area.css +1 -0
- package/styles/text-input.css +1 -0
- package/styles/theme.css +5 -1
- package/styles/tokenizer.css +1 -0
- package/dist/context-CV6TrhJY.js +0 -2080
- package/dist/loadCatalog-Bulk4H7U.js +0 -143
- package/dist/upstreamMap-DrkVNtXW.js +0 -1073
- package/dist/{index-BqhgeAT4.d.ts → index-5FGt4HsB.d.ts} +1 -1
package/dist/context-CV6TrhJY.js
DELETED
|
@@ -1,2080 +0,0 @@
|
|
|
1
|
-
import { computed, inject, provide, toValue } from "vue";
|
|
2
|
-
//#region src/locale/messages/alert-dialog.ts
|
|
3
|
-
const alertDialogMessages = {
|
|
4
|
-
"en": { cancel: "Cancel" },
|
|
5
|
-
"zh-CN": { cancel: "取消" }
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/locale/messages/avatar-group.ts
|
|
9
|
-
const avatarGroupMessages = {
|
|
10
|
-
"en": {
|
|
11
|
-
label: "Avatars",
|
|
12
|
-
keyboardHint: "Use arrow keys to move between avatars"
|
|
13
|
-
},
|
|
14
|
-
"zh-CN": {
|
|
15
|
-
label: "头像组",
|
|
16
|
-
keyboardHint: "用方向键在头像之间切换"
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/locale/messages/banner.ts
|
|
21
|
-
const bannerMessages = {
|
|
22
|
-
"en": {
|
|
23
|
-
dismiss: "Dismiss",
|
|
24
|
-
dismissTitled: (dismiss, title) => `${dismiss} ${title}`,
|
|
25
|
-
collapse: "Collapse",
|
|
26
|
-
expand: "Expand"
|
|
27
|
-
},
|
|
28
|
-
"zh-CN": {
|
|
29
|
-
dismiss: "关闭",
|
|
30
|
-
dismissTitled: (dismiss, title) => `${dismiss}“${title}”`,
|
|
31
|
-
collapse: "收起",
|
|
32
|
-
expand: "展开"
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/locale/messages/breadcrumbs.ts
|
|
37
|
-
const breadcrumbsMessages = {
|
|
38
|
-
"en": { label: "Breadcrumb" },
|
|
39
|
-
"zh-CN": { label: "面包屑导航" }
|
|
40
|
-
};
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/locale/messages/button.ts
|
|
43
|
-
const buttonMessages = {
|
|
44
|
-
"en": { loading: "Loading" },
|
|
45
|
-
"zh-CN": { loading: "加载中" }
|
|
46
|
-
};
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/locale/messages/calendar.ts
|
|
49
|
-
const calendarMessages = {
|
|
50
|
-
"en": {
|
|
51
|
-
label: "Calendar",
|
|
52
|
-
previousMonth: "Previous month",
|
|
53
|
-
nextMonth: "Next month",
|
|
54
|
-
rangeStart: (date) => `Start date ${date}. Select an end date.`,
|
|
55
|
-
rangeCleared: (date) => `Cleared start date ${date}. Select a start date.`,
|
|
56
|
-
rangeComplete: (start, end) => `Selected range: ${start} to ${end}.`,
|
|
57
|
-
rangeStartName: (date) => `${date}, range start`,
|
|
58
|
-
rangeEndName: (date) => `${date}, range end`,
|
|
59
|
-
rangeBoth: (date) => `${date}, range start and range end`,
|
|
60
|
-
daySelected: (date) => `${date}, selected`,
|
|
61
|
-
dayInRange: (date) => `${date}, in range`
|
|
62
|
-
},
|
|
63
|
-
"zh-CN": {
|
|
64
|
-
label: "日历",
|
|
65
|
-
previousMonth: "上个月",
|
|
66
|
-
nextMonth: "下个月",
|
|
67
|
-
rangeStart: (date) => `开始日期:${date}。请选择结束日期。`,
|
|
68
|
-
rangeCleared: (date) => `已取消开始日期 ${date}。请重新选择开始日期。`,
|
|
69
|
-
rangeComplete: (start, end) => `已选择 ${start} 至 ${end}。`,
|
|
70
|
-
rangeStartName: (date) => `${date},开始日期`,
|
|
71
|
-
rangeEndName: (date) => `${date},结束日期`,
|
|
72
|
-
rangeBoth: (date) => `${date},开始和结束日期`,
|
|
73
|
-
daySelected: (date) => `${date},已选中`,
|
|
74
|
-
dayInRange: (date) => `${date},在所选范围内`
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/locale/messages/shared.ts
|
|
79
|
-
function clearLabel(label, fallback, prefix) {
|
|
80
|
-
return label != null && label !== "" ? `${prefix}${label}` : fallback;
|
|
81
|
-
}
|
|
82
|
-
const numberFormats$1 = /* @__PURE__ */ new Map();
|
|
83
|
-
/**
|
|
84
|
-
* 按语言给数字加千分位,对应原版 ICU 里的 `{count, number}`。
|
|
85
|
-
* 内置文案只有 `en` 和 `zh-CN`,两者都写成 `1,234`。
|
|
86
|
-
*/
|
|
87
|
-
function formatCount(value, locale) {
|
|
88
|
-
let format = numberFormats$1.get(locale);
|
|
89
|
-
if (format == null) {
|
|
90
|
-
format = new Intl.NumberFormat(locale);
|
|
91
|
-
numberFormats$1.set(locale, format);
|
|
92
|
-
}
|
|
93
|
-
return format.format(value);
|
|
94
|
-
}
|
|
95
|
-
/** 英文单复数:1 用单数,其余用复数,和原版 `plural, one {…} other {…}` 一致。 */
|
|
96
|
-
function englishPlural(count, one, other) {
|
|
97
|
-
return count === 1 ? one : other;
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/locale/messages/carousel.ts
|
|
101
|
-
const carouselMessages = {
|
|
102
|
-
"en": {
|
|
103
|
-
label: "Carousel",
|
|
104
|
-
scrollLeft: "Scroll left",
|
|
105
|
-
scrollRight: "Scroll right",
|
|
106
|
-
slide: (current, total) => `Slide ${formatCount(current, "en")} of ${formatCount(total, "en")}`
|
|
107
|
-
},
|
|
108
|
-
"zh-CN": {
|
|
109
|
-
label: "轮播",
|
|
110
|
-
scrollLeft: "向左滚动",
|
|
111
|
-
scrollRight: "向右滚动",
|
|
112
|
-
slide: (current, total) => `第 ${formatCount(current, "zh-CN")} 张,共 ${formatCount(total, "zh-CN")} 张`
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region src/locale/messages/chat.ts
|
|
117
|
-
const chatMessages = {
|
|
118
|
-
"en": {
|
|
119
|
-
log: "Messages",
|
|
120
|
-
newMessages: "New messages",
|
|
121
|
-
scrollToBottom: "Scroll to bottom",
|
|
122
|
-
messageFrom: (sender) => `Message from ${sender}`,
|
|
123
|
-
messageStatus: (status) => `Message ${status}`,
|
|
124
|
-
statusSending: "Sending",
|
|
125
|
-
statusSent: "Sent",
|
|
126
|
-
statusDelivered: "Delivered",
|
|
127
|
-
statusRead: "Read",
|
|
128
|
-
statusFailed: "Failed",
|
|
129
|
-
senderUser: "user",
|
|
130
|
-
senderAssistant: "assistant",
|
|
131
|
-
senderSystem: "system",
|
|
132
|
-
toolError: (message) => `Error: ${message}`,
|
|
133
|
-
toolGroup: (count) => `${count} tool calls`,
|
|
134
|
-
toolPending: "Pending",
|
|
135
|
-
toolRunning: "Running",
|
|
136
|
-
toolComplete: "Complete",
|
|
137
|
-
toolFailed: "Failed",
|
|
138
|
-
thinking: "Thinking",
|
|
139
|
-
typingOne: (name) => `${name} is typing…`,
|
|
140
|
-
typingTwo: (first, second) => `${first} and ${second} are typing…`,
|
|
141
|
-
typingMany: (name, others) => `${name} and ${others} others are typing…`,
|
|
142
|
-
typingNames: (names) => `${names} are typing…`,
|
|
143
|
-
typingOthers: (count) => `${formatCount(count, "en")} ${englishPlural(count, "other", "others")}`,
|
|
144
|
-
unreadBelow: (label) => `${label} messages below`,
|
|
145
|
-
unreadLabel: "New",
|
|
146
|
-
placeholder: "Type a message…",
|
|
147
|
-
drawerLabel: "Items",
|
|
148
|
-
inputLabel: "Message input",
|
|
149
|
-
noSpeechDetected: "No speech was detected.",
|
|
150
|
-
expandPastedText: "Expand",
|
|
151
|
-
pastedTextLabel: (lines, chars) => lines === 1 ? `${formatCount(chars, "en")} chars` : `${formatCount(lines, "en")} lines, ${formatCount(chars, "en")} chars`,
|
|
152
|
-
drawerExpand: (label) => `Expand ${label}`,
|
|
153
|
-
drawerCollapse: (label) => `Collapse ${label}`,
|
|
154
|
-
startDictation: "Start dictation",
|
|
155
|
-
stopDictation: "Stop dictation",
|
|
156
|
-
send: "Send",
|
|
157
|
-
stop: "Stop",
|
|
158
|
-
suggestions: "Suggestions",
|
|
159
|
-
searching: "Searching…",
|
|
160
|
-
noResults: "No results"
|
|
161
|
-
},
|
|
162
|
-
"zh-CN": {
|
|
163
|
-
log: "消息列表",
|
|
164
|
-
newMessages: "有新消息",
|
|
165
|
-
scrollToBottom: "滚动到底部",
|
|
166
|
-
messageFrom: (sender) => `来自${sender}的消息`,
|
|
167
|
-
messageStatus: (status) => `消息${status}`,
|
|
168
|
-
statusSending: "发送中",
|
|
169
|
-
statusSent: "已发送",
|
|
170
|
-
statusDelivered: "已送达",
|
|
171
|
-
statusRead: "已读",
|
|
172
|
-
statusFailed: "发送失败",
|
|
173
|
-
senderUser: "用户",
|
|
174
|
-
senderAssistant: "助手",
|
|
175
|
-
senderSystem: "系统",
|
|
176
|
-
toolError: (message) => `错误:${message}`,
|
|
177
|
-
toolGroup: (count) => `${count} 个工具调用`,
|
|
178
|
-
toolPending: "等待中",
|
|
179
|
-
toolRunning: "进行中",
|
|
180
|
-
toolComplete: "已完成",
|
|
181
|
-
toolFailed: "失败",
|
|
182
|
-
thinking: "思考中",
|
|
183
|
-
typingOne: (name) => `${name} 正在输入…`,
|
|
184
|
-
typingTwo: (first, second) => `${first} 和 ${second} 正在输入…`,
|
|
185
|
-
typingMany: (name, others) => `${name} 和其他 ${others} 人正在输入…`,
|
|
186
|
-
typingNames: (names) => `${names}正在输入…`,
|
|
187
|
-
typingOthers: (count) => `另外 ${formatCount(count, "zh-CN")} 人`,
|
|
188
|
-
unreadBelow: (label) => `${label}以下是未读消息`,
|
|
189
|
-
unreadLabel: "新消息",
|
|
190
|
-
placeholder: "输入消息……",
|
|
191
|
-
drawerLabel: "项目",
|
|
192
|
-
inputLabel: "消息输入框",
|
|
193
|
-
noSpeechDetected: "未检测到语音。",
|
|
194
|
-
expandPastedText: "展开",
|
|
195
|
-
pastedTextLabel: (lines, chars) => lines === 1 ? `${formatCount(chars, "zh-CN")} 个字符` : `${formatCount(lines, "zh-CN")} 行,${formatCount(chars, "zh-CN")} 个字符`,
|
|
196
|
-
drawerExpand: (label) => `展开 ${label}`,
|
|
197
|
-
drawerCollapse: (label) => `折叠 ${label}`,
|
|
198
|
-
startDictation: "开始语音输入",
|
|
199
|
-
stopDictation: "停止语音输入",
|
|
200
|
-
send: "发送",
|
|
201
|
-
stop: "停止",
|
|
202
|
-
suggestions: "建议",
|
|
203
|
-
searching: "正在搜索…",
|
|
204
|
-
noResults: "没有结果"
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region src/locale/messages/checkbox-list.ts
|
|
209
|
-
const checkboxListMessages = {
|
|
210
|
-
"en": {
|
|
211
|
-
loading: "Loading",
|
|
212
|
-
checkbox: "Checkbox"
|
|
213
|
-
},
|
|
214
|
-
"zh-CN": {
|
|
215
|
-
loading: "正在加载",
|
|
216
|
-
checkbox: "复选框"
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
//#endregion
|
|
220
|
-
//#region src/locale/messages/citation.ts
|
|
221
|
-
const citationMessages = {
|
|
222
|
-
"en": { label: (number, title) => `Citation ${number}: ${title}` },
|
|
223
|
-
"zh-CN": { label: (number, title) => `引用 ${number}:${title}` }
|
|
224
|
-
};
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region src/locale/messages/code-block.ts
|
|
227
|
-
const codeBlockMessages = {
|
|
228
|
-
"en": {
|
|
229
|
-
copied: "Copied",
|
|
230
|
-
copyCode: "Copy code",
|
|
231
|
-
code: "Code"
|
|
232
|
-
},
|
|
233
|
-
"zh-CN": {
|
|
234
|
-
copied: "已复制",
|
|
235
|
-
copyCode: "复制代码",
|
|
236
|
-
code: "代码"
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
//#endregion
|
|
240
|
-
//#region src/locale/messages/command-palette.ts
|
|
241
|
-
const commandPaletteMessages = {
|
|
242
|
-
"en": {
|
|
243
|
-
label: "Command palette",
|
|
244
|
-
emptySearch: "No results",
|
|
245
|
-
emptyBootstrap: "Type to search",
|
|
246
|
-
placeholder: "Search…",
|
|
247
|
-
listLabel: "Commands",
|
|
248
|
-
inputLabel: "Search commands",
|
|
249
|
-
loading: "Loading",
|
|
250
|
-
noResultsFor: (query) => `No results for ${query}`,
|
|
251
|
-
resultCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "result", "results")}`,
|
|
252
|
-
navigate: "Navigate",
|
|
253
|
-
select: "Select",
|
|
254
|
-
close: "Close"
|
|
255
|
-
},
|
|
256
|
-
"zh-CN": {
|
|
257
|
-
label: "命令面板",
|
|
258
|
-
emptySearch: "没有结果",
|
|
259
|
-
emptyBootstrap: "输入以搜索",
|
|
260
|
-
placeholder: "搜索…",
|
|
261
|
-
listLabel: "命令",
|
|
262
|
-
inputLabel: "搜索命令",
|
|
263
|
-
loading: "正在加载",
|
|
264
|
-
noResultsFor: (query) => `没有与 ${query} 匹配的结果`,
|
|
265
|
-
resultCount: (count) => `${formatCount(count, "zh-CN")} 个结果`,
|
|
266
|
-
navigate: "移动",
|
|
267
|
-
select: "选择",
|
|
268
|
-
close: "关闭"
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/locale/messages/comment-composer.ts
|
|
273
|
-
const commentComposerMessages = {
|
|
274
|
-
"en": {
|
|
275
|
-
addEmoji: "Add emoji",
|
|
276
|
-
agents: "Agents",
|
|
277
|
-
attachImages: "Attach images",
|
|
278
|
-
cancel: "Cancel",
|
|
279
|
-
chooseImages: "Choose images",
|
|
280
|
-
imageAlt: "Image attachment",
|
|
281
|
-
imagesOnly: "Only image files can be added",
|
|
282
|
-
noAgents: "No agents",
|
|
283
|
-
placeholder: "Write a comment…",
|
|
284
|
-
removeQuote: "Remove quoted text",
|
|
285
|
-
uploadFailed: "Images couldn't be added"
|
|
286
|
-
},
|
|
287
|
-
"zh-CN": {
|
|
288
|
-
addEmoji: "添加表情",
|
|
289
|
-
agents: "智能体",
|
|
290
|
-
attachImages: "添加图片",
|
|
291
|
-
cancel: "取消",
|
|
292
|
-
chooseImages: "选择图片",
|
|
293
|
-
imageAlt: "图片附件",
|
|
294
|
-
imagesOnly: "只能添加图片文件",
|
|
295
|
-
noAgents: "没有智能体",
|
|
296
|
-
placeholder: "写一条评论…",
|
|
297
|
-
removeQuote: "移除引用文字",
|
|
298
|
-
uploadFailed: "图片没能添加。"
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
//#endregion
|
|
302
|
-
//#region src/locale/icu.ts
|
|
303
|
-
const pluralRules = /* @__PURE__ */ new Map();
|
|
304
|
-
const ordinalRules = /* @__PURE__ */ new Map();
|
|
305
|
-
const numberFormats = /* @__PURE__ */ new Map();
|
|
306
|
-
function rulesFor(locale, ordinal) {
|
|
307
|
-
const cache = ordinal ? ordinalRules : pluralRules;
|
|
308
|
-
let rules = cache.get(locale);
|
|
309
|
-
if (rules == null) {
|
|
310
|
-
rules = new Intl.PluralRules(locale, ordinal ? { type: "ordinal" } : void 0);
|
|
311
|
-
cache.set(locale, rules);
|
|
312
|
-
}
|
|
313
|
-
return rules;
|
|
314
|
-
}
|
|
315
|
-
function numberFor(locale) {
|
|
316
|
-
let format = numberFormats.get(locale);
|
|
317
|
-
if (format == null) {
|
|
318
|
-
format = new Intl.NumberFormat(locale);
|
|
319
|
-
numberFormats.set(locale, format);
|
|
320
|
-
}
|
|
321
|
-
return format;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* 解析原版目录里的 ICU MessageFormat。
|
|
325
|
-
* 覆盖 `{name}`、`{name, number}`、`plural`、`selectordinal` 和 `select`。
|
|
326
|
-
* 解析失败时抛错,调用方负责把这个键记进未映射列表。
|
|
327
|
-
*/
|
|
328
|
-
function formatIcu(message, values, locale) {
|
|
329
|
-
return render(parseMessage(message), values, locale, void 0);
|
|
330
|
-
}
|
|
331
|
-
function icuPlaceholderNames(message) {
|
|
332
|
-
return Object.keys(icuArgumentKinds(message));
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* 每个占位符名字用到的写法,已排序去重。
|
|
336
|
-
* 译文和原文的这张表一致,说明两边收同样的值;字面文字和占位符顺序不算在内。
|
|
337
|
-
* 解析失败时抛错。
|
|
338
|
-
*/
|
|
339
|
-
function icuArgumentKinds(message) {
|
|
340
|
-
const kinds = /* @__PURE__ */ new Map();
|
|
341
|
-
collectKinds(parseMessage(message), kinds);
|
|
342
|
-
return Object.fromEntries([...kinds].map(([name, set]) => [name, [...set].sort()]));
|
|
343
|
-
}
|
|
344
|
-
function collectKinds(nodes, kinds) {
|
|
345
|
-
for (const node of nodes) {
|
|
346
|
-
if (node.type === "text" || node.type === "pound") continue;
|
|
347
|
-
const kind = node.type === "arg" ? "argument" : node.type === "plural" && node.ordinal ? "selectordinal" : node.type;
|
|
348
|
-
const set = kinds.get(node.name) ?? /* @__PURE__ */ new Set();
|
|
349
|
-
set.add(kind);
|
|
350
|
-
kinds.set(node.name, set);
|
|
351
|
-
if (node.type === "plural" || node.type === "select") for (const option of node.options) collectKinds(option.nodes, kinds);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function render(nodes, values, locale, pound) {
|
|
355
|
-
let text = "";
|
|
356
|
-
for (const node of nodes) text += renderNode(node, values, locale, pound);
|
|
357
|
-
return text;
|
|
358
|
-
}
|
|
359
|
-
function renderNode(node, values, locale, pound) {
|
|
360
|
-
if (node.type === "text") return node.value;
|
|
361
|
-
if (node.type === "pound") return pound == null ? "" : numberFor(locale).format(pound);
|
|
362
|
-
if (node.type === "arg") return textValue(values[node.name]);
|
|
363
|
-
if (node.type === "number") {
|
|
364
|
-
const value = numericValue(values[node.name]);
|
|
365
|
-
return value == null ? "" : numberFor(locale).format(value);
|
|
366
|
-
}
|
|
367
|
-
if (node.type === "select") return renderChoice(node.options, selectSelector(values[node.name]), values, locale, pound);
|
|
368
|
-
const value = numericValue(values[node.name]);
|
|
369
|
-
const rounded = value == null ? void 0 : value - node.offset;
|
|
370
|
-
const selector = value == null ? "other" : pluralSelector(value, node.options, locale, node.ordinal);
|
|
371
|
-
return renderChoice(node.options, selector, values, locale, rounded);
|
|
372
|
-
}
|
|
373
|
-
function pluralSelector(value, options, locale, ordinal) {
|
|
374
|
-
const exact = exactSelector(value);
|
|
375
|
-
if (exact != null && options.some((option) => option.selector === exact)) return exact;
|
|
376
|
-
return rulesFor(locale, ordinal).select(value);
|
|
377
|
-
}
|
|
378
|
-
function renderChoice(options, selector, values, locale, pound) {
|
|
379
|
-
const match = options.find((option) => option.selector === selector) ?? options.find((option) => option.selector === "other") ?? options[0];
|
|
380
|
-
return match == null ? "" : render(match.nodes, values, locale, pound);
|
|
381
|
-
}
|
|
382
|
-
function textValue(value) {
|
|
383
|
-
if (value == null) return "";
|
|
384
|
-
return typeof value === "number" ? String(value) : value;
|
|
385
|
-
}
|
|
386
|
-
function numericValue(value) {
|
|
387
|
-
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
388
|
-
if (typeof value === "string" && value.trim() !== "") {
|
|
389
|
-
const parsed = Number(value);
|
|
390
|
-
if (Number.isFinite(parsed)) return parsed;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
function exactSelector(value) {
|
|
394
|
-
return Number.isInteger(value) ? `=${value}` : void 0;
|
|
395
|
-
}
|
|
396
|
-
function selectSelector(value) {
|
|
397
|
-
if (value == null) return "other";
|
|
398
|
-
return String(value);
|
|
399
|
-
}
|
|
400
|
-
function startsQuote(next, pluralPound) {
|
|
401
|
-
return next === "{" || next === "}" || next === "<" || next === ">" || pluralPound && next === "#";
|
|
402
|
-
}
|
|
403
|
-
function parseMessage(input) {
|
|
404
|
-
let index = 0;
|
|
405
|
-
function parseNodes(stop, pluralPound) {
|
|
406
|
-
const nodes = [];
|
|
407
|
-
let text = "";
|
|
408
|
-
const flush = () => {
|
|
409
|
-
if (text !== "") {
|
|
410
|
-
nodes.push({
|
|
411
|
-
type: "text",
|
|
412
|
-
value: text
|
|
413
|
-
});
|
|
414
|
-
text = "";
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
while (index < input.length) {
|
|
418
|
-
const char = input[index];
|
|
419
|
-
if (char === "'") {
|
|
420
|
-
const next = input[index + 1];
|
|
421
|
-
if (next === "'") {
|
|
422
|
-
text += "'";
|
|
423
|
-
index += 2;
|
|
424
|
-
continue;
|
|
425
|
-
}
|
|
426
|
-
if (!startsQuote(next, pluralPound)) {
|
|
427
|
-
text += "'";
|
|
428
|
-
index += 1;
|
|
429
|
-
continue;
|
|
430
|
-
}
|
|
431
|
-
index += 1;
|
|
432
|
-
while (index < input.length) {
|
|
433
|
-
if (input[index] === "'") {
|
|
434
|
-
if (input[index + 1] === "'") {
|
|
435
|
-
text += "'";
|
|
436
|
-
index += 2;
|
|
437
|
-
continue;
|
|
438
|
-
}
|
|
439
|
-
index += 1;
|
|
440
|
-
break;
|
|
441
|
-
}
|
|
442
|
-
text += input[index];
|
|
443
|
-
index += 1;
|
|
444
|
-
}
|
|
445
|
-
continue;
|
|
446
|
-
}
|
|
447
|
-
if (char === "#" && pluralPound) {
|
|
448
|
-
flush();
|
|
449
|
-
nodes.push({ type: "pound" });
|
|
450
|
-
index += 1;
|
|
451
|
-
continue;
|
|
452
|
-
}
|
|
453
|
-
if (char === "{") {
|
|
454
|
-
flush();
|
|
455
|
-
index += 1;
|
|
456
|
-
nodes.push(parseArgument());
|
|
457
|
-
continue;
|
|
458
|
-
}
|
|
459
|
-
if (stop != null && char === stop) {
|
|
460
|
-
flush();
|
|
461
|
-
return nodes;
|
|
462
|
-
}
|
|
463
|
-
text += char;
|
|
464
|
-
index += 1;
|
|
465
|
-
}
|
|
466
|
-
if (stop != null) throw new Error("ICU 消息没有闭合");
|
|
467
|
-
flush();
|
|
468
|
-
return nodes;
|
|
469
|
-
}
|
|
470
|
-
function parseArgument() {
|
|
471
|
-
skipSpace();
|
|
472
|
-
const name = readIdentifier();
|
|
473
|
-
skipSpace();
|
|
474
|
-
if (input[index] === "}") {
|
|
475
|
-
index += 1;
|
|
476
|
-
return {
|
|
477
|
-
type: "arg",
|
|
478
|
-
name
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
if (input[index] !== ",") throw new Error(`ICU 参数 ${name} 格式不对`);
|
|
482
|
-
index += 1;
|
|
483
|
-
skipSpace();
|
|
484
|
-
const kind = readIdentifier();
|
|
485
|
-
skipSpace();
|
|
486
|
-
if (kind === "number") {
|
|
487
|
-
if (input[index] === ",") skipNumberStyle();
|
|
488
|
-
expectChar("}");
|
|
489
|
-
index += 1;
|
|
490
|
-
return {
|
|
491
|
-
type: "number",
|
|
492
|
-
name
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
if (kind === "plural" || kind === "selectordinal" || kind === "select") {
|
|
496
|
-
expectChar(",");
|
|
497
|
-
index += 1;
|
|
498
|
-
skipSpace();
|
|
499
|
-
let offset = 0;
|
|
500
|
-
if (kind !== "select" && input.startsWith("offset:", index)) {
|
|
501
|
-
index += 7;
|
|
502
|
-
skipSpace();
|
|
503
|
-
offset = readInteger();
|
|
504
|
-
skipSpace();
|
|
505
|
-
}
|
|
506
|
-
const options = [];
|
|
507
|
-
while (index < input.length && input[index] !== "}") {
|
|
508
|
-
skipSpace();
|
|
509
|
-
if (input[index] === "}") break;
|
|
510
|
-
const selector = readSelector();
|
|
511
|
-
skipSpace();
|
|
512
|
-
expectChar("{");
|
|
513
|
-
index += 1;
|
|
514
|
-
const nodes = parseNodes("}", kind !== "select");
|
|
515
|
-
expectChar("}");
|
|
516
|
-
index += 1;
|
|
517
|
-
options.push({
|
|
518
|
-
selector,
|
|
519
|
-
nodes
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
expectChar("}");
|
|
523
|
-
index += 1;
|
|
524
|
-
if (options.length === 0) throw new Error(`ICU ${kind} 没有选项`);
|
|
525
|
-
if (kind === "select") return {
|
|
526
|
-
type: "select",
|
|
527
|
-
name,
|
|
528
|
-
options
|
|
529
|
-
};
|
|
530
|
-
return {
|
|
531
|
-
type: "plural",
|
|
532
|
-
name,
|
|
533
|
-
offset,
|
|
534
|
-
ordinal: kind === "selectordinal",
|
|
535
|
-
options
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
throw new Error(`不支持的 ICU 类型 ${kind}`);
|
|
539
|
-
}
|
|
540
|
-
function skipNumberStyle() {
|
|
541
|
-
let depth = 0;
|
|
542
|
-
while (index < input.length) {
|
|
543
|
-
const char = input[index];
|
|
544
|
-
if (char === "{") depth += 1;
|
|
545
|
-
else if (char === "}") {
|
|
546
|
-
if (depth === 0) return;
|
|
547
|
-
depth -= 1;
|
|
548
|
-
}
|
|
549
|
-
index += 1;
|
|
550
|
-
}
|
|
551
|
-
throw new Error("ICU number 没有闭合");
|
|
552
|
-
}
|
|
553
|
-
function skipSpace() {
|
|
554
|
-
while (index < input.length && (input[index] === " " || input[index] === "\n" || input[index] === "\r" || input[index] === " ")) index += 1;
|
|
555
|
-
}
|
|
556
|
-
function readIdentifier() {
|
|
557
|
-
const start = index;
|
|
558
|
-
while (index < input.length && /[\w$]/.test(input[index])) index += 1;
|
|
559
|
-
if (start === index) throw new Error("ICU 缺少参数名");
|
|
560
|
-
return input.slice(start, index);
|
|
561
|
-
}
|
|
562
|
-
function readSelector() {
|
|
563
|
-
if (input[index] === "=") {
|
|
564
|
-
index += 1;
|
|
565
|
-
const sign = input[index] === "-" ? "-" : "";
|
|
566
|
-
if (sign) index += 1;
|
|
567
|
-
return `=${sign}${readInteger()}`;
|
|
568
|
-
}
|
|
569
|
-
return readIdentifier();
|
|
570
|
-
}
|
|
571
|
-
function readInteger() {
|
|
572
|
-
const start = index;
|
|
573
|
-
while (index < input.length && input[index] >= "0" && input[index] <= "9") index += 1;
|
|
574
|
-
if (start === index) throw new Error("ICU 缺少数字");
|
|
575
|
-
return Number(input.slice(start, index));
|
|
576
|
-
}
|
|
577
|
-
function expectChar(char) {
|
|
578
|
-
if (input[index] !== char) throw new Error(`ICU 期望 ${char}`);
|
|
579
|
-
}
|
|
580
|
-
return parseNodes(null, false);
|
|
581
|
-
}
|
|
582
|
-
//#endregion
|
|
583
|
-
//#region src/locale/messages/comments.ts
|
|
584
|
-
function fill$1(template, locale, values) {
|
|
585
|
-
return formatIcu(template, values, locale).replace(/[ \t]{2,}/g, " ").trim();
|
|
586
|
-
}
|
|
587
|
-
const commentsMessages = {
|
|
588
|
-
"en": {
|
|
589
|
-
actionsLabel: (name) => fill$1("Actions for {name}'s comment", "en", { name }),
|
|
590
|
-
addReaction: "Add reaction",
|
|
591
|
-
agentBadge: "Agent",
|
|
592
|
-
agentLogo: (name) => fill$1("{name} logo", "en", { name }),
|
|
593
|
-
chooseReaction: "Choose a reaction",
|
|
594
|
-
commentsLabel: (label) => fill$1("Threads in {label}", "en", { label }),
|
|
595
|
-
copyLink: "Copy comment link",
|
|
596
|
-
currentVersion: "Current version",
|
|
597
|
-
delete: "Delete",
|
|
598
|
-
deleteDescription: (name) => fill$1("Delete {name}'s comment? This action cannot be undone.", "en", { name }),
|
|
599
|
-
deleteFailed: "This comment couldn't be deleted.",
|
|
600
|
-
deleteFailedRetry: "This comment couldn't be deleted. Try again.",
|
|
601
|
-
deleteTitle: "Delete comment?",
|
|
602
|
-
edit: "Edit",
|
|
603
|
-
editFailed: "Your edit couldn't be saved.",
|
|
604
|
-
editPlaceholder: "Edit comment",
|
|
605
|
-
edited: "Edited",
|
|
606
|
-
editingContext: "Editing comment",
|
|
607
|
-
emptyDescription: "Start the discussion with a comment.",
|
|
608
|
-
emptyReadOnlyDescription: "There is no discussion on this item.",
|
|
609
|
-
emptyTitle: "No comments yet",
|
|
610
|
-
hideReplies: "Hide replies",
|
|
611
|
-
historyEmptyDescription: "This comment has no earlier versions.",
|
|
612
|
-
historyEmptyTitle: "No edit history",
|
|
613
|
-
historyFailed: "Edit history couldn't load",
|
|
614
|
-
historyLoadFailed: "The comment's edit history couldn't be loaded. Try again.",
|
|
615
|
-
historyLoading: "Loading edit history",
|
|
616
|
-
historySubtitle: (name) => fill$1("Comment by {name}", "en", { name }),
|
|
617
|
-
historyTitle: "Edit history",
|
|
618
|
-
label: "Comments",
|
|
619
|
-
linkCopied: "Comment link copied",
|
|
620
|
-
loadFailed: "Comments couldn't load",
|
|
621
|
-
loadOlder: "Load earlier comments",
|
|
622
|
-
loading: "Loading comments",
|
|
623
|
-
olderFailed: "Earlier comments couldn't load",
|
|
624
|
-
otherReactors: (count) => fill$1("{count, plural, one {# other} other {# others}}", "en", { count }),
|
|
625
|
-
outdated: "Outdated",
|
|
626
|
-
postFailed: "Your comment couldn't be posted.",
|
|
627
|
-
reactionCelebrate: "Celebrate",
|
|
628
|
-
reactionCount: (reaction, count) => fill$1("{reaction}: {count, number}", "en", {
|
|
629
|
-
reaction,
|
|
630
|
-
count
|
|
631
|
-
}),
|
|
632
|
-
reactionFailed: "Your reaction couldn't be saved.",
|
|
633
|
-
reactionLaugh: "Haha",
|
|
634
|
-
reactionLike: "Like",
|
|
635
|
-
reactionLove: "Love",
|
|
636
|
-
reactionSad: "Sad",
|
|
637
|
-
reactionWow: "Wow",
|
|
638
|
-
reopen: "Reopen",
|
|
639
|
-
reopenFailed: "This thread couldn't be reopened.",
|
|
640
|
-
reply: "Reply",
|
|
641
|
-
replyFailed: "Your reply couldn't be posted.",
|
|
642
|
-
replyPlaceholder: (name) => fill$1("Reply to {name}…", "en", { name }),
|
|
643
|
-
replyingContext: (name) => fill$1("Replying to {name}", "en", { name }),
|
|
644
|
-
resolve: "Mark as resolved",
|
|
645
|
-
resolveFailed: "This thread couldn't be resolved.",
|
|
646
|
-
resolved: "Resolved",
|
|
647
|
-
resolvedBy: (name) => fill$1("Resolved by {name}", "en", { name }),
|
|
648
|
-
retry: "Retry",
|
|
649
|
-
retryFailed: "Retrying didn't work.",
|
|
650
|
-
sendFailed: "Couldn't send this comment.",
|
|
651
|
-
threadLabel: (name) => fill$1("Thread by {name}", "en", { name }),
|
|
652
|
-
unread: "New",
|
|
653
|
-
unsavedDraft: "Unsaved draft. Dismiss again to discard it.",
|
|
654
|
-
versionAuthor: (name) => fill$1("by {name}", "en", { name }),
|
|
655
|
-
viewHistory: "View edit history",
|
|
656
|
-
viewReplies: (count) => fill$1("View {count, plural, one {# reply} other {# replies}}", "en", { count }),
|
|
657
|
-
reactionsLabel: "Reactions",
|
|
658
|
-
reactionWith: (count, emoji) => `${count} ${count === 1 ? "reaction" : "reactions"} with ${emoji}`
|
|
659
|
-
},
|
|
660
|
-
"zh-CN": {
|
|
661
|
-
actionsLabel: (name) => fill$1("{name} 这条评论的操作", "zh-CN", { name }),
|
|
662
|
-
addReaction: "添加回应",
|
|
663
|
-
agentBadge: "智能体",
|
|
664
|
-
agentLogo: (name) => fill$1("{name} 的标志", "zh-CN", { name }),
|
|
665
|
-
chooseReaction: "选择回应",
|
|
666
|
-
commentsLabel: (label) => fill$1("{label} 中的讨论串", "zh-CN", { label }),
|
|
667
|
-
copyLink: "复制评论链接",
|
|
668
|
-
currentVersion: "当前版本",
|
|
669
|
-
delete: "删除",
|
|
670
|
-
deleteDescription: (name) => fill$1("要删除 {name} 的评论吗?此操作无法撤销。", "zh-CN", { name }),
|
|
671
|
-
deleteFailed: "这条评论没能删除。",
|
|
672
|
-
deleteFailedRetry: "这条评论没能删除。请再试一次。",
|
|
673
|
-
deleteTitle: "删除评论?",
|
|
674
|
-
edit: "编辑",
|
|
675
|
-
editFailed: "这次编辑没能保存。",
|
|
676
|
-
editPlaceholder: "编辑评论",
|
|
677
|
-
edited: "已编辑",
|
|
678
|
-
editingContext: "正在编辑评论",
|
|
679
|
-
emptyDescription: "写一条评论,开始讨论。",
|
|
680
|
-
emptyReadOnlyDescription: "这项还没有讨论。",
|
|
681
|
-
emptyTitle: "还没有评论",
|
|
682
|
-
hideReplies: "隐藏回复",
|
|
683
|
-
historyEmptyDescription: "这条评论没有更早的版本。",
|
|
684
|
-
historyEmptyTitle: "没有编辑历史",
|
|
685
|
-
historyFailed: "编辑历史没能加载",
|
|
686
|
-
historyLoadFailed: "这条评论的编辑历史没能加载。请再试一次。",
|
|
687
|
-
historyLoading: "正在加载编辑历史",
|
|
688
|
-
historySubtitle: (name) => fill$1("{name} 的评论", "zh-CN", { name }),
|
|
689
|
-
historyTitle: "编辑历史",
|
|
690
|
-
label: "评论",
|
|
691
|
-
linkCopied: "评论链接已复制",
|
|
692
|
-
loadFailed: "评论没能加载",
|
|
693
|
-
loadOlder: "加载更早的评论",
|
|
694
|
-
loading: "正在加载评论",
|
|
695
|
-
olderFailed: "更早的评论没能加载",
|
|
696
|
-
otherReactors: (count) => fill$1("{count, plural, other {另外 # 人}}", "zh-CN", { count }),
|
|
697
|
-
outdated: "已过期",
|
|
698
|
-
postFailed: "这条评论没能发出。",
|
|
699
|
-
reactionCelebrate: "庆祝",
|
|
700
|
-
reactionCount: (reaction, count) => fill$1("{reaction}:{count, number}", "zh-CN", {
|
|
701
|
-
reaction,
|
|
702
|
-
count
|
|
703
|
-
}),
|
|
704
|
-
reactionFailed: "这次回应没能保存。",
|
|
705
|
-
reactionLaugh: "哈哈",
|
|
706
|
-
reactionLike: "赞",
|
|
707
|
-
reactionLove: "喜欢",
|
|
708
|
-
reactionSad: "难过",
|
|
709
|
-
reactionWow: "哇",
|
|
710
|
-
reopen: "重新打开",
|
|
711
|
-
reopenFailed: "这个讨论串没能重新打开。",
|
|
712
|
-
reply: "回复",
|
|
713
|
-
replyFailed: "这条回复没能发出。",
|
|
714
|
-
replyPlaceholder: (name) => fill$1("回复 {name}…", "zh-CN", { name }),
|
|
715
|
-
replyingContext: (name) => fill$1("正在回复 {name}", "zh-CN", { name }),
|
|
716
|
-
resolve: "标为已解决",
|
|
717
|
-
resolveFailed: "这个讨论串没能标为已解决。",
|
|
718
|
-
resolved: "已解决",
|
|
719
|
-
resolvedBy: (name) => fill$1("由 {name} 标为已解决", "zh-CN", { name }),
|
|
720
|
-
retry: "重试",
|
|
721
|
-
retryFailed: "重试没有成功。",
|
|
722
|
-
sendFailed: "这条评论没能发出。",
|
|
723
|
-
threadLabel: (name) => fill$1("{name} 的讨论串", "zh-CN", { name }),
|
|
724
|
-
unread: "新",
|
|
725
|
-
unsavedDraft: "草稿还没保存。再关闭一次就会丢掉。",
|
|
726
|
-
versionAuthor: (name) => fill$1("由 {name}", "zh-CN", { name }),
|
|
727
|
-
viewHistory: "查看编辑历史",
|
|
728
|
-
viewReplies: (count) => fill$1("查看 {count, plural, other {# 条回复}}", "zh-CN", { count }),
|
|
729
|
-
reactionsLabel: "回应",
|
|
730
|
-
reactionWith: (count, emoji) => `${count} 次 ${emoji} 回应`
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
//#endregion
|
|
734
|
-
//#region src/locale/messages/context-menu.ts
|
|
735
|
-
const contextMenuMessages = {
|
|
736
|
-
"en": { label: "Context menu" },
|
|
737
|
-
"zh-CN": { label: "快捷菜单" }
|
|
738
|
-
};
|
|
739
|
-
//#endregion
|
|
740
|
-
//#region src/locale/messages/date-input.ts
|
|
741
|
-
const dateInputMessages = {
|
|
742
|
-
"en": {
|
|
743
|
-
placeholder: "Select a date",
|
|
744
|
-
dialogLabel: "Choose date",
|
|
745
|
-
openCalendar: "Open calendar",
|
|
746
|
-
closeCalendar: "Close calendar",
|
|
747
|
-
toggleCalendarClose: "Close calendar",
|
|
748
|
-
clear: (label) => clearLabel(label, "Clear", "Clear "),
|
|
749
|
-
invalidDate: "Invalid date",
|
|
750
|
-
loading: "Loading",
|
|
751
|
-
resetPicking: "Reset",
|
|
752
|
-
savePicking: "Save",
|
|
753
|
-
doneChoosingMonth: "Done",
|
|
754
|
-
chooseMonthYear: (monthYear) => `${monthYear}, Choose month and year`,
|
|
755
|
-
monthWheel: "Month",
|
|
756
|
-
yearWheel: "Year"
|
|
757
|
-
},
|
|
758
|
-
"zh-CN": {
|
|
759
|
-
placeholder: "选择日期",
|
|
760
|
-
dialogLabel: "选择日期",
|
|
761
|
-
openCalendar: "打开日历",
|
|
762
|
-
closeCalendar: "关闭日历",
|
|
763
|
-
toggleCalendarClose: "收起日历",
|
|
764
|
-
clear: (label) => clearLabel(label, "清除", "清除"),
|
|
765
|
-
invalidDate: "日期无效",
|
|
766
|
-
loading: "正在加载",
|
|
767
|
-
resetPicking: "重置",
|
|
768
|
-
savePicking: "保存",
|
|
769
|
-
doneChoosingMonth: "完成",
|
|
770
|
-
chooseMonthYear: (monthYear) => `${monthYear},切换月份和年份`,
|
|
771
|
-
monthWheel: "月份",
|
|
772
|
-
yearWheel: "年份"
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
//#endregion
|
|
776
|
-
//#region src/locale/messages/date-range-input.ts
|
|
777
|
-
const dateRangeInputMessages = {
|
|
778
|
-
"en": {
|
|
779
|
-
placeholder: "Select date range",
|
|
780
|
-
dialogLabel: "Choose date range",
|
|
781
|
-
clear: (label) => clearLabel(label, "Clear", "Clear "),
|
|
782
|
-
presetDateRanges: "Preset date ranges"
|
|
783
|
-
},
|
|
784
|
-
"zh-CN": {
|
|
785
|
-
placeholder: "选择日期范围",
|
|
786
|
-
dialogLabel: "选择日期范围",
|
|
787
|
-
clear: (label) => clearLabel(label, "清除", "清除"),
|
|
788
|
-
presetDateRanges: "快捷日期范围"
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
//#endregion
|
|
792
|
-
//#region src/locale/messages/date-time-input.ts
|
|
793
|
-
const dateTimeInputMessages = {
|
|
794
|
-
"en": {
|
|
795
|
-
dateLabel: "Date",
|
|
796
|
-
timeLabel: "Time",
|
|
797
|
-
clear: (label) => clearLabel(label, "Clear", "Clear "),
|
|
798
|
-
placeholder: "Select a date",
|
|
799
|
-
timePlaceholder: "Select a time",
|
|
800
|
-
dialogLabel: "Choose date and time",
|
|
801
|
-
timeSuffix: (label) => `${label} time`,
|
|
802
|
-
timeOptionsLabel: (label) => `${label} options`,
|
|
803
|
-
pickerMode: "Date/time section",
|
|
804
|
-
openTimePicker: (label) => `Open ${label}`,
|
|
805
|
-
saveDatePicking: "Save date",
|
|
806
|
-
hourWheel: "Hour",
|
|
807
|
-
minuteWheel: "Minute",
|
|
808
|
-
secondWheel: "Second",
|
|
809
|
-
meridiemWheel: "AM/PM",
|
|
810
|
-
meridiemAM: "AM",
|
|
811
|
-
meridiemPM: "PM"
|
|
812
|
-
},
|
|
813
|
-
"zh-CN": {
|
|
814
|
-
dateLabel: "日期",
|
|
815
|
-
timeLabel: "时间",
|
|
816
|
-
clear: (label) => clearLabel(label, "清除", "清除"),
|
|
817
|
-
placeholder: "选择日期",
|
|
818
|
-
timePlaceholder: "选择时间",
|
|
819
|
-
dialogLabel: "选择日期和时间",
|
|
820
|
-
timeSuffix: (label) => `${label}的时间`,
|
|
821
|
-
timeOptionsLabel: (label) => `${label}选项`,
|
|
822
|
-
pickerMode: "切换日期或时间",
|
|
823
|
-
openTimePicker: (label) => `打开${label}`,
|
|
824
|
-
saveDatePicking: "确定日期",
|
|
825
|
-
hourWheel: "小时",
|
|
826
|
-
minuteWheel: "分钟",
|
|
827
|
-
secondWheel: "秒",
|
|
828
|
-
meridiemWheel: "上午/下午",
|
|
829
|
-
meridiemAM: "上午",
|
|
830
|
-
meridiemPM: "下午"
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
//#endregion
|
|
834
|
-
//#region src/locale/messages/dialog.ts
|
|
835
|
-
const dialogMessages = {
|
|
836
|
-
"en": { close: "Close" },
|
|
837
|
-
"zh-CN": { close: "关闭" }
|
|
838
|
-
};
|
|
839
|
-
//#endregion
|
|
840
|
-
//#region src/locale/messages/dropdown-menu.ts
|
|
841
|
-
const dropdownMenuMessages = {
|
|
842
|
-
"en": {
|
|
843
|
-
label: "Menu",
|
|
844
|
-
back: "Back",
|
|
845
|
-
backTo: (parent) => `Back to ${parent}`
|
|
846
|
-
},
|
|
847
|
-
"zh-CN": {
|
|
848
|
-
label: "菜单",
|
|
849
|
-
back: "返回",
|
|
850
|
-
backTo: (parent) => `返回到${parent}`
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
//#endregion
|
|
854
|
-
//#region src/locale/messages/emoji-picker.ts
|
|
855
|
-
function fill(template, locale, values) {
|
|
856
|
-
return formatIcu(template, values, locale).replace(/[ \t]{2,}/g, " ").trim();
|
|
857
|
-
}
|
|
858
|
-
const emojiPickerMessages = {
|
|
859
|
-
"en": {
|
|
860
|
-
frequentlyUsed: "Frequently used",
|
|
861
|
-
groupActivities: "Activities",
|
|
862
|
-
groupAnimalsNature: "Animals & nature",
|
|
863
|
-
groupFlags: "Flags",
|
|
864
|
-
groupFoodDrink: "Food & drink",
|
|
865
|
-
groupObjects: "Objects",
|
|
866
|
-
groupPeopleBody: "People & body",
|
|
867
|
-
groupSmileysEmotion: "Smileys & emotion",
|
|
868
|
-
groupSymbols: "Symbols",
|
|
869
|
-
groupTravelPlaces: "Travel & places",
|
|
870
|
-
label: "Emoji",
|
|
871
|
-
loadFailed: "More emoji couldn't be loaded.",
|
|
872
|
-
loading: "Loading emoji",
|
|
873
|
-
noResults: (query) => fill("No emoji match “{query}”", "en", { query }),
|
|
874
|
-
searchLabel: "Search emoji",
|
|
875
|
-
searchResults: "Search results",
|
|
876
|
-
pickLabel: "Pick an emoji",
|
|
877
|
-
reactWith: (name) => `React with ${name}`
|
|
878
|
-
},
|
|
879
|
-
"zh-CN": {
|
|
880
|
-
frequentlyUsed: "常用",
|
|
881
|
-
groupActivities: "活动",
|
|
882
|
-
groupAnimalsNature: "动物与自然",
|
|
883
|
-
groupFlags: "旗帜",
|
|
884
|
-
groupFoodDrink: "食物与饮品",
|
|
885
|
-
groupObjects: "物品",
|
|
886
|
-
groupPeopleBody: "人物与身体",
|
|
887
|
-
groupSmileysEmotion: "表情与情绪",
|
|
888
|
-
groupSymbols: "符号",
|
|
889
|
-
groupTravelPlaces: "旅行与地点",
|
|
890
|
-
label: "表情",
|
|
891
|
-
loadFailed: "更多表情没能加载。",
|
|
892
|
-
loading: "正在加载表情",
|
|
893
|
-
noResults: (query) => fill("没有和“{query}”匹配的表情", "zh-CN", { query }),
|
|
894
|
-
searchLabel: "搜索表情",
|
|
895
|
-
searchResults: "搜索结果",
|
|
896
|
-
pickLabel: "选择表情",
|
|
897
|
-
reactWith: (name) => `用${name}回应`
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
//#endregion
|
|
901
|
-
//#region src/locale/messages/field.ts
|
|
902
|
-
const fieldMessages = {
|
|
903
|
-
"en": {
|
|
904
|
-
optional: "Optional",
|
|
905
|
-
required: "Required",
|
|
906
|
-
labelTooltip: (label) => `About ${label}`
|
|
907
|
-
},
|
|
908
|
-
"zh-CN": {
|
|
909
|
-
optional: "可选",
|
|
910
|
-
required: "必填",
|
|
911
|
-
labelTooltip: (label) => `关于${label}`
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
//#endregion
|
|
915
|
-
//#region src/locale/messages/file-input.ts
|
|
916
|
-
const fileInputMessages = {
|
|
917
|
-
"en": {
|
|
918
|
-
placeholder: "Choose file",
|
|
919
|
-
placeholderMultiple: "Choose files",
|
|
920
|
-
clear: "Clear",
|
|
921
|
-
clearField: (label) => clearLabel(label, "Clear", "Clear "),
|
|
922
|
-
required: "Required",
|
|
923
|
-
dropHint: "Drop files here",
|
|
924
|
-
triggerWithFiles: (label, fileNames) => `${label}, ${fileNames}`,
|
|
925
|
-
fileSelected: (fileName) => `1 file selected: ${fileName}`,
|
|
926
|
-
filesSelected: (count) => `${count} files selected`,
|
|
927
|
-
errorType: (fileName) => `"${fileName}" is not an accepted file type`,
|
|
928
|
-
errorSize: (fileName, maxSize) => `"${fileName}" exceeds ${maxSize} limit`,
|
|
929
|
-
errorCount: (maxFiles) => `Maximum ${maxFiles} files allowed`,
|
|
930
|
-
fileSizeBytes: (size) => `${size} B`,
|
|
931
|
-
fileSizeKilobytes: (size) => `${size} KB`,
|
|
932
|
-
fileSizeMegabytes: (size) => `${size} MB`
|
|
933
|
-
},
|
|
934
|
-
"zh-CN": {
|
|
935
|
-
placeholder: "选择文件",
|
|
936
|
-
placeholderMultiple: "选择文件",
|
|
937
|
-
clear: "清除",
|
|
938
|
-
clearField: (label) => clearLabel(label, "清除", "清除"),
|
|
939
|
-
required: "必填",
|
|
940
|
-
dropHint: "把文件拖到这里",
|
|
941
|
-
triggerWithFiles: (label, fileNames) => `${label},${fileNames}`,
|
|
942
|
-
fileSelected: (fileName) => `已选择 1 个文件:${fileName}`,
|
|
943
|
-
filesSelected: (count) => `已选择 ${count} 个文件`,
|
|
944
|
-
errorType: (fileName) => `不支持“${fileName}”的文件类型`,
|
|
945
|
-
errorSize: (fileName, maxSize) => `“${fileName}”超过了 ${maxSize} 的大小限制`,
|
|
946
|
-
errorCount: (maxFiles) => `最多只能选择 ${maxFiles} 个文件`,
|
|
947
|
-
fileSizeBytes: (size) => `${size} 字节`,
|
|
948
|
-
fileSizeKilobytes: (size) => `${size} KB`,
|
|
949
|
-
fileSizeMegabytes: (size) => `${size} MB`
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
//#endregion
|
|
953
|
-
//#region src/locale/messages/info-tip.ts
|
|
954
|
-
const infoTipMessages = {
|
|
955
|
-
"en": { label: "More information" },
|
|
956
|
-
"zh-CN": { label: "更多信息" }
|
|
957
|
-
};
|
|
958
|
-
//#endregion
|
|
959
|
-
//#region src/locale/messages/input.ts
|
|
960
|
-
const inputMessages = {
|
|
961
|
-
"en": {
|
|
962
|
-
statusError: "Error details",
|
|
963
|
-
statusWarning: "Warning details",
|
|
964
|
-
statusSuccess: "Success details",
|
|
965
|
-
tooltip: "Clear"
|
|
966
|
-
},
|
|
967
|
-
"zh-CN": {
|
|
968
|
-
statusError: "错误详情",
|
|
969
|
-
statusWarning: "警告详情",
|
|
970
|
-
statusSuccess: "成功详情",
|
|
971
|
-
tooltip: "清除"
|
|
972
|
-
}
|
|
973
|
-
};
|
|
974
|
-
//#endregion
|
|
975
|
-
//#region src/locale/messages/kbd.ts
|
|
976
|
-
const kbdMessages = {
|
|
977
|
-
"en": {
|
|
978
|
-
alt: "Alt",
|
|
979
|
-
backspace: "Backspace",
|
|
980
|
-
command: "Command",
|
|
981
|
-
control: "Control",
|
|
982
|
-
controlShort: "Ctrl",
|
|
983
|
-
down: "Down arrow",
|
|
984
|
-
enter: "Enter",
|
|
985
|
-
escape: "Escape",
|
|
986
|
-
escapeShort: "Esc",
|
|
987
|
-
left: "Left arrow",
|
|
988
|
-
plus: "Plus",
|
|
989
|
-
right: "Right arrow",
|
|
990
|
-
shift: "Shift",
|
|
991
|
-
tab: "Tab",
|
|
992
|
-
up: "Up arrow",
|
|
993
|
-
shortcut: (shortcut, key) => `${shortcut} + ${key}`
|
|
994
|
-
},
|
|
995
|
-
"zh-CN": {
|
|
996
|
-
alt: "Alt",
|
|
997
|
-
backspace: "退格",
|
|
998
|
-
command: "Command",
|
|
999
|
-
control: "Control",
|
|
1000
|
-
controlShort: "Ctrl",
|
|
1001
|
-
down: "下方向键",
|
|
1002
|
-
enter: "回车",
|
|
1003
|
-
escape: "Esc",
|
|
1004
|
-
escapeShort: "Esc",
|
|
1005
|
-
left: "左方向键",
|
|
1006
|
-
plus: "加号",
|
|
1007
|
-
right: "右方向键",
|
|
1008
|
-
shift: "Shift",
|
|
1009
|
-
tab: "Tab",
|
|
1010
|
-
up: "上方向键",
|
|
1011
|
-
shortcut: (shortcut, key) => `${shortcut} + ${key}`
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
|
-
//#endregion
|
|
1015
|
-
//#region src/locale/messages/keyboard-hint.ts
|
|
1016
|
-
const keyboardHintMessages = {
|
|
1017
|
-
"en": { navigate: "to navigate" },
|
|
1018
|
-
"zh-CN": { navigate: "移动" }
|
|
1019
|
-
};
|
|
1020
|
-
//#endregion
|
|
1021
|
-
//#region src/locale/messages/layout.ts
|
|
1022
|
-
const layoutMessages = {
|
|
1023
|
-
"en": {
|
|
1024
|
-
skipToContent: "Skip to content",
|
|
1025
|
-
resizeHandle: "Resize handle",
|
|
1026
|
-
collapsed: "Collapsed",
|
|
1027
|
-
mobileNavigation: "Mobile navigation"
|
|
1028
|
-
},
|
|
1029
|
-
"zh-CN": {
|
|
1030
|
-
skipToContent: "跳到正文",
|
|
1031
|
-
resizeHandle: "拖拽分隔条",
|
|
1032
|
-
collapsed: "已收起",
|
|
1033
|
-
mobileNavigation: "移动端导航"
|
|
1034
|
-
}
|
|
1035
|
-
};
|
|
1036
|
-
//#endregion
|
|
1037
|
-
//#region src/locale/messages/lightbox.ts
|
|
1038
|
-
const lightboxMessages = {
|
|
1039
|
-
"en": {
|
|
1040
|
-
close: "Close",
|
|
1041
|
-
previous: "Previous",
|
|
1042
|
-
next: "Next",
|
|
1043
|
-
mediaViewer: "Media viewer",
|
|
1044
|
-
zoom: "Zoom",
|
|
1045
|
-
zoomedIn: "Zoomed in, use arrow keys to pan",
|
|
1046
|
-
zoomedOut: "Zoomed out",
|
|
1047
|
-
captionMore: "more",
|
|
1048
|
-
captionLess: "less",
|
|
1049
|
-
imagePosition: (index, total) => `Image ${formatCount(index, "en")} of ${formatCount(total, "en")}`,
|
|
1050
|
-
mediaPosition: (alt, index, total) => `${alt}, ${formatCount(index, "en")} of ${formatCount(total, "en")}`
|
|
1051
|
-
},
|
|
1052
|
-
"zh-CN": {
|
|
1053
|
-
close: "关闭",
|
|
1054
|
-
previous: "上一个",
|
|
1055
|
-
next: "下一个",
|
|
1056
|
-
mediaViewer: "媒体查看器",
|
|
1057
|
-
zoom: "缩放",
|
|
1058
|
-
zoomedIn: "已放大,使用箭头键平移",
|
|
1059
|
-
zoomedOut: "已缩小",
|
|
1060
|
-
captionMore: "更多",
|
|
1061
|
-
captionLess: "收起",
|
|
1062
|
-
imagePosition: (index, total) => `第 ${formatCount(index, "zh-CN")} 张图片,共 ${formatCount(total, "zh-CN")} 张`,
|
|
1063
|
-
mediaPosition: (alt, index, total) => `${alt},第 ${formatCount(index, "zh-CN")} 项,共 ${formatCount(total, "zh-CN")} 项`
|
|
1064
|
-
}
|
|
1065
|
-
};
|
|
1066
|
-
//#endregion
|
|
1067
|
-
//#region src/locale/messages/list-input.ts
|
|
1068
|
-
const listInputMessages = {
|
|
1069
|
-
"en": {
|
|
1070
|
-
emptyTitle: (itemName) => `No ${itemName}s yet`,
|
|
1071
|
-
emptyDescription: (itemName) => `Add a ${itemName} to get started.`,
|
|
1072
|
-
addItem: (itemName) => `Add ${itemName}`,
|
|
1073
|
-
removeItem: (itemName, position) => `Remove ${itemName} ${formatCount(position, "en")}`,
|
|
1074
|
-
removeUnavailable: "Remove is unavailable while the list is disabled",
|
|
1075
|
-
reorderItem: (itemName, position) => `Reorder ${itemName} ${formatCount(position, "en")}`,
|
|
1076
|
-
fieldLabelWithPosition: (header, itemName, position, total) => `${header}, ${itemName} ${formatCount(position, "en")} of ${formatCount(total, "en")}`,
|
|
1077
|
-
reorderInstructions: "Use Arrow Up or Arrow Down to move this item one position. Press Space or Enter to pick it up for extended keyboard reordering.",
|
|
1078
|
-
announceAdded: (itemName, position) => `Added ${itemName} ${formatCount(position, "en")}.`,
|
|
1079
|
-
announceRemoved: (itemName, position) => `Removed ${itemName} ${formatCount(position, "en")}.`,
|
|
1080
|
-
announceGrabbed: (itemName, position) => `${itemName} ${formatCount(position, "en")} grabbed. Use arrow keys to move, Space or Enter to drop, and Escape to cancel.`,
|
|
1081
|
-
announceMovedToPosition: (itemName, position, total) => `${itemName} moved to position ${formatCount(position, "en")} of ${formatCount(total, "en")}.`,
|
|
1082
|
-
announceReorderCancelled: "Reordering cancelled.",
|
|
1083
|
-
announceReturnedToPosition: (itemName, position) => `${itemName} returned to position ${formatCount(position, "en")}.`,
|
|
1084
|
-
announceDropped: (itemName, position, total) => `${itemName} dropped at position ${formatCount(position, "en")} of ${formatCount(total, "en")}.`,
|
|
1085
|
-
alreadyAtBoundary: (itemName, boundary) => `This ${itemName} is already ${boundary === "first" ? "first" : boundary === "last" ? "last" : ""}.`
|
|
1086
|
-
},
|
|
1087
|
-
"zh-CN": {
|
|
1088
|
-
emptyTitle: (itemName) => `还没有${itemName}`,
|
|
1089
|
-
emptyDescription: (itemName) => `添加一个${itemName}就可以开始了。`,
|
|
1090
|
-
addItem: (itemName) => `添加${itemName}`,
|
|
1091
|
-
removeItem: (itemName, position) => `删除第 ${formatCount(position, "zh-CN")} 个${itemName}`,
|
|
1092
|
-
removeUnavailable: "列表禁用时不能删除",
|
|
1093
|
-
reorderItem: (itemName, position) => `调整第 ${formatCount(position, "zh-CN")} 个${itemName}的顺序`,
|
|
1094
|
-
fieldLabelWithPosition: (header, itemName, position, total) => `${header},${itemName}第 ${formatCount(position, "zh-CN")} 个,共 ${formatCount(total, "zh-CN")} 个`,
|
|
1095
|
-
reorderInstructions: "按上方向键或下方向键把这个条目挪一位。按空格键或回车键可以拿起它,用键盘继续调整顺序。",
|
|
1096
|
-
announceAdded: (itemName, position) => `已添加第 ${formatCount(position, "zh-CN")} 个${itemName}。`,
|
|
1097
|
-
announceRemoved: (itemName, position) => `已删除第 ${formatCount(position, "zh-CN")} 个${itemName}。`,
|
|
1098
|
-
announceGrabbed: (itemName, position) => `已拿起${itemName}第 ${formatCount(position, "zh-CN")} 个。用方向键移动,按空格键或回车键放下,按 Escape 取消。`,
|
|
1099
|
-
announceMovedToPosition: (itemName, position, total) => `${itemName}已移动到第 ${formatCount(position, "zh-CN")} 个,共 ${formatCount(total, "zh-CN")} 个。`,
|
|
1100
|
-
announceReorderCancelled: "已取消调整顺序。",
|
|
1101
|
-
announceReturnedToPosition: (itemName, position) => `${itemName}回到了第 ${formatCount(position, "zh-CN")} 个。`,
|
|
1102
|
-
announceDropped: (itemName, position, total) => `${itemName}已放在第 ${formatCount(position, "zh-CN")} 个,共 ${formatCount(total, "zh-CN")} 个。`,
|
|
1103
|
-
alreadyAtBoundary: (itemName, boundary) => `这个${itemName}已经在${boundary === "first" ? "最前" : boundary === "last" ? "最后" : ""}了。`
|
|
1104
|
-
}
|
|
1105
|
-
};
|
|
1106
|
-
//#endregion
|
|
1107
|
-
//#region src/locale/messages/markdown.ts
|
|
1108
|
-
const markdownMessages = {
|
|
1109
|
-
"en": {
|
|
1110
|
-
headingLink: (title) => title === "" ? "Link to this section" : `Link to ${title}`,
|
|
1111
|
-
headingLinkCopy: (heading) => `Copy link to ${heading}`,
|
|
1112
|
-
headingLinkCopied: "Link copied",
|
|
1113
|
-
table: "Table",
|
|
1114
|
-
taskDone: "Completed",
|
|
1115
|
-
taskList: "Task list",
|
|
1116
|
-
taskPending: "Not completed"
|
|
1117
|
-
},
|
|
1118
|
-
"zh-CN": {
|
|
1119
|
-
headingLink: (title) => title === "" ? "本节链接" : `${title}的链接`,
|
|
1120
|
-
headingLinkCopy: (heading) => `复制“${heading}”的链接`,
|
|
1121
|
-
headingLinkCopied: "链接已复制",
|
|
1122
|
-
table: "表格",
|
|
1123
|
-
taskDone: "已完成",
|
|
1124
|
-
taskList: "任务列表",
|
|
1125
|
-
taskPending: "未完成"
|
|
1126
|
-
}
|
|
1127
|
-
};
|
|
1128
|
-
//#endregion
|
|
1129
|
-
//#region src/locale/messages/metadata-list.ts
|
|
1130
|
-
const metadataListMessages = {
|
|
1131
|
-
"en": {
|
|
1132
|
-
showMore: "Show more",
|
|
1133
|
-
showLess: "Show less"
|
|
1134
|
-
},
|
|
1135
|
-
"zh-CN": {
|
|
1136
|
-
showMore: "显示更多",
|
|
1137
|
-
showLess: "收起"
|
|
1138
|
-
}
|
|
1139
|
-
};
|
|
1140
|
-
//#endregion
|
|
1141
|
-
//#region src/locale/messages/more-menu.ts
|
|
1142
|
-
const moreMenuMessages = {
|
|
1143
|
-
"en": { label: "More options" },
|
|
1144
|
-
"zh-CN": { label: "更多选项" }
|
|
1145
|
-
};
|
|
1146
|
-
//#endregion
|
|
1147
|
-
//#region src/locale/messages/multi-selector.ts
|
|
1148
|
-
const multiSelectorMessages = {
|
|
1149
|
-
"en": {
|
|
1150
|
-
placeholder: "Select…",
|
|
1151
|
-
search: "Search…",
|
|
1152
|
-
searchOptions: "Search options",
|
|
1153
|
-
clear: "Clear",
|
|
1154
|
-
clearAll: (label) => clearLabel(label, "Clear all", "Clear all "),
|
|
1155
|
-
empty: "No options",
|
|
1156
|
-
emptySearch: "No results found",
|
|
1157
|
-
selectAll: "Select all",
|
|
1158
|
-
selectAllPartial: (label) => `${label}, partially selected`,
|
|
1159
|
-
selected: (count) => `${formatCount(count, "en")} selected`,
|
|
1160
|
-
more: (count) => `+${count}`,
|
|
1161
|
-
resultCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "result", "results")}`,
|
|
1162
|
-
create: (query) => `Create "${query}"`,
|
|
1163
|
-
created: (label) => `${label} created`,
|
|
1164
|
-
selectionCleared: "Selection cleared",
|
|
1165
|
-
allSelected: "All selected",
|
|
1166
|
-
selectionCount: (count, total) => `${formatCount(count, "en")} of ${formatCount(total, "en")} selected`,
|
|
1167
|
-
readOnly: "Read only",
|
|
1168
|
-
loading: "Loading"
|
|
1169
|
-
},
|
|
1170
|
-
"zh-CN": {
|
|
1171
|
-
placeholder: "请选择",
|
|
1172
|
-
search: "搜索…",
|
|
1173
|
-
searchOptions: "搜索选项",
|
|
1174
|
-
clear: "清除",
|
|
1175
|
-
clearAll: (label) => clearLabel(label, "清除全部", "清除全部"),
|
|
1176
|
-
empty: "暂无选项",
|
|
1177
|
-
emptySearch: "未找到结果",
|
|
1178
|
-
selectAll: "全选",
|
|
1179
|
-
selectAllPartial: (label) => `${label},已选部分`,
|
|
1180
|
-
selected: (count) => `已选 ${formatCount(count, "zh-CN")} 项`,
|
|
1181
|
-
more: (count) => `+${count}`,
|
|
1182
|
-
resultCount: (count) => `${formatCount(count, "zh-CN")} 个结果`,
|
|
1183
|
-
create: (query) => `创建“${query}”`,
|
|
1184
|
-
created: (label) => `已创建 ${label}`,
|
|
1185
|
-
selectionCleared: "已清空选择",
|
|
1186
|
-
allSelected: "已全部选中",
|
|
1187
|
-
selectionCount: (count, total) => `已选 ${formatCount(count, "zh-CN")} 项,共 ${formatCount(total, "zh-CN")} 项`,
|
|
1188
|
-
readOnly: "只读",
|
|
1189
|
-
loading: "正在加载"
|
|
1190
|
-
}
|
|
1191
|
-
};
|
|
1192
|
-
//#endregion
|
|
1193
|
-
//#region src/locale/messages/nav.ts
|
|
1194
|
-
const navMessages = {
|
|
1195
|
-
"en": {
|
|
1196
|
-
sideNav: "Side navigation",
|
|
1197
|
-
topNav: "Top navigation",
|
|
1198
|
-
mobileNav: "Navigation",
|
|
1199
|
-
collapseSidebar: "Collapse sidebar",
|
|
1200
|
-
expandSidebar: "Expand sidebar",
|
|
1201
|
-
openMenu: "Open menu",
|
|
1202
|
-
topNavOpenMenu: "Open menu",
|
|
1203
|
-
headingDialog: "Navigation menu",
|
|
1204
|
-
topNavHeadingDialog: "Navigation menu",
|
|
1205
|
-
openNavigation: "Open navigation",
|
|
1206
|
-
close: "Close navigation",
|
|
1207
|
-
more: "More",
|
|
1208
|
-
moreItems: (count) => `${count} more`,
|
|
1209
|
-
avatarOverflow: (count) => `${formatCount(count, "en")} more`,
|
|
1210
|
-
avatarNameWithStatus: (name, status) => `${name}, ${status}`,
|
|
1211
|
-
expandItem: (label) => `Expand ${label}`,
|
|
1212
|
-
collapseItem: (label) => `Collapse ${label}`,
|
|
1213
|
-
submenu: (label) => `${label} submenu`,
|
|
1214
|
-
resizeSidebar: "Resize sidebar",
|
|
1215
|
-
opensInNewTab: "(opens in new tab)"
|
|
1216
|
-
},
|
|
1217
|
-
"zh-CN": {
|
|
1218
|
-
sideNav: "侧边导航",
|
|
1219
|
-
topNav: "顶部导航",
|
|
1220
|
-
mobileNav: "导航",
|
|
1221
|
-
collapseSidebar: "收起侧边栏",
|
|
1222
|
-
expandSidebar: "展开侧边栏",
|
|
1223
|
-
openMenu: "打开菜单",
|
|
1224
|
-
topNavOpenMenu: "打开菜单",
|
|
1225
|
-
headingDialog: "导航菜单",
|
|
1226
|
-
topNavHeadingDialog: "导航菜单",
|
|
1227
|
-
openNavigation: "打开导航",
|
|
1228
|
-
close: "关闭导航",
|
|
1229
|
-
more: "更多",
|
|
1230
|
-
moreItems: (count) => `还有 ${count} 项`,
|
|
1231
|
-
avatarOverflow: (count) => `还有 ${formatCount(count, "zh-CN")} 个`,
|
|
1232
|
-
avatarNameWithStatus: (name, status) => `${name},${status}`,
|
|
1233
|
-
expandItem: (label) => `展开${label}`,
|
|
1234
|
-
collapseItem: (label) => `收起${label}`,
|
|
1235
|
-
submenu: (label) => `${label}子菜单`,
|
|
1236
|
-
resizeSidebar: "调整侧边栏宽度",
|
|
1237
|
-
opensInNewTab: "(在新标签页中打开)"
|
|
1238
|
-
}
|
|
1239
|
-
};
|
|
1240
|
-
//#endregion
|
|
1241
|
-
//#region src/locale/messages/number-input.ts
|
|
1242
|
-
const numberInputMessages = {
|
|
1243
|
-
"en": {
|
|
1244
|
-
increment: (label) => clearLabel(label, "Increment", "Increment "),
|
|
1245
|
-
decrement: (label) => clearLabel(label, "Decrement", "Decrement "),
|
|
1246
|
-
clear: (label) => clearLabel(label, "Clear", "Clear "),
|
|
1247
|
-
invalidNumber: "Invalid number"
|
|
1248
|
-
},
|
|
1249
|
-
"zh-CN": {
|
|
1250
|
-
increment: (label) => clearLabel(label, "增加", "增加"),
|
|
1251
|
-
decrement: (label) => clearLabel(label, "减少", "减少"),
|
|
1252
|
-
clear: (label) => clearLabel(label, "清除", "清除"),
|
|
1253
|
-
invalidNumber: "数字无效"
|
|
1254
|
-
}
|
|
1255
|
-
};
|
|
1256
|
-
//#endregion
|
|
1257
|
-
//#region src/locale/messages/outline.ts
|
|
1258
|
-
const outlineMessages = {
|
|
1259
|
-
"en": { label: "Table of contents" },
|
|
1260
|
-
"zh-CN": { label: "目录" }
|
|
1261
|
-
};
|
|
1262
|
-
//#endregion
|
|
1263
|
-
//#region src/locale/messages/pagination.ts
|
|
1264
|
-
const paginationMessages = {
|
|
1265
|
-
"en": {
|
|
1266
|
-
nav: "Pagination",
|
|
1267
|
-
previous: "Previous",
|
|
1268
|
-
next: "Next",
|
|
1269
|
-
previousPage: "Go to previous page",
|
|
1270
|
-
nextPage: "Go to next page",
|
|
1271
|
-
page: (page) => `Page ${formatCount(page, "en")}`,
|
|
1272
|
-
more: "More pages",
|
|
1273
|
-
perPage: "Per page",
|
|
1274
|
-
itemsPerPage: "Items per page",
|
|
1275
|
-
pageSize: (count) => `${count} / page`,
|
|
1276
|
-
total: (total, from, to) => `${formatCount(from, "en")}–${formatCount(to, "en")} of ${formatCount(total, "en")}`,
|
|
1277
|
-
compact: (page, totalPages) => `${page} / ${totalPages}`,
|
|
1278
|
-
pageOf: (page, totalPages) => `Page ${formatCount(page, "en")} of ${formatCount(totalPages, "en")}`,
|
|
1279
|
-
first: "Go to first page",
|
|
1280
|
-
last: "Go to last page",
|
|
1281
|
-
previousBy: (step) => `Back ${step} pages`,
|
|
1282
|
-
nextBy: (step) => `Forward ${step} pages`,
|
|
1283
|
-
previousPages: (step) => `Go back ${formatCount(step, "en")} ${englishPlural(step, "page", "pages")}`,
|
|
1284
|
-
nextPages: (step) => `Go forward ${formatCount(step, "en")} ${englishPlural(step, "page", "pages")}`,
|
|
1285
|
-
pageLabel: "Page",
|
|
1286
|
-
goToPage: "Go to page",
|
|
1287
|
-
goToPageNumber: (page) => `Go to page ${formatCount(page, "en")}`,
|
|
1288
|
-
pageIndicators: "Page indicators",
|
|
1289
|
-
ofTotal: (totalPages) => `/ ${formatCount(totalPages, "en")}`
|
|
1290
|
-
},
|
|
1291
|
-
"zh-CN": {
|
|
1292
|
-
nav: "分页导航",
|
|
1293
|
-
previous: "上一页",
|
|
1294
|
-
next: "下一页",
|
|
1295
|
-
previousPage: "转到上一页",
|
|
1296
|
-
nextPage: "转到下一页",
|
|
1297
|
-
page: (page) => `第 ${formatCount(page, "zh-CN")} 页`,
|
|
1298
|
-
more: "更多页码",
|
|
1299
|
-
perPage: "每页",
|
|
1300
|
-
itemsPerPage: "每页条数",
|
|
1301
|
-
pageSize: (count) => `${count} 条/页`,
|
|
1302
|
-
total: (total, from, to) => `共 ${formatCount(total, "zh-CN")} 条,显示 ${formatCount(from, "zh-CN")}-${formatCount(to, "zh-CN")}`,
|
|
1303
|
-
compact: (page, totalPages) => `${page} / ${totalPages}`,
|
|
1304
|
-
pageOf: (page, totalPages) => `第 ${formatCount(page, "zh-CN")} 页,共 ${formatCount(totalPages, "zh-CN")} 页`,
|
|
1305
|
-
first: "转到第一页",
|
|
1306
|
-
last: "转到最后一页",
|
|
1307
|
-
previousBy: (step) => `后退 ${step} 页`,
|
|
1308
|
-
nextBy: (step) => `前进 ${step} 页`,
|
|
1309
|
-
previousPages: (step) => `向前翻 ${formatCount(step, "zh-CN")} 页`,
|
|
1310
|
-
nextPages: (step) => `向后翻 ${formatCount(step, "zh-CN")} 页`,
|
|
1311
|
-
pageLabel: "页",
|
|
1312
|
-
goToPage: "跳转到指定页",
|
|
1313
|
-
goToPageNumber: (page) => `转到第 ${formatCount(page, "zh-CN")} 页`,
|
|
1314
|
-
pageIndicators: "页码指示",
|
|
1315
|
-
ofTotal: (totalPages) => `/ ${formatCount(totalPages, "zh-CN")}`
|
|
1316
|
-
}
|
|
1317
|
-
};
|
|
1318
|
-
//#endregion
|
|
1319
|
-
//#region src/locale/messages/popover.ts
|
|
1320
|
-
const popoverMessages = {
|
|
1321
|
-
"en": { close: "Close popover" },
|
|
1322
|
-
"zh-CN": { close: "关闭弹出框" }
|
|
1323
|
-
};
|
|
1324
|
-
const powerSearchMessages = {
|
|
1325
|
-
"en": {
|
|
1326
|
-
label: "Search",
|
|
1327
|
-
placeholder: "Search…",
|
|
1328
|
-
clear: "Clear all",
|
|
1329
|
-
results: "Search results",
|
|
1330
|
-
empty: "No results",
|
|
1331
|
-
removeFilter: (label) => `Remove ${label}`,
|
|
1332
|
-
resultCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "result", "results")}`,
|
|
1333
|
-
itemsCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "item", "items")}`,
|
|
1334
|
-
entitiesCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "entity", "entities")}`,
|
|
1335
|
-
filtersCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "filter", "filters")}`,
|
|
1336
|
-
more: (count) => `${formatCount(count, "en")} more`,
|
|
1337
|
-
dateRange: "date range",
|
|
1338
|
-
operators: {
|
|
1339
|
-
contains: "contains",
|
|
1340
|
-
notContains: "does not contain",
|
|
1341
|
-
startsWith: "starts with",
|
|
1342
|
-
notStartsWith: "does not start with",
|
|
1343
|
-
endsWith: "ends with",
|
|
1344
|
-
notEndsWith: "does not end with",
|
|
1345
|
-
is: "is",
|
|
1346
|
-
isNot: "is not",
|
|
1347
|
-
equals: "is",
|
|
1348
|
-
notEquals: "is not",
|
|
1349
|
-
greaterThan: "is greater than",
|
|
1350
|
-
lessThan: "is less than",
|
|
1351
|
-
greaterThanOrEqual: "is greater than or equal to",
|
|
1352
|
-
lessThanOrEqual: "is less than or equal to",
|
|
1353
|
-
before: "is before",
|
|
1354
|
-
after: "is after",
|
|
1355
|
-
between: "is between",
|
|
1356
|
-
isTrue: "is true",
|
|
1357
|
-
isFalse: "is false",
|
|
1358
|
-
isAnyOf: "is any of",
|
|
1359
|
-
isNoneOf: "is none of"
|
|
1360
|
-
},
|
|
1361
|
-
editor: {
|
|
1362
|
-
field: "Field",
|
|
1363
|
-
operator: "Operator",
|
|
1364
|
-
addFilter: "+ Add filter",
|
|
1365
|
-
removeFilter: "Remove filter",
|
|
1366
|
-
group: "Group",
|
|
1367
|
-
groupOperator: "Group operator",
|
|
1368
|
-
delete: "Delete",
|
|
1369
|
-
cancel: "Cancel",
|
|
1370
|
-
apply: "Apply",
|
|
1371
|
-
editing: "Edit filter"
|
|
1372
|
-
},
|
|
1373
|
-
value: {
|
|
1374
|
-
value: "Value",
|
|
1375
|
-
values: "Values",
|
|
1376
|
-
time: "Time",
|
|
1377
|
-
date: "Date",
|
|
1378
|
-
relativeDate: "Relative date",
|
|
1379
|
-
startDate: "Start date",
|
|
1380
|
-
endDate: "End date",
|
|
1381
|
-
entities: "Entities",
|
|
1382
|
-
searchPlaceholder: "Search…",
|
|
1383
|
-
enterValuePlaceholder: "Enter value…",
|
|
1384
|
-
addValuesPlaceholder: "Add values…",
|
|
1385
|
-
enterNumberPlaceholder: "Enter number…",
|
|
1386
|
-
selectPlaceholder: "Select…",
|
|
1387
|
-
selectValuesPlaceholder: "Select values…"
|
|
1388
|
-
}
|
|
1389
|
-
},
|
|
1390
|
-
"zh-CN": {
|
|
1391
|
-
label: "搜索",
|
|
1392
|
-
placeholder: "搜索……",
|
|
1393
|
-
clear: "全部清除",
|
|
1394
|
-
results: "搜索结果",
|
|
1395
|
-
empty: "没有结果",
|
|
1396
|
-
removeFilter: (label) => `移除${label}`,
|
|
1397
|
-
resultCount: (count) => `${formatCount(count, "zh-CN")} 个结果`,
|
|
1398
|
-
itemsCount: (count) => `${formatCount(count, "zh-CN")} 个项目`,
|
|
1399
|
-
entitiesCount: (count) => `${formatCount(count, "zh-CN")} 个实体`,
|
|
1400
|
-
filtersCount: (count) => `${formatCount(count, "zh-CN")} 个筛选条件`,
|
|
1401
|
-
more: (count) => `另外 ${formatCount(count, "zh-CN")} 个`,
|
|
1402
|
-
dateRange: "日期范围",
|
|
1403
|
-
operators: {
|
|
1404
|
-
contains: "包含",
|
|
1405
|
-
notContains: "不包含",
|
|
1406
|
-
startsWith: "开头是",
|
|
1407
|
-
notStartsWith: "开头不是",
|
|
1408
|
-
endsWith: "结尾是",
|
|
1409
|
-
notEndsWith: "结尾不是",
|
|
1410
|
-
is: "是",
|
|
1411
|
-
isNot: "不是",
|
|
1412
|
-
equals: "等于",
|
|
1413
|
-
notEquals: "不等于",
|
|
1414
|
-
greaterThan: "大于",
|
|
1415
|
-
lessThan: "小于",
|
|
1416
|
-
greaterThanOrEqual: "大于或等于",
|
|
1417
|
-
lessThanOrEqual: "小于或等于",
|
|
1418
|
-
before: "早于",
|
|
1419
|
-
after: "晚于",
|
|
1420
|
-
between: "介于",
|
|
1421
|
-
isTrue: "为真",
|
|
1422
|
-
isFalse: "为假",
|
|
1423
|
-
isAnyOf: "是其中任一",
|
|
1424
|
-
isNoneOf: "不是其中任何一个"
|
|
1425
|
-
},
|
|
1426
|
-
editor: {
|
|
1427
|
-
field: "字段",
|
|
1428
|
-
operator: "运算符",
|
|
1429
|
-
addFilter: "+ 添加筛选条件",
|
|
1430
|
-
removeFilter: "移除筛选条件",
|
|
1431
|
-
group: "分组",
|
|
1432
|
-
groupOperator: "组内条件关系",
|
|
1433
|
-
delete: "删除",
|
|
1434
|
-
cancel: "取消",
|
|
1435
|
-
apply: "应用",
|
|
1436
|
-
editing: "编辑筛选条件"
|
|
1437
|
-
},
|
|
1438
|
-
value: {
|
|
1439
|
-
value: "值",
|
|
1440
|
-
values: "值",
|
|
1441
|
-
time: "时间",
|
|
1442
|
-
date: "日期",
|
|
1443
|
-
relativeDate: "相对日期",
|
|
1444
|
-
startDate: "开始日期",
|
|
1445
|
-
endDate: "结束日期",
|
|
1446
|
-
entities: "实体",
|
|
1447
|
-
searchPlaceholder: "搜索……",
|
|
1448
|
-
enterValuePlaceholder: "输入值……",
|
|
1449
|
-
addValuesPlaceholder: "添加值……",
|
|
1450
|
-
enterNumberPlaceholder: "输入数字……",
|
|
1451
|
-
selectPlaceholder: "选择……",
|
|
1452
|
-
selectValuesPlaceholder: "选择值……"
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
//#endregion
|
|
1457
|
-
//#region src/locale/messages/rich-text-editor.ts
|
|
1458
|
-
const richTextEditorMessages = {
|
|
1459
|
-
"en": {
|
|
1460
|
-
tabEscapeHint: "Press Escape then Tab to move focus out of the editor.",
|
|
1461
|
-
toolbar: {
|
|
1462
|
-
label: "Text formatting",
|
|
1463
|
-
actions: "Formatting actions",
|
|
1464
|
-
undo: "Undo",
|
|
1465
|
-
redo: "Redo",
|
|
1466
|
-
historyDivider: "History and block formats",
|
|
1467
|
-
blockFormat: "Block format",
|
|
1468
|
-
formatDivider: "Block and inline formats",
|
|
1469
|
-
paragraph: "Paragraph",
|
|
1470
|
-
heading1: "Heading 1",
|
|
1471
|
-
heading2: "Heading 2",
|
|
1472
|
-
heading3: "Heading 3",
|
|
1473
|
-
bulletedList: "Bulleted list",
|
|
1474
|
-
numberedList: "Numbered list",
|
|
1475
|
-
blockQuote: "Block quote",
|
|
1476
|
-
bold: "Bold",
|
|
1477
|
-
italic: "Italic",
|
|
1478
|
-
underline: "Underline",
|
|
1479
|
-
strikethrough: "Strikethrough",
|
|
1480
|
-
inlineCode: "Inline code",
|
|
1481
|
-
link: "Link"
|
|
1482
|
-
},
|
|
1483
|
-
link: {
|
|
1484
|
-
insertTitle: "Insert link",
|
|
1485
|
-
editTitle: "Edit link",
|
|
1486
|
-
url: "URL",
|
|
1487
|
-
invalidUrl: "Enter a valid http, https, mailto, or tel URL.",
|
|
1488
|
-
remove: "Remove link",
|
|
1489
|
-
cancel: "Cancel",
|
|
1490
|
-
add: "Add link",
|
|
1491
|
-
update: "Update link"
|
|
1492
|
-
}
|
|
1493
|
-
},
|
|
1494
|
-
"zh-CN": {
|
|
1495
|
-
tabEscapeHint: "按 Esc 再按 Tab,可以把焦点移出编辑器。",
|
|
1496
|
-
toolbar: {
|
|
1497
|
-
label: "文字格式",
|
|
1498
|
-
actions: "格式操作",
|
|
1499
|
-
undo: "撤销",
|
|
1500
|
-
redo: "重做",
|
|
1501
|
-
historyDivider: "历史记录与块格式",
|
|
1502
|
-
blockFormat: "块格式",
|
|
1503
|
-
formatDivider: "块格式与行内格式",
|
|
1504
|
-
paragraph: "正文",
|
|
1505
|
-
heading1: "一级标题",
|
|
1506
|
-
heading2: "二级标题",
|
|
1507
|
-
heading3: "三级标题",
|
|
1508
|
-
bulletedList: "无序列表",
|
|
1509
|
-
numberedList: "有序列表",
|
|
1510
|
-
blockQuote: "引用",
|
|
1511
|
-
bold: "加粗",
|
|
1512
|
-
italic: "斜体",
|
|
1513
|
-
underline: "下划线",
|
|
1514
|
-
strikethrough: "删除线",
|
|
1515
|
-
inlineCode: "行内代码",
|
|
1516
|
-
link: "链接"
|
|
1517
|
-
},
|
|
1518
|
-
link: {
|
|
1519
|
-
insertTitle: "插入链接",
|
|
1520
|
-
editTitle: "编辑链接",
|
|
1521
|
-
url: "网址",
|
|
1522
|
-
invalidUrl: "请输入有效的 http、https、mailto 或 tel 网址。",
|
|
1523
|
-
remove: "移除链接",
|
|
1524
|
-
cancel: "取消",
|
|
1525
|
-
add: "添加链接",
|
|
1526
|
-
update: "更新链接"
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
};
|
|
1530
|
-
//#endregion
|
|
1531
|
-
//#region src/locale/messages/selector.ts
|
|
1532
|
-
const selectorMessages = {
|
|
1533
|
-
"en": {
|
|
1534
|
-
placeholder: "Select…",
|
|
1535
|
-
search: "Search…",
|
|
1536
|
-
searchOptions: "Search options",
|
|
1537
|
-
clear: "Clear",
|
|
1538
|
-
clearField: (label) => clearLabel(label, "Clear", "Clear "),
|
|
1539
|
-
empty: "No options",
|
|
1540
|
-
emptySearch: "No results found",
|
|
1541
|
-
resultCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "result", "results")}`,
|
|
1542
|
-
readOnly: "Read only",
|
|
1543
|
-
loading: "Loading"
|
|
1544
|
-
},
|
|
1545
|
-
"zh-CN": {
|
|
1546
|
-
placeholder: "请选择",
|
|
1547
|
-
search: "搜索…",
|
|
1548
|
-
searchOptions: "搜索选项",
|
|
1549
|
-
clear: "清除",
|
|
1550
|
-
clearField: (label) => clearLabel(label, "清除", "清除"),
|
|
1551
|
-
empty: "暂无选项",
|
|
1552
|
-
emptySearch: "未找到结果",
|
|
1553
|
-
resultCount: (count) => `${formatCount(count, "zh-CN")} 个结果`,
|
|
1554
|
-
readOnly: "只读",
|
|
1555
|
-
loading: "正在加载"
|
|
1556
|
-
}
|
|
1557
|
-
};
|
|
1558
|
-
//#endregion
|
|
1559
|
-
//#region src/locale/messages/spinner.ts
|
|
1560
|
-
const spinnerMessages = {
|
|
1561
|
-
"en": { loading: "Loading" },
|
|
1562
|
-
"zh-CN": { loading: "加载中" }
|
|
1563
|
-
};
|
|
1564
|
-
//#endregion
|
|
1565
|
-
//#region src/locale/messages/stepper.ts
|
|
1566
|
-
const stepperMessages = {
|
|
1567
|
-
"en": {
|
|
1568
|
-
progress: "Progress",
|
|
1569
|
-
optional: "Optional",
|
|
1570
|
-
previous: "Previous step",
|
|
1571
|
-
next: "Next step",
|
|
1572
|
-
goToStep: (stepNumber, label) => `Go to step ${formatCount(stepNumber, "en")}: ${label}`,
|
|
1573
|
-
goToStepWithStatus: (stepNumber, label, status) => `Go to step ${formatCount(stepNumber, "en")}: ${label}, ${status}`,
|
|
1574
|
-
status: {
|
|
1575
|
-
completed: "completed",
|
|
1576
|
-
warning: "warning",
|
|
1577
|
-
error: "error"
|
|
1578
|
-
}
|
|
1579
|
-
},
|
|
1580
|
-
"zh-CN": {
|
|
1581
|
-
progress: "进度",
|
|
1582
|
-
optional: "可选",
|
|
1583
|
-
previous: "上一步",
|
|
1584
|
-
next: "下一步",
|
|
1585
|
-
goToStep: (stepNumber, label) => `转到第 ${formatCount(stepNumber, "zh-CN")} 步:${label}`,
|
|
1586
|
-
goToStepWithStatus: (stepNumber, label, status) => `转到第 ${formatCount(stepNumber, "zh-CN")} 步:${label},${status}`,
|
|
1587
|
-
status: {
|
|
1588
|
-
completed: "已完成",
|
|
1589
|
-
warning: "警告",
|
|
1590
|
-
error: "错误"
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
};
|
|
1594
|
-
//#endregion
|
|
1595
|
-
//#region src/locale/messages/switch.ts
|
|
1596
|
-
const switchMessages = {
|
|
1597
|
-
"en": { loading: "Loading" },
|
|
1598
|
-
"zh-CN": { loading: "加载中" }
|
|
1599
|
-
};
|
|
1600
|
-
//#endregion
|
|
1601
|
-
//#region src/locale/messages/tab-list.ts
|
|
1602
|
-
const tabListMessages = {
|
|
1603
|
-
"en": { label: "Tabs" },
|
|
1604
|
-
"zh-CN": { label: "标签页" }
|
|
1605
|
-
};
|
|
1606
|
-
//#endregion
|
|
1607
|
-
//#region src/locale/messages/table.ts
|
|
1608
|
-
const tableMessages = {
|
|
1609
|
-
"en": {
|
|
1610
|
-
label: "Table",
|
|
1611
|
-
noData: "No data",
|
|
1612
|
-
filterAll: "All",
|
|
1613
|
-
reset: "Reset",
|
|
1614
|
-
apply: "Apply",
|
|
1615
|
-
selectAllRows: "Select all rows",
|
|
1616
|
-
selectRow: "Select row",
|
|
1617
|
-
selectRowNamed: (label) => `Select ${label}`,
|
|
1618
|
-
sortAscending: "Sort ascending",
|
|
1619
|
-
sortDescending: "Sort descending",
|
|
1620
|
-
clearSort: "Clear sort",
|
|
1621
|
-
sortedAscending: "ascending",
|
|
1622
|
-
sortedDescending: "descending",
|
|
1623
|
-
sortBy: (label) => `Sort by ${label}`,
|
|
1624
|
-
sortedBy: (label, direction) => `Sort by ${label}, sorted ${direction}`,
|
|
1625
|
-
sortedByWithPriority: (label, direction, rank, total) => `Sort by ${label}, sorted ${direction}, priority ${formatCount(rank, "en")} of ${formatCount(total, "en")}`,
|
|
1626
|
-
filterByColumn: (header) => `Filter ${header}`,
|
|
1627
|
-
bulkActionsLabel: "Bulk actions",
|
|
1628
|
-
clearAll: "Unselect All",
|
|
1629
|
-
selectedCount: (count) => `${formatCount(count, "en")} selected`,
|
|
1630
|
-
paginationLabel: "Table pagination",
|
|
1631
|
-
paginationLabelAbove: (label) => `${label} (top)`,
|
|
1632
|
-
paginationLabelBelow: (label) => `${label} (bottom)`,
|
|
1633
|
-
resizeColumn: (label) => `Resize column ${label}`,
|
|
1634
|
-
expandGroup: (groupKey) => `Expand group ${groupKey}`,
|
|
1635
|
-
collapseGroup: (groupKey) => `Collapse group ${groupKey}`,
|
|
1636
|
-
expandRow: "Expand row",
|
|
1637
|
-
collapseRow: "Collapse row",
|
|
1638
|
-
expandAllRows: "Expand all rows",
|
|
1639
|
-
collapseAllRows: "Collapse all rows",
|
|
1640
|
-
rowExpansion: "Row expansion",
|
|
1641
|
-
rowStatus: "Row status",
|
|
1642
|
-
treeExpandRow: "Expand row",
|
|
1643
|
-
treeCollapseRow: "Collapse row",
|
|
1644
|
-
treeExpandAllRows: "Expand all rows",
|
|
1645
|
-
treeCollapseAllRows: "Collapse all rows"
|
|
1646
|
-
},
|
|
1647
|
-
"zh-CN": {
|
|
1648
|
-
label: "表格",
|
|
1649
|
-
noData: "暂无数据",
|
|
1650
|
-
filterAll: "全部",
|
|
1651
|
-
reset: "重置",
|
|
1652
|
-
apply: "应用",
|
|
1653
|
-
selectAllRows: "选择所有行",
|
|
1654
|
-
selectRow: "选择行",
|
|
1655
|
-
selectRowNamed: (label) => `选择 ${label}`,
|
|
1656
|
-
sortAscending: "升序排序",
|
|
1657
|
-
sortDescending: "降序排序",
|
|
1658
|
-
clearSort: "清除排序",
|
|
1659
|
-
sortedAscending: "升序",
|
|
1660
|
-
sortedDescending: "降序",
|
|
1661
|
-
sortBy: (label) => `按${label}排序`,
|
|
1662
|
-
sortedBy: (label, direction) => `按${label}排序,当前为${direction}`,
|
|
1663
|
-
sortedByWithPriority: (label, direction, rank, total) => `按${label}排序,当前为${direction},优先级 ${formatCount(rank, "zh-CN")}/${formatCount(total, "zh-CN")}`,
|
|
1664
|
-
filterByColumn: (header) => `筛选${header}`,
|
|
1665
|
-
bulkActionsLabel: "批量操作",
|
|
1666
|
-
clearAll: "取消全选",
|
|
1667
|
-
selectedCount: (count) => `已选择 ${formatCount(count, "zh-CN")} 项`,
|
|
1668
|
-
paginationLabel: "表格分页",
|
|
1669
|
-
paginationLabelAbove: (label) => `${label}(顶部)`,
|
|
1670
|
-
paginationLabelBelow: (label) => `${label}(底部)`,
|
|
1671
|
-
resizeColumn: (label) => `调整列宽 ${label}`,
|
|
1672
|
-
expandGroup: (groupKey) => `展开分组 ${groupKey}`,
|
|
1673
|
-
collapseGroup: (groupKey) => `折叠分组 ${groupKey}`,
|
|
1674
|
-
expandRow: "展开行",
|
|
1675
|
-
collapseRow: "折叠行",
|
|
1676
|
-
expandAllRows: "展开所有行",
|
|
1677
|
-
collapseAllRows: "折叠所有行",
|
|
1678
|
-
rowExpansion: "行展开",
|
|
1679
|
-
rowStatus: "行状态",
|
|
1680
|
-
treeExpandRow: "展开行",
|
|
1681
|
-
treeCollapseRow: "折叠行",
|
|
1682
|
-
treeExpandAllRows: "展开所有行",
|
|
1683
|
-
treeCollapseAllRows: "折叠所有行"
|
|
1684
|
-
}
|
|
1685
|
-
};
|
|
1686
|
-
//#endregion
|
|
1687
|
-
//#region src/locale/messages/text-area.ts
|
|
1688
|
-
const textAreaMessages = {
|
|
1689
|
-
"en": {
|
|
1690
|
-
charactersRemaining: (count) => `${formatCount(count, "en")} ${englishPlural(count, "character", "characters")} remaining`,
|
|
1691
|
-
charactersOverLimit: (count) => `${formatCount(count, "en")} ${englishPlural(count, "character", "characters")} over the limit`
|
|
1692
|
-
},
|
|
1693
|
-
"zh-CN": {
|
|
1694
|
-
charactersRemaining: (count) => `还可以输入 ${formatCount(count, "zh-CN")} 个字符`,
|
|
1695
|
-
charactersOverLimit: (count) => `已超出 ${formatCount(count, "zh-CN")} 个字符`
|
|
1696
|
-
}
|
|
1697
|
-
};
|
|
1698
|
-
//#endregion
|
|
1699
|
-
//#region src/locale/messages/text-input.ts
|
|
1700
|
-
const textInputMessages = {
|
|
1701
|
-
"en": { clear: (label) => clearLabel(label, "Clear", "Clear ") },
|
|
1702
|
-
"zh-CN": { clear: (label) => clearLabel(label, "清除", "清除") }
|
|
1703
|
-
};
|
|
1704
|
-
//#endregion
|
|
1705
|
-
//#region src/locale/messages/thumbnail.ts
|
|
1706
|
-
const thumbnailMessages = {
|
|
1707
|
-
"en": {
|
|
1708
|
-
remove: (accessibleName) => `Remove ${accessibleName}`,
|
|
1709
|
-
open: (accessibleName) => `Open ${accessibleName}`,
|
|
1710
|
-
fallbackName: "Thumbnail"
|
|
1711
|
-
},
|
|
1712
|
-
"zh-CN": {
|
|
1713
|
-
remove: (accessibleName) => `移除 ${accessibleName}`,
|
|
1714
|
-
open: (accessibleName) => `打开 ${accessibleName}`,
|
|
1715
|
-
fallbackName: "缩略图"
|
|
1716
|
-
}
|
|
1717
|
-
};
|
|
1718
|
-
//#endregion
|
|
1719
|
-
//#region src/locale/messages/time-input.ts
|
|
1720
|
-
const timeInputMessages = {
|
|
1721
|
-
"en": {
|
|
1722
|
-
placeholder: "Select a time",
|
|
1723
|
-
formatHint12: "e.g., 2:30 PM",
|
|
1724
|
-
formatHint24: "e.g., 14:30",
|
|
1725
|
-
outOfRange: "Time is outside the allowed range",
|
|
1726
|
-
loading: "Loading",
|
|
1727
|
-
clear: (label) => clearLabel(label, "Clear", "Clear "),
|
|
1728
|
-
invalidTime: "Invalid time",
|
|
1729
|
-
openPicker: (label) => `Open ${label}`
|
|
1730
|
-
},
|
|
1731
|
-
"zh-CN": {
|
|
1732
|
-
placeholder: "选择时间",
|
|
1733
|
-
formatHint12: "例如 2:30 PM",
|
|
1734
|
-
formatHint24: "例如 14:30",
|
|
1735
|
-
outOfRange: "时间不在允许的范围内",
|
|
1736
|
-
loading: "加载中",
|
|
1737
|
-
clear: (label) => clearLabel(label, "清除", "清除"),
|
|
1738
|
-
invalidTime: "时间无效",
|
|
1739
|
-
openPicker: (label) => `打开${label}`
|
|
1740
|
-
}
|
|
1741
|
-
};
|
|
1742
|
-
//#endregion
|
|
1743
|
-
//#region src/locale/messages/timestamp.ts
|
|
1744
|
-
const timestampMessages = {
|
|
1745
|
-
"en": {
|
|
1746
|
-
copyValue: (value) => `Copy ${value}`,
|
|
1747
|
-
copy: "Copy",
|
|
1748
|
-
copied: "Copied",
|
|
1749
|
-
detailsLabel: "Timestamp details"
|
|
1750
|
-
},
|
|
1751
|
-
"zh-CN": {
|
|
1752
|
-
copyValue: (value) => `复制 ${value}`,
|
|
1753
|
-
copy: "复制",
|
|
1754
|
-
copied: "已复制",
|
|
1755
|
-
detailsLabel: "时间戳详情"
|
|
1756
|
-
}
|
|
1757
|
-
};
|
|
1758
|
-
//#endregion
|
|
1759
|
-
//#region src/locale/messages/toast.ts
|
|
1760
|
-
const toastMessages = {
|
|
1761
|
-
"en": {
|
|
1762
|
-
dismiss: "Dismiss notification",
|
|
1763
|
-
viewport: "Notifications"
|
|
1764
|
-
},
|
|
1765
|
-
"zh-CN": {
|
|
1766
|
-
dismiss: "关闭通知",
|
|
1767
|
-
viewport: "通知"
|
|
1768
|
-
}
|
|
1769
|
-
};
|
|
1770
|
-
//#endregion
|
|
1771
|
-
//#region src/locale/messages/token.ts
|
|
1772
|
-
const tokenMessages = {
|
|
1773
|
-
"en": { remove: (label) => `Remove ${label}` },
|
|
1774
|
-
"zh-CN": { remove: (label) => `移除${label}` }
|
|
1775
|
-
};
|
|
1776
|
-
//#endregion
|
|
1777
|
-
//#region src/locale/messages/tokenizer.ts
|
|
1778
|
-
const tokenizerMessages = {
|
|
1779
|
-
"en": {
|
|
1780
|
-
placeholder: "Add…",
|
|
1781
|
-
empty: "No results found",
|
|
1782
|
-
loading: "Loading",
|
|
1783
|
-
error: "Couldn't load results",
|
|
1784
|
-
clear: "Clear all",
|
|
1785
|
-
results: "Search results",
|
|
1786
|
-
more: (count) => `+${count} more`,
|
|
1787
|
-
added: (label) => `Added ${label}`,
|
|
1788
|
-
removed: (label) => `Removed ${label}`,
|
|
1789
|
-
create: (query) => `Create "${query}"`
|
|
1790
|
-
},
|
|
1791
|
-
"zh-CN": {
|
|
1792
|
-
placeholder: "添加…",
|
|
1793
|
-
empty: "未找到结果",
|
|
1794
|
-
loading: "正在加载",
|
|
1795
|
-
error: "加载失败",
|
|
1796
|
-
clear: "全部清除",
|
|
1797
|
-
results: "搜索结果",
|
|
1798
|
-
more: (count) => `另外 ${count} 个`,
|
|
1799
|
-
added: (label) => `已添加${label}`,
|
|
1800
|
-
removed: (label) => `已移除${label}`,
|
|
1801
|
-
create: (query) => `创建「${query}」`
|
|
1802
|
-
}
|
|
1803
|
-
};
|
|
1804
|
-
//#endregion
|
|
1805
|
-
//#region src/locale/messages/transfer-list-selector.ts
|
|
1806
|
-
const transferListSelectorMessages = {
|
|
1807
|
-
"en": {
|
|
1808
|
-
apply: "Apply",
|
|
1809
|
-
cancel: "Cancel",
|
|
1810
|
-
triggerLabel: (count) => `${formatCount(count, "en")} selected`
|
|
1811
|
-
},
|
|
1812
|
-
"zh-CN": {
|
|
1813
|
-
apply: "应用",
|
|
1814
|
-
cancel: "取消",
|
|
1815
|
-
triggerLabel: (count) => `已选 ${formatCount(count, "zh-CN")} 项`
|
|
1816
|
-
}
|
|
1817
|
-
};
|
|
1818
|
-
//#endregion
|
|
1819
|
-
//#region src/locale/messages/transfer-list.ts
|
|
1820
|
-
const transferListMessages = {
|
|
1821
|
-
"en": {
|
|
1822
|
-
selectedLabel: "Selected",
|
|
1823
|
-
availableLabel: "Available",
|
|
1824
|
-
ungroupedLabel: "Other",
|
|
1825
|
-
searchPlaceholder: "Search…",
|
|
1826
|
-
searchLabel: (label) => `Search ${label}`,
|
|
1827
|
-
selectedEmpty: "No selected options",
|
|
1828
|
-
availableEmpty: "No available options",
|
|
1829
|
-
noResults: "No results",
|
|
1830
|
-
clear: "Clear",
|
|
1831
|
-
addAll: "Add all",
|
|
1832
|
-
addOption: (label) => `Add ${label}`,
|
|
1833
|
-
removeOption: (label) => `Remove ${label}`,
|
|
1834
|
-
reorderOption: (label) => `Reorder ${label}`,
|
|
1835
|
-
transferDisabled: (label) => `${label} cannot be moved`,
|
|
1836
|
-
reorderDisabled: (label) => `${label} cannot be reordered`,
|
|
1837
|
-
reorderInstructions: "Press Space or Enter to pick up an item. Use Arrow Up, Arrow Down, Home, or End to move it. Press Space or Enter to drop, or Escape to cancel.",
|
|
1838
|
-
announceAdded: (label, count) => `${label} added. ${formatCount(count, "en")} ${englishPlural(count, "item", "items")} selected.`,
|
|
1839
|
-
announceRemoved: (label, count) => `${label} removed. ${formatCount(count, "en")} ${englishPlural(count, "item", "items")} selected.`,
|
|
1840
|
-
announceBulkAdded: (count) => `${formatCount(count, "en")} ${englishPlural(count, "item", "items")} added.`,
|
|
1841
|
-
announceBulkRemoved: (count) => `${formatCount(count, "en")} ${englishPlural(count, "item", "items")} removed.`,
|
|
1842
|
-
announceGrabbed: (label, position, total) => `${label} picked up, position ${formatCount(position, "en")} of ${formatCount(total, "en")}. Use arrow keys to move, Space or Enter to drop, or Escape to cancel.`,
|
|
1843
|
-
announceMoveCancelled: (label) => `${label} move cancelled.`,
|
|
1844
|
-
announceDropped: (label, position, total) => `${label} dropped at position ${formatCount(position, "en")} of ${formatCount(total, "en")}.`,
|
|
1845
|
-
announceReturned: (label, position) => `${label} returned to position ${formatCount(position, "en")}.`,
|
|
1846
|
-
announceMovedToPosition: (label, position, total) => `${label}, position ${formatCount(position, "en")} of ${formatCount(total, "en")}.`,
|
|
1847
|
-
announceSearchResults: (count) => `${formatCount(count, "en")} ${englishPlural(count, "item", "items")} found.`
|
|
1848
|
-
},
|
|
1849
|
-
"zh-CN": {
|
|
1850
|
-
selectedLabel: "已选",
|
|
1851
|
-
availableLabel: "可选",
|
|
1852
|
-
ungroupedLabel: "其它",
|
|
1853
|
-
searchPlaceholder: "搜索…",
|
|
1854
|
-
searchLabel: (label) => `搜索${label}`,
|
|
1855
|
-
selectedEmpty: "还没有选中任何选项",
|
|
1856
|
-
availableEmpty: "没有可选的选项了",
|
|
1857
|
-
noResults: "没有匹配结果",
|
|
1858
|
-
clear: "清空",
|
|
1859
|
-
addAll: "全部添加",
|
|
1860
|
-
addOption: (label) => `添加${label}`,
|
|
1861
|
-
removeOption: (label) => `移除${label}`,
|
|
1862
|
-
reorderOption: (label) => `调整${label}的顺序`,
|
|
1863
|
-
transferDisabled: (label) => `${label}不能移动`,
|
|
1864
|
-
reorderDisabled: (label) => `${label}不能调整顺序`,
|
|
1865
|
-
reorderInstructions: "按空格键或回车键拿起一项。用上方向键、下方向键、Home 或 End 移动它。按空格键或回车键放下,按 Escape 取消。",
|
|
1866
|
-
announceAdded: (label, count) => `已添加${label}。当前已选 ${formatCount(count, "zh-CN")} 项。`,
|
|
1867
|
-
announceRemoved: (label, count) => `已移除${label}。当前已选 ${formatCount(count, "zh-CN")} 项。`,
|
|
1868
|
-
announceBulkAdded: (count) => `已添加 ${formatCount(count, "zh-CN")} 项。`,
|
|
1869
|
-
announceBulkRemoved: (count) => `已移除 ${formatCount(count, "zh-CN")} 项。`,
|
|
1870
|
-
announceGrabbed: (label, position, total) => `已拿起${label},第 ${formatCount(position, "zh-CN")} 个,共 ${formatCount(total, "zh-CN")} 个。用方向键移动,按空格键或回车键放下,按 Escape 取消。`,
|
|
1871
|
-
announceMoveCancelled: (label) => `已取消移动${label}。`,
|
|
1872
|
-
announceDropped: (label, position, total) => `${label}已放在第 ${formatCount(position, "zh-CN")} 个,共 ${formatCount(total, "zh-CN")} 个。`,
|
|
1873
|
-
announceReturned: (label, position) => `${label}回到了第 ${formatCount(position, "zh-CN")} 个。`,
|
|
1874
|
-
announceMovedToPosition: (label, position, total) => `${label},第 ${formatCount(position, "zh-CN")} 个,共 ${formatCount(total, "zh-CN")} 个。`,
|
|
1875
|
-
announceSearchResults: (count) => `找到 ${formatCount(count, "zh-CN")} 项。`
|
|
1876
|
-
}
|
|
1877
|
-
};
|
|
1878
|
-
//#endregion
|
|
1879
|
-
//#region src/locale/messages/tree-list.ts
|
|
1880
|
-
const treeListMessages = {
|
|
1881
|
-
"en": { toggleChildren: "Toggle children" },
|
|
1882
|
-
"zh-CN": { toggleChildren: "切换子项" }
|
|
1883
|
-
};
|
|
1884
|
-
//#endregion
|
|
1885
|
-
//#region src/locale/messages/typeahead.ts
|
|
1886
|
-
const typeaheadMessages = {
|
|
1887
|
-
"en": {
|
|
1888
|
-
placeholder: "Search…",
|
|
1889
|
-
empty: "No results found",
|
|
1890
|
-
loading: "Loading",
|
|
1891
|
-
error: "Couldn't load results",
|
|
1892
|
-
clear: "Clear selection",
|
|
1893
|
-
results: "Search results",
|
|
1894
|
-
resultCount: (count) => `${formatCount(count, "en")} ${englishPlural(count, "result", "results")}`
|
|
1895
|
-
},
|
|
1896
|
-
"zh-CN": {
|
|
1897
|
-
placeholder: "搜索…",
|
|
1898
|
-
empty: "未找到结果",
|
|
1899
|
-
loading: "正在加载",
|
|
1900
|
-
error: "加载失败",
|
|
1901
|
-
clear: "清除所选",
|
|
1902
|
-
results: "搜索结果",
|
|
1903
|
-
resultCount: (count) => `找到 ${formatCount(count, "zh-CN")} 个结果`
|
|
1904
|
-
}
|
|
1905
|
-
};
|
|
1906
|
-
//#endregion
|
|
1907
|
-
//#region src/locale/messages.ts
|
|
1908
|
-
const astryxMessages = {
|
|
1909
|
-
"en": {
|
|
1910
|
-
alertDialog: alertDialogMessages.en,
|
|
1911
|
-
avatarGroup: avatarGroupMessages.en,
|
|
1912
|
-
banner: bannerMessages.en,
|
|
1913
|
-
breadcrumbs: breadcrumbsMessages.en,
|
|
1914
|
-
button: buttonMessages.en,
|
|
1915
|
-
calendar: calendarMessages.en,
|
|
1916
|
-
carousel: carouselMessages.en,
|
|
1917
|
-
chat: chatMessages.en,
|
|
1918
|
-
checkboxList: checkboxListMessages.en,
|
|
1919
|
-
citation: citationMessages.en,
|
|
1920
|
-
codeBlock: codeBlockMessages.en,
|
|
1921
|
-
commandPalette: commandPaletteMessages.en,
|
|
1922
|
-
commentComposer: commentComposerMessages.en,
|
|
1923
|
-
comments: commentsMessages.en,
|
|
1924
|
-
contextMenu: contextMenuMessages.en,
|
|
1925
|
-
dateInput: dateInputMessages.en,
|
|
1926
|
-
dateRangeInput: dateRangeInputMessages.en,
|
|
1927
|
-
dateTimeInput: dateTimeInputMessages.en,
|
|
1928
|
-
dialog: dialogMessages.en,
|
|
1929
|
-
dropdownMenu: dropdownMenuMessages.en,
|
|
1930
|
-
emojiPicker: emojiPickerMessages.en,
|
|
1931
|
-
field: fieldMessages.en,
|
|
1932
|
-
fileInput: fileInputMessages.en,
|
|
1933
|
-
infoTip: infoTipMessages.en,
|
|
1934
|
-
input: inputMessages.en,
|
|
1935
|
-
kbd: kbdMessages.en,
|
|
1936
|
-
keyboardHint: keyboardHintMessages.en,
|
|
1937
|
-
layout: layoutMessages.en,
|
|
1938
|
-
lightbox: lightboxMessages.en,
|
|
1939
|
-
listInput: listInputMessages.en,
|
|
1940
|
-
markdown: markdownMessages.en,
|
|
1941
|
-
metadataList: metadataListMessages.en,
|
|
1942
|
-
moreMenu: moreMenuMessages.en,
|
|
1943
|
-
multiSelector: multiSelectorMessages.en,
|
|
1944
|
-
nav: navMessages.en,
|
|
1945
|
-
numberInput: numberInputMessages.en,
|
|
1946
|
-
outline: outlineMessages.en,
|
|
1947
|
-
pagination: paginationMessages.en,
|
|
1948
|
-
popover: popoverMessages.en,
|
|
1949
|
-
powerSearch: powerSearchMessages.en,
|
|
1950
|
-
richTextEditor: richTextEditorMessages.en,
|
|
1951
|
-
selector: selectorMessages.en,
|
|
1952
|
-
spinner: spinnerMessages.en,
|
|
1953
|
-
stepper: stepperMessages.en,
|
|
1954
|
-
switch: switchMessages.en,
|
|
1955
|
-
tabList: tabListMessages.en,
|
|
1956
|
-
table: tableMessages.en,
|
|
1957
|
-
textArea: textAreaMessages.en,
|
|
1958
|
-
textInput: textInputMessages.en,
|
|
1959
|
-
thumbnail: thumbnailMessages.en,
|
|
1960
|
-
timeInput: timeInputMessages.en,
|
|
1961
|
-
timestamp: timestampMessages.en,
|
|
1962
|
-
toast: toastMessages.en,
|
|
1963
|
-
token: tokenMessages.en,
|
|
1964
|
-
tokenizer: tokenizerMessages.en,
|
|
1965
|
-
transferListSelector: transferListSelectorMessages.en,
|
|
1966
|
-
transferList: transferListMessages.en,
|
|
1967
|
-
treeList: treeListMessages.en,
|
|
1968
|
-
typeahead: typeaheadMessages.en
|
|
1969
|
-
},
|
|
1970
|
-
"zh-CN": {
|
|
1971
|
-
alertDialog: alertDialogMessages["zh-CN"],
|
|
1972
|
-
avatarGroup: avatarGroupMessages["zh-CN"],
|
|
1973
|
-
banner: bannerMessages["zh-CN"],
|
|
1974
|
-
breadcrumbs: breadcrumbsMessages["zh-CN"],
|
|
1975
|
-
button: buttonMessages["zh-CN"],
|
|
1976
|
-
calendar: calendarMessages["zh-CN"],
|
|
1977
|
-
carousel: carouselMessages["zh-CN"],
|
|
1978
|
-
chat: chatMessages["zh-CN"],
|
|
1979
|
-
checkboxList: checkboxListMessages["zh-CN"],
|
|
1980
|
-
citation: citationMessages["zh-CN"],
|
|
1981
|
-
codeBlock: codeBlockMessages["zh-CN"],
|
|
1982
|
-
commandPalette: commandPaletteMessages["zh-CN"],
|
|
1983
|
-
commentComposer: commentComposerMessages["zh-CN"],
|
|
1984
|
-
comments: commentsMessages["zh-CN"],
|
|
1985
|
-
contextMenu: contextMenuMessages["zh-CN"],
|
|
1986
|
-
dateInput: dateInputMessages["zh-CN"],
|
|
1987
|
-
dateRangeInput: dateRangeInputMessages["zh-CN"],
|
|
1988
|
-
dateTimeInput: dateTimeInputMessages["zh-CN"],
|
|
1989
|
-
dialog: dialogMessages["zh-CN"],
|
|
1990
|
-
dropdownMenu: dropdownMenuMessages["zh-CN"],
|
|
1991
|
-
emojiPicker: emojiPickerMessages["zh-CN"],
|
|
1992
|
-
field: fieldMessages["zh-CN"],
|
|
1993
|
-
fileInput: fileInputMessages["zh-CN"],
|
|
1994
|
-
infoTip: infoTipMessages["zh-CN"],
|
|
1995
|
-
input: inputMessages["zh-CN"],
|
|
1996
|
-
kbd: kbdMessages["zh-CN"],
|
|
1997
|
-
keyboardHint: keyboardHintMessages["zh-CN"],
|
|
1998
|
-
layout: layoutMessages["zh-CN"],
|
|
1999
|
-
lightbox: lightboxMessages["zh-CN"],
|
|
2000
|
-
listInput: listInputMessages["zh-CN"],
|
|
2001
|
-
markdown: markdownMessages["zh-CN"],
|
|
2002
|
-
metadataList: metadataListMessages["zh-CN"],
|
|
2003
|
-
moreMenu: moreMenuMessages["zh-CN"],
|
|
2004
|
-
multiSelector: multiSelectorMessages["zh-CN"],
|
|
2005
|
-
nav: navMessages["zh-CN"],
|
|
2006
|
-
numberInput: numberInputMessages["zh-CN"],
|
|
2007
|
-
outline: outlineMessages["zh-CN"],
|
|
2008
|
-
pagination: paginationMessages["zh-CN"],
|
|
2009
|
-
popover: popoverMessages["zh-CN"],
|
|
2010
|
-
powerSearch: powerSearchMessages["zh-CN"],
|
|
2011
|
-
richTextEditor: richTextEditorMessages["zh-CN"],
|
|
2012
|
-
selector: selectorMessages["zh-CN"],
|
|
2013
|
-
spinner: spinnerMessages["zh-CN"],
|
|
2014
|
-
stepper: stepperMessages["zh-CN"],
|
|
2015
|
-
switch: switchMessages["zh-CN"],
|
|
2016
|
-
tabList: tabListMessages["zh-CN"],
|
|
2017
|
-
table: tableMessages["zh-CN"],
|
|
2018
|
-
textArea: textAreaMessages["zh-CN"],
|
|
2019
|
-
textInput: textInputMessages["zh-CN"],
|
|
2020
|
-
thumbnail: thumbnailMessages["zh-CN"],
|
|
2021
|
-
timeInput: timeInputMessages["zh-CN"],
|
|
2022
|
-
timestamp: timestampMessages["zh-CN"],
|
|
2023
|
-
toast: toastMessages["zh-CN"],
|
|
2024
|
-
token: tokenMessages["zh-CN"],
|
|
2025
|
-
tokenizer: tokenizerMessages["zh-CN"],
|
|
2026
|
-
transferListSelector: transferListSelectorMessages["zh-CN"],
|
|
2027
|
-
transferList: transferListMessages["zh-CN"],
|
|
2028
|
-
treeList: treeListMessages["zh-CN"],
|
|
2029
|
-
typeahead: typeaheadMessages["zh-CN"]
|
|
2030
|
-
}
|
|
2031
|
-
};
|
|
2032
|
-
//#endregion
|
|
2033
|
-
//#region src/locale/context.ts
|
|
2034
|
-
const astryxLocaleKey = Symbol("astryx-locale");
|
|
2035
|
-
const astryxMessagesKey = Symbol("astryx-messages");
|
|
2036
|
-
/**
|
|
2037
|
-
* 把语言标签收成规范写法。
|
|
2038
|
-
* `zh`、`zh-CN`、`zh-Hans` 收成 `zh-CN`,对上内置的简体中文文案。
|
|
2039
|
-
* 其余标签只做大小写规范,例如 `en-gb` 收成 `en-GB`,日期和数字因此按这个地区的习惯排。
|
|
2040
|
-
* 空值和解析不了的标签回到 `en`。
|
|
2041
|
-
*/
|
|
2042
|
-
function normalizeLocale(locale) {
|
|
2043
|
-
const trimmed = locale?.trim() ?? "";
|
|
2044
|
-
if (trimmed === "") return "en";
|
|
2045
|
-
let parsed;
|
|
2046
|
-
try {
|
|
2047
|
-
parsed = new Intl.Locale(trimmed);
|
|
2048
|
-
} catch {
|
|
2049
|
-
return "en";
|
|
2050
|
-
}
|
|
2051
|
-
const base = parsed.baseName;
|
|
2052
|
-
const lower = base.toLowerCase();
|
|
2053
|
-
if (lower === "zh" || lower === "zh-cn" || lower === "zh-hans" || lower.startsWith("zh-hans-")) return "zh-CN";
|
|
2054
|
-
return base;
|
|
2055
|
-
}
|
|
2056
|
-
function provideAstryxLocale(locale, messages) {
|
|
2057
|
-
provide(astryxLocaleKey, computed(() => normalizeLocale(toValue(locale))));
|
|
2058
|
-
if (messages !== void 0) provide(astryxMessagesKey, computed(() => toValue(messages)));
|
|
2059
|
-
}
|
|
2060
|
-
function useAstryxLocale() {
|
|
2061
|
-
const injected = inject(astryxLocaleKey, void 0);
|
|
2062
|
-
return computed(() => injected == null ? "en" : normalizeLocale(toValue(injected)));
|
|
2063
|
-
}
|
|
2064
|
-
/**
|
|
2065
|
-
* 一个语言标签对应的内置文案。只有简体中文有自己的一份,其余语言都用英文。
|
|
2066
|
-
* 别的语言要显示本地文字,得通过 `messages` 交进来。
|
|
2067
|
-
*/
|
|
2068
|
-
function builtInMessages(locale) {
|
|
2069
|
-
return locale === "zh-CN" ? astryxMessages["zh-CN"] : astryxMessages.en;
|
|
2070
|
-
}
|
|
2071
|
-
function useAstryxMessages() {
|
|
2072
|
-
const locale = useAstryxLocale();
|
|
2073
|
-
const provided = inject(astryxMessagesKey, void 0);
|
|
2074
|
-
return computed(() => {
|
|
2075
|
-
if (provided != null) return toValue(provided);
|
|
2076
|
-
return builtInMessages(locale.value);
|
|
2077
|
-
});
|
|
2078
|
-
}
|
|
2079
|
-
//#endregion
|
|
2080
|
-
export { provideAstryxLocale as a, astryxMessages as c, chatMessages as d, normalizeLocale as i, formatIcu as l, astryxMessagesKey as n, useAstryxLocale as o, builtInMessages as r, useAstryxMessages as s, astryxLocaleKey as t, icuPlaceholderNames as u };
|