aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-11-05 15:23:29 -0800
committerBryan Newbold <bnewbold@archive.org>2020-11-05 15:23:29 -0800
commitf3fa07b7d4dc1f577c585211ad5d34431e4aa854 (patch)
tree2ccfc65fad67978e4af76cc655112696dbe5ddcb
parent25fcabba3e553aaffae8e772652a27ae62162fb2 (diff)
downloadfatcat-scholar-f3fa07b7d4dc1f577c585211ad5d34431e4aa854.tar.gz
fatcat-scholar-f3fa07b7d4dc1f577c585211ad5d34431e4aa854.zip
update i18n extraction notes
-rw-r--r--Makefile7
-rw-r--r--README.md2
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b3617c6..7261808 100644
--- a/Makefile
+++ b/Makefile
@@ -58,9 +58,12 @@ dev-index: ## Delete/Create DEV elasticsearch fulltext index locally
http put ":9200/dev_scholar_fulltext_v01/_alias/dev_scholar_fulltext"
cat data/sim_intermediate.json data/work_intermediate.json | pipenv run python -m fatcat_scholar.transform run_transform | esbulk -verbose -size 200 -id key -w 4 -index dev_scholar_fulltext_v01 -type _doc
-.PHONY: update-i18n
-update-i18n: ## Re-extract and compile translation files
+.PHONY: extract-i18n
+extract-i18n: ## Re-extract translation source strings (for weblate)
pipenv run pybabel extract -F extra/i18n/babel.cfg -o extra/i18n/web_interface.pot fatcat_scholar/
+
+.PHONY: recompile-i18n
+recompile-i18n: extract-i18n ## Re-extract and compile all translation files (bypass weblate)
pipenv run pybabel update -i extra/i18n/web_interface.pot -d fatcat_scholar/translations
pipenv run pybabel compile -d fatcat_scholar/translations
diff --git a/README.md b/README.md
index de3c48c..c27aeb5 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ in the `./data/` directory. We don't have an out-of-the-box solution for non-IA
staff at this step (yet).
After making changes to any user interface strings, the interface translation
-file (".pot") needs to be updated with `make update-i18n`. When these changes
+file (".pot") needs to be updated with `make extract-i18n`. When these changes
are merged to master, the Weblate translation system will be updated
automatically.