Topic i18n keys - #189
Conversation
Signed-off-by: Cory Rylan <crylan@nvidia.com>
Signed-off-by: Cory Rylan <crylan@nvidia.com>
📝 WalkthroughWalkthroughThe 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. ChangesMedia localization strings
Lighthouse benchmark thresholds
Metadata service validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.jsonTraceback (most recent call last): projects/internals/metadata/static/lighthouse.jsonTraceback (most recent call last): projects/internals/metadata/static/releases.jsonTraceback (most recent call last):
🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
There was a problem hiding this comment.
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 winExercise the new media keys in the update test.
The
translationsfixture still stops atcreate, so this test never verifies updating keys such asplaybackRateOptionorseekBackward. 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
📒 Files selected for processing (39)
projects/core/src/accordion/accordion.test.lighthouse.tsprojects/core/src/alert/alert.test.lighthouse.tsprojects/core/src/color/color.test.lighthouse.tsprojects/core/src/combobox/combobox.test.lighthouse.tsprojects/core/src/copy-button/copy-button.test.lighthouse.tsprojects/core/src/datetime/datetime.test.lighthouse.tsprojects/core/src/dialog/dialog.test.lighthouse.tsprojects/core/src/drawer/drawer.test.lighthouse.tsprojects/core/src/dropdown-group/dropdown-group.test.lighthouse.tsprojects/core/src/dropdown/dropdown.test.lighthouse.tsprojects/core/src/dropzone/dropzone.test.lighthouse.tsprojects/core/src/index.test.lighthouse.tsprojects/core/src/internal/controllers/i18n.controller.test.tsprojects/core/src/internal/services/i18n.service.test.tsprojects/core/src/internal/services/i18n.service.tsprojects/core/src/month/month.test.lighthouse.tsprojects/core/src/notification/notification.test.lighthouse.tsprojects/core/src/pagination/pagination.test.lighthouse.tsprojects/core/src/panel/panel.test.lighthouse.tsprojects/core/src/password/password.test.lighthouse.tsprojects/core/src/preferences-input/preferences-input.test.lighthouse.tsprojects/core/src/resize-handle/resize-handle.test.lighthouse.tsprojects/core/src/search/search.test.lighthouse.tsprojects/core/src/select/select.test.lighthouse.tsprojects/core/src/sort-button/sort-button.test.lighthouse.tsprojects/core/src/steps/steps.test.lighthouse.tsprojects/core/src/tag/tag.test.lighthouse.tsprojects/core/src/time/time.test.lighthouse.tsprojects/core/src/toast/toast.test.lighthouse.tsprojects/core/src/toggletip/toggletip.test.lighthouse.tsprojects/core/src/tree/tree.test.lighthouse.tsprojects/core/src/week/week.test.lighthouse.tsprojects/internals/metadata/src/services/api.service.test.tsprojects/internals/metadata/src/services/projects.service.test.tsprojects/internals/metadata/src/services/releases.service.test.tsprojects/internals/metadata/static/adoption.jsonprojects/internals/metadata/static/lighthouse.jsonprojects/internals/metadata/static/releases.jsonprojects/internals/metadata/static/tests.json
There was a problem hiding this comment.
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.
|
🎉 This issue has been resolved in version 2.2.0 🎉 |
|
🎉 This issue has been resolved in version 2.2.0 🎉 |
|
🎉 This issue has been resolved in version 2.1.1 🎉 |
|
🎉 This issue has been resolved in version 2.1.7 🎉 |
Summary by CodeRabbit
New Features
Bug Fixes
Tests