Skip to content

Conversation

@cellog
Copy link
Contributor

@cellog cellog commented Oct 16, 2025

Issue #1869

This is the 2nd of 3 PRs (third will be docs)

This transforms the component under the hood for Trans, Select, Plural, and SelectOrdinal to use the IcuTrans component just committed a few hours ago.

I managed to bump test coverage a wee bit higher in this one.

For the next PR: which docs should I update, and should I add new ones?

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided
  • commit message and code follows the Developer's Certification of Origin

@coveralls
Copy link

coveralls commented Oct 16, 2025

Coverage Status

coverage: 97.593% (+0.4%) from 97.208%
when pulling 4888218 on cellog:issue-1869-icu.macro
into 62d6c2c on i18next:master.

@cellog
Copy link
Contributor Author

cellog commented Oct 17, 2025

@adrai adrai merged commit ceae385 into i18next:master Oct 17, 2025
9 checks passed
@adrai
Copy link
Member

adrai commented Oct 17, 2025

Will create a new release as soon as you've prepared the docs etc.

@cellog
Copy link
Contributor Author

cellog commented Oct 17, 2025

Will create a new release as soon as you've prepared the docs etc.

Working on them now. Thank you for being so flexible and for accepting this work!

@cellog
Copy link
Contributor Author

cellog commented Oct 17, 2025

it would be nice if you could also update this example: https://github.com/i18next/react-i18next/blob/master/example/react-icu/src/ComponentUsingMacro.js https://github.com/i18next/react-i18next/blob/master/example/react-icu/src/ComponentUsingMacroInterpolated.js

Those examples don't need updating because they work without modification (100% backwards-compatible API, only the under-the-hood implementation has changed)

@cellog
Copy link
Contributor Author

cellog commented Oct 17, 2025

I just realized that the defaults prop could be used to pass in a translation directly. I will have to add that support in a follow-up PR, will do that today.

@cellog
Copy link
Contributor Author

cellog commented Oct 17, 2025

oh! No I am wrong, that aspect of the icu macro is fully tested, and working. I just didn't know about it. Please disregard 😂

@cellog
Copy link
Contributor Author

cellog commented Oct 17, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants