# @guuri11/i18n-cli

> CLI tool for quick i18n additions

Latest version **1.2.6** (published 2023-06-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install @guuri11/i18n-cli
pnpm add @guuri11/i18n-cli
yarn add @guuri11/i18n-cli
bun add @guuri11/i18n-cli
```

Provides the command `i18n-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2023-06-12 |
| First published | 2022-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sergio Gurillo Corral |
| Maintainers | guuri11 |
| Keywords | i18n, internationalization, node, react-i18n, cli |

## Links

- npm: https://www.npmjs.com/package/@guuri11/i18n-cli
- Repository: https://github.com/Guuri11/i18n-cli
- Homepage: https://github.com/Guuri11/i18n-cli#readme
- Issues: https://github.com/Guuri11/i18n-cli/issues
- npm.io page: https://npm.io/package/@guuri11/i18n-cli

## Dependencies (2)

- [consola](https://npm.io/package/consola.md) ^2.15.3
- [readline](https://npm.io/package/readline.md) ^1.3.0

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.2.6 (latest) — 2023-06-12
- 1.2.5 — 2023-06-12
- 1.2.4 — 2023-06-12
- 1.2.2 — 2023-02-28
- 1.2.1 — 2023-02-28
- 1.2.0 — 2023-02-27
- 1.1.2 — 2023-02-27
- 1.1.1 — 2023-02-27
- 1.1.0 — 2023-02-27
- 1.0.9 — 2022-11-01
- 1.0.8 — 2022-11-01
- 1.0.7 — 2022-11-01
- 1.0.6 — 2022-11-01
- 1.0.5 — 2022-11-01
- 1.0.4 — 2022-11-01
- … 4 more at https://npm.io/package/@guuri11/i18n-cli/versions

## README

# 🌍 I18n-cli

CLI tool for quick i18n additions


# 🏆 Motivation
Working with translations can be so boring & annoying when you are trasnlating a big project with 3 or more languages availables. So I wanted to have a node tool for inserting ASAP the sentences for i18n.


# 🧪 Features

- Add new sentences to locales, just put the folder path where the json files are located.
- Update a the sentences based on a key
- Delete the sentences based on a key
- Export the locales to CSV

## Installation

Install with ```$ npm install --save-dev i18n-cli```

or

Install with ```$ yarn add --dev @guuri11/i18n-cli ```

## Usage
Run ```$ node_modules/@guuri11/i18n-cli/bin/cli.js  ```

or

Create a script in your package.json like this
```json

"scripts": {
    "i18n-cli": "node_modules/@guuri11/i18n-cli/bin/cli.js"
  }
```
and just run 

```npm run i18n-cli```

or

```yarn run i18n-cli```

#### Preview
```
ℹ Running i18n editor                                                                                                                      15:12:33
ℹ Please choose an option:                                                                                                                 15:12:33
1 -> Add Translation Sentence
2 -> Delete Translation Sentence
3 -> Generate CSV extract
4 -> Exit
Option: 1
Selected option: 1
Enter the folder path where the locale files are located: ./locale
Enter the key of the new translation sentence: hello_world
ready Key: hello_world                                                                                                                     15:12:59
Add translation for en locale or type 'update' to modify an existing one: Hello world!
ready Value: Hello world!                                                                                                                  15:13:21
✔ Translation added to locale                                                                                                              15:13:21
Add translation for es locale or type 'update' to modify an existing one: Hola mundo!
ready Value: Hola mundo!                                                                                                                   15:13:25
✔ Translation added to locale                                                                                                              15:13:25
✔ Translation added to all locales                                                                                                         15:13:25
ℹ Please choose an option:                                                                                                                 15:13:25
1 -> Add Translation Sentence
2 -> Delete Translation Sentence
3 -> Generate CSV extract
4 -> Exit
Option: 3
Selected option: 3
✔ CSV generated successfully 
```
#### Result

##### src/locales/en.json
```json
{
  "hello_world": "Hello World"
}
````

##### src/locales/es.json
```json
{
  "hello_world": "Hola mundo"
}
````

##### src/locales/locales.csv
```csv
key,en,es
hello_world,Hello world!,Hola mundo!
````

## 📝 Feedback

If you have any feedback, please reach out to me at Linkedin 😁 (https://www.linkedin.com/in/sergio-gurillo-corral-2585431b0/)

---
_Source: https://npm.io/package/@guuri11/i18n-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
