From 35882d4c0b531eda404b806cba0102afa426b7a3 Mon Sep 17 00:00:00 2001 From: Henri F Date: Mon, 16 Oct 2023 11:42:42 -0700 Subject: [PATCH] Update TRANSLATIONS.md with details on installation `dprint` usage --- TRANSLATIONS.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/TRANSLATIONS.md b/TRANSLATIONS.md index 3842852a840d..8c1b898d3da0 100644 --- a/TRANSLATIONS.md +++ b/TRANSLATIONS.md @@ -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/ @@ -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