-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(README): add instructions to translate the theme
- Loading branch information
1 parent
823d8d7
commit f359c55
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
MESSAGE_CATALOG_NAME = sphinx | ||
|
||
.PHONY: help | ||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo " extract to extract translatable strings into POT files" | ||
@echo " init to initialise a PO file for a new language" | ||
@echo " update to update existing PO files" | ||
@echo " compile to compile updated PO files" | ||
|
||
.PHONY: extract | ||
extract: | ||
pybabel extract -o iati_sphinx_theme/locale/$(MESSAGE_CATALOG_NAME).pot -F babel.cfg iati_sphinx_theme | ||
|
||
.PHONY: init | ||
init: | ||
pybabel init -i iati_sphinx_theme/locale/$(MESSAGE_CATALOG_NAME).pot -d iati_sphinx_theme/locale --domain=$(MESSAGE_CATALOG_NAME) -l ${lang} | ||
|
||
.PHONY: update | ||
update: | ||
pybabel update -i iati_sphinx_theme/locale/$(MESSAGE_CATALOG_NAME).pot -d iati_sphinx_theme/locale --domain=${MESSAGE_CATALOG_NAME} | ||
|
||
.PHONE: compile | ||
compile: | ||
pybabel compile --directory=iati_sphinx_theme/locale --domain=${MESSAGE_CATALOG_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters