nodejs / i18n

The Node.js Internationalization Working Group – A Community Committee initiative.
MIT License
150 stars 40 forks source link

Discussion about NPM module #261

Closed alexandrtovmach closed 4 years ago

alexandrtovmach commented 4 years ago

Let's make this issue as central place to discuss question "do we need NPM module or not?" cite from https://github.com/nodejs/i18n/pull/250#issuecomment-602829024

I'm actually thinking that it's a bit overhead to create npm module for localization purposes. It makes sense to create any of npm package to share functionality (or content in our case) between many projects. We have just two nodejs.org and nodejs.dev and sounds like a good catch, but... in new website we're using Gatsby/GraphQL, that can be extended with gatsby-source-git plugin to pull any of data directly from GitHub repo.

From my point of view we solved content delivery for nodejs.dev, so there no more reasons to create npm package, because it's going to be used just in one project - nodejs.org.

Please write your objections here, and let's make a decision. If everyone agrees that NPM module is not needed, these issues and PR will be closed.: #92 #93 #133 #245 #250

@nodejs/i18n @nodejs/i18n-api

zeke commented 4 years ago

Thanks for bringing this all into one place.

Based on your feedback in https://github.com/nodejs/i18n/pull/250#issuecomment-602829024, it seems like nodejs.dev will likely use a Gatsby plugin to get localized content directly from this git repo.

I'd still be in favor of exporting a lightweight version of the module as designed in https://github.com/nodejs/i18n/pull/250, but NOT PUBLISHING it to npm. That way anyone can install directly from the master branch on GitHub using npm install nodejs/i18n. I see a few benefits to this:

alexandrtovmach commented 4 years ago

@zeke Totally makes sense, and I agree with this way. I'm just curious - where do you think we will use this module? =)

zeke commented 4 years ago

where do you think we will use this module?

I was imagining building a lightweight portable website desktop app that could be used to visually validate the localized content, independent of any external site like nodejs.org or nodejs.dev.

vmd is a Node.js module that contains an Electron app that renders Markdown with GitHub styles applied using github-markdown-css. I'd like to use this as inspiration.

I think it would be cool to be able to run npx nodejs-docs (or similar) and get a locally running desktop app with all the Node.js docs, a sidebar with a table of contents, nice styles that look like github.com, a dropdown for changing the node version, and a dropdown for changing the language.

Just an idea though 🤔

JoseJPR commented 4 years ago

👋 Hi all, sorry I'm late for this issue.

I see two different points after reading these ideas:

1.- On the one hand, the standardization of documentation files for both website .dev and .org.

I did not know this library (https://www.gatsbyjs.org/packages/gatsby-source-git/) but I think it can really give a solution for the .dev website. Keep updated an NPM library is more effort.

2.- On the other hand, the idea of ​​offering a lightweight portable website desktop version. And here I ask a question. Don't you think we can offer this feature with the current websites if they are turned to progressive web applications?

In this way the user can to install a version of website on their desktop or mobile and have access from an icon. With libraries such as Google's Workbox, you can design caching strategies to be able to force the updating content when it is necessary and when this application is opened by the user. For users with low internet connectivity always have a local version.

Cheers!

alexandrtovmach commented 4 years ago

@zeke Nevermind, I'll close related stuff

alexandrtovmach commented 4 years ago

Closing in favor #250