mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
[backport cloud/1.38] fix: localize node definition filter names and descriptions (#8563)
Backport of #8540 to cloud/1.38 Does not include dev-node changes since that has not been backported. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8563-backport-cloud-1-38-fix-localize-node-definition-filter-names-and-descriptions-2fc6d73d36508171b11cfa01d522438b) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
@@ -3,6 +3,7 @@ import _ from 'es-toolkit/compat'
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
|
|
||||||
|
import { t } from '@/i18n'
|
||||||
import { isProxyWidget } from '@/core/graph/subgraph/proxyWidget'
|
import { isProxyWidget } from '@/core/graph/subgraph/proxyWidget'
|
||||||
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
||||||
import { transformNodeDefV1ToV2 } from '@/schemas/nodeDef/migration'
|
import { transformNodeDefV1ToV2 } from '@/schemas/nodeDef/migration'
|
||||||
@@ -408,17 +409,16 @@ export const useNodeDefStore = defineStore('nodeDef', () => {
|
|||||||
// Deprecated nodes filter
|
// Deprecated nodes filter
|
||||||
registerNodeDefFilter({
|
registerNodeDefFilter({
|
||||||
id: 'core.deprecated',
|
id: 'core.deprecated',
|
||||||
name: 'Hide Deprecated Nodes',
|
name: t('nodeFilters.hideDeprecated'),
|
||||||
description: 'Hides nodes marked as deprecated unless explicitly enabled',
|
description: t('nodeFilters.hideDeprecatedDescription'),
|
||||||
predicate: (nodeDef) => showDeprecated.value || !nodeDef.deprecated
|
predicate: (nodeDef) => showDeprecated.value || !nodeDef.deprecated
|
||||||
})
|
})
|
||||||
|
|
||||||
// Experimental nodes filter
|
// Experimental nodes filter
|
||||||
registerNodeDefFilter({
|
registerNodeDefFilter({
|
||||||
id: 'core.experimental',
|
id: 'core.experimental',
|
||||||
name: 'Hide Experimental Nodes',
|
name: t('nodeFilters.hideExperimental'),
|
||||||
description:
|
description: t('nodeFilters.hideExperimentalDescription'),
|
||||||
'Hides nodes marked as experimental unless explicitly enabled',
|
|
||||||
predicate: (nodeDef) => showExperimental.value || !nodeDef.experimental
|
predicate: (nodeDef) => showExperimental.value || !nodeDef.experimental
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -426,9 +426,8 @@ export const useNodeDefStore = defineStore('nodeDef', () => {
|
|||||||
// Filter out litegraph typed subgraphs, saved blueprints are added in separately
|
// Filter out litegraph typed subgraphs, saved blueprints are added in separately
|
||||||
registerNodeDefFilter({
|
registerNodeDefFilter({
|
||||||
id: 'core.subgraph',
|
id: 'core.subgraph',
|
||||||
name: 'Hide Subgraph Nodes',
|
name: t('nodeFilters.hideSubgraph'),
|
||||||
description:
|
description: t('nodeFilters.hideSubgraphDescription'),
|
||||||
'Temporarily hides subgraph nodes from node library and search',
|
|
||||||
predicate: (nodeDef) => {
|
predicate: (nodeDef) => {
|
||||||
// Hide subgraph nodes (identified by category='subgraph' and python_module='nodes')
|
// Hide subgraph nodes (identified by category='subgraph' and python_module='nodes')
|
||||||
return !(
|
return !(
|
||||||
|
|||||||
Reference in New Issue
Block a user