Refactor modals into partials and add missing i18n keys for settings#658
Refactor modals into partials and add missing i18n keys for settings#658Skillkiller wants to merge 5 commits intoalam00000:mainfrom
Conversation
📝 WalkthroughWalkthroughThis PR extracts the "Settings/Shortcuts" and "Warning" modal markup from inline HTML in Changes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/partials/warning-modal.html`:
- Around line 1-45: The template uses a non-existent Tailwind class
"bg-gray-850" (seen on the modal container with id "warning-modal" / class list)
which breaks styling; fix by either adding a custom color token for
--color-gray-850 in your Tailwind `@theme` extension in styles.css (so
"bg-gray-850" becomes valid) or replace "bg-gray-850" with an existing palette
class such as "bg-gray-800" or "bg-gray-900" in the warning modal (and make the
same replacement for the identical occurrence in the settings modal).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f4a1a378-5bc7-4366-a7a7-83d717d7121c
📒 Files selected for processing (7)
index.htmlpublic/locales/de/common.jsonpublic/locales/en/common.jsonsimple-index.htmlsrc/js/main.tssrc/partials/settings-modal.htmlsrc/partials/warning-modal.html
Description
In the settings menu, there were two options that hadn't been translated yet (see #593). I have now implemented the missing i18n keys in the HTML files and added the corresponding German and English translations.
During implementation, I noticed that the buttons within the warning dialogs were also untranslated. I’ve addressed this by adding the necessary translation keys to both the HTML and the TypeScript logic.
To improve maintainability, I refactored these dialogs into separate HTML partials. This allowed me to remove redundant code from index.html and simple-index.html. Consequently, any future changes only need to be made in one central location rather than being applied twice.
Fixes #593
Type of change
🧪 How Has This Been Tested?
Checklist:
Expected Results:
Checklist:
Summary by CodeRabbit
New Features
Localization