From 59ce1bba160e26f4dee69c702bb0f53c8076d5b4 Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Wed, 1 Sep 2021 16:53:30 -0400 Subject: [PATCH] Remove deprecated lingui add-locale cmd --- awx/ui/CONTRIBUTING.md | 2 +- awx/ui/package.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/ui/CONTRIBUTING.md b/awx/ui/CONTRIBUTING.md index b2ef140b96..d9b8a0f114 100644 --- a/awx/ui/CONTRIBUTING.md +++ b/awx/ui/CONTRIBUTING.md @@ -350,7 +350,7 @@ You can learn more about the ways lingui and its React helpers at [this link](ht ### Setting up .po files to give to translation team -1. `npm run add-locale` to add the language that you want to translate to (we should only have to do this once and the commit to repo afaik). Example: `npm run add-locale en es fr` # Add English, Spanish and French locale +1. Make sure that the languages you intend to translate are set correctly in the `.linguirc` configuration file. 2. `npm run extract-strings` to create .po files for each language specified. The .po files will be placed in src/locales. When updating strings that are used by `` or `plural()` you will need to run this command to get the strings to render properly. This command will create `.po` files for each of the supported languages that will need to be committed with your PR. 3. Open up the .po file for the language you want to test and add some translations. In production we would pass this .po file off to the translation team. 4. Once you've edited your .po file (or we've gotten a .po file back from the translation team) run `npm run compile-strings`. This command takes the .po files and turns them into a minified JSON object and can be seen in the `messages.js` file in each locale directory. These files get loaded at the App root level (see: App.js). diff --git a/awx/ui/package.json b/awx/ui/package.json index 33374e0d6d..402740eacc 100644 --- a/awx/ui/package.json +++ b/awx/ui/package.json @@ -72,7 +72,6 @@ "test-watch": "TZ='UTC' react-scripts test", "eject": "react-scripts eject", "lint": "eslint --ext .js --ext .jsx .", - "add-locale": "lingui add-locale", "extract-strings": "lingui extract", "extract-template": "lingui extract-template", "compile-strings": "lingui compile",