mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-05 16:10:31 +02:00
Update TRANSLATIONS.md with details on installation and dprint
usage (#1372)
Related to #1359
This commit is contained in:
parent
b096dca04b
commit
0e32756795
@ -31,13 +31,24 @@ GNU Gettext utilities below.
|
|||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
|
### Gettext
|
||||||
|
|
||||||
You will need the [Gettext] utilities (`msginit`, `msgmerge`) and [`dprint`].
|
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
|
```shell
|
||||||
sudo apt install gettext
|
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.
|
Install `dprint` using their installation instructions.
|
||||||
|
|
||||||
[dprint]: https://dprint.dev/
|
[dprint]: https://dprint.dev/
|
||||||
@ -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
|
There are many PO editors available. [Poedit](https://poedit.net/) is a popular
|
||||||
cross-platform choice, but you can also find several online editors.
|
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
|
### Formatting a Translation
|
||||||
[Gettext] and [`dprint`](https://dprint.dev/) and then run
|
|
||||||
|
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
|
```shell
|
||||||
dprint fmt
|
dprint fmt po/xx.po
|
||||||
```
|
```
|
||||||
|
|
||||||
This will automatically format the files for you. Commit the formatting fix and
|
This will automatically format the `.po` file for you. Commit the formatting fix
|
||||||
push to your branch. Your PR should now be error free.
|
and push to your branch. Your PR should now be error free.
|
||||||
|
|
||||||
## Using Translations
|
## Using Translations
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user