Add more translatable text for world creation

This commit is contained in:
EGAMatsu 2025-07-11 15:31:05 -05:00
parent fe3d18e7bc
commit c8dbe382de
3 changed files with 60 additions and 11 deletions

3
.gitattributes vendored
View File

@ -1,2 +1,3 @@
*.c linguist-language=C
*.h linguist-language=C
*.h linguist-language=C
src/Strings.h -text

View File

@ -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);
}

View File

@ -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"