Skip to content

Conversation

@andreaskienle
Copy link
Contributor

@andreaskienle andreaskienle commented Aug 6, 2025

This PR adds eslint-plugin-i18next to automatically detect missing i18next translations.

A lot of changes to the eslint.config.js file but most of them are just the prettier (see commits).

@andreaskienle andreaskienle marked this pull request as ready for review August 6, 2025 10:55
@andreaskienle andreaskienle requested a review from Copilot August 6, 2025 10:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds eslint-plugin-i18next to detect missing internationalization translations and ensures existing hardcoded strings are properly translated. The main purpose is to enforce i18n best practices and prevent untranslated text from being displayed to users.

  • Adds eslint-plugin-i18next dependency and configuration to enforce i18n usage
  • Replaces hardcoded strings with translated versions using the t() function
  • Adds ESLint disable comments for legitimate literal strings (like shell command syntax)

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
eslint.config.js Adds i18next plugin configuration and converts quotes from double to single
package.json Adds eslint-plugin-i18next dependency
public/locales/en.json Adds translation keys for newly internationalized strings
src/components/Core/ShellBar.tsx Replaces "Beta" hardcoded text with translation
src/components/Core/IntelligentBreadcrumbs.tsx Replaces "Projects", "Workspaces", "MCPs" with translations
src/components/ControlPlanes/CopyKubeconfigButton.tsx Replaces "Kubeconfig" with translation
src/components/Dialogs/KubectlCommandInfo/KubectlBaseDialog.tsx Replaces "Close" with translation
src/components/Dialogs/KubectlCommandInfo/KubectlTerminal.tsx Adds ESLint disable comments for shell command literals
Comments suppressed due to low confidence (4)

src/components/Core/ShellBar.tsx:50

  • The addition of useTranslation hook introduces new behavior that should be covered by tests to ensure the translation key 'ShellBar.betaButton' is properly resolved.
  const { t } = useTranslation();

src/components/Core/IntelligentBreadcrumbs.tsx:33

  • The translation changes for breadcrumb items lack test coverage to verify that the correct translation keys are used and properly rendered.
            <BreadcrumbsItem href={`${PREFIX}/projects`}>{t('IntelligentBreadcrumbs.projects')}</BreadcrumbsItem>

src/components/ControlPlanes/CopyKubeconfigButton.tsx:29

  • The replacement of hardcoded 'Kubeconfig' text with translation should be tested to ensure the translation key resolves correctly.
        {t('CopyKubeconfigButton.kubeconfigButton')}

src/components/Dialogs/KubectlCommandInfo/KubectlBaseDialog.tsx:87

  • The change from hardcoded 'Close' to translation key 'common.close' should be tested to verify proper translation rendering in the dialog footer.
      footer={<Bar endContent={<Button onClick={onClose}>{t('common.close')}</Button>} />}

@andreaskienle andreaskienle merged commit 96b60c8 into main Aug 6, 2025
5 checks passed
@andreaskienle andreaskienle deleted the i18next-lint branch August 6, 2025 13:05
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.

2 participants