From c6eddb0bae32c43ffff46e9c1e3f293d0fd9ed73 Mon Sep 17 00:00:00 2001 From: Pevernow <3450354617@qq.com> Date: Mon, 9 Aug 2021 00:59:07 +0800 Subject: Gettext support on Android (#11435) Co-authored-by: sfan5 Co-authored-by: =?UTF-8?q?Olivier=20Samyn=20=F0=9F=8E=BB?= --- android/app/build.gradle | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'android/app') diff --git a/android/app/build.gradle b/android/app/build.gradle index b7d93ef0f..53fe85910 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -76,10 +76,13 @@ task prepareAssets() { copy { from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}" } - /*copy { - // ToDo: fix broken locales - from "${projRoot}/po" into "${assetsFolder}/po" - }*/ + fileTree("${projRoot}/po").include("**/*.po").forEach { poFile -> + def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/" + file(moPath).mkdirs() + exec { + commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile + } + } copy { from "${projRoot}/textures" into "${assetsFolder}/textures" } -- cgit v1.2.3