fix: add missing translations (#6970)

## Summary

Adds translations for things identified as "always English" during QA
testing.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6970-fix-add-missing-translations-2b86d73d365081ffa58ccef156d28028)
by [Unito](https://www.unito.io)
This commit is contained in:
Christian Byrne
2025-11-26 17:25:49 -08:00
committed by GitHub
parent 29dbfa3f60
commit c57ceaf826
3 changed files with 41 additions and 21 deletions

View File

@@ -131,6 +131,11 @@
"newFolder": "New Folder",
"enableAll": "Enable All",
"disableAll": "Disable All",
"enableSelected": "Enable Selected",
"disableSelected": "Disable Selected",
"disableThirdParty": "Disable Third-Party",
"core": "Core",
"custom": "Custom",
"command": "Command",
"keybinding": "Keybinding",
"upload": "Upload",

View File

@@ -30,7 +30,12 @@
</Message>
</template>
<div class="mb-3 flex gap-2">
<SelectButton v-model="filterType" :options="filterTypes" />
<SelectButton
v-model="filterType"
:options="filterTypes"
option-label="label"
option-value="value"
/>
</div>
<DataTable
v-model:selection="selectedExtensions"
@@ -47,9 +52,9 @@
{{ slotProps.data.name }}
<Tag
v-if="extensionStore.isCoreExtension(slotProps.data.name)"
value="Core"
:value="$t('g.core')"
/>
<Tag v-else value="Custom" severity="info" />
<Tag v-else :value="$t('g.custom')" severity="info" />
</template>
</Column>
<Column
@@ -90,15 +95,26 @@ import SelectButton from 'primevue/selectbutton'
import Tag from 'primevue/tag'
import ToggleSwitch from 'primevue/toggleswitch'
import { computed, onMounted, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import SearchBox from '@/components/common/SearchBox.vue'
import PanelTemplate from '@/components/dialog/content/setting/PanelTemplate.vue'
import { useSettingStore } from '@/platform/settings/settingStore'
import { useExtensionStore } from '@/stores/extensionStore'
import type { ComfyExtension } from '@/types/comfy'
const filterTypes = ['All', 'Core', 'Custom']
const filterType = ref('All')
const selectedExtensions = ref<Array<any>>([])
const { t } = useI18n()
const filterTypeKeys = ['all', 'core', 'custom'] as const
type FilterTypeKey = (typeof filterTypeKeys)[number]
const filterTypes = computed(() =>
filterTypeKeys.map((key) => ({
label: t(`g.${key}`),
value: key
}))
)
const filterType = ref<FilterTypeKey>('all')
const selectedExtensions = ref<ComfyExtension[]>([])
const filters = ref({
global: { value: '', matchMode: FilterMatchMode.CONTAINS }
@@ -112,11 +128,11 @@ const editingEnabledExtensions = ref<Record<string, boolean>>({})
const filteredExtensions = computed(() => {
const extensions = extensionStore.extensions
switch (filterType.value) {
case 'Core':
case 'core':
return extensions.filter((ext) =>
extensionStore.isCoreExtension(ext.name)
)
case 'Custom':
case 'custom':
return extensions.filter(
(ext) => !extensionStore.isCoreExtension(ext.name)
)
@@ -190,9 +206,9 @@ const applyChanges = () => {
}
const menu = ref<InstanceType<typeof ContextMenu>>()
const contextMenuItems = [
const contextMenuItems = computed(() => [
{
label: 'Enable Selected',
label: t('g.enableSelected'),
icon: 'pi pi-check',
command: async () => {
selectedExtensions.value.forEach((ext) => {
@@ -204,7 +220,7 @@ const contextMenuItems = [
}
},
{
label: 'Disable Selected',
label: t('g.disableSelected'),
icon: 'pi pi-times',
command: async () => {
selectedExtensions.value.forEach((ext) => {
@@ -219,20 +235,20 @@ const contextMenuItems = [
separator: true
},
{
label: 'Enable All',
label: t('g.enableAll'),
icon: 'pi pi-check',
command: enableAllExtensions
},
{
label: 'Disable All',
label: t('g.disableAll'),
icon: 'pi pi-times',
command: disableAllExtensions
},
{
label: 'Disable 3rd Party',
label: t('g.disableThirdParty'),
icon: 'pi pi-times',
command: disableThirdPartyExtensions,
disabled: !extensionStore.hasThirdPartyExtensions
}
]
])
</script>

View File

@@ -334,19 +334,18 @@ export const useWorkflowTemplatesStore = defineStore(
})
// 2. Basics (isEssential categories) - always second if it exists
let gettingStartedText = 'Getting Started'
const essentialCat = coreTemplates.value.find(
(cat) => cat.isEssential && cat.templates.length > 0
)
const hasEssentialCategories = Boolean(essentialCat)
if (essentialCat) {
gettingStartedText = essentialCat.title
}
if (hasEssentialCategories) {
const categoryTitle = essentialCat.title ?? 'Getting Started'
items.push({
id: 'basics',
label: gettingStartedText,
label: st(
`templateWorkflows.category.${normalizeI18nKey(categoryTitle)}`,
categoryTitle
),
icon: 'icon-[lucide--graduation-cap]'
})
}