refactor(i18n): replace handlebars-intl adapter#1685
Open
paulfalgout wants to merge 1 commit intodevelopfrom
Open
refactor(i18n): replace handlebars-intl adapter#1685paulfalgout wants to merge 1 commit intodevelopfrom
paulfalgout wants to merge 1 commit intodevelopfrom
Conversation
RoundingWell Care Ops Frontend
|
||||||||||||||||||||||||||||
| Project |
RoundingWell Care Ops Frontend
|
| Branch Review |
i18n
|
| Run status |
|
| Run duration | 02m 02s |
| Commit |
|
| Committer | Paul Falgout |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
236
|
| View all changes introduced in this branch ↗︎ | |
Coverage Report for CI Build 6Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
74f587c to
2420a08
Compare
paulfalgout
commented
May 5, 2026
| dueButton: Due | ||
| updateButton: Updated | ||
| dateTypes: "{type, select, created_at {Added} due_date {Due} updated_at {Updated}}" | ||
| dateTypes: "{type, select, created_at {Added} due_date {Due} updated_at {Updated} other {}}" |
Contributor
Author
There was a problem hiding this comment.
The newer version of FormatJS requires every ICU select message to include an other branch. Without it, those messages fail validation and render unformatted ICU text. The empty other {} branches preserve the prior fallback behavior while making the messages valid.
nmajor25
approved these changes
May 5, 2026
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.
Closes FE-120
What
handlebars-intlwith@formatjs/intlformatMessage,formatDate,intlGet, andformatHTMLMessageWhy
handlebars-intlis a thin adapter over FormatJS. Owning the small adapter locally removes an old dependency layer while preserving existing template behavior.Testing
npx cypress run --component --spec src/js/base/helpers.cy.jsnpm run lintSummary by cubic
Replaced
handlebars-intlwith a local Handlebars i18n adapter built on@formatjs/intl, fixed ICU select handling by addingotherbranches, and preserved HTML message tags with safe escaping. Addresses FE-120 with no template changes and clearer errors for invalid inputs.Refactors
src/js/i18n/intl.jswithformatMessage,formatDate,intlGet,formatHTMLMessage, and anintlblock helper; registered withhandlebarsandhandlebars/runtime. Updated i18n README.handlebars-intland added@formatjs/intl.Bug Fixes
otherbranches to ICU selects inen-US.yml.formatHTMLMessage. Added tests for selects, number formatting, HTML, and invalid input errors.Written for commit 9648072. Summary will update on new commits.