Skip to content

Commit

Permalink
Finish docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jul 5, 2023
1 parent a9b23ff commit e473f83
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/add-new-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,45 @@ step. We suggest using [Poedit](https://poedit.net/) for translating `.po` files

The `shortcodes.po` file is optional and can be skipped. This file can be used to provide custom
shortcodes for the emojibase preset.

## 3) Generate data files

Once translations have been made, we can generate the data files. This may take a while, so be sure
to let the command keep running until completion.

```
yarn run generate
```

> A lot of information will be logged to the console, this is normal. However, please scan all logs
> for any warnings and errors. If easily fixable, feel free to fix, otherwise report an issue!
If generation completed successfully, you should see the `packages/data/<locale>` directory with a
handful of files.

## 4) Verify data files

Although data files were generated, we should manually verify that the data is correct.

- Ensure that there's no empty strings in every `*.raw.json` file.
- This is as simple as searching for `""` in the file.
- The `emoji` and `text` fields in `data.raw.json` can be empty.
- Ensure that `label` in `compact.raw.json` and `data.raw.json` align with your locale.
- These translations are provided by CLDR and cannot be changed.
- If there are missing labels, then this language/locale _will not be supported_ until CLDR is
complete.
- Ensure that `message` in `messages.raw.json` align with the translations from
`po/<locale>/messages.po`.
- Optional: Ensure that shortcodes in `shortcodes/emojibase.raw.json` align with the translations
from `po/<locale>/shortcodes.po`.

## 5) Create pull request

Once verified, add the following files to git:

- `po/<locale>/*.po`
- `packages/data/<locale>/**/*.raw.json`

And then create a pull request!

> Please limit 1 locale per PR, otherwise we will not accept it.

0 comments on commit e473f83

Please sign in to comment.