Skip to content

I18n translation#47

Open
Lantum-Brendan wants to merge 13 commits intoflatrun:mainfrom
Lantum-Brendan:i18n-translation
Open

I18n translation#47
Lantum-Brendan wants to merge 13 commits intoflatrun:mainfrom
Lantum-Brendan:i18n-translation

Conversation

@Lantum-Brendan
Copy link

@Lantum-Brendan Lantum-Brendan commented Mar 2, 2026

This PR handles a slight setup documentation modification and handles translation to locale languages.

2026-03-04.14-53-11.mp4

@Lantum-Brendan Lantum-Brendan marked this pull request as ready for review March 4, 2026 13:46
@sourceant
Copy link

sourceant bot commented Mar 4, 2026

Code Review Summary

This PR implements Internationalization (i18n) across the dashboard. It introduces translation files for multiple languages (EN, FR, DE, ES, PT, IT) and updates UI components to use the useI18n hook. It also refines some API URL configurations in the documentation.

🚀 Key Improvements

  • Full i18n coverage for all primary views and components.
  • Added a robust LanguageSelector component with flag icons.
  • Updated README documentation to prevent common API URL configuration errors.
  • Added comprehensive vitest.setup.ts to support i18n in unit tests.

💡 Minor Suggestions

  • Deduplicate token normalization helper functions across views.
  • Use translation keys for error strings in the Auth store.

🚨 Critical Issues

  • Broken unit test in BackupsTab.test.ts due to case sensitivity mismatch in status badges.

Copy link

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

error.value = "";
const normalizedApiKey = apiKey.trim();

if (!normalizedApiKey) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message 'API key is required' is still hardcoded while the rest of the app has been internationalized. This should use the $t function or be handled in the view layer with a translation key.

Suggested change
if (!normalizedApiKey) {
if (!normalizedApiKey) {
error.value = "auth.errors.apiKeyRequired";
loading.value = false;
return false;
}

@@ -951,12 +974,18 @@ const deleteCredential = async () => {
try {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When calling templatesApi.refresh(), the response potentially contains a count or message that is being ignored in favor of a static notification. It's better to verify if the count needs to be passed to the translation string.

Suggested change
try {
const response = await templatesApi.refresh();
notifications.success(
t("settings.general.quickActions.templatesRefreshedTitle"),
t("settings.general.quickActions.templatesRefreshedDesc", { n: response.data.count || 0 })
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant