|
3 | 3 | <div class="selectors"> |
4 | 4 | <!-- fnType Picker --> |
5 | 5 | <s-picker |
6 | | - :label="t('inputs.fnType')" |
| 6 | + :label="t('data.main.fnType')" |
7 | 7 | v-model.lazy="fnType" |
8 | 8 | :key="selectKey" |
9 | 9 | > |
10 | 10 | <s-picker-item v-for="type in fnTypeArr" :value="type.value"> |
11 | | - {{ t(type.label) }} |
| 11 | + {{ t("data.fnType." + type.value) }} |
12 | 12 | </s-picker-item> |
13 | 13 | </s-picker> |
14 | 14 |
|
15 | 15 | <!-- graphType Picker --> |
16 | 16 | <s-picker |
17 | | - :label="t('inputs.graphType')" |
| 17 | + :label="t('data.main.graphType')" |
18 | 18 | v-model.lazy="props.self.graphType" |
19 | 19 | v-show="props.self.graphType !== 'text'" |
20 | 20 | :key="selectKey" |
21 | 21 | > |
22 | 22 | <s-picker-item v-for="type in allowedGraphType" :value="type.value"> |
23 | | - {{ t(type.label) }} |
| 23 | + {{ t("data.graphType." + type.value) }} |
24 | 24 | </s-picker-item> |
25 | 25 | </s-picker> |
26 | 26 |
|
|
37 | 37 | > |
38 | 38 | <SIconDelete /> |
39 | 39 | </s-icon-button> |
40 | | - {{ t("buttons.del") }} |
| 40 | + {{ t("data.topButton.delete") }} |
41 | 41 | </s-tooltip> |
42 | 42 | <!-- Hide --> |
43 | 43 | <s-tooltip> |
|
48 | 48 | > |
49 | 49 | <SIconHide /> |
50 | 50 | </s-icon-button> |
51 | | - {{ t("buttons.hide") }} |
| 51 | + {{ t("data.topButton.hide") }} |
52 | 52 | </s-tooltip> |
53 | 53 | <!-- Fold --> |
54 | 54 | <s-tooltip> |
55 | 55 | <s-icon-button slot="trigger" @click="folded = !folded"> |
56 | 56 | <s-icon :name="folded ? 'chevron_down' : 'chevron_up'"> </s-icon> |
57 | 57 | </s-icon-button> |
58 | | - {{ t(folded ? "buttons.expand" : "buttons.collapse") }} |
| 58 | + {{ t(`data.topButton.${folded ? "more" : "less"}`) }} |
59 | 59 | </s-tooltip> |
60 | 60 | <!-- Drag --> |
61 | 61 | <span class="datablock-drag drag-icon"> |
|
76 | 76 | </template> |
77 | 77 | <script setup lang="ts"> |
78 | 78 | import { useI18n } from "vue-i18n"; |
79 | | -const { t, locale } = useI18n(); |
| 79 | +import { I18nSchema } from "@/i18n"; |
| 80 | +const { locale, t } = useI18n<{ message: I18nSchema }>(); |
80 | 81 |
|
81 | 82 | import { fnTypeArr, getAllowedGraphType } from "../consts"; |
82 | 83 | import { ref, computed, toRef } from "vue"; |
@@ -114,9 +115,9 @@ function deleteDatum() { |
114 | 115 | const backup = props.self; |
115 | 116 | profile.datum.splice(props.index, 1); |
116 | 117 | Snackbar.builder({ |
117 | | - text: t("title.deleteSuccess"), |
| 118 | + text: t("editor.delete.success"), |
118 | 119 | action: { |
119 | | - text: t("buttons.undo"), |
| 120 | + text: t("editor.delete.undo"), |
120 | 121 | click: () => { |
121 | 122 | profile.datum.splice(props.index, 0, backup); |
122 | 123 | }, |
|
0 commit comments