# @raytio/react-intl-manager

> Manage i18n files used by react-intl

Latest version **6.4.0** (published 2023-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @raytio/react-intl-manager
pnpm add @raytio/react-intl-manager
yarn add @raytio/react-intl-manager
bun add @raytio/react-intl-manager
```

Provides the command `react-intl-manager`.

## 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 | 6.4.0 |
| Published | 2023-11-09 |
| First published | 2020-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 12 |
| Unpacked size | 52.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cameron.beattie, borigthedwarf, kyle.h, kalda341 |

## Links

- npm: https://www.npmjs.com/package/@raytio/react-intl-manager
- Repository: https://gitlab.com/raytio/react-intl-manager
- Homepage: https://gitlab.com/raytio/react-intl-manager#readme
- Issues: https://gitlab.com/raytio/react-intl-manager/issues
- npm.io page: https://npm.io/package/@raytio/react-intl-manager

## Dependencies (12)

- [glob](https://npm.io/package/glob.md) ^7.1.2
- [chalk](https://npm.io/package/chalk.md) ^2.3.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.11.1
- [schema-utils](https://npm.io/package/schema-utils.md) ^2.7.0
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) ^1.0.1
- [babel-preset-react-app](https://npm.io/package/babel-preset-react-app.md) ^10.0.1
- [@formatjs/ts-transformer](https://npm.io/package/@formatjs/ts-transformer.md) 2.5.1
- [intl-messageformat-parser](https://npm.io/package/intl-messageformat-parser.md) ^5.3.7
- [@babel/helper-plugin-utils](https://npm.io/package/@babel/helper-plugin-utils.md) ^7.10.4
- [@babel/plugin-proposal-private-property-in-object](https://npm.io/package/@babel/plugin-proposal-private-property-in-object.md) ^7.21.11

## Recent versions

- 6.4.0 (latest) — 2023-11-09
- 6.3.1 — 2023-02-19
- 6.3.0 — 2022-04-02
- 6.2.0 — 2021-04-10
- 6.1.2 — 2020-08-27
- 6.1.1 — 2020-08-18
- 6.1.0 — 2020-08-10
- 6.0.2 — 2020-08-05
- 6.0.1 — 2020-08-05

## README

# react-intl-manager

![pipeline](https://gitlab.com/raytio/react-intl-manager/badges/main/pipeline.svg?style=flat-square)
![coverage](https://gitlab.com/raytio/react-intl-manager/badges/main/coverage.svg?style=flat-square)
![npm version](https://img.shields.io/npm/v/@raytio/react-intl-manager?color=%234c1&style=flat-square)

A fork of [react-intl-translations-manager](https://github.com/GertjanReynaert/react-intl-translations-manager) which works better for Raytio and integrates with the GitLab CI.

What it actually does

- Remove duplicates from the locale json files
- Remove redundant keys from locale json files
- Detect missing keys and add them as `null`
- Generate a codequality report for codeclimate or GitLab CI.

Note that for performance reasons, this script only parses files that import the `i18n` module. If it fails to detect this, you can add `// @i18nForceCheck` to force it to check that file.

## Usage:

```sh
npm i -D @raytio/react-intl-manager
```

Then add a section to package.json called `i18n` which contains the config:

```jsonc
{
  "scripts": {
    "i18n": "react-intl-manager"
  },
  "i18n": {
    "localeDir": "path/to/locale-json-files",

    // optional, src by default
    "sourceFolder": "src",

    // optional, .messages by default
    "messagesDir": ".messages",

    // optional, the name of the es module - default is "i18n", not "react-intl"
    // set to `false` to parse every js-like file
    "moduleSourceName": "i18n",

    // optional, this will append any issues to this file if exists (or create it)
    "codeQualityReport": "path/to/codequality.json"
  }
}
```

## Contributing

```sh
# makes cli.js available
npm link
```

## Publishing

The CI will publish every commit to `main` if the version number in package.json has been bumped.

---
_Source: https://npm.io/package/@raytio/react-intl-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
