From 07696ce0ed93b088947d753e6f9ad351d9c95aa9 Mon Sep 17 00:00:00 2001 From: zhaoweny Date: Mon, 22 Jun 2020 10:16:48 +0800 Subject: [PATCH] i18n: fix typos in locale/README.md --- locale/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/README.md b/locale/README.md index 017aa0d53..060637749 100644 --- a/locale/README.md +++ b/locale/README.md @@ -7,7 +7,7 @@ Below is a summary of [GNU gettext](https://www.gnu.org/software/gettext/) manua ## i18n with command line Windows users can get these tools via Git for windows, Msys2 or Cygwin; or just use WSL / WSL2. -For Linux and macOS users these tools might be avaliable out-of-box. +For Linux and macOS users these tools might be available out-of-box. ### To generate new template for translation: @@ -15,9 +15,9 @@ For Linux and macOS users these tools might be avaliable out-of-box. $ find */ *.py -name "*.py" | xgettext -o locale/lang.pot -d lang -k_t -f - ``` -explaination: +explanation: -* `find */ *.py -name "*.py"`: collect all `.py` file path in root dir and all sub-folder, write it to stdout +* `find */ *.py -name "*.py"`: collect all `.py` file path in root folder and all sub-folder, write it to stdout * `xgettext`: a utility looking for keyword and put string literals in a specific format for human translation * `-o locale/lang.pot`: let `xgettext` write to `locale/lang.pot` * `-d lang`: default language domain is `lang` @@ -26,13 +26,13 @@ explaination: this `locale/lang.pot` is called PO template, which is throwed away once actual `ll_CC/LC_MESSAGES/lang.po` is ready for use. -### To initalize PO file for new language +### To initialize PO file for new language ```console $ msginit -i locale/lang.pot -l ll_CC -o locale/ll_CC/LC_MESSAGES/lang.po ``` -explaination: +explanation: * `-i locale/lang.pot`: input file location * `-l ll_CC`: target locale. `ll` should be a language code, and `CC` should be a country code @@ -53,7 +53,7 @@ $ msgmerge locale/ll_CC/LC_MESSAGES/lang.po locale/lang.pot just edit the `lang.po` file :) -### To generate mechine readable MO file +### To generate machine readable MO file For a single locale: @@ -61,7 +61,7 @@ For a single locale: $ msgfmt locale/ll_CC/LC_MESSAGES/lang.po -o locale/ll_CC/LC_MESSAGES/lang.mo ``` -For all avaliable locale: +For all available locale: ```bash for f in locale/*/; do msgfmt $f/LC_MESSAGES/lang.po -o $f/LC_MESSAGES/lang.mo