From c8dbe382de1b40f46297b99a8c55a1f217a3f1f8 Mon Sep 17 00:00:00 2001 From: EGAMatsu <58616438+EGAMatsu@users.noreply.github.com> Date: Fri, 11 Jul 2025 15:31:05 -0500 Subject: [PATCH] Add more translatable text for world creation --- .gitattributes | 3 ++- src/Menus.c | 16 ++++++++-------- src/Strings.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/.gitattributes b/.gitattributes index ba58ebaf7..487bd3e3c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ *.c linguist-language=C -*.h linguist-language=C \ No newline at end of file +*.h linguist-language=C +src/Strings.h -text \ No newline at end of file diff --git a/src/Menus.c b/src/Menus.c index e5cabfbca..f9bc1490a 100644 --- a/src/Menus.c +++ b/src/Menus.c @@ -1198,15 +1198,15 @@ static void GenLevelScreen_ContextRecreated(void* screen) { TextInputWidget_SetFont(&s->inputs[2], &s->textFont); TextInputWidget_SetFont(&s->inputs[3], &s->textFont); - TextWidget_SetConst(&s->labels[0], "Width:", &s->textFont); - TextWidget_SetConst(&s->labels[1], "Height:", &s->textFont); - TextWidget_SetConst(&s->labels[2], "Length:", &s->textFont); - TextWidget_SetConst(&s->labels[3], "Seed:", &s->textFont); + TextWidget_SetConst(&s->labels[0], ccString_SubOption_Worldgen[CC_CurrentLanguage][1], &s->textFont); /* Width */ + TextWidget_SetConst(&s->labels[1], ccString_SubOption_Worldgen[CC_CurrentLanguage][2], &s->textFont); /* Height */ + TextWidget_SetConst(&s->labels[2], ccString_SubOption_Worldgen[CC_CurrentLanguage][3], &s->textFont); /* Depth */ + TextWidget_SetConst(&s->labels[3], ccString_SubOption_Worldgen[CC_CurrentLanguage][4], &s->textFont); /* Seed */ - TextWidget_SetConst(&s->title, "Generate new level", &s->textFont); - ButtonWidget_SetConst(&s->flatgrass, "Flatgrass", &titleFont); - ButtonWidget_SetConst(&s->vanilla, "Vanilla", &titleFont); - ButtonWidget_SetConst(&s->cancel, ccStrings_optionsMenu[CC_CurrentLanguage][20], &titleFont); + TextWidget_SetConst(&s->title, ccString_SubOption_Worldgen[CC_CurrentLanguage][0], &s->textFont); /* "Generate new level" */ + ButtonWidget_SetConst(&s->flatgrass, ccString_SubOption_Worldgen[CC_CurrentLanguage][5], &titleFont); /* Flatgrass */ + ButtonWidget_SetConst(&s->vanilla, ccString_SubOption_Worldgen[CC_CurrentLanguage][6], &titleFont); /* Vanilla */ + ButtonWidget_SetConst(&s->cancel, ccStrings_optionsMenu[CC_CurrentLanguage][20], &titleFont); /* Cancel */ Font_Free(&titleFont); } diff --git a/src/Strings.h b/src/Strings.h index 5076955b2..9abc7809e 100644 --- a/src/Strings.h +++ b/src/Strings.h @@ -13,6 +13,13 @@ Copyright 2014-2025 ClassiCube | Licensed under BSD-3 /* Can be removed if causes issues */ +/* + + OPEN AND SAVE WITH DOS/CP-437 ENCODING. + NOT DOING SO WILL BREAK TEXT. + +*/ + #define CC_LANGUAGE_LANGCNT 4 #define CC_LANGUAGE_ENGLISH 0 @@ -108,7 +115,7 @@ static char* ccStrings_optionsMenu[CC_LANGUAGE_LANGCNT][27] = { "ante e musi...", "ante e poki sitelen...", "ante e nena wawa...", - "o pali ma sin...", + "o pali e ma sin...", "ante e ma...", "o awen e ma...", @@ -180,6 +187,47 @@ static char* csString_LanguageNames[CC_LANGUAGE_LANGCNT] = { "Deutsch" }; +/* Worldgen */ +static char* ccString_SubOption_Worldgen[CC_LANGUAGE_LANGCNT][7] = { + { + "Generate new level", + "Width: ", + "Height: ", + "Length: ", + "Seed: ", + "Flatgrass", + "Vanilla" + }, + { + "Generate new level", + "Width: ", + "Height: ", + "Length: ", + "Seed: ", + "Flatgrass", + "Vanilla" + }, + { + "o pali e ma sin", + "suli poka: ", + "suli sinpin: ", + "suli insa: ", + "nanpa nasa: ", + "ma supa", + "ma pi supa ala" + }, + { + "Generate new level", + "Width: ", + "Height: ", + "Length: ", + "Seed: ", + "Flatgrass", + "Vanilla" + } + +}; + /* Graphics Options */ static char* ccString_SubOption_Graphics[CC_LANGUAGE_LANGCNT][11] = { { @@ -467,7 +515,7 @@ static char* ccString_SubOption_WorldGen[CC_LANGUAGE_LANGCNT][4] = { "Enorme" }, { - "o pali ma sin", + "o pali e ma sin", "lili", "meso", "suli"