mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Fixed language selection by adding English, leaving default as "<System>" language. Removed languages which don't have translations yet.
As side-effect, changed GameListCtrl sorting to use the configured IPL/GC language instead of the UI language, which is misleading with missing translations, and possibly wrong if we ever get translations that are not part of the GC ones. In case we want the old behavior back, revert GameListCtrl.cpp and ISOProperties.cpp. For translators: use either "<System>" if your operating system is the same language as the one you're translating for, or replace one of the others. Someone will add them to the list when they are committed. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6785 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -222,7 +222,7 @@ void SConfig::LoadSettings()
|
||||
ini.Get("Interface", "MainWindowPosY", &m_LocalCoreStartupParameter.iPosY, 100);
|
||||
ini.Get("Interface", "MainWindowWidth", &m_LocalCoreStartupParameter.iWidth, 800);
|
||||
ini.Get("Interface", "MainWindowHeight", &m_LocalCoreStartupParameter.iHeight, 600);
|
||||
ini.Get("Interface", "Language", (int*)&m_InterfaceLanguage, 0);
|
||||
ini.Get("Interface", "Language", &m_InterfaceLanguage, 0);
|
||||
ini.Get("Interface", "ShowToolbar", &m_InterfaceToolbar, true);
|
||||
ini.Get("Interface", "ShowStatusbar", &m_InterfaceStatusbar, true);
|
||||
ini.Get("Interface", "ShowLogWindow", &m_InterfaceLogWindow, false);
|
||||
|
@ -26,19 +26,6 @@
|
||||
#include "HW/SI_Device.h"
|
||||
#include "SysConf.h"
|
||||
|
||||
// HyperIris: not sure but a temporary implement
|
||||
enum INTERFACE_LANGUAGE
|
||||
{
|
||||
INTERFACE_ENGLISH = 0,
|
||||
INTERFACE_GERMAN,
|
||||
INTERFACE_FRENCH,
|
||||
INTERFACE_SPANISH,
|
||||
INTERFACE_ITALIAN,
|
||||
INTERFACE_DUTCH,
|
||||
|
||||
INTERFACE_OTHER,
|
||||
};
|
||||
|
||||
struct SConfig : NonCopyable
|
||||
{
|
||||
// Wii Devices
|
||||
@ -67,7 +54,7 @@ struct SConfig : NonCopyable
|
||||
std::string m_bba_mac;
|
||||
|
||||
// interface language
|
||||
INTERFACE_LANGUAGE m_InterfaceLanguage;
|
||||
int m_InterfaceLanguage;
|
||||
// framelimit choose
|
||||
int m_Framelimit;
|
||||
bool b_UseFPS;
|
||||
|
@ -112,7 +112,6 @@ bool CBannerLoaderGC::GetName(std::string _rName[])
|
||||
{
|
||||
DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile;
|
||||
|
||||
// u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
char tempBuffer[65] = {0};
|
||||
|
@ -230,20 +230,16 @@ void CConfigMain::InitializeGUILists()
|
||||
arrayStringFor_Themes.Add(wxT("Vista"));
|
||||
arrayStringFor_Themes.Add(wxT("X-Plastik"));
|
||||
arrayStringFor_Themes.Add(wxT("KDE"));
|
||||
|
||||
// GUI language arrayStrings
|
||||
arrayStringFor_InterfaceLang.Add(_("English"));
|
||||
arrayStringFor_InterfaceLang.Add(_("German"));
|
||||
arrayStringFor_InterfaceLang.Add(_("French"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Spanish"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Italian"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Dutch"));
|
||||
|
||||
|
||||
// Gamecube page
|
||||
// GC Language arrayStrings
|
||||
arrayStringFor_GCSystemLang = arrayStringFor_InterfaceLang;
|
||||
|
||||
arrayStringFor_GCSystemLang.Add(_("English"));
|
||||
arrayStringFor_GCSystemLang.Add(_("German"));
|
||||
arrayStringFor_GCSystemLang.Add(_("French"));
|
||||
arrayStringFor_GCSystemLang.Add(_("Spanish"));
|
||||
arrayStringFor_GCSystemLang.Add(_("Italian"));
|
||||
arrayStringFor_GCSystemLang.Add(_("Dutch"));
|
||||
|
||||
|
||||
// Wii page
|
||||
// Sensorbar Position
|
||||
@ -255,12 +251,20 @@ void CConfigMain::InitializeGUILists()
|
||||
arrayStringFor_WiiAspectRatio.Add(wxT("16:9"));
|
||||
|
||||
// Wii Language arrayStrings
|
||||
arrayStringFor_WiiSystemLang = arrayStringFor_InterfaceLang;
|
||||
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
|
||||
arrayStringFor_WiiSystemLang.Insert(_("Japanese"), 0);
|
||||
arrayStringFor_WiiSystemLang.Add(_("Simplified Chinese"));
|
||||
arrayStringFor_WiiSystemLang.Add(_("Traditional Chinese"));
|
||||
arrayStringFor_WiiSystemLang.Add(_("Korean"));
|
||||
|
||||
|
||||
// GUI language arrayStrings
|
||||
// keep those in sync with DolphinApp::InitLanguageSupport
|
||||
arrayStringFor_InterfaceLang.Add(_("<System>"));
|
||||
arrayStringFor_InterfaceLang.Add(_("English"));
|
||||
arrayStringFor_InterfaceLang.Add(_("German"));
|
||||
arrayStringFor_InterfaceLang.Add(_("French"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Italian"));
|
||||
|
||||
}
|
||||
|
||||
void CConfigMain::InitializeGUIValues()
|
||||
@ -873,10 +877,9 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
|
||||
main_frame->InitBitmaps();
|
||||
break;
|
||||
case ID_INTERFACE_LANG:
|
||||
if (SConfig::GetInstance().m_InterfaceLanguage !=
|
||||
(INTERFACE_LANGUAGE)InterfaceLang->GetSelection())
|
||||
if (SConfig::GetInstance().m_InterfaceLanguage != InterfaceLang->GetSelection())
|
||||
SuccessAlert("You must restart Dolphin in order for the change to take effect.");
|
||||
SConfig::GetInstance().m_InterfaceLanguage = (INTERFACE_LANGUAGE)InterfaceLang->GetSelection();
|
||||
SConfig::GetInstance().m_InterfaceLanguage = InterfaceLang->GetSelection();
|
||||
bRefreshList = true;
|
||||
break;
|
||||
case ID_HOTKEY_CONFIG:
|
||||
|
@ -65,7 +65,7 @@ bool operator < (const GameListItem &one, const GameListItem &other)
|
||||
indexOne = 0;
|
||||
break;
|
||||
default:
|
||||
indexOne = SConfig::GetInstance().m_InterfaceLanguage;
|
||||
indexOne = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
|
||||
}
|
||||
|
||||
switch (other.GetCountry())
|
||||
@ -75,10 +75,10 @@ bool operator < (const GameListItem &one, const GameListItem &other)
|
||||
indexOther = 0;
|
||||
break;
|
||||
default:
|
||||
indexOther = SConfig::GetInstance().m_InterfaceLanguage;
|
||||
indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
|
||||
}
|
||||
|
||||
switch(currentColumn)
|
||||
switch (currentColumn)
|
||||
{
|
||||
case CGameListCtrl::COLUMN_TITLE:
|
||||
return strcasecmp(one.GetName(indexOne).c_str(),
|
||||
@ -453,15 +453,15 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
break;
|
||||
default:
|
||||
m_gameList.append(StringFromFormat("%s (E)\n",
|
||||
rISOFile.GetName(SConfig::GetInstance().m_InterfaceLanguage).c_str()));
|
||||
rISOFile.GetName(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage).c_str()));
|
||||
SetItem(_Index, COLUMN_TITLE,
|
||||
wxString::From8BitData(
|
||||
rISOFile.GetName(SConfig::GetInstance().m_InterfaceLanguage).c_str()),
|
||||
rISOFile.GetName(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage).c_str()),
|
||||
-1);
|
||||
SetItem(_Index, COLUMN_NOTES,
|
||||
wxString::From8BitData(company.size() ?
|
||||
company.c_str() :
|
||||
rISOFile.GetDescription(SConfig::GetInstance().m_InterfaceLanguage).c_str()),
|
||||
rISOFile.GetDescription(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage).c_str()),
|
||||
-1);
|
||||
break;
|
||||
}
|
||||
@ -716,7 +716,7 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
|
||||
indexOne = 0;
|
||||
break;
|
||||
default:
|
||||
indexOne = SConfig::GetInstance().m_InterfaceLanguage;
|
||||
indexOne = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
|
||||
}
|
||||
|
||||
switch (iso2->GetCountry())
|
||||
@ -726,7 +726,7 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
|
||||
indexOther = 0;
|
||||
break;
|
||||
default:
|
||||
indexOther = SConfig::GetInstance().m_InterfaceLanguage;
|
||||
indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
|
||||
}
|
||||
|
||||
switch(sortData)
|
||||
|
@ -191,7 +191,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||
m_FST->SetValue(wxString::Format(wxT("%u"), OpenISO->GetFSTSize()));
|
||||
|
||||
// Here we set all the info to be shown (be it SJIS or Ascii) + we set the window title
|
||||
ChangeBannerDetails((int)SConfig::GetInstance().m_InterfaceLanguage);
|
||||
ChangeBannerDetails((int)SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
|
||||
m_Banner->SetBitmap(OpenGameListItem->GetImage());
|
||||
m_Banner->Connect(wxID_ANY, wxEVT_RIGHT_DOWN,
|
||||
wxMouseEventHandler(CISOProperties::RightClickOnBanner), (wxObject*)NULL, this);
|
||||
@ -468,7 +468,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
arrayStringFor_Lang.Add(_("Italian"));
|
||||
arrayStringFor_Lang.Add(_("Dutch"));
|
||||
m_Lang = new wxChoice(m_Information, ID_LANG, wxDefaultPosition, wxDefaultSize, arrayStringFor_Lang, 0, wxDefaultValidator);
|
||||
m_Lang->SetSelection((int)SConfig::GetInstance().m_InterfaceLanguage);
|
||||
m_Lang->SetSelection((int)SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
|
||||
m_ShortText = new wxStaticText(m_Information, ID_SHORTNAME_TEXT, _("Short Name:"), wxDefaultPosition, wxDefaultSize);
|
||||
m_ShortName = new wxTextCtrl(m_Information, ID_SHORTNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
|
||||
m_MakerText = new wxStaticText(m_Information, ID_MAKER_TEXT, _("Maker:"), wxDefaultPosition, wxDefaultSize);
|
||||
|
@ -411,14 +411,14 @@ void DolphinApp::InitLanguageSupport()
|
||||
{
|
||||
int language = 0;
|
||||
|
||||
// keep those in sync with CConfigMain::InitializeGUILists
|
||||
const wxLanguage langIds[] =
|
||||
{
|
||||
wxLANGUAGE_DEFAULT,
|
||||
wxLANGUAGE_ENGLISH,
|
||||
wxLANGUAGE_GERMAN,
|
||||
wxLANGUAGE_FRENCH,
|
||||
wxLANGUAGE_SPANISH,
|
||||
wxLANGUAGE_ITALIAN,
|
||||
wxLANGUAGE_DUTCH,
|
||||
};
|
||||
|
||||
IniFile ini;
|
||||
@ -426,7 +426,7 @@ void DolphinApp::InitLanguageSupport()
|
||||
ini.Get("Interface", "Language", &language, 0);
|
||||
|
||||
// Load language if possible, fall back to system default otherwise
|
||||
if(wxLocale::IsAvailable(langIds[language]))
|
||||
if(language >= 0 && language < sizeof(langIds) / sizeof(wxLanguage) && wxLocale::IsAvailable(langIds[language]))
|
||||
{
|
||||
m_locale = new wxLocale(langIds[language]);
|
||||
|
||||
@ -438,14 +438,14 @@ void DolphinApp::InitLanguageSupport()
|
||||
|
||||
if(!m_locale->IsOk())
|
||||
{
|
||||
PanicAlert("Error loading selected language. Falling back to system default.\n");
|
||||
PanicAlert("Error loading selected language. Falling back to system default.\n");
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("The selected language is not supported by your system. Falling back to system default.\n");
|
||||
PanicAlert("The selected language is not supported by your system. Falling back to system default.\n");
|
||||
m_locale = new wxLocale(wxLANGUAGE_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user