Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TRANSLATIONS.md with details on installation and dprint usage #1372

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,24 @@ GNU Gettext utilities below.

## Preparation

### Gettext

You will need the [Gettext] utilities (`msginit`, `msgmerge`) and [`dprint`].
Under Debian and Ubuntu, you can install Gettext with:

On Debian and Ubuntu, you can install Gettext with:

```shell
sudo apt install gettext
```

On MacOS with [Homebrew](https://brew.sh/), you can install with:

```shell
brew install gettext
```

### `dprint`

Install `dprint` using their installation instructions.

[dprint]: https://dprint.dev/
Expand Down Expand Up @@ -136,15 +147,18 @@ will take care of escaping things like `"` correctly.
There are many PO editors available. [Poedit](https://poedit.net/) is a popular
cross-platform choice, but you can also find several online editors.

If the file is not formatted correct, you will get an error on the PR. Install
[Gettext] and [`dprint`](https://dprint.dev/) and then run
### Formatting a Translation

If the file is not formatted correct, you will get an error on the PR. Make sure
to follow the [steps](#preparation) to install [Gettext] and
[`dprint`](https://dprint.dev/) and then run:

```shell
dprint fmt
dprint fmt po/xx.po
```

This will automatically format the files for you. Commit the formatting fix and
push to your branch. Your PR should now be error free.
This will automatically format the `.po` file for you. Commit the formatting fix
and push to your branch. Your PR should now be error free.

## Using Translations

Expand Down