Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing translation keys and provide initial translation #162

Merged
merged 10 commits into from
Jan 30, 2025
Prev Previous commit
Next Next commit
Merge branch 'dev' into AIStringTranslation
  • Loading branch information
mschuettlerTNG committed Jan 29, 2025
commit b9d09cfb4ca3094fd63071c70aa2f008a70a6f97
3 changes: 3 additions & 0 deletions WebUI/src/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"COM_REQUESTING": "Requesting",
"COM_DEFAULT": "Default",
"COM_STOP": "Stop",
"COM_REQUESTING": "Requesting",
"COM_DEFAULT": "Default",
"COM_STOP": "Stop",
"COM_DEBUG": "Open Developer Logs",
"COM_OPEN_LOCATION": "Open in Folder",
"COM_OPEN_PARAMS": "Parameters Info",
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/assets/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"SETTINGS_TAB_MODEL": "モデル",
"SETTINGS_INFERENCE_DEVICE": "推論デバイス",
"SETTINGS_MODEL_IMAGE_RESOLUTION": "画像解像度",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STANDARD": "標準",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STRANDARD": "標準",
"SETTINGS_MODEL_IMAGE_RESOLUTION_HD": "HD",
"SETTINGS_MODEL_QUALITY": "生成品質",
"SETTINGS_MODEL_QUALITY_STANDARD": "標準",
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/assets/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"SETTINGS_TAB_MODEL": "Modele",
"SETTINGS_INFERENCE_DEVICE": "Urządzenie do wnioskowania",
"SETTINGS_MODEL_IMAGE_RESOLUTION": "Rozdzielczość obrazu",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STANDARD": "Standardowa",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STRANDARD": "Standardowa",
"SETTINGS_MODEL_IMAGE_RESOLUTION_HD": "HD",
"SETTINGS_MODEL_QUALITY": "Jakość generowania",
"SETTINGS_MODEL_QUALITY_STANDARD": "Standardowa",
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/assets/i18n/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"SETTINGS_TAB_MODEL": "โมเดล",
"SETTINGS_INFERENCE_DEVICE": "Inference Device",
"SETTINGS_MODEL_IMAGE_RESOLUTION": "ความละเอียดของภาพ",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STANDARD": "มาตรฐาน",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STRANDARD": "มาตรฐาน",
"SETTINGS_MODEL_IMAGE_RESOLUTION_HD": "HD",
"SETTINGS_MODEL_QUALITY": "คุณภาพที่ต้องการ",
"SETTINGS_MODEL_QUALITY_STANDARD": "มาตรฐาน",
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/assets/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"SETTINGS_TAB_MODEL": "Mẫu",
"SETTINGS_INFERENCE_DEVICE": "Thiết bị suy luận",
"SETTINGS_MODEL_IMAGE_RESOLUTION": "Độ phân giải ảnh",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STANDARD": "Tiêu chuẩn",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STRANDARD": "Tiêu chuẩn",
"SETTINGS_MODEL_IMAGE_RESOLUTION_HD": "Cao",
"SETTINGS_MODEL_QUALITY": "Chất lượng đầu ra",
"SETTINGS_MODEL_QUALITY_STANDARD": "Tiêu chuẩn",
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/assets/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"SETTINGS_TAB_MODEL": "模型",
"SETTINGS_INFERENCE_DEVICE": "推論裝置",
"SETTINGS_MODEL_IMAGE_RESOLUTION": "圖像生成解析度",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STANDARD": "標準",
"SETTINGS_MODEL_IMAGE_RESOLUTION_STRANDARD": "標準",
"SETTINGS_MODEL_IMAGE_RESOLUTION_HD": "高解析",
"SETTINGS_MODEL_QUALITY": "圖像生成畫質",
"SETTINGS_MODEL_QUALITY_STANDARD": "標準畫質",
Expand Down
8 changes: 4 additions & 4 deletions WebUI/src/assets/js/store/comfyUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export const useComfyUi = defineStore(
if (mutableWorkflow[keys[0]].inputs !== undefined) {
if (input.type === 'string')
console.log('actually modifying string', input.label, input.current.value)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(mutableWorkflow[keys[0]].inputs as any)[input.nodeInput] = input.current.value
}
}
Expand Down Expand Up @@ -397,20 +397,20 @@ const settingToComfyInputsName = {
} satisfies Partial<Record<Setting, string[]>>
type ComfySetting = keyof typeof settingToComfyInputsName
const findKeysByTitle = (workflow: ComfyUIApiWorkflow, title: ComfySetting | 'loader' | string) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Object.entries(workflow)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.filter(([_key, value]) => (value as any)?.['_meta']?.title === title)
.map(([key, _value]) => key)
const findKeysByClassType = (workflow: ComfyUIApiWorkflow, classType: string) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Object.entries(workflow)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.filter(([_key, value]) => (value as any)?.['class_type'] === classType)
.map(([key, _value]) => key)
const findKeysByInputsName = (workflow: ComfyUIApiWorkflow, setting: ComfySetting) => {
for (const inputName of settingToComfyInputsName[setting]) {
if (inputName === 'text') continue
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const keys = Object.entries(workflow)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.filter(([_key, value]) => (value as any)?.['inputs']?.[inputName ?? ''] !== undefined)
.map(([key, _value]) => key)
if (keys.length > 0) return keys
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/components/SettingsImageGeneration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
<div class="border-t border-color-spilter items-center flex-wrap grid grid-cols-1 gap-2">
<button class="mt-4" @click="imageGeneration.resetActiveWorkflowSettings">
<div class="svg-icon i-refresh">Reset</div>
{{ languages.COM_LOAD_WORKFLOW_DEFAULTS }}
Load workflow defaults
</button>
</div>
</div>
Expand Down
31 changes: 31 additions & 0 deletions WebUI/src/components/ui/loadImage/LoadImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,34 @@ function processFiles(files: File[] | null, inputCurrent: Ref<string, string>) {
}
}
</script>

<template>
<div ref="imgDropZone" class="flex justify-center relative">
<div
v-show="isOverDropZone"
class="bg-black/70 absolute inset-0 flex items-center justify-center text-white text-lg"
>
Load Image
</div>
<img :src="imageUrlRef.value as string" alt="Image" class="w-64 py-4 object-scale-down" />
</div>
<div class="flex justify-center">
<input
:id="id"
:accept="acceptedImageTypes.join(',')"
type="file"
class="hidden"
v-on:change="(e: Event) => handleFilesEvent(imageUrlRef as Ref<string, string>)(e)"
/>
<label
:for="id"
:class="
cn(
'text-base bg-color-active py-1 px-6 rounded hover:opacity-90 hover:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 ',
props.class,
)
"
>Load Image</label
>
</div>
</template>
2 changes: 1 addition & 1 deletion WebUI/src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ type NumberRange = {
max: number
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type DownloadFailedParams = {
type: 'error' | 'cancelConfrim' | 'cancelDownload' | 'conflict'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
error?: any
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.