fix(i18n): extract untranslated hardcoded strings#2181
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✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4dcd7d9 to
87cbc54
Compare
87cbc54 to
a487a11
Compare
a487a11 to
cf190cf
Compare
cf190cf to
db14455
Compare
📝 WalkthroughWalkthroughThis pull request refactors the internationalisation layer for settings UI labels and package documentation. The Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 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
🧹 Nitpick comments (1)
app/pages/package-docs/[...path].vue (1)
13-13: Align with the project's established$t()pattern in<script setup>.This page unnecessarily destructures
tfromuseI18n()instead of using the auto-injected$t(). Other pages across the project (index.vue, about.vue, etc.) use$t()directly within script setup callbacks, including useSeoMeta and other composables.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 879a087c-1be9-42bf-b663-4c4d635c1fc7
📒 Files selected for processing (33)
app/components/Settings/AccentColorPicker.vueapp/components/Settings/BgThemePicker.vueapp/composables/useSettings.tsapp/pages/package-docs/[...path].vueapp/pages/settings.vuei18n/locales/ar.jsoni18n/locales/az-AZ.jsoni18n/locales/bg-BG.jsoni18n/locales/bn-IN.jsoni18n/locales/cs-CZ.jsoni18n/locales/de-DE.jsoni18n/locales/en.jsoni18n/locales/es.jsoni18n/locales/fr-FR.jsoni18n/locales/hi-IN.jsoni18n/locales/hu-HU.jsoni18n/locales/id-ID.jsoni18n/locales/it-IT.jsoni18n/locales/ja-JP.jsoni18n/locales/kn-IN.jsoni18n/locales/mr-IN.jsoni18n/locales/nb-NO.jsoni18n/locales/ne-NP.jsoni18n/locales/pl-PL.jsoni18n/locales/pt-BR.jsoni18n/locales/ru-RU.jsoni18n/locales/ta-IN.jsoni18n/locales/te-IN.jsoni18n/locales/tr-TR.jsoni18n/locales/uk-UA.jsoni18n/locales/zh-CN.jsoni18n/locales/zh-TW.jsoni18n/schema.json
|
|
||
| defineOgImageComponent('Default', { | ||
| title: () => `${pkg.value?.name ?? 'Package'} - Docs`, | ||
| title: () => t('package.docs.og_title', { name: pkg.value?.name ?? 'Package' }), |
There was a problem hiding this comment.
Localise the OG fallback token too.
'Package' is still hardcoded English. Use an existing translated key for the fallback to keep this path fully localised.
💡 Suggested patch
- title: () => t('package.docs.og_title', { name: pkg.value?.name ?? 'Package' }),
+ title: () => t('package.docs.og_title', { name: pkg.value?.name ?? t('package.navigation') }),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| title: () => t('package.docs.og_title', { name: pkg.value?.name ?? 'Package' }), | |
| title: () => t('package.docs.og_title', { name: pkg.value?.name ?? t('package.navigation') }), |

🔗 Linked issue
N/A (I think)
🧭 Context
Found some untranslated hardcoded user-visible English strings
📚 Description
Extract them and translate to French