npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jlatte

v0.0.3

Published

A simple CLI to translate JSON files.

Downloads

1

Readme

jlatte ☕

This is a Node.js script that helps you to easily perform language translation on your project's languages .json files using the Google Translate API. It can automatically detect the source language in a specified folder and translate the content in the correspondent files.

No configuration needed.

Nested objects support.

📦 Installation

Install it as a dev dependency in your project.

npm install -D jlatte

or

pnpm add jlatte -D

🧑‍💻 Usage

  1. Inside the folder that you use for your .json languages, create the source language file, for example, en.json with all the translations. Note: you can add after new translation, and if you have change manually any of the translations it will keep it as it is.

  2. Create in the same folder than the source language file, an empty .json file for every of the desired languages. For example es.json. Note: check for the available language codes in Available codes

  3. Execute the CLI in your project

pnpm jlatte

Note: you can create a script on your package.json for convenience as:

scripts{
   "translate": "pnpm jlatte <sourceFilePath> <sort>"
}

Replace <sourceFilePath> with the path to the source JSON file, and <sort> with true or false depending if you want to sort the object keys alphabetically or not, where true es "yes" and false is "not".

Example:

scripts{
   "translate": "pnpm jlatte languages/en.json true"
}

and then just execute:

pnpm translate

Available codes

| Language | Code | |---------------------|------| | Afar | aa | | Abkhazian | ab | | Afrikaans | af | | Akan | ak | | Albanian | sq | | Amharic | am | | Arabic | ar | | Aragonese | an | | Armenian | hy | | Assamese | as | | Avaric | av | | Avestan | ae | | Aymara | ay | | Azerbaijani | az | | Bashkir | ba | | Bambara | bm | | Basque | eu | | Belarusian | be | | Bengali | bn | | Bihari Languages | bh | | Bislama | bi | | Tibetan | bo | | Bosnian | bs | | Breton | br | | Bulgarian | bg | | Burmese | my | | Catalan | ca | | Valencian | ca | | Czech | cs | | Chamorro | ch | | Chechen | ce | | Chinese | zh | | Church Slavic | cu | | Old Slavonic | cu | | Church Slavonic | cu | | Old Bulgarian | cu | | Old Church Slavonic | cu | | Chuvash | cv | | Cornish | kw | | Corsican | co | | Cree | cr | | Welsh | cy | | Danish | da | | German | de | | Divehi | dv | | Dhivehi | dv | | Maldivian | dv | | Dutch | nl | | Flemish | nl | | Dzongkha | dz | | Greek | el | | English | en | | Esperanto | eo | | Estonian | et | | Ewe | ee | | Faroese | fo | | Persian | fa | | Fijian | fj | | Finnish | fi | | French | fr | | Western Frisian | fy | | Fula | ff | | Georgian | ka | | Gaelic | gd | | Scottish Gaelic | gd | | Irish | ga | | Galician | gl | | Manx | gv | | Guarani | gn | | Gujarati | gu | | Haitian | ht | | Haitian Creole | ht | | Hausa | ha | | Hebrew | he | | Herero | hz | | Hindi | hi | | Hiri Motu | ho | | Croatian | hr | | Hungarian | hu | | Igbo | ig | | Icelandic | is | | Ido | io | | Sichuan Yi | ii | | Nuosu | ii | | Inuktitut | iu | | Interlingue | ie | | Occidental | ie | | Interlingua | ia | | Indonesian | id | | Inupiaq | ik | | Italian | it | | Javanese | jv | | Japanese | ja | | Kalaallisut | kl | | Greenlandic | kl | | Kannada | kn | | Kashmiri | ks | | Kanuri | kr | | Kazakh | kk | | Central Khmer | km | | Kikuyu | ki | | Gikuyu | ki | | Kinyarwanda | rw | | Kirghiz | ky | | Kyrgyz | ky | | Komi | kv | | Kongo | kg | | Korean | ko | | Kuanyama | kj | | Kwanyama | kj | | Kurdish | ku | | Lao | lo | | Latin | la | | Latvian | lv | | Limburgan | li | | Limburger | li | | Limburgish | li | | Lingala | ln | | Lithuanian | lt | | Luxembourgish | lb | | Letzeburgesch | lb | | Luba-Katanga | lu | | Ganda | lg | | Macedonian | mk | | Marshallese | mh | | Malayalam | ml | | Maori | mi | | Marathi | mr | | Malay | ms | | Malagasy | mg | | Maltese | mt | | Mongolian | mn | | Nauru | na | | Navajo | nv | | Navaho | nv | | Ndebele, South | nr | | South Ndebele | nr | | Ndebele, North | nd | | North Ndebele | nd | | Ndonga | ng | | Nepali | ne | | Norwegian Nynorsk | nn | | Nynorsk, Norwegian | nn | | Norwegian Bokmål | nb | | Bokmål, Norwegian | nb | | Norwegian | no | | Chichewa | ny | | Chewa | ny | | Nyanja | ny | | Occitan | oc | | Ojibwa | oj | | Oriya | or | | Oromo | om | | Ossetian | os | | Ossetic | os | | Panjabi | pa | | Punjabi | pa | | Pali | pi | | Polish | pl | | Portuguese | pt | | Pushto | ps | | Pashto | ps | | Quechua | qu | | Romansh | rm | | Romanian | ro | | Moldavian | ro | | Moldovan | ro | | Rundi | rn | | Russian | ru | | Sango | sg | | Sanskrit | sa | | Sinhala | si | | Sinhalese | si | | Slovak | sk | | Slovenian | sl | | Northern Sami | se | | Samoan | sm | | Shona | sn | | Sindhi | sd | | Somali | so | | Sotho, Southern | st | | Spanish | es | | Sardinian | sc | | Serbian | sr | | Swati | ss | | Sundanese | su | | Swahili | sw | | Swedish | sv | | Tahitian | ty | | Tamil | ta | | Tatar | tt | | Telugu | te | | Tajik | tg | | Tagalog | tl | | Thai | th | | Tigrinya | ti | | Tonga | to | | Tswana | tn | | Tsonga | ts | | Turkmen | tk | | Turkish | tr | | Twi | tw | | Uighur | ug | | Ukrainian | uk | | Urdu | ur | | Uzbek | uz | | Venda | ve | | Vietnamese | vi | | Volapük | vo | | Walloon | wa | | Wolof | wo | | Xhosa | xh | | Yiddish | yi | | Yoruba | yo | | Zhuang | za | | Chuang | za | | Zulu | zu |

🎖️ Credits

Translate as base for the translations.

Clack and picocolors for the command-line interface