Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/sidebar/ComfyMenuButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
@click.stop="handleNodes2ToggleClick"
>
<span class="p-menubar-item-label text-nowrap">{{ item.label }}</span>
<Tag severity="info" class="ml-2 text-xs">{{ $t('g.beta') }}</Tag>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Translation key blocked by duplicate in main.json.

The $t('g.beta') will resolve to "BETA" instead of "Beta" due to the duplicate key issue flagged in src/locales/en/main.json line 3. Once that's fixed by using a distinct key (e.g., g.betaTag), update this reference accordingly.

🤖 Prompt for AI Agents
In src/components/sidebar/ComfyMenuButton.vue around line 76, the template
currently uses $t('g.beta') which resolves to the wrong string because of a
duplicate key in src/locales/en/main.json; change the translation reference to
the new distinct key (for example $t('g.betaTag')) to match the updated locales
file, and verify the locales file contains the new key/value ("Beta") so the
component shows the corrected capitalisation.

<ToggleSwitch
v-model="nodes2Enabled"
class="ml-4"
Expand Down Expand Up @@ -101,6 +102,7 @@

<script setup lang="ts">
import type { MenuItem } from 'primevue/menuitem'
import Tag from 'primevue/tag'
import TieredMenu from 'primevue/tieredmenu'
import type { TieredMenuMethods, TieredMenuState } from 'primevue/tieredmenu'
import ToggleSwitch from 'primevue/toggleswitch'
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"g": {
"beta": "Beta",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Duplicate key will cause incorrect value.

This adds a "beta" key, but line 253 already defines "beta": "BETA" in the same "g" object. JSON objects cannot have duplicate keys—only the last definition (line 253: "BETA") will be used. This means the Beta tag in ComfyMenuButton.vue will display "BETA" instead of the intended "Beta".

Solution: Use a distinct key name:

-    "beta": "Beta",
+    "betaTag": "Beta",

Then update ComfyMenuButton.vue line 76:

-        <Tag severity="info" class="ml-2 text-xs">{{ $t('g.beta') }}</Tag>
+        <Tag severity="info" class="ml-2 text-xs">{{ $t('g.betaTag') }}</Tag>

Alternatively, if line 253's "beta": "BETA" is unused, remove it and keep this new entry.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Biome (2.1.2)

[error] 3-3: The key beta was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

🤖 Prompt for AI Agents
In src/locales/en/main.json around line 3 (and referencing the duplicate at line
253), you added a "beta" key that duplicates an existing "beta": "BETA" entry —
JSON will keep only the last one, causing the wrong text to display. Fix by
renaming this new key to a unique name (e.g., "betaLabel") or removing the other
duplicate at line 253; if you rename the key, update ComfyMenuButton.vue (around
line 76) to use the new key name so the intended "Beta" string is used.

"user": "User",
"currentUser": "Current user",
"empty": "Empty",
Expand Down
Loading