mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-24 00:09:32 +00:00
fix: resolve missing i18n key warnings (#9064)
## Summary Fix multiple i18n missing key console warnings by correcting key paths and adding missing translations. ## Changes - **What**: - `ScrubableNumberInput`: Fixed references to non-existent `g.ariaLabel.decrement`/`g.ariaLabel.increment` keys → use `g.decrement`/`g.increment` - `SidebarIcon`: Replaced `t()` with `st()` (safe translate) to prevent double-translation when parent components pass pre-translated strings - `en/main.json`: Added missing `menuLabels.Copy`, `menuLabels.Paste`, `menuLabels.Select All` keys ## Review Focus The `SidebarIcon` change from `t()` to `st()` is the key design decision. `SidebarIcon` receives both i18n keys (from sidebar tabs via `SideToolbar`) and pre-translated strings (from dedicated sidebar button components). Using `st()` (which checks `te()` before translating) handles both cases without warnings. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9064-fix-resolve-missing-i18n-key-warnings-30e6d73d3650816eaad3ce030f9c1d3f) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<slot name="background" />
|
||||
<Button
|
||||
v-if="!hideButtons"
|
||||
:aria-label="t('g.ariaLabel.decrement')"
|
||||
:aria-label="t('g.decrement')"
|
||||
data-testid="decrement"
|
||||
class="h-full w-8 rounded-r-none hover:bg-base-foreground/20 disabled:opacity-30"
|
||||
variant="muted-textonly"
|
||||
@@ -51,7 +51,7 @@
|
||||
<slot />
|
||||
<Button
|
||||
v-if="!hideButtons"
|
||||
:aria-label="t('g.ariaLabel.increment')"
|
||||
:aria-label="t('g.increment')"
|
||||
data-testid="increment"
|
||||
class="h-full w-8 rounded-l-none hover:bg-base-foreground/20 disabled:opacity-30"
|
||||
variant="muted-textonly"
|
||||
|
||||
Reference in New Issue
Block a user