feat: use i18n for hardcoded strings in components and pages#2134
feat: use i18n for hardcoded strings in components and pages#2134Sigmabrogz wants to merge 3 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReplaces hard-coded English UI strings with Vue i18n translation keys across multiple components and pages: Package Skills modal, diff ViewerPanel, blog index, and package diff page. Adds corresponding English translations in Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/diff/ViewerPanel.vue (1)
148-148:⚠️ Potential issue | 🟡 MinorSeveral strings remain hardcoded despite having i18n keys available.
The following strings should be localised to complete the i18n work for this component:
Line Current Suggested 148 Options{{ $t('compare.viewer.options') }}301 View file{{ $t('compare.viewer.view_file') }}338 View in code browser{{ $t('compare.viewer.view_in_code_browser') }}348 No content changes detected{{ $t('compare.viewer.no_content_changes') }}These keys already exist in
i18n/locales/en.json(lines 1219, 1225, 1228, 1229).🔧 Proposed fix
<span class="i-lucide:settings w-3.5 h-3.5" /> - Options + {{ $t('compare.viewer.options') }} <spanclass="px-2 py-1 text-xs text-fg-muted hover:text-fg bg-bg-muted border border-border rounded transition-colors" target="_blank" > - View file + {{ $t('compare.viewer.view_file') }} </NuxtLink>class="text-xs text-fg-muted hover:text-fg underline" > - View in code browser + {{ $t('compare.viewer.view_in_code_browser') }} </NuxtLink><div v-else-if="diff && diff.hunks.length === 0" class="py-8 text-center text-fg-muted text-sm" > - No content changes detected + {{ $t('compare.viewer.no_content_changes') }} </div>Also applies to: 301-301, 338-338, 348-348
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8c3bd668-6049-407a-bf86-541c8f6aa8a9
📒 Files selected for processing (5)
app/components/Package/SkillsModal.vueapp/components/diff/ViewerPanel.vueapp/pages/blog/index.vueapp/pages/diff/[[org]]/[packageName]/v/[versionRange].vuei18n/locales/en.json
|
I've updated the remaining hardcoded strings in |
|
Thanks for jumping on this issue! I've just merged #2140 since it was ready to go, but I appreciate you taking the time to work on it. 🙏 |
Closes #2128
Replaced hardcoded strings with i18n translations across the following files:
app/pages/blog/index.vueapp/pages/diff/[[org]]/[packageName]/v/[versionRange].vueapp/components/diff/ViewerPanel.vueapp/components/Package/SkillsModal.vueAdded missing keys to
en.json.