mirror of https://github.com/PCSX2/pcsx2.git
i18n:
* allow to translate the about box * Fix a crash when wx did not support the default locale git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4389 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
95d2e08492
commit
5c0a0f978e
|
@ -39,30 +39,31 @@ Dialogs::AboutBoxDialog::AboutBoxDialog( wxWindow* parent )
|
|||
{
|
||||
// [TODO] : About box should be upgraded to use scrollable read-only text boxes.
|
||||
|
||||
static const wxString LabelAuthors = fromUTF8(
|
||||
"Arcum42, Refraction, drk||raziel, cottonvibes, gigaherz, "
|
||||
"rama, Jake.Stine, saqib, pseudonym, gregory.hainaut"
|
||||
"\n\n"
|
||||
"Previous versions: Alexey silinov, Aumatt, "
|
||||
"Florin, goldfinger, Linuzappz, loser, "
|
||||
"Nachbrenner, shadow, Zerofrog, tmkk"
|
||||
"\n\n"
|
||||
"Betatesting: Bositman, ChaosCode, "
|
||||
"CKemu, crushtest, GeneralPlot, "
|
||||
"Krakatos, Parotaku, Rudy_X"
|
||||
"\n\n"
|
||||
"Webmasters: CKemu, Falcon4ever"
|
||||
);
|
||||
wxString LabelAuthors = wxsFormat(
|
||||
L"Arcum42, Refraction, drk||raziel, cottonvibes, gigaherz, "
|
||||
L"rama, Jake.Stine, saqib, pseudonym, gregory.hainaut"
|
||||
L"\n\n"
|
||||
L"%s: Alexey silinov, Aumatt, "
|
||||
L"Florin, goldfinger, Linuzappz, loser, "
|
||||
L"Nachbrenner, shadow, Zerofrog, tmkk"
|
||||
L"\n\n"
|
||||
L"%s: Bositman, ChaosCode, "
|
||||
L"CKemu, crushtest, GeneralPlot, "
|
||||
L"Krakatos, Parotaku, Rudy_X"
|
||||
L"\n\n"
|
||||
L"%s: CKemu, Falcon4ever",
|
||||
_("Previous versions"), _("Betatesting"), _("Webmasters"));
|
||||
|
||||
static const wxString LabelGreets = fromUTF8(
|
||||
"Hiryu and Sjeep (libcdvd / iso filesystem), nneeve (fpu and vu), n1ckname (compilation guides)"
|
||||
"\n\n"
|
||||
"Plugin Specialists: ChickenLiver (Lilypad), Efp (efp), "
|
||||
"Gabest (Gsdx, Cdvdolio, Xpad), Zeydlitz (ZZogl)"
|
||||
"\n\n"
|
||||
"Special thanks to: black_wd, Belmont, BGome, _Demo_, Dreamtime, "
|
||||
"F|RES, MrBrown, razorblade, Seta-san, Skarmeth, feal87, Athos"
|
||||
);
|
||||
|
||||
wxString LabelGreets = wxsFormat(
|
||||
L"Hiryu and Sjeep (libcdvd / iso filesystem), nneeve (fpu and vu), n1ckname (compilation guides)"
|
||||
L"\n\n"
|
||||
L"%s: ChickenLiver (Lilypad), Efp (efp), "
|
||||
L"Gabest (Gsdx, Cdvdolio, Xpad), Zeydlitz (ZZogl)"
|
||||
L"\n\n"
|
||||
L"%s: black_wd, Belmont, BGome, _Demo_, Dreamtime, "
|
||||
L"F|RES, MrBrown, razorblade, Seta-san, Skarmeth, feal87, Athos",
|
||||
_("Plugin Specialists"), _("Special thanks to"));
|
||||
|
||||
// This sizer holds text of the authors and a logo!
|
||||
wxFlexGridSizer& AuthLogoSizer = *new wxFlexGridSizer( 2, 0, StdPadding );
|
||||
|
@ -78,9 +79,9 @@ Dialogs::AboutBoxDialog::AboutBoxDialog( wxWindow* parent )
|
|||
pxStaticText& label_auth = Text( LabelAuthors ).SetMinWidth(240);
|
||||
pxStaticText& label_greets = Text( LabelGreets ).SetMinWidth(200);
|
||||
|
||||
aboutUs += Heading(L"Developers").Bold() | StdExpand();
|
||||
aboutUs += Heading(_("Developers")).Bold() | StdExpand();
|
||||
aboutUs += label_auth | StdExpand();
|
||||
contribs += Heading(L"Contributors").Bold() | StdExpand();
|
||||
contribs += Heading(_("Contributors")).Bold() | StdExpand();
|
||||
contribs += label_greets | StdExpand();
|
||||
|
||||
AuthLogoSizer += aboutUs | StdExpand();
|
||||
|
|
|
@ -156,7 +156,7 @@ static wxLanguage i18n_FallbackToAnotherLang( wxLanguage wxLangId )
|
|||
{
|
||||
// if some translations are provided, do not change the language
|
||||
LangPackList dummy_lang;
|
||||
bool valid_stat;
|
||||
bool valid_stat = false;
|
||||
i18n_DoPackageCheck(wxLangId, dummy_lang, valid_stat);
|
||||
if (valid_stat) return wxLangId;
|
||||
|
||||
|
@ -193,10 +193,12 @@ bool i18n_SetLanguage( wxLanguage wxLangId, const wxString& langCode )
|
|||
{
|
||||
const wxLanguageInfo* info = wxLocale::GetLanguageInfo(wxLangId);
|
||||
|
||||
// Check if you can load a similar language
|
||||
wxLanguage LangId_fallback = i18n_FallbackToAnotherLang((wxLanguage)info->Language);
|
||||
if (LangId_fallback != (wxLanguage)info->Language)
|
||||
info = wxLocale::GetLanguageInfo(LangId_fallback);
|
||||
// Check if you can load a similar language in case the current one is not yet provided
|
||||
if (info) {
|
||||
wxLanguage LangId_fallback = i18n_FallbackToAnotherLang((wxLanguage)info->Language);
|
||||
if (LangId_fallback != (wxLanguage)info->Language)
|
||||
info = wxLocale::GetLanguageInfo(LangId_fallback);
|
||||
}
|
||||
|
||||
// note: language canonical name mismatch probably means wxWidgets version changed since
|
||||
// the user's ini file was provided. Missing/invalid ID probably means the same thing.
|
||||
|
|
Loading…
Reference in New Issue