Skip to content

Topic i18n keys - #189

Merged
coryrylan merged 2 commits into
mainfrom
topic-i18n-keys
Jul 24, 2026
Merged

Topic i18n keys#189
coryrylan merged 2 commits into
mainfrom
topic-i18n-keys

Conversation

@coryrylan

@coryrylan coryrylan commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added English localization strings for media controls, including playback, volume, seeking, fullscreen, and current-time labels.
    • Improved translation handling for media-related interface text.
  • Bug Fixes

    • Search results now prioritize exact component-name matches.
  • Tests

    • Updated performance benchmark thresholds and metadata validation coverage to reflect current application behavior.

Signed-off-by: Cory Rylan <crylan@nvidia.com>
Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan
coryrylan requested a review from johnyanarella July 22, 2026 21:29
@coryrylan coryrylan self-assigned this Jul 22, 2026
Copilot AI review requested due to automatic review settings July 22, 2026 21:29
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds media-related localization keys and defaults, updates their tests, raises JavaScript payload limits across Lighthouse benchmarks, strengthens metadata service tests, and refreshes metadata artifact pointers.

Changes

Media localization strings

Layer / File(s) Summary
Localization contract and state tests
projects/core/src/internal/services/i18n.service.ts, projects/core/src/internal/services/i18n.service.test.ts, projects/core/src/internal/controllers/i18n.controller.test.ts
Adds media, fullscreen, playback, seeking, and volume translations with English defaults and updated initialization, merge, and update assertions.

Lighthouse benchmark thresholds

Layer / File(s) Summary
JavaScript payload budget updates
projects/core/src/*/*.test.lighthouse.ts, projects/core/src/index.test.lighthouse.ts
Raises JavaScript payload upper bounds for component and index Lighthouse tests while retaining other benchmark assertions.

Metadata service validation

Layer / File(s) Summary
Retrieval tests and static artifacts
projects/internals/metadata/src/services/*test.ts, projects/internals/metadata/static/*
Adds exact-match and repeated-call assertions, and updates Git LFS pointers for adoption, Lighthouse, releases, and tests artifacts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • NVIDIA/elements#188: Updates the same i18n implementation and related tests with media/time translation keys and merge expectations.

Suggested labels: scope(code)

Suggested reviewers: johnyanarella

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too generic and does not clearly describe the main change in this PR. Rename it to something specific like "Add i18n keys for media and fullscreen controls".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-i18n-keys

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
projects/internals/metadata/static/adoption.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

projects/internals/metadata/static/lighthouse.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

projects/internals/metadata/static/releases.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 1 others
🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
projects/core/src/internal/services/i18n.service.test.ts (1)

71-113: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Exercise the new media keys in the update test.

The translations fixture still stops at create, so this test never verifies updating keys such as playbackRateOption or seekBackward. Add the new keys, including {rate} and {value} placeholders, and assert their merged values.

Suggested test fixture update
       maxFileSize: 'max file size',
-      create: 'créer'
+      create: 'créer',
+      currentTime: 'temps actuel',
+      enterFullscreen: 'entrer en plein écran',
+      exitFullscreen: 'quitter le plein écran',
+      muteMedia: 'couper le son du média',
+      pauseMedia: 'mettre le média en pause',
+      playMedia: 'lire le média',
+      playbackRate: 'vitesse de lecture',
+      playbackRateOption: '{rate}x',
+      seekBackward: 'reculer de {value} secondes',
+      seekForward: 'avancer de {value} secondes',
+      seekToEnd: 'aller à la fin',
+      seekToStart: 'aller au début',
+      unmuteMedia: 'réactiver le son du média',
+      volume: 'volume'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@projects/core/src/internal/services/i18n.service.test.ts` around lines 71 -
113, Extend the translations fixture in the I18nService.update test with the new
media keys, including playbackRateOption and seekBackward and their {rate} and
{value} placeholders, then ensure the existing merged-value assertion verifies
those entries in I18nService.i18n.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@projects/core/src/internal/services/i18n.service.test.ts`:
- Around line 71-113: Extend the translations fixture in the I18nService.update
test with the new media keys, including playbackRateOption and seekBackward and
their {rate} and {value} placeholders, then ensure the existing merged-value
assertion verifies those entries in I18nService.i18n.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 2827c49e-38e9-40fa-8c96-e9f6c23fd4cf

📥 Commits

Reviewing files that changed from the base of the PR and between 287e6c3 and c9a1a91.

📒 Files selected for processing (39)
  • projects/core/src/accordion/accordion.test.lighthouse.ts
  • projects/core/src/alert/alert.test.lighthouse.ts
  • projects/core/src/color/color.test.lighthouse.ts
  • projects/core/src/combobox/combobox.test.lighthouse.ts
  • projects/core/src/copy-button/copy-button.test.lighthouse.ts
  • projects/core/src/datetime/datetime.test.lighthouse.ts
  • projects/core/src/dialog/dialog.test.lighthouse.ts
  • projects/core/src/drawer/drawer.test.lighthouse.ts
  • projects/core/src/dropdown-group/dropdown-group.test.lighthouse.ts
  • projects/core/src/dropdown/dropdown.test.lighthouse.ts
  • projects/core/src/dropzone/dropzone.test.lighthouse.ts
  • projects/core/src/index.test.lighthouse.ts
  • projects/core/src/internal/controllers/i18n.controller.test.ts
  • projects/core/src/internal/services/i18n.service.test.ts
  • projects/core/src/internal/services/i18n.service.ts
  • projects/core/src/month/month.test.lighthouse.ts
  • projects/core/src/notification/notification.test.lighthouse.ts
  • projects/core/src/pagination/pagination.test.lighthouse.ts
  • projects/core/src/panel/panel.test.lighthouse.ts
  • projects/core/src/password/password.test.lighthouse.ts
  • projects/core/src/preferences-input/preferences-input.test.lighthouse.ts
  • projects/core/src/resize-handle/resize-handle.test.lighthouse.ts
  • projects/core/src/search/search.test.lighthouse.ts
  • projects/core/src/select/select.test.lighthouse.ts
  • projects/core/src/sort-button/sort-button.test.lighthouse.ts
  • projects/core/src/steps/steps.test.lighthouse.ts
  • projects/core/src/tag/tag.test.lighthouse.ts
  • projects/core/src/time/time.test.lighthouse.ts
  • projects/core/src/toast/toast.test.lighthouse.ts
  • projects/core/src/toggletip/toggletip.test.lighthouse.ts
  • projects/core/src/tree/tree.test.lighthouse.ts
  • projects/core/src/week/week.test.lighthouse.ts
  • projects/internals/metadata/src/services/api.service.test.ts
  • projects/internals/metadata/src/services/projects.service.test.ts
  • projects/internals/metadata/src/services/releases.service.test.ts
  • projects/internals/metadata/static/adoption.json
  • projects/internals/metadata/static/lighthouse.json
  • projects/internals/metadata/static/releases.json
  • projects/internals/metadata/static/tests.json

Copilot AI 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.

Pull request overview

Updates shared i18n defaults and metadata-search behavior, then refreshes generated metadata artifacts and adjusts Lighthouse size budgets to reflect the new baseline in the Elements monorepo.

Changes:

  • Add new default i18n keys/strings (media-related) and update i18n unit/controller tests accordingly.
  • Improve metadata service tests to assert memoized getData() behavior and add an API search test for exact-match prioritization.
  • Refresh Git LFS-backed metadata JSON artifacts and bump multiple Lighthouse JS-size thresholds to match the updated bundles.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
projects/internals/metadata/static/tests.json Updates LFS pointer for generated tests metadata snapshot.
projects/internals/metadata/static/releases.json Updates LFS pointer for generated releases metadata snapshot.
projects/internals/metadata/static/lighthouse.json Updates LFS pointer for generated Lighthouse metadata snapshot.
projects/internals/metadata/static/adoption.json Updates LFS pointer for generated adoption metadata snapshot.
projects/internals/metadata/src/services/releases.service.test.ts Adds assertion that getData() returns a stable cached reference.
projects/internals/metadata/src/services/projects.service.test.ts Adds assertion that getData() returns a stable cached reference.
projects/internals/metadata/src/services/api.service.test.ts Adds test ensuring exact API search matches are ranked first.
projects/core/src/internal/services/i18n.service.ts Adds new i18n keys and default strings to the global registry.
projects/core/src/internal/services/i18n.service.test.ts Extends initial-state expectations and simplifies update test to assert merge semantics.
projects/core/src/internal/controllers/i18n.controller.test.ts Updates expected i18n payloads to include the new keys.
projects/core/src/index.test.lighthouse.ts Adjusts index.js bundle size budget threshold.
projects/core/src/accordion/accordion.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/alert/alert.test.lighthouse.ts Adjusts JS size budget threshold(s).
projects/core/src/color/color.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/combobox/combobox.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/copy-button/copy-button.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/datetime/datetime.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/dialog/dialog.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/drawer/drawer.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/dropdown-group/dropdown-group.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/dropdown/dropdown.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/dropzone/dropzone.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/month/month.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/notification/notification.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/pagination/pagination.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/panel/panel.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/password/password.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/preferences-input/preferences-input.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/resize-handle/resize-handle.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/search/search.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/select/select.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/sort-button/sort-button.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/steps/steps.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/tag/tag.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/time/time.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/toast/toast.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/toggletip/toggletip.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/tree/tree.test.lighthouse.ts Adjusts JS size budget threshold.
projects/core/src/week/week.test.lighthouse.ts Adjusts JS size budget threshold.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread projects/core/src/internal/services/i18n.service.ts
Comment thread projects/core/src/internal/services/i18n.service.ts
@coderabbitai coderabbitai Bot mentioned this pull request Jul 22, 2026
@coryrylan
coryrylan merged commit 73584d2 into main Jul 24, 2026
16 checks passed
@coryrylan
coryrylan deleted the topic-i18n-keys branch July 24, 2026 03:17
@coryrylan

Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 2.2.0 🎉

Changelog

@coryrylan

Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 2.2.0 🎉

Changelog

@coryrylan

Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 2.1.1 🎉

Changelog

@coryrylan

Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 2.1.7 🎉

Changelog

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants