-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ar(feat) [DPCP-37]: Localization Part 2: Dictionaries #42
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Yes, I extend my computer life time by delegating builds to the cloud. |
Who likes a janky loud and heated piece of expensive metal in a quiet room anyway? |
FWIW, it's more sustainable, since the cloud VMs are shared from a pool. So when I'm no longer using them, someone else's living room can be quiet again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
lib/dictionaries/index.js
Outdated
// @dict | ||
import 'server-only'; | ||
|
||
const dictionaries = { | ||
global: { | ||
en: () => import('./global/en.json').then((module) => module.default), | ||
'pt-br': () => import('./global/pt-br.json').then((module) => module.default), | ||
'it-it': () => import('./global/it-it.json').then((module) => module.default), | ||
}, | ||
}; | ||
|
||
export const getDictionary = (type) => async (locale) => dictionaries[type][locale](); | ||
export const getGlobalDictionary = getDictionary('global'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this became redundant with next-intl
@@ -2,6 +2,7 @@ | |||
'use server'; | |||
import type { UserSchema } from '@types'; | |||
import { getSession } from '@auth'; | |||
import { getGlobalDictionary } from '@dict' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔪
]; | ||
|
||
acceptLanguage.languages(supportedLocales); | ||
export const middlewares = [authMiddleware, i18nDetectMiddleware]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There seems to be an outage on GH Actions. I think pull_request pushes can default to 1 CI pipe active at a time (configurable), as in cancelling previous ones as new pushes arrive. |
* ar(fix) [DPTM-2]: Ensure autonomous Dev environment (#35) * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * [DPTM-2] Dev env (#37) * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * [DPTM-2] dev env (#38) * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * [DPTM-2]: dev env (#39) * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment --------- Signed-off-by: Angelo Reale <12191809+angeloreale@users.noreply.github.com> * [DPTM-2]: dev env (#40) * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment * ar(fix) [DPTM-2]: Ensure autonomous Dev environment --------- Signed-off-by: Angelo Reale <12191809+angeloreale@users.noreply.github.com> * ar(feat) [DPCP-37]: Localization Part 1: Add Locale Support (#41) * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization Part 2: Dictionaries (#42) * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * [DPCP-37] [DPCP-91] [DPCP-92] Nits (#43) * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(feat) [DPCP-37]: Localization * ar(fix): services --------- Signed-off-by: Angelo Reale <12191809+angeloreale@users.noreply.github.com>
PLEASE REVIEW YOUR OWN PR BEFORE OPENING/UN-DRAFTING IT
[Ticket Title]
[ticket description]
Screenshots/Videocasts/Preview Links
Have you?
If so, THANKS! You can pop a beer/soda.
Please open your PR and ping your colleagues to review it on #web-devs channel.
Also, make sure to remind them on a daily basis during stand-up.