Compare commits

...

1 Commits

Author SHA1 Message Date
CodeRabbit Fixer
2d84899656 fix: refactor(litegraph): localize hardcoded 'Value' prompt titles in NumberWidget.ts via vue-i18n (#9389)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:08:13 +01:00
3 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import { t } from '@/i18n'
import type { INumericWidget } from '@/lib/litegraph/src/types/widgets'
import { evaluateInput, getWidgetStep } from '@/lib/litegraph/src/utils/widget'
@@ -65,7 +66,7 @@ export class NumberWidget
// Handle center click - show prompt
canvas.prompt(
'Value',
t('widgets.valuePromptTitle'),
this.value,
(v: string) => {
const parsed = evaluateInput(v)

View File

@@ -1,3 +1,4 @@
import { t } from '@/i18n'
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
import type { IStringWidget } from '@/lib/litegraph/src/types/widgets'
@@ -40,7 +41,7 @@ export class TextWidget
override onClick({ e, node, canvas }: WidgetEventOptions) {
// Show prompt dialog for text input
canvas.prompt(
'Value',
t('widgets.valuePromptTitle'),
this.value,
(v: string) => {
if (v !== null) {

View File

@@ -2545,6 +2545,7 @@
},
"node2only": "Node 2.0 only",
"selectModel": "Select model",
"valuePromptTitle": "Value",
"uploadSelect": {
"placeholder": "Select...",
"placeholderImage": "Select image...",