From bf11a2a6e0d25d9e9670de3e45525746bef9048f Mon Sep 17 00:00:00 2001 From: Tomas Vana Date: Mon, 13 May 2024 10:25:52 +1000 Subject: [PATCH] Add Makefile --- Makefile | 22 ++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..62c5d2136 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +# Constants +BABEL_CFG = crossword_puzzle/babel.cfg +LOCALES = crossword_puzzle/locales +BASE_POT = crossword_puzzle/locales/base.pot +TRANSLATOR = crossword_puzzle/_translation_utils.py + +# i18n +i18n: extract update translate compile + +# init: pybabel init -l -i $(BASE_POT) -d $(LOCALES) + +extract: + pybabel extract -F $(BABEL_CFG) -o $(BASE_POT) . + +update: + pybabel update -i $(BASE_POT) -d $(LOCALES) + +translate: + python $(TRANSLATOR) + +compile: + pybabel compile -d $(LOCALES) \ No newline at end of file diff --git a/setup.py b/setup.py index 720825132..5d20809e0 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="crossword_puzzle", - version="1.2.67", + version="1.2.68", author="Tomas Vana", url="https://github.com/tomasvana10/crossword_puzzle", description="Select, generate and play always-unique crosswords.",