-
Notifications
You must be signed in to change notification settings - Fork 433
Lint: Adding more checks for non internationalized strings #5625
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
Changes from all commits
d832a62
14e3776
963c32b
f04f2c1
4ac8161
7fee326
4e0030c
8967d92
d975a19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
Myestery marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // 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: [ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [quality] low Priority Issue: Inconsistent ordering in ignoreText array
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's alphabetical, except for |
||
| 'ComfyUI', | ||
| 'GitHub', | ||
| 'OpenAI', | ||
| 'API', | ||
| 'URL', | ||
| 'JSON', | ||
| 'YAML', | ||
| 'GPU', | ||
| 'App Data:', | ||
| 'App Path:', | ||
| 'ComfyUI', | ||
| 'CPU', | ||
| 'RAM', | ||
| 'fps', | ||
| 'GB', | ||
| 'MB', | ||
| 'GitHub', | ||
| 'GPU', | ||
| 'JSON', | ||
| 'KB', | ||
| 'LoRA', | ||
| 'MB', | ||
| 'ms', | ||
| 'fps', | ||
| 'OpenAI', | ||
| 'png', | ||
| 'px', | ||
| 'App Data:', | ||
| 'App Path:' | ||
| 'RAM', | ||
| 'URL', | ||
| 'YAML', | ||
| '1.2 MB' | ||
| ] | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,7 +80,7 @@ | |
| /> | ||
|
|
||
| <SliderControl | ||
| label="Stepsize" | ||
| :label="$t('maskEditor.stepSize')" | ||
| :min="1" | ||
| :max="100" | ||
| :step="1" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[performance] medium Priority
Issue: Potentially inefficient regex pattern /.+/ used for all element attributes
Context: The pattern /.+/ will match every element in the Vue templates, which could slow down linting on large components with many elements
Suggestion: Consider using more specific element patterns or grouping common attributes to avoid the catch-all regex that processes every single element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If only...
But we could split this and some other slow rules out to a dedicated config (later).