Skip to content

[feat] Add ESLint i18n enforcement and fix hardcoded strings #4327

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

Merged
merged 5 commits into from
Jul 2, 2025

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Jul 2, 2025

Adds @intlify/eslint-plugin-vue-i18n to enforce internationalization in Vue components and fixes all existing hardcoded strings.

Key features:

  • ESLint rule blocks new hardcoded user-facing strings (set to error level)
  • Smart ignore patterns for symbols, technical terms, and brand names
  • Fixed all existing violations by adding proper i18n keys and () calls

If run on entire codebase without fixes, this would show errors on these lines:

  • src/components/dialog/content/SettingDialogContent.vue:53 (Loading panel...)
  • src/components/install/InstallLocationPicker.vue:49,58 (App Data/Path labels)
  • src/components/node/NodePreview.vue:18 (PREVIEW badge)
  • src/components/searchbox/NodeSearchBox.vue:30 (Add filter condition)
  • src/components/sidebar/tabs/modelLibrary/ModelPreview.vue:11,15,23,27,31 (Architecture, Author, Usage hint, etc.)

All violations have been fixed by adding translation keys to main.json and updating components to use () calls.

┆Issue is synchronized with this Notion page by Unito

Adds @intlify/eslint-plugin-vue-i18n with smart configuration to enforce
internationalization in Vue components. Fixed all existing hardcoded strings
by adding proper translation keys and using () calls.

- Ignores symbols, single characters, and technical terms
- Blocks hardcoded user-facing strings with ESLint error
- Added translation keys for install paths, model metadata, loading states
- Works with existing pre-commit and CI workflows
Copy link

socket-security bot commented Jul 2, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​intlify/​eslint-plugin-vue-i18n@​3.2.0971008383100

View full report

christian-byrne and others added 3 commits July 2, 2025 00:15
…rings

These refer to Windows directory paths (AppData folder) and should remain
in English as they're technical file system references.
@webfiltered webfiltered merged commit 959ab3b into main Jul 2, 2025
2 checks passed
@webfiltered webfiltered deleted the feat/i18n-eslint-enforcement branch July 2, 2025 07:41
comfy-jinyi pushed a commit that referenced this pull request Jul 4, 2025
comfy-jinyi pushed a commit that referenced this pull request Jul 4, 2025
This was referenced Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants