feat(i18n): extract java-agent namespace strings#651
Merged
Conversation
✅ Deploy Preview for otel-ecosystem-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Jun 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces internationalization (i18n) support across the Ecosystem Explorer UI, including a feature-flagged language switcher and English/Spanish translation bundles.
Changes:
- Add i18next + react-i18next configuration (HTTP backend + optional language detection via
I18Nfeature flag). - Replace hardcoded UI copy across multiple pages/components with translation keys.
- Add
en/eslocale JSON files and update dev/test feature-flag env defaults.
Reviewed changes
Copilot reviewed 68 out of 69 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ecosystem-explorer/src/test/setup.ts | Initializes i18n resources for unit tests. |
| ecosystem-explorer/src/main.tsx | Loads i18n configuration at app startup. |
| ecosystem-explorer/src/lib/feature-flags.ts | Adds I18N feature flag. |
| ecosystem-explorer/src/i18n/config.ts | New i18next configuration with backend + optional language detection. |
| ecosystem-explorer/src/features/not-found/not-found-page.tsx | Moves 404 copy to translations. |
| ecosystem-explorer/src/features/java-agent/utils/format.ts | Translates semantic convention + feature labels via i18n. |
| ecosystem-explorer/src/features/java-agent/java-release-comparison-page.tsx | Moves page text to translations. |
| ecosystem-explorer/src/features/java-agent/java-instrumentation-list-page.tsx | Moves list UI strings (errors/loading/results) to translations. |
| ecosystem-explorer/src/features/java-agent/java-configuration-list-page.tsx | Moves configuration list strings to translations. |
| ecosystem-explorer/src/features/java-agent/java-agent-page.tsx | Moves landing copy to translations. |
| ecosystem-explorer/src/features/java-agent/instrumentation-detail-page.tsx | Moves detail page labels/tooltips/empty states to translations. |
| ecosystem-explorer/src/features/java-agent/configuration/configuration-builder-page.tsx | Moves builder UI strings to translations. |
| ecosystem-explorer/src/features/java-agent/configuration/components/union-renderer.tsx | Localizes ARIA label for union chooser. |
| ecosystem-explorer/src/features/java-agent/configuration/components/preview-card.tsx | Localizes preview card labels + ARIA text. |
| ecosystem-explorer/src/features/java-agent/configuration/components/plugin-select-renderer.tsx | Localizes plugin picker labels/placeholders. |
| ecosystem-explorer/src/features/java-agent/configuration/components/list-renderer.tsx | Localizes list add/remove UI + empty text. |
| ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-row.tsx | Localizes row labels, counts, and ARIA strings. |
| ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-config-form.tsx | Localizes empty-state message. |
| ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-config-field.tsx | Localizes control labels, pills, and default preview. |
| ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-browser.tsx | Localizes browser headings/readouts/empty states. |
| ecosystem-explorer/src/features/java-agent/configuration/components/group-renderer.tsx | Localizes enable toggle ARIA label. |
| ecosystem-explorer/src/features/java-agent/configuration/components/field-section.tsx | Localizes expand/collapse ARIA label + empty fallback. |
| ecosystem-explorer/src/features/java-agent/configuration/components/controls/primitive-list-control.tsx | Localizes list control labels + empty state. |
| ecosystem-explorer/src/features/java-agent/configuration/components/controls/key-value-map-control.tsx | Localizes map control labels/placeholders + announcements. |
| ecosystem-explorer/src/features/java-agent/configuration/components/controls/focus-managed-input-list.tsx | Localizes accessibility announcements. |
| ecosystem-explorer/src/features/java-agent/configuration/components/controls/field-meta.tsx | Localizes “Default” label. |
| ecosystem-explorer/src/features/java-agent/configuration/components/controls/control-wrapper.tsx | Localizes “default” badge and reset link text. |
| ecosystem-explorer/src/features/java-agent/configuration/components/configuration-toc-sidebar.tsx | Localizes tabs, search, and nav labels. |
| ecosystem-explorer/src/features/java-agent/configuration/components/circular-ref-placeholder.tsx | Localizes circular reference message. |
| ecosystem-explorer/src/features/java-agent/components/version-selector.tsx | Localizes default “Version” label. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-section.tsx | Localizes telemetry section headers and empty states. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-comparison/version-selector-panel.tsx | Localizes comparison selector UI strings. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-comparison/telemetry-comparison-section.tsx | Localizes comparison loading/errors/warnings. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-comparison/span-diff-card.tsx | Localizes diff card status + messages. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-comparison/metric-diff-card.tsx | Localizes diff card labels/messages. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-comparison/diff-results-section.tsx | Localizes diff result headers and empty-state text. |
| ecosystem-explorer/src/features/java-agent/components/telemetry-comparison/attribute-diff-table.tsx | Localizes attribute diff table headings/status text. |
| ecosystem-explorer/src/features/java-agent/components/sub-instrumentation-item.tsx | Localizes item ARIA label. |
| ecosystem-explorer/src/features/java-agent/components/multi-instrumentation-group-card.tsx | Localizes versions count label. |
| ecosystem-explorer/src/features/java-agent/components/instrumentation-filter-bar.tsx | Localizes filter labels, placeholders, and tooltips. |
| ecosystem-explorer/src/features/java-agent/components/instrumentation-configuration-tab.tsx | Localizes “no options” empty state. |
| ecosystem-explorer/src/features/java-agent/components/instrumentation-badges.tsx | Localizes badge labels/tooltips/ARIA labels. |
| ecosystem-explorer/src/features/java-agent/components/configuration-selector.tsx | Localizes selector banner/label. |
| ecosystem-explorer/src/features/java-agent/components/configuration-card.tsx | Localizes default/examples/usage strings. |
| ecosystem-explorer/src/features/java-agent/components/attribute-table.tsx | Localizes attributes table labels. |
| ecosystem-explorer/src/features/java-agent/components/agent-explore-landing.tsx | Localizes landing navigation card copy. |
| ecosystem-explorer/src/features/home/components/hero-section.tsx | Localizes hero headline + tagline. |
| ecosystem-explorer/src/features/home/components/explore-section.tsx | Localizes explore navigation cards. |
| ecosystem-explorer/src/features/collector/collector-page.tsx | Localizes collector landing copy + unavailable state. |
| ecosystem-explorer/src/features/collector/collector-detail-page.tsx | Localizes collector detail labels/sections/stability/type descriptions. |
| ecosystem-explorer/src/features/collector/collector-components-page.tsx | Localizes collector components list UI. |
| ecosystem-explorer/src/components/ui/copy-button.tsx | Localizes “Copy/Copied” default labels. |
| ecosystem-explorer/src/components/ui/back-button.tsx | Localizes “Back” default label. |
| ecosystem-explorer/src/components/layout/header.tsx | Localizes header nav + adds feature-flagged language switcher. |
| ecosystem-explorer/src/components/layout/footer.tsx | Localizes footer copy and links. |
| ecosystem-explorer/public/locales/es/layout.json | Adds Spanish layout translations. |
| ecosystem-explorer/public/locales/es/java-agent.json | Adds Spanish Java Agent translations. |
| ecosystem-explorer/public/locales/es/home.json | Adds Spanish home translations. |
| ecosystem-explorer/public/locales/es/common.json | Adds Spanish common translations. |
| ecosystem-explorer/public/locales/es/collector.json | Adds Spanish collector translations. |
| ecosystem-explorer/public/locales/en/layout.json | Adds English layout translations. |
| ecosystem-explorer/public/locales/en/java-agent.json | Adds English Java Agent translations. |
| ecosystem-explorer/public/locales/en/home.json | Adds English home translations. |
| ecosystem-explorer/public/locales/en/common.json | Adds English common translations. |
| ecosystem-explorer/public/locales/en/collector.json | Adds English collector translations. |
| ecosystem-explorer/package.json | Adds i18n dependencies. |
| ecosystem-explorer/bun.lock | Locks i18n dependency versions. |
| ecosystem-explorer/.env.test | Disables I18N for tests. |
| ecosystem-explorer/.env.development | Enables I18N for development. |
Comments suppressed due to low confidence (4)
ecosystem-explorer/src/i18n/config.ts:1
- With
HttpBackend, translations load asynchronously.react-i18nextdefaults to Suspense-based loading; if the app isn't wrapped in a<Suspense fallback={...}>, initial renders can throw/suspend. Fix by either (a) addingreact: { useSuspense: false }to the i18n init options and handling readiness manually, or (b) wrapping the application root in a Suspense boundary with an appropriate fallback.
ecosystem-explorer/src/i18n/config.ts:1 - The config registers the
aboutnamespace, but this PR doesn't add/public/locales/{lng}/about.json. That will cause backend requests for missing files (and potentially trigger Suspense or error noise depending on configuration). Either adden/about.json+es/about.json, or removeaboutfromnsuntil those files exist.
ecosystem-explorer/src/i18n/config.ts:1 - The document
<html lang>is only updated onlanguageChanged, so the initial language may never be applied (especially when language detection selects a non-default language on first load). Setdocument.documentElement.langafter initialization as well (e.g., in the init promise resolution or aninitializedevent handler) to ensure screen readers and accessibility tooling see the correct language from the first paint.
ecosystem-explorer/src/test/setup.ts:1 - i18next
init(...)returns a promise; running it at module top-level without awaiting can create ordering/flakiness in tests that render before initialization completes. Move initialization into abeforeAlland await the init promise (or useinitImmediate: falsein the test-only init config if appropriate for your setup).
3 tasks
Assisted-By: This contribution was prepared with the assistance of an AI development tool.
Assisted-By: This contribution was prepared with the assistance of an AI development tool.
…ion-list-page Assisted-By: This contribution was prepared with the assistance of an AI development tool.
…pace Assisted-By: This contribution was prepared with the assistance of an AI development tool.
Components that call useTranslation() or getI18n().t() throw or return key strings when no i18next instance exists. The integration test setup did not initialize i18next, causing all java-agent integration tests to fail after the namespace was extracted in the previous commit. Assisted-By: This contribution was prepared with the assistance of an AI development tool.
# Conflicts: # ecosystem-explorer/src/features/java-agent/components/sub-instrumentation-item.tsx # ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-browser.tsx
Contributor
|
Thank you for your contribution @eruizdechavez! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Assisted-By: This contribution was prepared with the assistance of an AI development tool.