Stefan Nenzén stne3960
  • Joined on 2023-01-12
stne3960 pushed to basic-scaffolding-frontend-i18n at DMC/studentportalen 2025-04-13 17:50:12 +02:00
12a10a9c6f Add --clean option to extractor
stne3960 created pull request DMC/studentportalen#6 2025-04-13 13:34:05 +02:00
WIP: Add i18n support
stne3960 created branch basic-scaffolding-frontend-i18n in DMC/studentportalen 2025-04-12 22:58:17 +02:00
stne3960 pushed to basic-scaffolding-frontend-i18n at DMC/studentportalen 2025-04-12 22:58:17 +02:00
719158015e Add i18n documentation to README
5e4eec2d73 Add translations and languages to components
574519699c Add useI18n hook
63667b0b86 Add i18n files
62ac5e5fbc Add config
Compare 6 commits »
stne3960 commented on pull request DMC/studentportalen#5 2025-04-10 16:36:30 +02:00
Add i18n support

After discussions, we decided to more forward with something other than lingui

stne3960 closed pull request DMC/studentportalen#5 2025-04-10 16:36:30 +02:00
Add i18n support
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-10 10:48:51 +02:00
aed07160ba Remove overrides and compile translations on build
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 19:26:42 +02:00
bb6ba0a0a1 Upgrade @swc/core
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 19:22:33 +02:00
52d5dcf91b Revert "Switch from experimental SWC to babel"
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 18:31:37 +02:00
2faa14dc46 Switch from experimental SWC to babel
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 16:37:25 +02:00
05e6967c58 Add src/
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 16:33:20 +02:00
0b049362d8 Ignore compiled messages.ts
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 16:29:34 +02:00
0384d5322c Add documentation
stne3960 pushed to basic-scaffolding-frontend-lingui at DMC/studentportalen 2025-04-09 13:49:03 +02:00
fb9f1cab07 Iterate over navigator.languages and default to English
stne3960 commented on pull request DMC/studentportalen#5 2025-04-09 13:30:45 +02:00
Add i18n support

One final question, is it the t(...) function one should use to show some feedback in a click handler/form submit scenario?

Yes, that's the idea.

stne3960 commented on pull request DMC/studentportalen#5 2025-04-09 12:57:54 +02:00
Add i18n support

I agree that we should interate over navigator.languages instead.

Regarding defaulting to english if no language is found, very good question. We are Swedish public agency, most outward…

stne3960 commented on pull request DMC/studentportalen#5 2025-04-09 12:48:42 +02:00
Add i18n support

One thing I'm also wondering about is moving the i18n stuff to App.tsx instead of main.tsx. In my mind the App component is responsible for loading all the context required for the application…

stne3960 commented on pull request DMC/studentportalen#5 2025-04-09 12:31:57 +02:00
Add i18n support

Otherwise you get the warning Unused eslint-disable directive (no problems were reported) when runnning npm run lint

stne3960 created pull request DMC/studentportalen#5 2025-04-09 11:56:01 +02:00
Add i18n support
stne3960 deleted branch basic-scaffolding-frontend-i18n from DMC/studentportalen 2025-04-09 11:53:57 +02:00