From a03f31e237e017a006ce83e08c954292cf68a73e Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Sat, 15 Feb 2025 19:40:40 +0100 Subject: [PATCH] build(make): add translation generation --- Makefile | 5 ++++- readme.md | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f1f4c81..5db369b 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,10 @@ publish: clean: uv run invoke clean -init: +%.mo: %.po + msgfmt "$^" -o "$@" + +init: themes/clean-blog/translations/fr/LC_MESSAGES/messages.mo uv sync .PHONY: clean build publish dev init diff --git a/readme.md b/readme.md index c853061..5a15fd4 100644 --- a/readme.md +++ b/readme.md @@ -9,6 +9,7 @@ software: - `git` - `make` - `uv` +- `gettext` To synchronise the blog remotely with its intended target, the synchronisation is done using `rsync` over `ssh`. @@ -30,7 +31,10 @@ This blog relies on [pelican](https://getpelican.com) as a static site generator. To manage the different python dependencies of this project, we are using [`uv`](https://github.com/astral-sh/uv) as a python project manager. -To download the dependencies, run `uv sync` or: +Moreover, translations are managed with python `gettext` which requires +compiling the translation file. + +Those two steps are performed with the following command: ```sh make init