add portuguese translation (marcoslimaozinho)

This commit is contained in:
dborth 2010-08-21 20:05:51 +00:00
parent d3231ba4ef
commit 65d9aba53e
5 changed files with 11 additions and 4 deletions

View File

@ -37,6 +37,8 @@ extern const u8 zh_lang[];
extern const u32 zh_lang_size;
extern const u8 ko_lang[];
extern const u32 ko_lang_size;
extern const u8 pt_lang[];
extern const u32 pt_lang_size;
// Sounds

View File

@ -3325,8 +3325,10 @@ static int MenuSettingsMenu()
GCSettings.language++;
if(GCSettings.language == LANG_ITALIAN)
GCSettings.language++;
else if(GCSettings.language > LANG_DUTCH)
GCSettings.language = LANG_DUTCH;
else if(GCSettings.language == LANG_SIMP_CHINESE)
GCSettings.language = LANG_PORTUGUESE;
else if(GCSettings.language == LANG_JAPANESE)
GCSettings.language = LANG_ENGLISH;
break;
}
@ -3390,6 +3392,7 @@ static int MenuSettingsMenu()
case LANG_SIMP_CHINESE: sprintf(options.value[5], "Chinese (Simplified)"); break;
case LANG_TRAD_CHINESE: sprintf(options.value[5], "Chinese (Traditional)"); break;
case LANG_KOREAN: sprintf(options.value[5], "Korean"); break;
case LANG_PORTUGUESE: sprintf(options.value[5], "Portuguese"); break;
}
optionBrowser.TriggerUpdate();

View File

@ -576,7 +576,7 @@ void FixInvalidSettings()
GCSettings.MusicVolume = 40;
if(!(GCSettings.SFXVolume >= 0 && GCSettings.SFXVolume <= 100))
GCSettings.SFXVolume = 40;
if(GCSettings.language < 0 || GCSettings.language > LANG_KOREAN)
if(GCSettings.language < 0 || GCSettings.language > LANG_PORTUGUESE)
GCSettings.language = LANG_ENGLISH;
if(!(GCSettings.render >= 0 && GCSettings.render < 3))
GCSettings.render = 1;

View File

@ -221,6 +221,7 @@ bool LoadLanguage()
case LANG_SIMP_CHINESE:
case LANG_TRAD_CHINESE: file = (char *)zh_lang; eof = file + zh_lang_size; break;
case LANG_KOREAN: file = (char *)ko_lang; eof = file + ko_lang_size; break;
case LANG_PORTUGUESE: file = (char *)pt_lang; eof = file + pt_lang_size; break;
default: return false;
}

View File

@ -53,7 +53,8 @@ enum {
LANG_DUTCH,
LANG_SIMP_CHINESE,
LANG_TRAD_CHINESE,
LANG_KOREAN
LANG_KOREAN,
LANG_PORTUGUESE
};
struct SGCSettings{