mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-10 03:43:04 +08:00
Implementation: Add Portuguese to MORE_LANGUAGES (#36)
Brazilian Portuguese has one of the larger GTA communities and a long-standing fan translation, but no way to select it: the language menu stops at Spanish and Text.cpp has no filename for it, so a translated GXT can only be used by overwriting AMERICAN.GXT and losing English. This is the same shape as the Polish, Russian and Japanese entries already there - enum value, PORTUGUESE.GXT in both lookups, menu action and row. No font set is needed: Portuguese is Latin-1 and the existing EFIGS set already covers its accented characters, so the default branch in InitialiseChangedLanguageSettings handles it. No game data is added. The player supplies PORTUGUESE.GXT themselves, exactly as with every other language. FEL_POR is not a key in the stock GXT, so the entry shows its key name until a translation provides the string - the same situation as the other MORE_LANGUAGES entries, and it is selectable either way.
This commit is contained in:
@@ -4759,6 +4759,14 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u
|
||||
InitialiseChangedLanguageSettings();
|
||||
SaveSettings();
|
||||
break;
|
||||
#ifdef MORE_LANGUAGES
|
||||
case MENUACTION_LANG_POR:
|
||||
m_PrefsLanguage = LANGUAGE_PORTUGUESE;
|
||||
m_bFrontEnd_ReloadObrTxtGxt = true;
|
||||
InitialiseChangedLanguageSettings();
|
||||
SaveSettings();
|
||||
break;
|
||||
#endif
|
||||
case MENUACTION_CHECKSAVE:
|
||||
{
|
||||
int saveSlot = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot;
|
||||
|
||||
@@ -267,6 +267,9 @@ enum eMenuAction
|
||||
MENUACTION_LANG_GER,
|
||||
MENUACTION_LANG_ITA,
|
||||
MENUACTION_LANG_SPA,
|
||||
#ifdef MORE_LANGUAGES
|
||||
MENUACTION_LANG_POR,
|
||||
#endif
|
||||
MENUACTION_POPULATESLOTS_CHANGEMENU,
|
||||
MENUACTION_CHECKSAVE,
|
||||
MENUACTION_NEWGAME,
|
||||
@@ -748,6 +751,7 @@ public:
|
||||
LANGUAGE_POLISH,
|
||||
LANGUAGE_RUSSIAN,
|
||||
LANGUAGE_JAPANESE,
|
||||
LANGUAGE_PORTUGUESE,
|
||||
#endif
|
||||
};
|
||||
bool GetIsMenuActive() {return !!m_bMenuActive;}
|
||||
|
||||
@@ -80,6 +80,9 @@ CMenuScreen aScreens[] = {
|
||||
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||
#ifdef MORE_LANGUAGES
|
||||
MENUACTION_LANG_POR, "FEL_POR", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, MENUALIGN_CENTER,
|
||||
},
|
||||
|
||||
|
||||
@@ -71,6 +71,9 @@ CText::Load(void)
|
||||
case CMenuManager::LANGUAGE_JAPANESE:
|
||||
sprintf(filename, "JAPANESE.GXT");
|
||||
break;
|
||||
case CMenuManager::LANGUAGE_PORTUGUESE:
|
||||
sprintf(filename, "PORTUGUESE.GXT");
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -275,6 +278,9 @@ CText::LoadMissionText(char *MissionTableName)
|
||||
case CMenuManager::LANGUAGE_JAPANESE:
|
||||
sprintf(filename, "JAPANESE.GXT");
|
||||
break;
|
||||
case CMenuManager::LANGUAGE_PORTUGUESE:
|
||||
sprintf(filename, "PORTUGUESE.GXT");
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
CTimer::Suspend();
|
||||
|
||||
Reference in New Issue
Block a user