Skip to content
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

Merged
merged 12 commits into from
Aug 21, 2024

Conversation

angeloreale
Copy link
Contributor

PLEASE REVIEW YOUR OWN PR BEFORE OPENING/UN-DRAFTING IT

[Ticket Title]

[ticket description]

Screenshots/Videocasts/Preview Links

Have you?

  • Reviewed your own PR?
  • Tested your own feature/fix meets Acceptance Criteria?
  • Made sure it passes all checks? (lint, build, integrations, scripts, etc)?
  • Added screenshots? (if relevant)
  • Added unit tests? (if necessary)
  • Added documentation? (if necessary)

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.

Copy link

vercel bot commented Aug 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nyx ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 2:39pm

Copy link

Nyx: Add Localisation

@angeloreale
Copy link
Contributor Author

Yes, I extend my computer life time by delegating builds to the cloud.

@angeloreale
Copy link
Contributor Author

Who likes a janky loud and heated piece of expensive metal in a quiet room anyway?

@angeloreale
Copy link
Contributor Author

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.

Copy link
Contributor Author

@angeloreale angeloreale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment on lines 1 to 13
// @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');
Copy link
Contributor Author

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'
Copy link
Contributor Author

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];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@angeloreale
Copy link
Contributor Author

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.

@angeloreale angeloreale merged commit 9a5d2bd into dev Aug 21, 2024
4 of 6 checks passed
@angeloreale angeloreale deleted the ar/feat/DPCP-37--localization-dict branch August 21, 2024 14:42
@angeloreale angeloreale mentioned this pull request Aug 21, 2024
angeloreale added a commit that referenced this pull request Aug 21, 2024
* 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>
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.

1 participant