From 3355f861428d60d25d2fc93f14b0fffd5cb262c6 Mon Sep 17 00:00:00 2001 From: paradust7 <102263465+paradust7@users.noreply.github.com> Date: Fri, 5 Jan 2024 06:09:01 +0000 Subject: [PATCH] Add gettext / multi-language support --- Dockerfile | 3 +- build_minetest.sh | 2 +- fetch_sources.sh | 2 +- static/index.html | 34 ++++++++--- static/launcher.js | 140 +++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 166 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84aae0f..8a200d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ RUN \ cmake \ tclsh \ zip \ - zstd + zstd \ + gettext COPY . /minetest-wasm diff --git a/build_minetest.sh b/build_minetest.sh index cf8c71b..23713a8 100755 --- a/build_minetest.sh +++ b/build_minetest.sh @@ -30,7 +30,7 @@ if ! $INCREMENTAL; then emcmake cmake \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DENABLE_SYSTEM_GMP=OFF \ - -DENABLE_GETTEXT=FALSE \ + -DENABLE_GETTEXT=TRUE \ -DRUN_IN_PLACE=TRUE \ -DENABLE_GLES=TRUE \ -DCMAKE_BUILD_TYPE="$MINETEST_BUILD_TYPE" \ diff --git a/fetch_sources.sh b/fetch_sources.sh index 7f1f8ac..4307b9c 100755 --- a/fetch_sources.sh +++ b/fetch_sources.sh @@ -31,7 +31,7 @@ getrepo minetest_game "https://github.com/minetest/minetest_game.git" a3b171e317 # These repos are part of the fork getrepo webshims "https://github.com/paradust7/webshims.git" 91c3fe85d2cb7f85cc8e19d3f53dc8f252a69ff7 -getrepo minetest "https://github.com/paradust7/minetest.git" bfe2f41d7e830df08814f6ec6c0ec686e3b0d20b +getrepo minetest "https://github.com/paradust7/minetest.git" 943e0e9f99245aaf61a3e3967d53f807c70492e6 getrepo irrlichtmt "https://github.com/paradust7/irrlicht.git" bcada2f995d7b927f6c67c755fb32a2a4da5b236 # Make irrlichtmt symlink diff --git a/static/index.html b/static/index.html index 7b60199..c6de495 100644 --- a/static/index.html +++ b/static/index.html @@ -14,6 +14,13 @@ +
+ + Select language: + +

@@ -45,12 +52,13 @@