Skip to content

Commit fce6c09

Browse files
DrJKLampcode-com
andcommitted
fix: resolve missing i18n key warnings
- Add missing menuLabels keys (Copy, Paste, Select All) to en locale - Use safe translate (st) in SidebarIcon to avoid double-translation warnings - Fix ScrubableNumberInput using non-existent g.ariaLabel.* keys Amp-Thread-ID: https://ampcode.com/threads/T-019c81ec-0f8d-76df-a3c4-72eafb8f5bfa Co-authored-by: Amp <amp@ampcode.com>
1 parent de13113 commit fce6c09

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/components/common/ScrubableNumberInput.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<slot name="background" />
77
<Button
88
v-if="!hideButtons"
9-
:aria-label="t('g.ariaLabel.decrement')"
9+
:aria-label="t('g.decrement')"
1010
data-testid="decrement"
1111
class="h-full w-8 rounded-r-none hover:bg-base-foreground/20 disabled:opacity-30"
1212
variant="muted-textonly"
@@ -51,7 +51,7 @@
5151
<slot />
5252
<Button
5353
v-if="!hideButtons"
54-
:aria-label="t('g.ariaLabel.increment')"
54+
:aria-label="t('g.increment')"
5555
data-testid="increment"
5656
class="h-full w-8 rounded-l-none hover:bg-base-foreground/20 disabled:opacity-30"
5757
variant="muted-textonly"

src/components/sidebar/SidebarIcon.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</div>
4242
</slot>
4343
<span v-if="label && !isSmall" class="side-bar-button-label">{{
44-
t(label)
44+
st(label, label)
4545
}}</span>
4646
</div>
4747
</Button>
@@ -50,12 +50,10 @@
5050
<script setup lang="ts">
5151
import { computed } from 'vue'
5252
import type { Component } from 'vue'
53-
import { useI18n } from 'vue-i18n'
5453
5554
import Button from '@/components/ui/button/Button.vue'
55+
import { st } from '@/i18n'
5656
import { cn } from '@/utils/tailwindUtil'
57-
58-
const { t } = useI18n()
5957
const {
6058
icon = '',
6159
selected = false,
@@ -83,7 +81,7 @@ const overlayValue = computed(() =>
8381
typeof iconBadge === 'function' ? (iconBadge() ?? '') : iconBadge
8482
)
8583
const shouldShowBadge = computed(() => !!overlayValue.value)
86-
const computedTooltip = computed(() => t(tooltip) + tooltipSuffix)
84+
const computedTooltip = computed(() => st(tooltip, tooltip) + tooltipSuffix)
8785
</script>
8886

8987
<style>

src/locales/en/main.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,10 @@
13221322
"Assets": "Assets",
13231323
"Model Library": "Model Library",
13241324
"Node Library": "Node Library",
1325-
"Workflows": "Workflows"
1325+
"Workflows": "Workflows",
1326+
"Copy": "Copy",
1327+
"Paste": "Paste",
1328+
"Select All": "Select All"
13261329
},
13271330
"desktopMenu": {
13281331
"reinstall": "Reinstall",

0 commit comments

Comments
 (0)