-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat: create i18n package #6945
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
packages/i18n/package.json
Outdated
@@ -0,0 +1,6 @@ | |||
{ | |||
"name": "@nodejs/i18n", |
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.
I'm not a fan of this scope, we should have one specific to the website because this one is also used apr undici. The packages in nodejs
are user packages, so it's not the best idea. But there's also @node-core
, which doesn't fit either because it's intended for node core 😁.
So for me it would be necessary to have a scope specific to the website project.
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.
I think it should be "@node-core/website-i18n" and the current "@nodejs/website" on (apps/site) should be "@node-core/website"
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.
i am fine with that - one thing to keep in mind is that we cannot anticipate how people will use these packages once split out. @node-core/website-i18n
could suddenly become very useful to someone downstream. That's not to say we should optimize for unknown, but I do like re-use.
the config is in the In this case, you could have a config for the app that just gives the language enabled or not. |
FYI, the i18n package is missing a build script I'm not sure a build-step is needed, since right now the i18n package only has a bunch of JSONs; And I don't think the i18n package needs anything else 🤔 cc @bmuenzenmeyer or @canerakdas any idea of what the i18n package should have else? |
I think it is the other way around. site dependsOn i18n |
you're not wrong. The question to make the right choice is: are the translation keys package/app dependent or shared, in simple terms do we have one JSON per language or one JSON per language per app/package. |
@@ -1,6 +1,6 @@ | |||
'use strict'; |
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.
IMO this file should be on package i18n. So it's can be share between multiple apps.
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.
agree
Note Your Pull Request seems to be updating Translations of the Node.js Website. Whilst we appreciate your intent; Any Translation update should be done through our Crowdin Project. Thank you! |
Description
Create i18n package
Validation
Related Issues
Related to #5405
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.