feat: nl_nl translation (#1626)

This commit is contained in:
Illyrius
2026-02-22 19:44:52 +01:00
committed by GitHub
parent 12acb8aa76
commit c929d54b8a
2 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
{
"commands.pumpkin.version": "Pumpkin %s\n",
"commands.pumpkin.description": "Geeft iedereen de kracht om snelle \nen efficiënte Minecraft-servers te hosten.\n",
"commands.pumpkin.minecraft_version": "(Minecraft %1$s, Protocol %2$s)\n",
"commands.pumpkin.github": "[GitHub-repository]",
"commands.pumpkin.website": "[Website]",
"commands.pumpkin.version.hover": "Klik om de versie te kopiëren",
"commands.pumpkin.description.hover": "Klik om de beschrijving te kopiëren",
"commands.pumpkin.minecraft_version.hover": "Klik om de Minecraft-versie te kopiëren",
"commands.pumpkin.github.hover": "Klik om de repository te openen.",
"commands.pumpkin.website.hover": "Klik om de website te openen."
}

View File

@@ -19,6 +19,7 @@ static PUMPKIN_EN_US_JSON: &str = include_str!("../../assets/translations/en_us.
static PUMPKIN_ES_ES_JSON: &str = include_str!("../../assets/translations/es_es.json");
static PUMPKIN_FR_FR_JSON: &str = include_str!("../../assets/translations/fr_fr.json");
static PUMPKIN_JA_JP_JSON: &str = include_str!("../../assets/translations/ja_jp.json");
static PUMPKIN_NL_NL_JSON: &str = include_str!("../../assets/translations/nl_nl.json");
static PUMPKIN_RU_RU_JSON: &str = include_str!("../../assets/translations/ru_ru.json");
static PUMPKIN_ZH_CN_JSON: &str = include_str!("../../assets/translations/zh_cn.json");
static PUMPKIN_TR_TR_JSON: &str = include_str!("../../assets/translations/tr_tr.json");
@@ -71,9 +72,9 @@ pub fn get_translation(key: &str, locale: Locale) -> String {
|| {
translations[Locale::EnUs as usize]
.get(&key)
.map_or(key, std::clone::Clone::clone)
.map_or(key, Clone::clone)
},
std::clone::Clone::clone,
Clone::clone,
)
}
@@ -209,6 +210,8 @@ pub static TRANSLATIONS: LazyLock<Mutex<[HashMap<String, String>; Locale::last()
serde_json::from_str(PUMPKIN_FR_FR_JSON).expect("Could not parse fr_fr.json.");
let pumpkin_ja_jp: HashMap<String, String> =
serde_json::from_str(PUMPKIN_JA_JP_JSON).expect("Could not parse ja_jp.json.");
let pumpkin_nl_nl: HashMap<String, String> =
serde_json::from_str(PUMPKIN_NL_NL_JSON).expect("Could not parse nl_nl.json.");
let pumpkin_ru_ru: HashMap<String, String> =
serde_json::from_str(PUMPKIN_RU_RU_JSON).expect("Could not parse ru_ru.json.");
let pumpkin_zh_cn: HashMap<String, String> =
@@ -237,6 +240,9 @@ pub static TRANSLATIONS: LazyLock<Mutex<[HashMap<String, String>; Locale::last()
for (key, value) in pumpkin_ja_jp {
array[Locale::JaJp as usize].insert(format!("pumpkin:{key}"), value);
}
for (key, value) in pumpkin_nl_nl {
array[Locale::NlNl as usize].insert(format!("pumpkin:{key}"), value);
}
for (key, value) in pumpkin_ru_ru {
array[Locale::RuRu as usize].insert(format!("pumpkin:{key}"), value);
}