Comfy-Org / Comfy-Org/ComfyUI_frontend
fix: replace hardcoded error strings in UserSelectView with vue-i18n translations
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
Two user-facing error messages in `src/views/UserSelectView.vue` are hardcoded strings instead of using vue-i18n, which is inconsistent with the rest of the component that uses `$t()` for all other visible text.
## Details
- **Line 67:** `User "${newUsername.value}" already exists`
- **Line 79:** `No user selected`
## Proposed Fix
1. Add i18n keys to `src/locales/en/main.json` (e.g. `errors.userExists` and `errors.noUserSelected`)
2. Update `src/views/UserSelectView.vue` to use `$t('errors.userExists', { name: newUsername.value })` and `$t('errors.noUserSelected')`
3. Update `src/views/UserSelectView.test.ts` to assert against the translated text
## References
- Flagged during review of PR #11959 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/11959#discussion_r3188607090)
- Requested by: @pythongosssss
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11966-fix-replace-hardcoded-error-strings-in-UserSelectView-with-vue-i18n-translations-3576d73d36508126b5c3e2b089e2978f) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.