more translation supports

This commit is contained in:
minjaesong
2023-09-09 15:42:28 +09:00
parent 290b11eb96
commit c5134ffe97
2 changed files with 43 additions and 10 deletions

View File

@@ -1,14 +1,42 @@
# The name that will be displayed in game
# The name that will be displayed in-game
propername=Terrarum
# The description
description=The base game
description=The game
# Translations to the description
# Two-character language code is interpreted as a superset of four-character code.
# For example, description_pt will be used for both ptPT and ptBR
description_bgBG=\u0418\u0433\u0440\u0430\u0442\u0430
description_csCZ=Hra
description_daDK=Spillet
description_de=Das Spiel
description_elGR=\u03A4\u03BF \u03C0\u03B1\u03B9\u03C7\u03BD\u03AF\u03B4\u03B9
description_es=El juego
description_fiFI=Peli
description_frFR=Le jeu
description_hiIN=\u0916\u0947\u0932
description_huHU=A j\u00E1t\u00E9k
description_isIC=Leikurinn
description_it=Il gioco
description_jaJP=\u57FA\u672C\u30B2\u30FC\u30E0
description_koKR=\uAE30\uBCF8 \uAC8C\uC784
description_nlNL=Het spel
description_noNB=Spillet
description_pt=O jogo
description_roRO=Jocul
description_ruRU=\u0418\u0433\u0440\u0430
description_svSE=Spelet
description_thTH=\u0E40\u0E01\u0E21
description_trTR=Oyun
description_zhCN=\u57FA\u672C\u6E38\u620F
description_zhTW=\u57FA\u672C\u904A\u6232
# Author of the module
author=CuriousTo\uA75Bvald
# Root package name for the module
# The game will look for certain classes base on this package string, so don't mess up!
# The game will look for certain classes based on this package string, so don't mess up!
package=net.torvald.terrarum.modulebasegame
# Name of the entry script
@@ -28,13 +56,13 @@ jar=
# Sha256sum of the External JAR, if any
jarhash=
# Modules that must be pre-installed, separate multiple by semicolon (;)
# Modules that must be pre-installed, separated by semicolons (;)
# Dependency syntax: "module's identification name (aka folder name) spaces allowed versionnumber"
# Version number:
# - a.b.c : the exact version a.b.c
# - a.b.c+ : Any version between a.b.c and a.b.65535
# - a.b.* : Any version between a.b.0 and a.b.65535
# - a.b+ : Any version between a.b.0 and a.255.65535
# - a.* : Any version between a.0.0 and a.255.65535
# - * : Any version. Period.
# - a.b.c+ : Any version between a.b.c and a.b.16777215
# - a.b.* : Any version between a.b.0 and a.b.16777215
# - a.b+ : Any version between a.b.0 and a.16777215.16777215
# - a.* : Any version between a.0.0 and a.16777215.16777215
# - * : Any version between 0.0.0 and 65535.16777215.16777215
dependency=

View File

@@ -10,6 +10,7 @@ import com.badlogic.gdx.utils.GdxRuntimeException
import net.torvald.terrarum.*
import net.torvald.terrarum.modulebasegame.ui.MODULEINFO_CELL_HEIGHT
import net.torvald.terrarum.modulebasegame.ui.MODULEINFO_CELL_WIDTH
import net.torvald.terrarumsansbitmap.gdx.TerrarumSansBitmap
class UIItemModuleInfoCell(
parent: UICanvas,
@@ -40,12 +41,16 @@ class UIItemModuleInfoCell(
private val modDesc = App.getConfigString("language").let { lang ->
val la = lang.substring(0..1)
if (modProp.descTranslations.contains(lang))
val r = if (modProp.descTranslations.contains(lang))
modProp.descTranslations[lang]
else if (modProp.descTranslations.contains(la))
modProp.descTranslations[la]
else
modProp.description
if (la == "bg") "${TerrarumSansBitmap.charsetOverrideBulgarian}$r${TerrarumSansBitmap.charsetOverrideDefault}"
else if (la == "sr") "${TerrarumSansBitmap.charsetOverrideSerbian}$r${TerrarumSansBitmap.charsetOverrideDefault}"
else r
}
init {