[PR #353] [MERGED] refactor: use Lingui for i18n #611

Closed
opened 2026-02-16 12:36:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stoatchat/for-web/pull/353
Author: @insertish
Created: 3/26/2025
Status: Merged
Merged: 3/31/2025
Merged by: @insertish

Base: mainHead: izzy/refactor/i18n


📝 Commits (10+)

  • f802380 refactor: use Lingui for i18n (1/?)
  • 4d8cdb0 refactor: use Lingui for i18n (2/2)
  • c2762c7 chore: clean up type errors
  • 7709755 refactor: remove useQuantity in favour of Plural
  • 444364f fix: missing string
  • efdfe6e fix: export setLanguage for now
  • 7efbf57 chore: generate catalog
  • 1b16f3d feat: ability to set 12/24-hour time
  • 738e965 chore: hide other languages for now
  • 8e2a358 refactor: switch to Deno for lifecycle scripts

📊 Changes

153 files changed (+6338 additions, -1948 deletions)

View changed files

doc/src/components/i18n/translating-errors.md (+11 -0)
doc/src/components/i18n/using-lingui.md (+31 -0)
📝 doc/src/components/ui/tools/form2.md (+4 -5)
lifecycle/deno.json (+5 -0)
lifecycle/generateEmojiMapping.ts (+30 -0)
📝 packages/client/components/app/interface/channels/text/DraftMessage.tsx (+8 -7)
📝 packages/client/components/app/interface/channels/text/Message.tsx (+14 -16)
📝 packages/client/components/app/interface/channels/text/Messages.tsx (+2 -1)
📝 packages/client/components/app/interface/settings/_layout/Content.tsx (+1 -1)
📝 packages/client/components/app/interface/settings/channel/Overview.tsx (+9 -7)
📝 packages/client/components/app/interface/settings/channel/Webhooks.tsx (+3 -8)
📝 packages/client/components/app/interface/settings/channel/index.tsx (+9 -11)
📝 packages/client/components/app/interface/settings/server/Overview.tsx (+9 -9)
📝 packages/client/components/app/interface/settings/server/index.tsx (+16 -22)
📝 packages/client/components/app/interface/settings/user/Accessibility.tsx (+28 -25)
📝 packages/client/components/app/interface/settings/user/Account.tsx (+46 -28)
📝 packages/client/components/app/interface/settings/user/Appearance.tsx (+2 -2)
📝 packages/client/components/app/interface/settings/user/Feedback.tsx (+18 -13)
📝 packages/client/components/app/interface/settings/user/Keybinds.tsx (+22 -23)
📝 packages/client/components/app/interface/settings/user/Language.tsx (+75 -69)

...and 80 more files

📄 Description

it's time for one of these again
i found this library during my uni group project and the DX is fantastic

  • Replace t with Lingui equivalents everywhere
  • Remove old dependencies
  • Integrate hot loading of catalogs

Closes https://github.com/revoltchat/frontend/issues/274


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stoatchat/for-web/pull/353 **Author:** [@insertish](https://github.com/insertish) **Created:** 3/26/2025 **Status:** ✅ Merged **Merged:** 3/31/2025 **Merged by:** [@insertish](https://github.com/insertish) **Base:** `main` ← **Head:** `izzy/refactor/i18n` --- ### 📝 Commits (10+) - [`f802380`](https://github.com/stoatchat/for-web/commit/f802380a6b67f6ea91aa58ac3f5a1ad0b0528df9) refactor: use Lingui for i18n (1/?) - [`4d8cdb0`](https://github.com/stoatchat/for-web/commit/4d8cdb0dc28226b4ca12ca42b1a88c95a5baee58) refactor: use Lingui for i18n (2/2) - [`c2762c7`](https://github.com/stoatchat/for-web/commit/c2762c715c70ee0a872de236860bc5460e88ac5e) chore: clean up type errors - [`7709755`](https://github.com/stoatchat/for-web/commit/7709755306e74fab538dcbf57dded1f58d949767) refactor: remove useQuantity in favour of Plural - [`444364f`](https://github.com/stoatchat/for-web/commit/444364f5e3f02003d74953ca21fab8c03cd65898) fix: missing string - [`efdfe6e`](https://github.com/stoatchat/for-web/commit/efdfe6e7d8c685759eeca2138005c91a5897cd3c) fix: export setLanguage for now - [`7efbf57`](https://github.com/stoatchat/for-web/commit/7efbf571006d288b0bdbc5072dda461f538867ef) chore: generate catalog - [`1b16f3d`](https://github.com/stoatchat/for-web/commit/1b16f3dc3ac1efc790618d1e837079ac1a1db6f1) feat: ability to set 12/24-hour time - [`738e965`](https://github.com/stoatchat/for-web/commit/738e965c23d9d929bfe4831934466c71082f21c3) chore: hide other languages for now - [`8e2a358`](https://github.com/stoatchat/for-web/commit/8e2a358e6f676faf4f356593fb1f54ad0722cde4) refactor: switch to Deno for lifecycle scripts ### 📊 Changes **153 files changed** (+6338 additions, -1948 deletions) <details> <summary>View changed files</summary> ➕ `doc/src/components/i18n/translating-errors.md` (+11 -0) ➕ `doc/src/components/i18n/using-lingui.md` (+31 -0) 📝 `doc/src/components/ui/tools/form2.md` (+4 -5) ➕ `lifecycle/deno.json` (+5 -0) ➕ `lifecycle/generateEmojiMapping.ts` (+30 -0) 📝 `packages/client/components/app/interface/channels/text/DraftMessage.tsx` (+8 -7) 📝 `packages/client/components/app/interface/channels/text/Message.tsx` (+14 -16) 📝 `packages/client/components/app/interface/channels/text/Messages.tsx` (+2 -1) 📝 `packages/client/components/app/interface/settings/_layout/Content.tsx` (+1 -1) 📝 `packages/client/components/app/interface/settings/channel/Overview.tsx` (+9 -7) 📝 `packages/client/components/app/interface/settings/channel/Webhooks.tsx` (+3 -8) 📝 `packages/client/components/app/interface/settings/channel/index.tsx` (+9 -11) 📝 `packages/client/components/app/interface/settings/server/Overview.tsx` (+9 -9) 📝 `packages/client/components/app/interface/settings/server/index.tsx` (+16 -22) 📝 `packages/client/components/app/interface/settings/user/Accessibility.tsx` (+28 -25) 📝 `packages/client/components/app/interface/settings/user/Account.tsx` (+46 -28) 📝 `packages/client/components/app/interface/settings/user/Appearance.tsx` (+2 -2) 📝 `packages/client/components/app/interface/settings/user/Feedback.tsx` (+18 -13) 📝 `packages/client/components/app/interface/settings/user/Keybinds.tsx` (+22 -23) 📝 `packages/client/components/app/interface/settings/user/Language.tsx` (+75 -69) _...and 80 more files_ </details> ### 📄 Description it's time for one of these again i found this library during my uni group project and the DX is fantastic - [x] Replace `t` with Lingui equivalents everywhere - [x] Remove old dependencies - [x] Integrate hot loading of catalogs Closes https://github.com/revoltchat/frontend/issues/274 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 12:36:04 -05:00
yindo closed this issue 2026-02-16 12:36:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/for-web#611