aboutsummaryrefslogtreecommitdiff
path: root/client/makefile
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-03 18:21:17 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-03 18:21:17 +0200
commit5c1f99fe6c5286d9fad42fff6ae5849143c4b1e0 (patch)
tree1729935dcf7a8d2f42b49c9f497111704a328b36 /client/makefile
parentb13b1e5e1d477cf0c125320c4553348c49c11e83 (diff)
downloadhurrycurry-5c1f99fe6c5286d9fad42fff6ae5849143c4b1e0.tar
hurrycurry-5c1f99fe6c5286d9fad42fff6ae5849143c4b1e0.tar.bz2
hurrycurry-5c1f99fe6c5286d9fad42fff6ae5849143c4b1e0.tar.zst
generate po from ini
Diffstat (limited to 'client/makefile')
-rw-r--r--client/makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/client/makefile b/client/makefile
index 40ee470a..71a4fb38 100644
--- a/client/makefile
+++ b/client/makefile
@@ -13,9 +13,12 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
-.PHONY: assets clean all
-all: assets
+.PHONY: assets clean all locales
+all: assets locales
assets: menu/book/book_01.webp
+locales: $(patsubst ../locale/%.ini,po/%.po,$(wildcard ../locale/*.ini))
+
+LT = ../target/release/localetool
clean:
rm -f menu/book/book_*.webp
@@ -24,3 +27,14 @@ menu/book/book_01.webp:
@echo Downloading recipe book...
@mkdir -p menu/book
@curl -L https://s.metamuffin.org/static/hurrycurry/book.webp.tar.zst | tar -xC menu/book
+
+$(LT): $(shell find ../locale/tools -type f)
+ { cd ..; cargo build --release --bin localetool; }
+
+po/locales.csv: $(LT)
+ @mkdir -p po
+ $(LT) export-godot-csv ../locale $@
+
+po/%.po: ../locale/%.ini $(LT)
+ @mkdir -p po
+ $(LT) export-po $< $@