Skip to content

Conversation

rohitkrai03
Copy link
Contributor

@rohitkrai03 rohitkrai03 commented Sep 17, 2025

Hey, I just made a Pull Request!

Fixes - https://issues.redhat.com/browse/RHIDP-8780

Added internationalization (i18n) support to Homepage plugin

  • Multi-language support: English (default), German, French, Italian, and Spanish
  • Translation infrastructure: Built with Backstage's @backstage/core-plugin-api/alpha using createTranslationRef, translation resources, and semantic key structures with parameter interpolation
  • Unit test mocking: Created reusable translation test utilities (mockTranslations.ts) that use actual English strings as single source of truth - can be copied to other plugins

The plugin now supports multiple languages with proper fallbacks and maintains all existing functionality. The translation infrastructure and test patterns established here can be reused across other Backstage plugins.

Languages added:

  • 🇩🇪 German (de)
  • 🇫🇷 French (fr)
  • 🇮🇹 Italian (it)
  • 🇪🇸 Spanish (es)
  • 🇺🇸 English (en) - default
Screen.Recording.2025-09-18.at.2.01.20.AM.mov

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Sep 17, 2025

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/homepage/packages/app none v0.0.0
@red-hat-developer-hub/backstage-plugin-dynamic-home-page workspaces/homepage/plugins/dynamic-home-page minor v1.7.0

Copy link
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

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

Just small suggestions. I think we don't need the trans component. Wdyt?

Copy link
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

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

Awesome work. I just believe we don't need the trans component. Wdyt?

Signed-off-by: Rohit Rai <rohitkrai03@gmail.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
28.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

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

featuredDocs.learnMore contains still a prefix space but we can merge it anyway now to rebase other PRs.

Thanks @rohitkrai03 👍

@christoph-jerolimov christoph-jerolimov merged commit 8b64e16 into redhat-developer:main Sep 24, 2025
8 of 9 checks passed
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