# quasar-app-extension-i18n-spell-checker

> Quasar app extension that works as spell checker for i18n files in Quasar projects

Latest version **0.0.3** (published 2022-02-19) · GPLv3 license · 0 weekly downloads

## Install

```sh
npm install quasar-app-extension-i18n-spell-checker
pnpm add quasar-app-extension-i18n-spell-checker
yarn add quasar-app-extension-i18n-spell-checker
bun add quasar-app-extension-i18n-spell-checker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-02-19 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| License | GPLv3 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 14.18.2 |
| Dependencies | 8 |
| Unpacked size | 239.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Diego Luis Soler |
| Maintainers | diegosoler |
| Keywords | Quasar Framework, spell, spell check, vue-i18n, i18n |

## Links

- npm: https://www.npmjs.com/package/quasar-app-extension-i18n-spell-checker
- Repository: https://github.com/dlsoler/quasar-app-extension-i18n-spell-checker
- Homepage: https://github.com/dlsoler/quasar-app-extension-i18n-spell-checker#readme
- Issues: https://github.com/dlsoler/quasar-app-extension-i18n-spell-checker/issues
- npm.io page: https://npm.io/package/quasar-app-extension-i18n-spell-checker

## Dependencies (8)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nodehun](https://npm.io/package/nodehun.md) ^3.0.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.4.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^6.1.0
- [wink-tokenizer](https://npm.io/package/wink-tokenizer.md) ^5.3.0
- [string-strip-html](https://npm.io/package/string-strip-html.md) ^8.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

- 0.0.3 (latest) — 2022-02-19
- 0.0.2 — 2022-02-10
- 0.0.1 — 2022-02-10

## README

<div style="text-align: center; margin-bottom: 40px">
    <img src="images/logo.png" alt="logo" width="200">
</div>


Quasar App Extension i18n-spell-checker
===

> _This is a work in process._

> _This project is independent of the [Quasar Framework](https://quasar.dev), but I love Quasar Framework._


**i18n-spell-checker** is a [Quasar App Extension](https://quasar.dev/app-extensions/introduction) to spell check the text values stored in the i18n files in a typical Quasar Application.  
The extension works with the module [Nodehun](https://www.npmjs.com/package/nodehun#checking-for-correctness) which aims to expose as much of [Hunspell](http://hunspell.github.io/)'s functionality.

To read about Hunspell: [Hunspell spell checker](http://hunspell.github.io/).

# Donate

If you appreciate the work that went into this App Extension, please consider [donating to Quasar](https://donate.quasar.dev).


# How the extesion works

The checking process is very simple:

1. The extension opens any one of these files in your Quasar Framework based application:

    * <APPLICACTION_ROOT_DIRECTORY>/src/i18n/<LANGUAGE_ID>/index.js
    * <APPLICACTION_ROOT_DIRECTORY>/src/i18n/<LANGUAGE_ID>/index.ts

2. Parse the file to compile it to a Javascript Object.

3. Take recursively the text values of each property in the object.

4. Split the text values in words.

5. Check the spelling of each word using Hunspell.

6. Print a colored message with the spelling errors detected.


# Install

```bash
quasar ext add i18n-spell-checker
```
Quasar CLI will retrieve it from the NPM registry and install the extension to your project.

---
> ## Where to get dictionaries
> Please, read the nodehum docs in [https://www.npmjs.com/package/nodehun#where-to-get-dictionaries](https://www.npmjs.com/package/nodehun#where-to-get-dictionaries)
> 
>If you are thinking in using Open Office dictionary, please follow this link and read the note: [https://www.npmjs.com/package/nodehun#a-note-about-open-office-dictionaries](https://www.npmjs.com/package/nodehun#a-note-about-open-office-dictionaries)    


---
## Extension commands

# spellcheck

```bash
quasar run i18n-spell-checker spellcheck --language <LANGUAGE> --path <DICTIONARIES_DIRECTORY_PATH>
```
### Examples

1. Check the USA English (en-US) files using the dictionaries (.aff and .dic files) in ../dictionaries

    Print the wrong words in red without the line numbers.

```bash
quasar run i18n-spell-checker spellcheck --language en-US --path ../dictionaries
```

2. Check the USA English (en-US) files using the dictionaries (.aff and .dic files) in ../dictionaries

    Print line number in the file before the text with the wrong words in red.

```bash
quasar run i18n-spell-checker spellcheck --language en-US --path ../dictionaries -n
```

3. Check the Argentina Spain  (es-AR) files using the dictionaries (.aff and .dic files) in ../dictionaries

    Print line number in the file before the text with the wrong words in red.

```bash
quasar run i18n-spell-checker spellcheck --language es-AR --path ../dictionaries -n
```

## save-dictionary-path

The command save-dictionary-path saves in the Quasar persistent configuration the path to the directory where the dictionaries files (**.aff** and **.dic** files) are stored.

You can use this command once to avoid to write the path each time you run the command spellcheck.

```bash
quasar run i18n-spell-checker save-dictionary-path --path <DICTIONARIES_DIRECTORY>
```

### Examples

If you run:

```bash
quasar run i18n-spell-checker save-dictionary-path --path ~/my_dictionaries
```

And then:

```bash
quasar run i18n-spell-checker spellcheck --language en-US  -n
```

Because the extension knows the path to dictionaries, the previous command is equivalent to run:

```bash
quasar run i18n-spell-checker spellcheck --language en-US --path ~/my_dictionaries -n
```

# Uninstall
```bash
quasar ext remove i18n-spell-checker
```

# Other Info

You can get help using the -h or --help option in the extension commands. For example:

```bash
quasar run i18n-spell-checker spellcheck -h
```


# Donate
If you appreciate the work that went into this App Extension, please consider [donating to Quasar](https://donate.quasar.dev).

---
_Source: https://npm.io/package/quasar-app-extension-i18n-spell-checker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
