externalize hardcoded UI strings, add Hebrew translation and RTL support#488
Closed
cdtauman wants to merge 4 commits into
Closed
externalize hardcoded UI strings, add Hebrew translation and RTL support#488cdtauman wants to merge 4 commits into
cdtauman wants to merge 4 commits into
Conversation
…implement RTL layout support
- i18n & Localization Dictionaries:
* Restructured and added new keys to 'en-US.json' (sample prompts for chat/image/video, ComfyUI settings, and unified preset names/descriptions/tags).
* Synchronized 'he-IL.json' to align 100% with the updated English dictionary (0 missing/extra keys).
* Registered Hebrew ('he-IL') in the active language options list.
- RTL Layout & Navigation Integration:
* Implemented 'isRTL' computed state in the i18n store.
* Added watcher to dynamically toggle 'document.documentElement.dir' ('rtl' / 'ltr') and 'lang' attributes on language swap.
* Migrated hardcoded margins/paddings (e.g., mr-*, ml-*) to logical CSS properties (me-*, ms-*, start-*, end-*) across 60+ components.
- UI & Code Cleanups:
* Replaced hardcoded text with dynamic 'languages.*' translation keys in App.vue, Chat.vue, PromptArea.vue, and other sub-components.
* Created helper translation functions in 'utils.ts' for dynamic presets, descriptions, variants, and tags (e.g., 'translatePresetName').
* Formatted code to meet project Prettier rules and verified zero ESLint/TS errors.
3 tasks
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This pull request externalizes remaining hardcoded UI text strings into dynamic localization keys in
en-US.json(establishing a clean foundation for future language contributions) and introduces full Hebrew translation along with complete Right-to-Left (RTL) layout adaptations across all components.Related Issue:
None.
Changes Made:
Global UI String Externalization (Paving the way for future languages):
languages.*references.en-US.jsonwith unified keys for preset names, descriptions, tags, sample prompts, and advanced settings, allowing any future translation files to easily map the entire application.Hebrew Localization:
he-IL.jsonsynchronized 100% with the updated English dictionary (0 missing/extra keys).RTL Engine & Layout Adaptations:
isRTLcomputed property in thei18nstore.document.documentElement.dir = 'rtl'(or'ltr') anddocument.documentElement.langglobally on language swap.ml-*/mr-*with logical CSS properties likems-*,me-*,start-*,end-*) to ensure perfect visual presentation in both LTR and RTL.Dynamic Translation Utilities:
translatePresetName,translatePresetDescription, etc.) inutils.tsto translate dynamically populated presets, descriptions, and tags.Testing Done:
npm run lint:ci) passed successfully with 0 errors.npm run format:ci) passed successfully.npx vue-tsc --noEmit) compiled successfully with no type errors.