nodejs / nodejs.org

The Node.js® Website
https://nodejs.org
MIT License
6.14k stars 6.21k forks source link

Add translations of snippet comments from Download Package Manager boxes #6849

Closed ovflowd closed 2 months ago

ovflowd commented 3 months ago

The snippets below are defined on a TypeScript file and shown below:

image

We can call the translation service (t) and include translation strings within the i18n JSON files for such comments; otherwise, it feels like the translation is lacking here.

PalashChitnavis commented 3 months ago

Hey, can I work on this issue?
Could you explain the issue and the approach?

bmuenzenmeyer commented 3 months ago

Thanks for your interest. We don't assign tickets if we can help it. Feel free to submit a pull request if you have time. Reference 🍪 https://www.redhat.com/en/blog/dont-lick-cookie

AugustinMauroy commented 3 months ago

@bmuenzenmeyer Hello, they weren't asking to be assigned an outcome, they were asking for guidance 😁.

So @PalashChitnavis, in util/getNodeDownloadSnippet.ts you have a function that return string to put on codebox. So issue "ask" to add i18n for comment. To add i18n on a string you I'll need to use client hooks from next-intl call useTranslation.

Also we have this doc about how to contribute on this repo : COLLABORATOR_GUIDE.md

bmuenzenmeyer commented 3 months ago

To be fair, they did both. On mobile i answered too quickly, thanks for giving them next steps!

nilkhankari commented 2 months ago

Hey @PalashChitnavis , Could you please let me know if you are working on this? else I will look into it. Thanks

AugustinMauroy commented 2 months ago

@nilkhankari I think you can go head