mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Add a little hack to make it so panic alerts and questions can be translated if they are in the wxWidgets portion of the code, as well as make a few strings in the config dialog translatable.
Add Hungarian translations by Delirious. Update Italian translations by RebuMan. Update German translations by JackyCola and LucasX. Update Greek translations by Gpower2. Update Frensh translations by Pascal. Make sure the game list is refreshed when the GC language is changed. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6826 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -51,6 +51,7 @@ static const wxLanguage langIds[] =
|
||||
wxLANGUAGE_GERMAN,
|
||||
wxLANGUAGE_GREEK,
|
||||
wxLANGUAGE_HEBREW,
|
||||
wxLANGUAGE_HUNGARIAN,
|
||||
wxLANGUAGE_ITALIAN,
|
||||
wxLANGUAGE_JAPANESE,
|
||||
wxLANGUAGE_KOREAN,
|
||||
@ -60,18 +61,20 @@ static const wxLanguage langIds[] =
|
||||
wxLANGUAGE_SPANISH,
|
||||
};
|
||||
|
||||
#define _trans(a) a
|
||||
|
||||
// Strings for Device Selections
|
||||
#define DEV_NONE_STR "<Nothing>"
|
||||
#define DEV_DUMMY_STR "Dummy"
|
||||
#define DEV_NONE_STR _trans("<Nothing>")
|
||||
#define DEV_DUMMY_STR _trans("Dummy")
|
||||
|
||||
#define SIDEV_STDCONT_STR "Standard Controller"
|
||||
#define SIDEV_STDCONT_STR _trans("Standard Controller")
|
||||
#define SIDEV_GBA_STR "GBA"
|
||||
#define SIDEV_AM_BB_STR "AM-Baseboard"
|
||||
#define SIDEV_AM_BB_STR _trans("AM-Baseboard")
|
||||
|
||||
#define EXIDEV_MEMCARD_STR "Memory Card"
|
||||
#define EXIDEV_MIC_STR "Mic"
|
||||
#define EXIDEV_MEMCARD_STR _trans("Memory Card")
|
||||
#define EXIDEV_MIC_STR _trans("Mic")
|
||||
#define EXIDEV_BBA_STR "BBA"
|
||||
#define EXIDEV_AM_BB_STR "AM-Baseboard"
|
||||
#define EXIDEV_AM_BB_STR _trans("AM-Baseboard")
|
||||
|
||||
#ifdef WIN32
|
||||
//only used with xgettext to be picked up as translatable string.
|
||||
@ -287,6 +290,7 @@ void CConfigMain::InitializeGUILists()
|
||||
arrayStringFor_InterfaceLang.Add(_("German"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Greek"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Hebrew"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Hungarian"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Italian"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Japanese"));
|
||||
arrayStringFor_InterfaceLang.Add(_("Korean"));
|
||||
@ -558,13 +562,13 @@ void CConfigMain::CreateGUIControls()
|
||||
GCEXIDeviceText[0] = new wxStaticText(GamecubePage, ID_GC_EXIDEVICE_SLOTA_TEXT, wxT("Slot A"), wxDefaultPosition, wxDefaultSize);
|
||||
GCEXIDeviceText[1] = new wxStaticText(GamecubePage, ID_GC_EXIDEVICE_SLOTB_TEXT, wxT("Slot B"), wxDefaultPosition, wxDefaultSize);
|
||||
GCEXIDeviceText[2] = new wxStaticText(GamecubePage, ID_GC_EXIDEVICE_SP1_TEXT, wxT("SP1 "), wxDefaultPosition, wxDefaultSize);
|
||||
const wxString SlotDevices[] = {wxT(DEV_NONE_STR), wxT(DEV_DUMMY_STR), wxT(EXIDEV_MEMCARD_STR)
|
||||
const wxString SlotDevices[] = {_(DEV_NONE_STR), _(DEV_DUMMY_STR), _(EXIDEV_MEMCARD_STR)
|
||||
#if HAVE_PORTAUDIO
|
||||
, wxT(EXIDEV_MIC_STR)
|
||||
, _(EXIDEV_MIC_STR)
|
||||
#endif
|
||||
};
|
||||
static const int numSlotDevices = sizeof(SlotDevices)/sizeof(wxString);
|
||||
const wxString SP1Devices[] = { wxT(DEV_NONE_STR), wxT(DEV_DUMMY_STR), wxT(EXIDEV_BBA_STR), wxT(EXIDEV_AM_BB_STR) };
|
||||
const wxString SP1Devices[] = { _(DEV_NONE_STR), _(DEV_DUMMY_STR), _(EXIDEV_BBA_STR), _(EXIDEV_AM_BB_STR) };
|
||||
static const int numSP1Devices = sizeof(SP1Devices)/sizeof(wxString);
|
||||
GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA, wxDefaultPosition, wxDefaultSize, numSlotDevices, SlotDevices, 0, wxDefaultValidator);
|
||||
GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB, wxDefaultPosition, wxDefaultSize, numSlotDevices, SlotDevices, 0, wxDefaultValidator);
|
||||
@ -608,7 +612,7 @@ void CConfigMain::CreateGUIControls()
|
||||
GCSIDeviceText[2] = new wxStaticText(GamecubePage, ID_GC_SIDEVICE_TEXT, wxT("Port 3"), wxDefaultPosition, wxDefaultSize);
|
||||
GCSIDeviceText[3] = new wxStaticText(GamecubePage, ID_GC_SIDEVICE_TEXT, wxT("Port 4"), wxDefaultPosition, wxDefaultSize);
|
||||
// SIDEV_AM_BB_STR must be last!
|
||||
const wxString SIDevices[] = {wxT(DEV_NONE_STR),wxT(SIDEV_STDCONT_STR),wxT(SIDEV_GBA_STR),wxT(SIDEV_AM_BB_STR)};
|
||||
const wxString SIDevices[] = {_(DEV_NONE_STR),_(SIDEV_STDCONT_STR),_(SIDEV_GBA_STR),_(SIDEV_AM_BB_STR)};
|
||||
static const int numSIDevices = sizeof(SIDevices)/sizeof(wxString);
|
||||
GCSIDevice[0] = new wxChoice(GamecubePage, ID_GC_SIDEVICE0, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1, wxDefaultPosition, wxDefaultSize, numSIDevices - 1, SIDevices, 0, wxDefaultValidator);
|
||||
@ -911,7 +915,7 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
|
||||
break;
|
||||
case ID_INTERFACE_LANG:
|
||||
if (SConfig::GetInstance().m_InterfaceLanguage != langIds[InterfaceLang->GetSelection()])
|
||||
SuccessAlert("You must restart Dolphin in order for the change to take effect.");
|
||||
SuccessAlert("%s", _wxt("You must restart Dolphin in order for the change to take effect."));
|
||||
SConfig::GetInstance().m_InterfaceLanguage = langIds[InterfaceLang->GetSelection()];
|
||||
break;
|
||||
case ID_HOTKEY_CONFIG:
|
||||
@ -938,6 +942,7 @@ void CConfigMain::GCSettingsChanged(wxCommandEvent& event)
|
||||
// Gamecube - IPL
|
||||
case ID_GC_SRAM_LNG:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage = GCSystemLang->GetSelection();
|
||||
bRefreshList = true;
|
||||
break;
|
||||
// Gamecube - Devices
|
||||
case ID_GC_EXIDEVICE_SP1:
|
||||
@ -993,8 +998,8 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("Cannot use that file as a memory card.\n"
|
||||
"Are you trying to use the same file in both slots?");
|
||||
PanicAlert("%s", _wxt("Cannot use that file as a memory card.\n"
|
||||
"Are you trying to use the same file in both slots?"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user