mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 00:04:06 +00:00
## Summary This PR fixes all @intlify/vue-i18n/no-raw-text linting errors identified in #5625 by replacing raw text strings with proper i18n translation function calls. ## Changes Fixed i18n linting errors in the following files: - `src/components/widget/SampleModelSelector.vue` - "Upload Model" → `$t('g.upload')` - `src/components/topbar/CurrentUserButton.vue` - "user profile" → `$t('g.currentUser')` - `src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue` - "Loading help" → `$t('g.loading')` - `src/components/sidebar/SidebarShortcutsToggleButton.vue` - "shortcuts.shortcuts" → `$t('shortcuts.shortcuts')` - `src/components/sidebar/SidebarLogoutIcon.vue` - "sideToolbar.logout" → `$t('sideToolbar.logout')` - `src/components/sidebar/SidebarHelpCenterIcon.vue` - "menu.help" → `$t('menu.help')` - `src/components/sidebar/SidebarBottomPanelToggleButton.vue` - "sideToolbar.labels.console" → `$t('sideToolbar.labels.console')` - `src/components/load3d/controls/viewer/ViewerCameraControls.vue` - "fov" → `t('load3d.fov')` - `src/components/helpcenter/HelpCenterMenuContent.vue` - "Help Center Menu" and "Recent releases" → `$t()` calls All raw text strings have been replaced with appropriate i18n translation keys that already exist in `src/locales/en/main.json`. ## Related Issue Fixes errors reported in CI job: https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/18705105609/job/53341658467?pr=5625 This PR aims to help #5625 pass CI/CD checks. ## Test Plan - All i18n linting errors should be resolved - No functionality changes - only proper use of i18n system - Existing translation keys are used from the locale files ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6280-bugfix-fix-intlify-vue-i18n-no-raw-text-linting-errors-2976d73d365081369b43de01486fb409) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>
41 lines
1.1 KiB
Vue
41 lines
1.1 KiB
Vue
<template>
|
|
<SidebarIcon
|
|
:label="$t('shortcuts.shortcuts')"
|
|
:tooltip="tooltipText"
|
|
:selected="isShortcutsPanelVisible"
|
|
@click="toggleShortcutsPanel"
|
|
>
|
|
<template #icon>
|
|
<i class="icon-[lucide--keyboard]" />
|
|
</template>
|
|
</SidebarIcon>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import { useCommandStore } from '@/stores/commandStore'
|
|
import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
|
|
|
|
import SidebarIcon from './SidebarIcon.vue'
|
|
|
|
const { t } = useI18n()
|
|
const bottomPanelStore = useBottomPanelStore()
|
|
const commandStore = useCommandStore()
|
|
const command = commandStore.getCommand('Workspace.ToggleBottomPanel.Shortcuts')
|
|
const { formatKeySequence } = commandStore
|
|
|
|
const isShortcutsPanelVisible = computed(
|
|
() => bottomPanelStore.activePanel === 'shortcuts'
|
|
)
|
|
|
|
const tooltipText = computed(
|
|
() => `${t('shortcuts.keyboardShortcuts')} (${formatKeySequence(command)})`
|
|
)
|
|
|
|
const toggleShortcutsPanel = () => {
|
|
bottomPanelStore.togglePanel('shortcuts')
|
|
}
|
|
</script>
|