Skip to content

feat(#4655): add AI Catalog translations for supported RHDH locales - #4841

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/4655-ai-catalog-translations
Open

fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/4655-ai-catalog-translations

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Add German, Spanish, French, Italian, and Japanese translation files for the Boost AI Catalog frontend plugin. Each locale file uses createTranslationMessages with flattened dot-notation keys matching the boostTranslationRef, and all five are registered as lazy imports in the translation resource.

Changes:

  • Create de.ts, es.ts, fr.ts, it.ts, ja.ts locale files under
    plugins/boost/src/translations/
  • Register lazy locale imports in src/translations/index.ts
  • Add ref.test.ts with key parity and placeholder preservation
    tests for all five locales
  • Add Playwright locale coverage test for representative strings
  • Update existing e2e tests to skip on non-English locales
  • Update playwright.config.ts to include all six locales
  • Add changeset for minor version bump
  • Archive the ai-catalog-frontend-translations OpenSpec change
  • Update specifications/CURRENT.md to reflect completed work

Tasks 10 (dev app locale switching) and 11 (English fallback) are runtime verification steps that cannot be executed in the sandbox environment; all other tasks are complete.


Closes #4655

Post-script verification

  • Branch is not main/master (agent/4655-ai-catalog-translations)
  • Secret scan passed (gitleaks — ce6f5f564c3de015df98325f90e9e763c00b0abe..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Add German, Spanish, French, Italian, and Japanese translation
files for the Boost AI Catalog frontend plugin. Each locale file
uses createTranslationMessages with flattened dot-notation keys
matching the boostTranslationRef, and all five are registered as
lazy imports in the translation resource.

Changes:
- Create de.ts, es.ts, fr.ts, it.ts, ja.ts locale files under
  plugins/boost/src/translations/
- Register lazy locale imports in src/translations/index.ts
- Add ref.test.ts with key parity and placeholder preservation
  tests for all five locales
- Add Playwright locale coverage test for representative strings
- Update existing e2e tests to skip on non-English locales
- Update playwright.config.ts to include all six locales
- Add changeset for minor version bump
- Archive the ai-catalog-frontend-translations OpenSpec change
- Update specifications/CURRENT.md to reflect completed work

Tasks 10 (dev app locale switching) and 11 (English fallback)
are runtime verification steps that cannot be executed in the
sandbox environment; all other tasks are complete.

Closes #4655
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 17, 2026
@rhdh-gh-app

rhdh-gh-app Bot commented Sep 17, 2026

Copy link
Copy Markdown

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
@red-hat-developer-hub/backstage-plugin-boost workspaces/boost/plugins/boost minor v0.6.0

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.14%. Comparing base (ce6f5f5) to head (dc0c0a4).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4841   +/-   ##
=======================================
  Coverage   60.14%   60.14%           
=======================================
  Files        2673     2673           
  Lines      106162   106162           
  Branches    29807    29817   +10     
=======================================
  Hits        63856    63856           
  Misses      41789    41789           
  Partials      517      517           
Flag Coverage Δ *Carryforward flag
adoption-insights 84.77% <ø> (ø) Carriedforward from ce6f5f5
ai-integrations 79.83% <ø> (ø) Carriedforward from ce6f5f5
app-defaults 54.82% <ø> (ø) Carriedforward from ce6f5f5
augment 46.67% <ø> (ø) Carriedforward from ce6f5f5
boost 84.97% <ø> (ø)
bulk-import 73.12% <ø> (ø) Carriedforward from ce6f5f5
cost-management 13.53% <ø> (ø) Carriedforward from ce6f5f5
dcm 73.47% <ø> (ø) Carriedforward from ce6f5f5
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from ce6f5f5
e2e-extensions 62.31% <ø> (ø) Carriedforward from ce6f5f5
e2e-global-header 51.82% <ø> (ø) Carriedforward from ce6f5f5
e2e-homepage 61.11% <ø> (ø) Carriedforward from ce6f5f5
e2e-intelligent-assistant 46.01% <ø> (ø) Carriedforward from ce6f5f5
e2e-orchestrator 49.49% <ø> (ø) Carriedforward from ce6f5f5
e2e-orchestrator-plugin 49.48% <ø> (ø) Carriedforward from ce6f5f5
e2e-quickstart 55.21% <ø> (ø) Carriedforward from ce6f5f5
e2e-scorecard 50.05% <ø> (ø) Carriedforward from ce6f5f5
e2e-theme 16.36% <ø> (ø) Carriedforward from ce6f5f5
extensions 58.30% <ø> (ø) Carriedforward from ce6f5f5
global-floating-action-button 71.18% <ø> (ø) Carriedforward from ce6f5f5
global-header 67.76% <ø> (ø) Carriedforward from ce6f5f5
homepage 48.39% <ø> (ø) Carriedforward from ce6f5f5
install-dynamic-plugins 71.77% <ø> (ø) Carriedforward from ce6f5f5
intelligent-assistant 77.99% <ø> (ø) Carriedforward from ce6f5f5
konflux 91.98% <ø> (ø) Carriedforward from ce6f5f5
lightspeed 69.02% <ø> (ø) Carriedforward from ce6f5f5
mcp-integrations 84.46% <ø> (ø) Carriedforward from ce6f5f5
orchestrator 77.32% <ø> (ø) Carriedforward from ce6f5f5
quickstart 63.74% <ø> (ø) Carriedforward from ce6f5f5
sandbox 79.56% <ø> (ø) Carriedforward from ce6f5f5
scorecard 88.44% <ø> (ø) Carriedforward from ce6f5f5
theme 87.91% <ø> (ø) Carriedforward from ce6f5f5
translations 5.12% <ø> (ø) Carriedforward from ce6f5f5
x2a 13.86% <ø> (ø) Carriedforward from ce6f5f5

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce6f5f5...dc0c0a4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 17, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:18 AM UTC · Completed 5:31 AM UTC

Commit: dc0c0a4 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $6.13

@sonarqubecloud

Copy link
Copy Markdown

@fullsend-ai-review

Copy link
Copy Markdown

Review — comment

PR: #4841 — feat(#4655): add AI Catalog translations for supported RHDH locales
Verdict: Comment — medium-severity findings worth noting but none that block merge


Summary

This PR adds German, Spanish, French, Italian, and Japanese translation files for the Boost AI Catalog frontend plugin, registers them as lazy imports, adds unit tests for key parity and placeholder preservation, adds Playwright locale coverage tests, and archives the OpenSpec change. The implementation is well-executed and follows established repository patterns.

Correctness: All 5 locale files contain exactly 61 keys matching the flattened boostMessages reference. The {{title}} interpolation placeholder is preserved in all locales. Lazy import syntax matches the established createTranslationResource pattern (verified against orchestrator workspace). Unit test and e2e test logic are sound.

Security: No issues. Translation strings contain no HTML, JavaScript, or injection vectors. No secrets or credentials. No hidden Unicode control characters. PR body contains no instruction-injection patterns.

Intent & coherence: All 21 changed files align with issue #4655 scope. No out-of-scope behavioral changes. Existing e2e test modifications are narrowly scoped skip guards only. The minor changeset bump is correct for a new feature visible to plugin consumers.

Style & conventions: File naming, JSDoc tags, default exports, license headers, ESLint disable patterns, and Playwright configuration all follow established repo patterns (verified against orchestrator, dcm, x2a, quickstart, bulk-import, and other workspaces).


Findings

Medium

1. Stale documentation — CURRENT.md trailing summary contradicts updated section

  • File: workspaces/boost/specifications/CURRENT.md, line 124
  • Category: Documentation currency
  • Description: The PR updates lines 72–79 from "Active remaining frontend work" to "Completed frontend work" and states there is no remaining active work. However, line 124 under "Cleanup progress" still reads: "Remaining current-release OpenSpec work: frontend translations." This directly contradicts the updated section above it. Issue boost: Add AI Catalog translations for supported RHDH locales #4655 explicitly requires updating CURRENT.md so translations are no longer listed as active work.
  • Remediation: Update line 124 to reflect that frontend translations are complete (e.g., "All current-release OpenSpec work is complete." or remove the line).

2. Stale documentation — boost-frontend-architecture.md directory tree comment

  • File: workspaces/boost/specifications/boost-frontend-architecture.md, line 114
  • Category: Documentation currency
  • Description: The directory tree comment reads translations/ # English scaffold; locales are a remaining change. After this PR, the translations directory will contain 5 locale files and the index registers all of them. The comment is stale and misleading.
  • Remediation: Update to reflect the current state, e.g., translations/ # Locale files (en, de, es, fr, it, ja) and translation resource.

Low

3. Stale "planned" wording in architecture doc technology table

  • File: workspaces/boost/specifications/boost-frontend-architecture.md, line 315
  • Category: Documentation currency
  • Description: The technology stack table says 5 locales planned (de, es, fr, it, ja). After this PR, the five locales are implemented, not planned.
  • Remediation: Change "planned" to "supported" or "implemented."

4. TBD placeholder in archived spec Purpose section

  • File: workspaces/boost/openspec/specs/ai-catalog-translations/spec.md, line 5
  • Category: Documentation currency
  • Description: The canonical spec file promoted to openspec/specs/ has a placeholder Purpose: "TBD - created by archiving change ai-catalog-frontend-translations. Update Purpose after archive." This file is the permanent record of implemented behavior.
  • Remediation: Replace the TBD with an actual purpose description (e.g., "Locale translation files for the AI Catalog frontend, covering de, es, fr, it, ja.").

5. No accessibility testing for non-English locales

  • File: workspaces/boost/e2e-tests/boost.AiCatalogPage.test.ts
  • Category: Test coverage
  • Description: All existing tests (including the one calling runAccessibilityTests) are skipped for non-English locales. The new boost.translations.test.ts does not run accessibility checks. This means axe scans are not executed for any translated locale.
  • Remediation: Consider adding runAccessibilityTests to at least one test case in boost.translations.test.ts for minimal accessibility coverage of translated pages.

6. Weaker type in e2e transformFlatMessagesIntoTree parameter

  • File: workspaces/boost/e2e-tests/utils/translations.ts, line 36
  • Category: Style / type safety
  • Description: The function parameter is typed Record<string, string>, whereas the established pattern in other workspaces (quickstart, bulk-import, adoption-insights) uses typeof boostTranslationDe.messages for compile-time key safety.
  • Remediation: Consider using typeof boostTranslationDe.messages to match the stricter typing used elsewhere.

7. Archived tasks 10-11 unchecked but CURRENT.md says "completed"

  • File: workspaces/boost/openspec/changes/archive/2026-09-17-ai-catalog-frontend-translations/tasks.md
  • Category: Internal consistency
  • Description: Tasks 10 ("Verify locale switching in dev app") and 11 ("Verify English fallback for missing keys") are marked unchecked, while CURRENT.md declares translations fully completed. The PR description notes these are runtime verification steps that cannot be executed in the sandbox.
  • Remediation: Either mark these tasks with a note explaining they are deferred runtime verification, or qualify the "completed" language in CURRENT.md.

Labels: PR adds i18n locale files within the boost workspace

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • workspaces/boost/specifications/CURRENT.md (file-level): Line 124 · [medium] documentation-currency

Line 124 still reads "Remaining current-release OpenSpec work: frontend translations" which contradicts the updated section above (lines 72-79) that declares translations completed. Issue #4655 explicitly requires updating CURRENT.md so translations are no longer listed as active work.

Suggested fix: Update line 124 to reflect completion, e.g. "All current-release OpenSpec work is complete." or remove the line.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.


## Purpose

TBD - created by archiving change ai-catalog-frontend-translations. Update Purpose after archive.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] documentation-currency

Canonical spec Purpose section has a TBD placeholder: "TBD - created by archiving change ai-catalog-frontend-translations. Update Purpose after archive."

Suggested fix: Replace TBD with actual purpose description.

let current = messages;
for (let i = 0; i < path.length - 1; i++) {
current[path[i]] = current[path[i]] || {};
current = current[path[i]] as Record<string, any>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] style

transformFlatMessagesIntoTree parameter is typed Record<string, string> instead of typeof boostTranslationDe.messages, diverging from the stricter typing used in quickstart, bulk-import, and adoption-insights workspaces.

Suggested fix: Use typeof boostTranslationDe.messages for compile-time key safety.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment translations workspace/boost Boost workspace (Backstage AI plugin) labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment translations workspace/boost Boost workspace (Backstage AI plugin)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

boost: Add AI Catalog translations for supported RHDH locales

0 participants