feat(tr): Add Some Turkish translations (#1132)

* feat(tr): Add Turkish translations

* Fix formatting issue in translation.rs
This commit is contained in:
Crefax
2025-08-18 10:12:04 +03:00
committed by GitHub
parent 2bf30cc875
commit 398ba39233
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"commands.pumpkin.version": "Pumpkin %s\n",
"commands.pumpkin.description": "Herkesin hızlı ve verimli Minecraft sunucuları kurmasını sağlar.\n",
"commands.pumpkin.minecraft_version": "(Minecraft %s, Protokol %s)\n",
"commands.pumpkin.github": "[Github Deposu]",
"commands.pumpkin.website": "[Web Sitesi]",
"commands.pumpkin.version.hover": "Sürümü kopyalamak için tıkla",
"commands.pumpkin.description.hover": "Açıklamayı kopyalamak için tıkla",
"commands.pumpkin.minecraft_version.hover": "Minecraft sürümünü kopyalamak için tıkla",
"commands.pumpkin.github.hover": "Depoyu açmak için tıkla.",
"commands.pumpkin.website.hover": "Web sitesini açmak için tıkla."
}

View File

@@ -18,6 +18,7 @@ static VANILLA_EN_US_JSON: &str = include_str!("../../assets/en_us.json");
static PUMPKIN_EN_US_JSON: &str = include_str!("../../assets/translations/en_us.json");
static PUMPKIN_ES_ES_JSON: &str = include_str!("../../assets/translations/es_es.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");
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SubstitutionRange {
@@ -191,6 +192,8 @@ pub static TRANSLATIONS: LazyLock<Mutex<[HashMap<String, String>; Locale::last()
serde_json::from_str(PUMPKIN_ES_ES_JSON).expect("Could not parse es_es.json.");
let pumpkin_zh_cn: HashMap<String, String> =
serde_json::from_str(PUMPKIN_ZH_CN_JSON).expect("Could not parse zh_cn.json.");
let pumpkin_tr_tr: HashMap<String, String> =
serde_json::from_str(PUMPKIN_TR_TR_JSON).expect("Could not parse tr_tr.json.");
for (key, value) in vanilla_en_us {
array[Locale::EnUs as usize].insert(format!("minecraft:{key}"), value);
@@ -204,6 +207,9 @@ pub static TRANSLATIONS: LazyLock<Mutex<[HashMap<String, String>; Locale::last()
for (key, value) in pumpkin_zh_cn {
array[Locale::ZhCn as usize].insert(format!("pumpkin:{key}"), value);
}
for (key, value) in pumpkin_tr_tr {
array[Locale::TrTr as usize].insert(format!("pumpkin:{key}"), value);
}
Mutex::new(array)
});