mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Lint: Adding more checks for non internationalized strings (#5625)
## Summary Catch more user visible (or audible) text that isn't internationalizable. ## Changes - **What**: Linter now checks other attributes for raw text. ## Review Focus What other properties have leaked English text to non-English locales that aren't in here?
This commit is contained in:
@@ -191,6 +191,19 @@ export default defineConfig([
|
||||
'@intlify/vue-i18n/no-raw-text': [
|
||||
'error',
|
||||
{
|
||||
attributes: {
|
||||
'/.+/': [
|
||||
'aria-label',
|
||||
'aria-placeholder',
|
||||
'aria-roledescription',
|
||||
'aria-valuetext',
|
||||
'label',
|
||||
'placeholder',
|
||||
'title',
|
||||
'v-tooltip'
|
||||
],
|
||||
img: ['alt']
|
||||
},
|
||||
// Ignore strings that are:
|
||||
// 1. Less than 2 characters
|
||||
// 2. Only symbols/numbers/whitespace (no letters)
|
||||
@@ -200,24 +213,27 @@ export default defineConfig([
|
||||
ignoreNodes: ['md-icon', 'v-icon', 'pre', 'code', 'script', 'style'],
|
||||
// Brand names and technical terms that shouldn't be translated
|
||||
ignoreText: [
|
||||
'ComfyUI',
|
||||
'GitHub',
|
||||
'OpenAI',
|
||||
'API',
|
||||
'URL',
|
||||
'JSON',
|
||||
'YAML',
|
||||
'GPU',
|
||||
'CPU',
|
||||
'RAM',
|
||||
'GB',
|
||||
'MB',
|
||||
'KB',
|
||||
'ms',
|
||||
'fps',
|
||||
'px',
|
||||
'App Data:',
|
||||
'App Path:'
|
||||
'App Path:',
|
||||
'ComfyUI',
|
||||
'CPU',
|
||||
'fps',
|
||||
'GB',
|
||||
'GitHub',
|
||||
'GPU',
|
||||
'JSON',
|
||||
'KB',
|
||||
'LoRA',
|
||||
'MB',
|
||||
'ms',
|
||||
'OpenAI',
|
||||
'png',
|
||||
'px',
|
||||
'RAM',
|
||||
'URL',
|
||||
'YAML',
|
||||
'1.2 MB'
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
/>
|
||||
|
||||
<SliderControl
|
||||
label="Stepsize"
|
||||
:label="$t('maskEditor.stepSize')"
|
||||
:min="1"
|
||||
:max="100"
|
||||
:step="1"
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
class="inline-block h-6 w-6 overflow-hidden rounded-[6px] border-0 bg-secondary-background"
|
||||
:style="{ marginLeft: idx === 0 ? '0' : '-12px' }"
|
||||
>
|
||||
<img :src="url" alt="preview" class="h-full w-full object-cover" />
|
||||
<img
|
||||
:src="url"
|
||||
:alt="$t('sideToolbar.queueProgressOverlay.preview')"
|
||||
class="h-full w-full object-cover"
|
||||
/>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<template #default="{ close }">
|
||||
<IconTextButton
|
||||
type="secondary"
|
||||
label="Settings"
|
||||
:label="$t('g.settings')"
|
||||
@click="
|
||||
() => {
|
||||
close()
|
||||
@@ -43,7 +43,7 @@
|
||||
</IconTextButton>
|
||||
<IconTextButton
|
||||
type="primary"
|
||||
label="Profile"
|
||||
:label="$t('g.profile')"
|
||||
@click="
|
||||
() => {
|
||||
close()
|
||||
@@ -65,7 +65,7 @@
|
||||
v-model="selectedFrameworks"
|
||||
v-model:search-query="searchText"
|
||||
class="w-[250px]"
|
||||
label="Select Frameworks"
|
||||
:label="$t('assetBrowser.selectFrameworks')"
|
||||
:options="frameworkOptions"
|
||||
:show-search-box="true"
|
||||
:show-selected-count="true"
|
||||
@@ -73,12 +73,12 @@
|
||||
/>
|
||||
<MultiSelect
|
||||
v-model="selectedProjects"
|
||||
label="Select Projects"
|
||||
:label="$t('assetBrowser.selectProjects')"
|
||||
:options="projectOptions"
|
||||
/>
|
||||
<SingleSelect
|
||||
v-model="selectedSort"
|
||||
label="Sorting Type"
|
||||
:label="$t('assetBrowser.sortingType')"
|
||||
:options="sortOptions"
|
||||
class="w-[135px]"
|
||||
>
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
"dropYourFileOr": "Drop your file or",
|
||||
"back": "Back",
|
||||
"next": "Next",
|
||||
"submit": "Submit",
|
||||
"install": "Install",
|
||||
"installing": "Installing",
|
||||
"overwrite": "Overwrite",
|
||||
@@ -234,6 +235,7 @@
|
||||
"frameNodes": "Frame Nodes",
|
||||
"listening": "Listening...",
|
||||
"ready": "Ready",
|
||||
"playPause": "Play/Pause",
|
||||
"playRecording": "Play Recording",
|
||||
"playing": "Playing",
|
||||
"stopPlayback": "Stop Playback",
|
||||
@@ -242,7 +244,9 @@
|
||||
"halfSpeed": "0.5x",
|
||||
"1x": "1x",
|
||||
"2x": "2x",
|
||||
"beta": "BETA"
|
||||
"beta": "BETA",
|
||||
"profile": "Profile",
|
||||
"noItems": "No items"
|
||||
},
|
||||
"manager": {
|
||||
"title": "Custom Nodes Manager",
|
||||
@@ -689,6 +693,7 @@
|
||||
"currentNode": "Current node:",
|
||||
"viewAllJobs": "View all jobs",
|
||||
"running": "running",
|
||||
"preview": "Preview",
|
||||
"interruptAll": "Interrupt all running jobs",
|
||||
"moreOptions": "More options",
|
||||
"showAssets": "Show assets",
|
||||
@@ -930,6 +935,7 @@
|
||||
"thickness": "Thickness",
|
||||
"opacity": "Opacity",
|
||||
"hardness": "Hardness",
|
||||
"stepSize": "Step Size",
|
||||
"smoothingPrecision": "Smoothing Precision",
|
||||
"resetToDefault": "Reset to Default",
|
||||
"paintBucketSettings": "Paint Bucket Settings",
|
||||
@@ -1835,6 +1841,7 @@
|
||||
"title": "Subscription",
|
||||
"titleUnsubscribed": "Subscribe to Comfy Cloud",
|
||||
"comfyCloud": "Comfy Cloud",
|
||||
"comfyCloudLogo": "Comfy Cloud Logo",
|
||||
"beta": "BETA",
|
||||
"perMonth": "USD / month",
|
||||
"renewsDate": "Renews {date}",
|
||||
@@ -2070,6 +2077,7 @@
|
||||
"cloudSurvey_steps_making": "What do you plan on making?",
|
||||
"assetBrowser": {
|
||||
"assets": "Assets",
|
||||
"assetCollection": "Asset collection",
|
||||
"checkpoints": "Checkpoints",
|
||||
"browseAssets": "Browse Assets",
|
||||
"noAssetsFound": "No assets found",
|
||||
@@ -2120,6 +2128,9 @@
|
||||
"sortZA": "Z-A",
|
||||
"sortRecent": "Recent",
|
||||
"sortPopular": "Popular",
|
||||
"selectFrameworks": "Select Frameworks",
|
||||
"selectProjects": "Select Projects",
|
||||
"sortingType": "Sorting Type",
|
||||
"errorFileTooLarge": "File exceeds the maximum allowed size limit",
|
||||
"errorFormatNotAllowed": "Only SafeTensor format is allowed",
|
||||
"errorUnsafePickleScan": "CivitAI detected potentially unsafe code in this file",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
data-component-id="AssetGrid"
|
||||
:style="gridStyle"
|
||||
role="grid"
|
||||
aria-label="Asset collection"
|
||||
:aria-label="$t('assetBrowser.assetCollection')"
|
||||
:aria-rowcount="-1"
|
||||
:aria-colcount="-1"
|
||||
:aria-setsize="assets.length"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<IconTextButton
|
||||
v-if="asset?.kind !== '3D'"
|
||||
type="transparent"
|
||||
label="Inspect asset"
|
||||
:label="$t('queue.jobMenu.inspectAsset')"
|
||||
@click="handleInspect"
|
||||
>
|
||||
<template #icon>
|
||||
@@ -17,7 +17,7 @@
|
||||
<IconTextButton
|
||||
v-if="showAddToWorkflow"
|
||||
type="transparent"
|
||||
label="Add to current workflow"
|
||||
:label="$t('queue.jobMenu.addToCurrentWorkflow')"
|
||||
@click="handleAddToWorkflow"
|
||||
>
|
||||
<template #icon>
|
||||
@@ -25,7 +25,11 @@
|
||||
</template>
|
||||
</IconTextButton>
|
||||
|
||||
<IconTextButton type="transparent" label="Download" @click="handleDownload">
|
||||
<IconTextButton
|
||||
type="transparent"
|
||||
:label="$t('queue.jobMenu.download')"
|
||||
@click="handleDownload"
|
||||
>
|
||||
<template #icon>
|
||||
<i class="icon-[lucide--download] size-4" />
|
||||
</template>
|
||||
@@ -36,7 +40,7 @@
|
||||
<IconTextButton
|
||||
v-if="showWorkflowActions"
|
||||
type="transparent"
|
||||
label="Open as workflow in new tab"
|
||||
:label="$t('queue.jobMenu.openAsWorkflowNewTab')"
|
||||
@click="handleOpenWorkflow"
|
||||
>
|
||||
<template #icon>
|
||||
@@ -47,7 +51,7 @@
|
||||
<IconTextButton
|
||||
v-if="showWorkflowActions"
|
||||
type="transparent"
|
||||
label="Export workflow"
|
||||
:label="$t('queue.jobMenu.exportWorkflow')"
|
||||
@click="handleExportWorkflow"
|
||||
>
|
||||
<template #icon>
|
||||
@@ -60,7 +64,7 @@
|
||||
<IconTextButton
|
||||
v-if="showCopyJobId"
|
||||
type="transparent"
|
||||
label="Copy job ID"
|
||||
:label="$t('queue.jobMenu.copyJobId')"
|
||||
@click="handleCopyJobId"
|
||||
>
|
||||
<template #icon>
|
||||
@@ -73,7 +77,7 @@
|
||||
<IconTextButton
|
||||
v-if="shouldShowDeleteButton"
|
||||
type="transparent"
|
||||
label="Delete"
|
||||
:label="$t('queue.jobMenu.delete')"
|
||||
@click="handleDelete"
|
||||
>
|
||||
<template #icon>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="flex justify-between pt-4">
|
||||
<span />
|
||||
<Button
|
||||
label="Next"
|
||||
:label="$t('g.next')"
|
||||
:disabled="!validStep1"
|
||||
class="h-10 w-full border-none text-white"
|
||||
@click="goTo(2, activateCallback)"
|
||||
@@ -84,20 +84,22 @@
|
||||
<InputText
|
||||
v-model="surveyData.useCaseOther"
|
||||
class="w-full"
|
||||
placeholder="Please specify"
|
||||
:placeholder="
|
||||
$t('cloudOnboarding.survey.options.industry.otherPlaceholder')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-6 pt-4">
|
||||
<Button
|
||||
label="Back"
|
||||
:label="$t('g.back')"
|
||||
severity="secondary"
|
||||
class="flex-1 text-white"
|
||||
@click="goTo(1, activateCallback)"
|
||||
/>
|
||||
<Button
|
||||
label="Next"
|
||||
:label="$t('g.next')"
|
||||
:disabled="!validStep2"
|
||||
class="h-10 flex-1 text-white"
|
||||
@click="goTo(3, activateCallback)"
|
||||
@@ -137,20 +139,22 @@
|
||||
<InputText
|
||||
v-model="surveyData.industryOther"
|
||||
class="w-full"
|
||||
placeholder="Please specify"
|
||||
:placeholder="
|
||||
$t('cloudOnboarding.survey.options.industry.otherPlaceholder')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-6 pt-4">
|
||||
<Button
|
||||
label="Back"
|
||||
:label="$t('g.back')"
|
||||
severity="secondary"
|
||||
class="flex-1 text-white"
|
||||
@click="goTo(2, activateCallback)"
|
||||
/>
|
||||
<Button
|
||||
label="Next"
|
||||
:label="$t('g.next')"
|
||||
:disabled="!validStep3"
|
||||
class="h-10 flex-1 border-none text-white"
|
||||
@click="goTo(4, activateCallback)"
|
||||
@@ -189,13 +193,13 @@
|
||||
|
||||
<div class="flex gap-6 pt-4">
|
||||
<Button
|
||||
label="Back"
|
||||
:label="$t('g.back')"
|
||||
severity="secondary"
|
||||
class="flex-1 text-white"
|
||||
@click="goTo(3, activateCallback)"
|
||||
/>
|
||||
<Button
|
||||
label="Submit"
|
||||
:label="$t('g.submit')"
|
||||
:disabled="!validStep4 || isSubmitting"
|
||||
:loading="isSubmitting"
|
||||
class="h-10 flex-1 border-none text-white"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="mx-auto flex h-[7%] max-h-[70px] w-5/6 items-end">
|
||||
<img
|
||||
src="/assets/images/comfy-cloud-logo.svg"
|
||||
alt="Comfy Cloud Logo"
|
||||
:alt="$t('subscription.comfyCloudLogo')"
|
||||
class="h-3/4 max-h-10 w-auto"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div
|
||||
role="button"
|
||||
:tabindex="0"
|
||||
aria-label="Play/Pause"
|
||||
:aria-label="$t('g.playPause')"
|
||||
class="flex size-6 cursor-pointer items-center justify-center rounded hover:bg-interface-menu-component-surface-hovered"
|
||||
@click="togglePlayPause"
|
||||
>
|
||||
@@ -64,7 +64,7 @@
|
||||
<div
|
||||
role="button"
|
||||
:tabindex="0"
|
||||
aria-label="Volume"
|
||||
:aria-label="$t('g.volume')"
|
||||
class="flex size-6 cursor-pointer items-center justify-center rounded hover:bg-interface-menu-component-surface-hovered"
|
||||
@click="toggleMute"
|
||||
>
|
||||
@@ -85,7 +85,7 @@
|
||||
ref="optionsButtonRef"
|
||||
role="button"
|
||||
:tabindex="0"
|
||||
aria-label="More Options"
|
||||
:aria-label="$t('g.moreOptions')"
|
||||
class="flex size-6 cursor-pointer items-center justify-center rounded hover:bg-interface-menu-component-surface-hovered"
|
||||
@click="toggleOptionsMenu"
|
||||
>
|
||||
|
||||
@@ -72,7 +72,7 @@ const searchQuery = defineModel<string>('searchQuery')
|
||||
class="absolute inset-0 flex items-center justify-center"
|
||||
>
|
||||
<i
|
||||
title="No items"
|
||||
:title="$t('g.noItems')"
|
||||
class="icon-[lucide--circle-off] size-30 text-zinc-500/20"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@ function handleSortSelected(item: SortOption) {
|
||||
v-model="searchQuery"
|
||||
type="text"
|
||||
:class="resetInputStyle"
|
||||
placeholder="Search"
|
||||
:placeholder="$t('g.search')"
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -49,7 +49,13 @@
|
||||
size="small"
|
||||
class="font-bold"
|
||||
severity="secondary"
|
||||
:aria-label="progressDialogContent.isExpanded ? 'Collapse' : 'Expand'"
|
||||
:aria-label="
|
||||
$t(
|
||||
progressDialogContent.isExpanded
|
||||
? 'contextMenu.Collapse'
|
||||
: 'contextMenu.Expand'
|
||||
)
|
||||
"
|
||||
@click.stop="progressDialogContent.toggle"
|
||||
/>
|
||||
<Button
|
||||
@@ -59,7 +65,7 @@
|
||||
size="small"
|
||||
class="font-bold"
|
||||
severity="secondary"
|
||||
aria-label="Close"
|
||||
:aria-label="$t('g.close')"
|
||||
@click.stop="closeDialog"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -71,8 +71,13 @@ const mountComponent = (options: { captureError?: boolean } = {}) => {
|
||||
messages: {
|
||||
en: {
|
||||
g: {
|
||||
close: 'Close',
|
||||
progressCountOf: 'of'
|
||||
},
|
||||
contextMenu: {
|
||||
Collapse: 'Collapse',
|
||||
Expand: 'Expand'
|
||||
},
|
||||
manager: {
|
||||
clickToFinishSetup: 'Click',
|
||||
applyChanges: 'Apply Changes',
|
||||
|
||||
Reference in New Issue
Block a user