MetaMask / MetaMask/metamask-extension
[Typescript Conversion: Level 19]: Convert ui/contexts/i18n.js to typescript
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
## **Description**
Convert `ui/contexts/i18n.js` from JavaScript to TypeScript as part of the TS migration initiative.
## **Scenario (for user stories only)**
_(Not applicable)_
## **Design (for user stories only)**
_(Not applicable)_
## **Technical Details (for technical tasks only)**
- Convert this file to TypeScript.
- Migration Level: **19**
- Dependencies:
- ui/ducks/locale/locale.ts
- ui/helpers/utils/i18n-helper.tsx
- Dependents:
- test/jest/rendering.js
- ui/components/app/flask/experimental-area/experimental-area.js
- ui/components/app/hold-to-reveal-button/hold-to-reveal-button.js
- ui/components/ui/nickname-popover/nickname-popover.component.js
- ui/components/ui/radio-group/radio-group.component.js
- ui/components/ui/update-nickname-popover/update-nickname-popover.js
- ui/hooks/useI18nContext.js
- ui/pages/asset/components/asset-options.js
- ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js
- ui/pages/index.js
- ui/pages/permissions-connect/redirect/permissions-redirect.component.js
- ui/pages/settings/settings-search-list/settings-search-list.js
- ui/pages/settings/settings-search/settings-search.js
- ui/pages/swaps/awaiting-signatures/awaiting-signatures.js
- ui/pages/swaps/awaiting-swap/awaiting-swap.js
- ui/pages/swaps/countdown-timer/countdown-timer.js
- ui/pages/swaps/create-new-swap/create-new-swap.js
- ui/pages/swaps/exchange-rate-display/exchange-rate-display.js
- ui/pages/swaps/fee-card/fee-card.js
- ui/pages/swaps/import-token/import-token.js
- ui/pages/swaps/index.js
- ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js
- ui/pages/swaps/searchable-item-list/item-list/item-list.component.js
- ui/pages/swaps/select-quote-popover/quote-details/quote-details.js
- ui/pages/swaps/select-quote-popover/select-quote-popover.js
- ui/pages/swaps/select-quote-popover/sort-list/sort-list.js
- ui/pages/swaps/smart-transaction-status/smart-transaction-status.js
- ui/pages/swaps/swaps-footer/swaps-footer.js
- ui/pages/swaps/view-on-block-explorer/view-on-block-explorer.js
## **[Threat Modeling Framework](https://github.com/adamshostack/4QuestionFrame) (for technical tasks only)**
- What are we working on? Convert file to TypeScript.
- What can go wrong? Type errors, integration mismatches, missing types.
- What are we going to do about it? Write types carefully and test thoroughly.
- Did we do a good job? _(To be evaluated)_
## **Acceptance Criteria**
- File is fully converted to TypeScript.
- Tests pass.
- File adheres to linting rules.
- Functionality remains unchanged.
## **Stakeholder Review (for MetaMask employees only)**
- [X] Engineering
- [ ] Design
- [ ] Product
- [ ] QA
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management
- [ ] Other
## **References**
- Parent issue: #31460
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ui/contexts/i18n.js and review its dependencies, ui/ducks/locale/locale.ts and ui/helpers/utils/i18n-helper.tsx. Check the listed dependents, especially test/jest/rendering.js, for integration expectations. Done means the file is fully converted to TypeScript, functionality is unchanged, tests pass, and linting succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, internationalization
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100