Localization:

- add some more strings for translation, change others for easier translation (in case anyone knows a better way than _("a") + wxString(wxT("b")), feel free to fix it).
- removed strings that shouldnt be translated.
- added gettextize script from glennrics to generate the .pot file; this excludes debugger-related strings which are usually not used by the end user anyways (again, less stuff to translate).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6759 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st
2011-01-06 13:57:46 +00:00
parent de15cb2bc9
commit 80cee2528c
19 changed files with 1045 additions and 2939 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

8
Languages/gettextize Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
cd ${0/gettextize/}/..
SRCDIR=Source
CPP_FILE_LIST=$(find $SRCDIR \( -name '*.cpp' -o -name '*.h' -o -name '*.c' \) -a ! \
-path '*Debug*')
xgettext -d dolphin-emu -s --keyword=_ --keyword=wxTRANSLATE -p ./Languages -o dolphin-emu.pot $CPP_FILE_LIST \
--package-name="Dolphin Emu" --package-version="2.0"

View File

@ -488,7 +488,7 @@ void CheatSearchTab::UpdateCheatSearchResultsList()
{ {
lbox_search_results->Clear(); lbox_search_results->Clear();
wxString count_label = wxString::Format(_("Count: %i"), search_results.size()); wxString count_label = _("Count:") + wxString::Format(wxT(" %i"), search_results.size());
if (search_results.size() > MAX_CHEAT_SEARCH_RESULTS_DISPLAY) if (search_results.size() > MAX_CHEAT_SEARCH_RESULTS_DISPLAY)
{ {
count_label += _(" (too many to display)"); count_label += _(" (too many to display)");

View File

@ -53,6 +53,13 @@ extern CFrame* main_frame;
#define EXIDEV_BBA_STR "BBA" #define EXIDEV_BBA_STR "BBA"
#define EXIDEV_AM_BB_STR "AM-Baseboard" #define EXIDEV_AM_BB_STR "AM-Baseboard"
#ifdef WIN32
//only used with xgettext to be picked up as translatable string.
//win32 does not have wx on its path, the provided wxALL_FILES
//translation does not work there.
#define unusedALL_FILES wxTRANSLATE("All files (*.*)|*.*");
#endif
BEGIN_EVENT_TABLE(CConfigMain, wxDialog) BEGIN_EVENT_TABLE(CConfigMain, wxDialog)
EVT_CLOSE(CConfigMain::OnClose) EVT_CLOSE(CConfigMain::OnClose)
@ -684,13 +691,13 @@ void CConfigMain::CreateGUIControls()
wxStaticText* DefaultISOText = new wxStaticText(PathsPage, ID_DEFAULTISO_TEXT, _("Default ISO:"), wxDefaultPosition, wxDefaultSize); wxStaticText* DefaultISOText = new wxStaticText(PathsPage, ID_DEFAULTISO_TEXT, _("Default ISO:"), wxDefaultPosition, wxDefaultSize);
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"), DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"),
wxString::Format(wxT("All GC/Wii images (gcm, iso, ciso, gcz)|*.gcm;*.iso;*.ciso;*.gcz|All files (%s)|%s"), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr), _("All GC/Wii images (gcm, iso, ciso, gcz)") + wxString::Format(wxT("|*.gcm;*.iso;*.ciso;*.gcz|%s"), wxGetTranslation(wxALL_FILES)),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
wxStaticText* DVDRootText = new wxStaticText(PathsPage, ID_DVDROOT_TEXT, _("DVD Root:"), wxDefaultPosition, wxDefaultSize); wxStaticText* DVDRootText = new wxStaticText(PathsPage, ID_DVDROOT_TEXT, _("DVD Root:"), wxDefaultPosition, wxDefaultSize);
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL); DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
wxStaticText* ApploaderPathText = new wxStaticText(PathsPage, ID_APPLOADERPATH_TEXT, _("Apploader:"), wxDefaultPosition, wxDefaultSize); wxStaticText* ApploaderPathText = new wxStaticText(PathsPage, ID_APPLOADERPATH_TEXT, _("Apploader:"), wxDefaultPosition, wxDefaultSize);
ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"), ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"),
wxString::Format(wxT("apploader (.img)|*.img|All files (%s)|%s"), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr), _("apploader (.img)") + wxString::Format(wxT("|*.img|%s"), wxGetTranslation(wxALL_FILES)),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
// Populate the settings // Populate the settings
@ -930,7 +937,7 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
wxString::From8BitData(File::GetUserPath(D_GCUSER_IDX)), wxString::From8BitData(File::GetUserPath(D_GCUSER_IDX)),
isSlotA ? wxT(GC_MEMCARDA) : wxT(GC_MEMCARDB), isSlotA ? wxT(GC_MEMCARDA) : wxT(GC_MEMCARDB),
wxEmptyString, wxEmptyString,
_("Gamecube Memory Cards (*.raw,*.gcp)|*.raw;*.gcp")).mb_str()); _("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp"))).mb_str());
if (!filename.empty()) if (!filename.empty())
{ {

View File

@ -406,17 +406,17 @@ CFrame::CFrame(wxFrame* parent,
if (g_pCodeWindow) if (g_pCodeWindow)
{ {
m_Mgr->AddPane(m_Panel, wxAuiPaneInfo() m_Mgr->AddPane(m_Panel, wxAuiPaneInfo()
.Name(_("Pane 0")).Caption(_("Pane 0")) .Name(_T("Pane 0")).Caption(_T("Pane 0"))
.CenterPane().PaneBorder(false).Show()); .CenterPane().PaneBorder(false).Show());
AuiFullscreen = m_Mgr->SavePerspective(); AuiFullscreen = m_Mgr->SavePerspective();
} }
else else
{ {
m_Mgr->AddPane(m_Panel, wxAuiPaneInfo() m_Mgr->AddPane(m_Panel, wxAuiPaneInfo()
.Name(_("Pane 0")).Caption(_("Pane 0")).PaneBorder(false) .Name(_T("Pane 0")).Caption(_T("Pane 0")).PaneBorder(false)
.CaptionVisible(false).Layer(0).Center().Show()); .CaptionVisible(false).Layer(0).Center().Show());
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo() m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
.Name(_("Pane 1")).Caption(_("Logging")).CaptionVisible(true) .Name(_T("Pane 1")).Caption(_("Logging")).CaptionVisible(true)
.Layer(0).FloatingSize(wxSize(600, 350)).CloseButton(true).Hide()); .Layer(0).FloatingSize(wxSize(600, 350)).CloseButton(true).Hide());
AuiFullscreen = m_Mgr->SavePerspective(); AuiFullscreen = m_Mgr->SavePerspective();
} }

View File

@ -378,20 +378,20 @@ void CFrame::TogglePane()
{ {
if (NB->GetPageCount() == 0) if (NB->GetPageCount() == 0)
{ {
m_LogWindow->x = m_Mgr->GetPane(_("Pane 1")).rect.GetWidth(); m_LogWindow->x = m_Mgr->GetPane(_T("Pane 1")).rect.GetWidth();
m_LogWindow->y = m_Mgr->GetPane(_("Pane 1")).rect.GetHeight(); m_LogWindow->y = m_Mgr->GetPane(_T("Pane 1")).rect.GetHeight();
m_LogWindow->winpos = m_Mgr->GetPane(_("Pane 1")).dock_direction; m_LogWindow->winpos = m_Mgr->GetPane(_T("Pane 1")).dock_direction;
m_Mgr->GetPane(_("Pane 1")).Hide(); m_Mgr->GetPane(_T("Pane 1")).Hide();
} }
else else
{ {
m_Mgr->GetPane(_("Pane 1")).BestSize(m_LogWindow->x, m_LogWindow->y) m_Mgr->GetPane(_T("Pane 1")).BestSize(m_LogWindow->x, m_LogWindow->y)
.MinSize(m_LogWindow->x, m_LogWindow->y) .MinSize(m_LogWindow->x, m_LogWindow->y)
.Direction(m_LogWindow->winpos).Show(); .Direction(m_LogWindow->winpos).Show();
m_Mgr->Update(); m_Mgr->Update();
// Reset the minimum size of the pane // Reset the minimum size of the pane
m_Mgr->GetPane(_("Pane 1")).MinSize(-1, -1); m_Mgr->GetPane(_T("Pane 1")).MinSize(-1, -1);
} }
m_Mgr->Update(); m_Mgr->Update();
} }
@ -770,7 +770,7 @@ void CFrame::ReloadPanes()
// Create new panes with notebooks // Create new panes with notebooks
for (u32 i = 0; i < Perspectives[ActivePerspective].Width.size() - 1; i++) for (u32 i = 0; i < Perspectives[ActivePerspective].Width.size() - 1; i++)
{ {
wxString PaneName = wxString::Format(_("Pane %i"), i + 1); wxString PaneName = wxString::Format(_T("Pane %i"), i + 1);
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide() m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide()
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking).Position(i) .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking).Position(i)
.Name(PaneName).Caption(PaneName)); .Name(PaneName).Caption(PaneName));
@ -928,7 +928,7 @@ void CFrame::SaveIniPerspectives()
void CFrame::AddPane() void CFrame::AddPane()
{ {
int PaneNum = GetNotebookCount() + 1; int PaneNum = GetNotebookCount() + 1;
wxString PaneName = wxString::Format(_("Pane %i"), PaneNum); wxString PaneName = wxString::Format(_T("Pane %i"), PaneNum);
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo() m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking) .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking)
.Name(PaneName).Caption(PaneName) .Name(PaneName).Caption(PaneName)

View File

@ -106,7 +106,7 @@ void CFrame::CreateMenu()
// file menu // file menu
wxMenu* fileMenu = new wxMenu; wxMenu* fileMenu = new wxMenu;
fileMenu->Append(wxID_OPEN, _("&Open...\tCtrl+O")); fileMenu->Append(wxID_OPEN, _("&Open...") + wxString(wxT("\tCtrl+O")));
fileMenu->Append(IDM_CHANGEDISC, _("Change &Disc...")); fileMenu->Append(IDM_CHANGEDISC, _("Change &Disc..."));
wxMenu *externalDrive = new wxMenu; wxMenu *externalDrive = new wxMenu;
@ -123,7 +123,7 @@ void CFrame::CreateMenu()
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs...")); fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs..."));
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _("E&xit\tAlt+F4")); fileMenu->Append(wxID_EXIT, _("E&xit") + wxString(wxT("\tAlt+F4")));
m_MenuBar->Append(fileMenu, _("&File")); m_MenuBar->Append(fileMenu, _("&File"));
// Emulation menu // Emulation menu
@ -156,7 +156,7 @@ void CFrame::CreateMenu()
emulationMenu->Append(IDM_SAVESTATE, _("Sa&ve State"), saveMenu); emulationMenu->Append(IDM_SAVESTATE, _("Sa&ve State"), saveMenu);
saveMenu->Append(IDM_SAVESTATEFILE, _("Save State...")); saveMenu->Append(IDM_SAVESTATEFILE, _("Save State..."));
loadMenu->Append(IDM_UNDOSAVESTATE, _("Last Overwritten State\tShift+F12")); loadMenu->Append(IDM_UNDOSAVESTATE, _("Last Overwritten State") + wxString(wxT("\tShift+F12")));
saveMenu->AppendSeparator(); saveMenu->AppendSeparator();
loadMenu->Append(IDM_LOADSTATEFILE, _("Load State...")); loadMenu->Append(IDM_LOADSTATEFILE, _("Load State..."));
@ -165,14 +165,14 @@ void CFrame::CreateMenu()
if (g_pCodeWindow) if (g_pCodeWindow)
loadMenu->Append(IDM_LOADLASTSTATE, _("Last Saved State")); loadMenu->Append(IDM_LOADLASTSTATE, _("Last Saved State"));
else else
loadMenu->Append(IDM_LOADLASTSTATE, _("Last Saved State\tF11")); loadMenu->Append(IDM_LOADLASTSTATE, _("Last Saved State") + wxString(wxT("\tF11")));
loadMenu->Append(IDM_UNDOLOADSTATE, _("Undo Load State\tF12")); loadMenu->Append(IDM_UNDOLOADSTATE, _("Undo Load State") + wxString(wxT("\tF12")));
loadMenu->AppendSeparator(); loadMenu->AppendSeparator();
for (int i = 1; i <= 8; i++) { for (int i = 1; i <= 8; i++) {
loadMenu->Append(IDM_LOADSLOT1 + i - 1, wxString::Format(wxT("Slot %i\tF%i"), i, i)); loadMenu->Append(IDM_LOADSLOT1 + i - 1, _("Slot") + wxString::Format(wxT(" %i\tF%i"), i, i));
saveMenu->Append(IDM_SAVESLOT1 + i - 1, wxString::Format(wxT("Slot %i\tShift+F%i"), i, i)); saveMenu->Append(IDM_SAVESLOT1 + i - 1, _("Slot") + wxString::Format(wxT(" %i\tShift+F%i"), i, i));
} }
m_MenuBar->Append(emulationMenu, _("&Emulation")); m_MenuBar->Append(emulationMenu, _("&Emulation"));
@ -235,17 +235,17 @@ void CFrame::CreateMenu()
viewMenu->Check(IDM_CONSOLEWINDOW, g_pCodeWindow->bShowOnStart[1]); viewMenu->Check(IDM_CONSOLEWINDOW, g_pCodeWindow->bShowOnStart[1]);
const wxString MenuText[] = { const wxString MenuText[] = {
_("&Registers"), wxTRANSLATE("&Registers"),
_("&Breakpoints"), wxTRANSLATE("&Breakpoints"),
_("&Memory"), wxTRANSLATE("&Memory"),
_("&JIT"), wxTRANSLATE("&JIT"),
_("&Sound"), wxTRANSLATE("&Sound"),
_("&Video") wxTRANSLATE("&Video")
}; };
for (int i = IDM_REGISTERWINDOW; i <= IDM_VIDEOWINDOW; i++) for (int i = IDM_REGISTERWINDOW; i <= IDM_VIDEOWINDOW; i++)
{ {
viewMenu->AppendCheckItem(i, MenuText[i - IDM_REGISTERWINDOW]); viewMenu->AppendCheckItem(i, wxGetTranslation(MenuText[i - IDM_REGISTERWINDOW]));
viewMenu->Check(i, g_pCodeWindow->bShowOnStart[i - IDM_LOGWINDOW]); viewMenu->Check(i, g_pCodeWindow->bShowOnStart[i - IDM_LOGWINDOW]);
} }
@ -312,25 +312,25 @@ wxString CFrame::GetMenuLabel(int Id)
switch (Id) switch (Id)
{ {
case HK_FULLSCREEN: case HK_FULLSCREEN:
Label = _("&Fullscreen\t"); Label = _("&Fullscreen");
break; break;
case HK_PLAY_PAUSE: case HK_PLAY_PAUSE:
if (Core::GetState() == Core::CORE_RUN) if (Core::GetState() == Core::CORE_RUN)
Label = _("&Pause\t"); Label = _("&Pause");
else else
Label = _("&Play\t"); Label = _("&Play");
break; break;
case HK_STOP: case HK_STOP:
Label = _("&Stop\t"); Label = _("&Stop");
break; break;
case HK_SCREENSHOT: case HK_SCREENSHOT:
Label = _("Take Screenshot\t"); Label = _("Take Screenshot");
break; break;
case HK_WIIMOTE1_CONNECT: case HK_WIIMOTE1_CONNECT:
case HK_WIIMOTE2_CONNECT: case HK_WIIMOTE2_CONNECT:
case HK_WIIMOTE3_CONNECT: case HK_WIIMOTE3_CONNECT:
case HK_WIIMOTE4_CONNECT: case HK_WIIMOTE4_CONNECT:
Label = wxString::Format(_("Connect Wiimote %i\t"), Label = wxString::Format(_("Connect Wiimote %i"),
Id - HK_WIIMOTE1_CONNECT + 1); Id - HK_WIIMOTE1_CONNECT + 1);
break; break;
} }
@ -339,6 +339,8 @@ wxString CFrame::GetMenuLabel(int Id)
(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkeyModifier[Id]); (SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkeyModifier[Id]);
wxString Hotkey = InputCommon::WXKeyToString wxString Hotkey = InputCommon::WXKeyToString
(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[Id]); (SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[Id]);
if (Modifier.Len() + Hotkey.Len() > 0)
Label += '\t';
return Label + Modifier + (Modifier.Len() ? _T("+") : _T("")) + Hotkey; return Label + Modifier + (Modifier.Len() ? _T("+") : _T("")) + Hotkey;
} }
@ -586,12 +588,8 @@ void CFrame::DoOpen(bool Boot)
wxString path = wxFileSelector( wxString path = wxFileSelector(
_("Select the file to load"), _("Select the file to load"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format _("All GC/Wii files (elf, dol, gcm, iso, ciso, wad)") +
( wxString::Format(wxT("|*.elf;*.dol;*.gcm;*.iso;*.ciso;*.gcz;*.wad|%s"), wxGetTranslation(wxALL_FILES)),
_T("All GC/Wii files (elf, dol, gcm, iso, ciso, wad)|*.elf;*.dol;*.gcm;*.iso;*.ciso;*.gcz;*.wad|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);
@ -650,12 +648,8 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
wxString path = wxFileSelector( wxString path = wxFileSelector(
_("Select The Recording File"), _("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format _("Dolphin TAS Movies (*.dtm)") +
( wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)),
_T("Dolphin TAS Movies (*.dtm)|*.dtm|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);
@ -1000,12 +994,8 @@ void CFrame::DoRecordingSave()
wxString path = wxFileSelector( wxString path = wxFileSelector(
_("Select The Recording File"), _("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format _("Dolphin TAS Movies (*.dtm)") +
( wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)),
_T("Dolphin TAS Movies (*.dtm)|*.dtm|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_SAVE | wxFD_PREVIEW, wxFD_SAVE | wxFD_PREVIEW,
this); this);
@ -1252,12 +1242,8 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event))
wxString path = wxFileSelector( wxString path = wxFileSelector(
_("Select the state to load"), _("Select the state to load"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format _("All Save States (sav, s##)") +
( wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)),
_T("All Save States (sav, s##)|*.sav;*.s??|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);
@ -1270,12 +1256,8 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
wxString path = wxFileSelector( wxString path = wxFileSelector(
_("Select the state to save"), _("Select the state to save"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format _("All Save States (sav, s##)") +
( wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)),
_T("All Save States (sav, s##)|*.sav;*.s??|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_SAVE, wxFD_SAVE,
this); this);

View File

@ -1045,8 +1045,9 @@ void CGameListCtrl::OnOpenSaveFolder(wxCommandEvent& WXUNUSED (event))
const GameListItem *iso = GetSelectedISO(); const GameListItem *iso = GetSelectedISO();
if (!iso) if (!iso)
return; return;
if (iso->GetWiiFSPath() != "NULL") std::string path = iso->GetWiiFSPath();
WxUtils::Explore(iso->GetWiiFSPath().c_str()); if (!path.empty())
WxUtils::Explore(path.c_str());
} }
void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event)) void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
@ -1283,22 +1284,16 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
{ {
wxString FileType; wxString FileType;
if (iso->GetPlatform() == GameListItem::WII_DISC) if (iso->GetPlatform() == GameListItem::WII_DISC)
FileType = _("All Wii ISO files (iso)|*.iso"); FileType = _("All Wii ISO files (iso)") + wxString(wxT("|*.iso"));
else else
FileType = _("All Gamecube GCM files (gcm)|*.gcm"); FileType = _("All Gamecube GCM files (gcm)") + wxString(wxT("|*.gcm"));
path = wxFileSelector( path = wxFileSelector(
_("Save decompressed GCM/ISO"), _("Save decompressed GCM/ISO"),
wxString(FilePath.c_str(), *wxConvCurrent), wxString(FilePath.c_str(), *wxConvCurrent),
wxString(FileName.c_str(), *wxConvCurrent) + FileType.After('*'), wxString(FileName.c_str(), *wxConvCurrent) + FileType.After('*'),
wxEmptyString, wxEmptyString,
FileType + FileType + wxT("|") + wxGetTranslation(wxALL_FILES),
wxString::Format
(
_T("|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_SAVE, wxFD_SAVE,
this); this);
} }
@ -1309,12 +1304,8 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
wxString(FilePath.c_str(), *wxConvCurrent), wxString(FilePath.c_str(), *wxConvCurrent),
wxString(FileName.c_str(), *wxConvCurrent) + _T(".gcz"), wxString(FileName.c_str(), *wxConvCurrent) + _T(".gcz"),
wxEmptyString, wxEmptyString,
wxString::Format _("All compressed GC/Wii ISO files (gcz)") +
( wxString::Format(wxT("|*.gcz|%s"), wxGetTranslation(wxALL_FILES)),
_T("All compressed GC/Wii ISO files (gcz)|*.gcz|All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_SAVE, wxFD_SAVE,
this); this);
} }

View File

@ -216,10 +216,11 @@ const std::string& GameListItem::GetName(int index) const
const std::string GameListItem::GetWiiFSPath() const const std::string GameListItem::GetWiiFSPath() const
{ {
DiscIO::IVolume *Iso = DiscIO::CreateVolumeFromFilename(m_FileName); DiscIO::IVolume *Iso = DiscIO::CreateVolumeFromFilename(m_FileName);
std::string ret;
if (Iso == NULL)
return ret;
std::string ret("NULL");
if (Iso != NULL)
{
if (DiscIO::IsVolumeWiiDisc(Iso) || DiscIO::IsVolumeWadFile(Iso)) if (DiscIO::IsVolumeWiiDisc(Iso) || DiscIO::IsVolumeWadFile(Iso))
{ {
char Path[250]; char Path[250];
@ -239,7 +240,6 @@ const std::string GameListItem::GetWiiFSPath() const
ret = std::string(Path); ret = std::string(Path);
} }
delete Iso; delete Iso;
}
return ret; return ret;
} }

View File

@ -577,7 +577,7 @@ void CISOProperties::OnBannerImageSave(wxCommandEvent& WXUNUSED (event))
wxString dirHome; wxString dirHome;
wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(wxT("%s.png"), m_GameID->GetLabel().c_str()), wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(wxT("%s.png"), m_GameID->GetLabel().c_str()),
_("*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize); wxALL_FILES_PATTERN, wxFD_SAVE|wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize);
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
m_Banner->GetBitmap().ConvertToImage().SaveFile(dialog.GetPath()); m_Banner->GetBitmap().ConvertToImage().SaveFile(dialog.GetPath());
@ -618,12 +618,7 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
Path = wxFileSelector( Path = wxFileSelector(
_("Export File"), _("Export File"),
wxEmptyString, File, wxEmptyString, wxEmptyString, File, wxEmptyString,
wxString::Format wxGetTranslation(wxALL_FILES),
(
wxT("All files (%s)|%s"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_SAVE, wxFD_SAVE,
this); this);
@ -746,7 +741,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
void CISOProperties::OnExtractDir(wxCommandEvent& event) void CISOProperties::OnExtractDir(wxCommandEvent& event)
{ {
wxString Directory = m_Treectrl->GetItemText(m_Treectrl->GetSelection()); wxString Directory = m_Treectrl->GetItemText(m_Treectrl->GetSelection());
wxString Path = wxDirSelector(_("Choose the folder where to extract to")); wxString Path = wxDirSelector(_("Choose the folder to extract to"));
if (!Path || !Directory) if (!Path || !Directory)
return; return;
@ -1051,10 +1046,10 @@ void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event))
{ {
SaveGameConfig(); SaveGameConfig();
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("ini")); wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("ini"));
if(filetype == NULL) // From extension failed, trying with MIME type now if(filetype == NULL) // From extension failed, trying with MIME type now
{ {
filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_("text/plain")); filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain"));
if(filetype == NULL) // MIME type failed, aborting mission if(filetype == NULL) // MIME type failed, aborting mission
{ {
PanicAlert("Filetype 'ini' is unknown! Will not open!"); PanicAlert("Filetype 'ini' is unknown! Will not open!");

View File

@ -94,7 +94,7 @@ void CLogWindow::CreateGUIControls()
m_FontChoice->Append(_("Selected font")); m_FontChoice->Append(_("Selected font"));
m_FontChoice->SetSelection(0); m_FontChoice->SetSelection(0);
DefaultFont = GetFont(); DefaultFont = GetFont();
MonoSpaceFont.SetNativeFontInfoUserDesc(_("lucida console windows-1252")); MonoSpaceFont.SetNativeFontInfoUserDesc(_T("lucida console windows-1252"));
LogFont.push_back(DefaultFont); LogFont.push_back(DefaultFont);
LogFont.push_back(MonoSpaceFont); LogFont.push_back(MonoSpaceFont);
LogFont.push_back(DebuggerFont); LogFont.push_back(DebuggerFont);
@ -168,11 +168,11 @@ void CLogWindow::OnClose(wxCloseEvent& event)
void CLogWindow::OnSize(wxSizeEvent& event) void CLogWindow::OnSize(wxSizeEvent& event)
{ {
if (!Parent->g_pCodeWindow && if (!Parent->g_pCodeWindow &&
Parent->m_Mgr->GetPane(_("Pane 1")).IsShown()) Parent->m_Mgr->GetPane(wxT("Pane 1")).IsShown())
{ {
x = Parent->m_Mgr->GetPane(_("Pane 1")).rect.GetWidth(); x = Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth();
y = Parent->m_Mgr->GetPane(_("Pane 1")).rect.GetHeight(); y = Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight();
winpos = Parent->m_Mgr->GetPane(_("Pane 1")).dock_direction; winpos = Parent->m_Mgr->GetPane(wxT("Pane 1")).dock_direction;
} }
event.Skip(); event.Skip();
} }

View File

@ -140,29 +140,29 @@ bool DolphinApp::OnInit()
wxCmdLineEntryDesc cmdLineDesc[] = wxCmdLineEntryDesc cmdLineDesc[] =
{ {
{ {
wxCMD_LINE_SWITCH, _("h"), _("help"), wxCMD_LINE_SWITCH, _T("h"), _T("help"),
_("Show this help message"), _("Show this help message"),
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
}, },
{ {
wxCMD_LINE_SWITCH, _("d"), _("debugger"), _("Opens the debugger") wxCMD_LINE_SWITCH, _T("d"), _T("debugger"), _("Opens the debugger")
}, },
{ {
wxCMD_LINE_SWITCH, _("l"), _("logger"), _("Opens the logger") wxCMD_LINE_SWITCH, _T("l"), _T("logger"), _("Opens the logger")
}, },
{ {
wxCMD_LINE_OPTION, _("e"), _("exec"), _("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"), wxCMD_LINE_OPTION, _T("e"), _T("exec"), _("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
}, },
{ {
wxCMD_LINE_SWITCH, _("b"), _("batch"), _("Exit Dolphin with emulator") wxCMD_LINE_SWITCH, _T("b"), _T("batch"), _("Exit Dolphin with emulator")
}, },
{ {
wxCMD_LINE_OPTION, _("V"), _("video_plugin"), _("Specify a video plugin"), wxCMD_LINE_OPTION, _T("V"), _T("video_plugin"), _("Specify a video plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
}, },
{ {
wxCMD_LINE_OPTION, _("A"), _("audio_plugin"), _("Specify an audio plugin"), wxCMD_LINE_OPTION, _T("A"), _T("audio_plugin"), _("Specify an audio plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
}, },
{ {
@ -183,18 +183,18 @@ bool DolphinApp::OnInit()
LoadFile = parser.Found("exec", &FileToLoad); LoadFile = parser.Found("exec", &FileToLoad);
BatchMode = parser.Found("batch"); BatchMode = parser.Found("batch");
#else #else
UseDebugger = parser.Found(_("debugger")); UseDebugger = parser.Found(_T("debugger"));
UseLogger = parser.Found(_("logger")); UseLogger = parser.Found(_T("logger"));
LoadFile = parser.Found(_("exec"), &FileToLoad); LoadFile = parser.Found(_T("exec"), &FileToLoad);
BatchMode = parser.Found(_("batch")); BatchMode = parser.Found(_T("batch"));
#endif #endif
#if wxCHECK_VERSION(2, 9, 0) #if wxCHECK_VERSION(2, 9, 0)
selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename); selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename);
selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename); selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename);
#else #else
selectVideoPlugin = parser.Found(_("video_plugin"), &videoPluginFilename); selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
selectAudioPlugin = parser.Found(_("audio_plugin"), &audioPluginFilename); selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
#endif #endif
#endif // wxUSE_CMDLINE_PARSER #endif // wxUSE_CMDLINE_PARSER

View File

@ -216,14 +216,14 @@ void CMemcardManager::CreateGUIControls()
m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot, m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot,
wxString::From8BitData(File::GetUserPath(D_GCUSER_IDX)), _("Choose a memory card:"), wxString::From8BitData(File::GetUserPath(D_GCUSER_IDX)), _("Choose a memory card:"),
_("Gamecube Memory Cards (*.raw,*.gcp)|*.raw;*.gcp"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); _("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp")), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400), m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400),
wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL, mcmSettings); wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL, mcmSettings);
m_MemcardList[slot]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL); m_MemcardList[slot]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL);
sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, wxString::Format(_("Memory Card %c"), 'A' + slot)); sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(wxT(" %c"), 'A' + slot));
sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND|wxALL, 5); sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND|wxALL, 5);
sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND|wxALL, 5); sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND|wxALL, 5);
sMemcard[slot]->Add(sPages[slot], 0, wxEXPAND|wxALL, 1); sMemcard[slot]->Add(sPages[slot], 0, wxEXPAND|wxALL, 1);
@ -487,7 +487,6 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
void CMemcardManager::CopyDeleteClick(wxCommandEvent& event) void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
{ {
int index_A = m_MemcardList[SLOT_A]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); int index_A = m_MemcardList[SLOT_A]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
int index_B = m_MemcardList[SLOT_B]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); int index_B = m_MemcardList[SLOT_B]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
int slot = SLOT_B; int slot = SLOT_B;
@ -531,15 +530,15 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
? wxString::FromAscii("") ? wxString::FromAscii("")
: wxString::From8BitData(DefaultIOPath.c_str()), : wxString::From8BitData(DefaultIOPath.c_str()),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_T("Native GCI files(*.gci)|*.gci|") _("Native GCI files(*.gci)") + wxString(wxT("|*.gci|")) +
_T("MadCatz Gameshark files(*.gcs)|*.gcs|") _("MadCatz Gameshark files(*.gcs)") + wxString(wxT("|*.gcs|")) +
_T("Datel MaxDrive/Pro files(*.sav)|*.sav"), _("Datel MaxDrive/Pro files(*.sav)") + wxString(wxT("|*.sav")),
wxFD_OPEN | wxFD_FILE_MUST_EXIST); wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (!fileName.empty() && !fileName2.empty()) if (!fileName.empty() && !fileName2.empty())
{ {
wxString temp2 = wxFileSelector(_("Save GCI as.."), wxString temp2 = wxFileSelector(_("Save GCI as..."),
wxEmptyString, wxEmptyString, wxT(".gci"), wxEmptyString, wxEmptyString, wxT(".gci"),
wxT("GCI File(*.gci)|*.gci"), _("GCI File(*.gci)") + wxString(_T("|*.gci")),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE); wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
if (temp2.empty()) break; if (temp2.empty()) break;
fileName2 = temp2.mb_str(); fileName2 = temp2.mb_str();
@ -562,12 +561,12 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
memoryCard[slot]->DEntry_FileName(index,tempC2); memoryCard[slot]->DEntry_FileName(index,tempC2);
sprintf(tempC, "%s_%s.gci", tempC, tempC2); sprintf(tempC, "%s_%s.gci", tempC, tempC2);
wxString fileName = wxFileSelector( wxString fileName = wxFileSelector(
_("Export save as.."), _("Export save as..."),
wxString::From8BitData(DefaultIOPath.c_str()), wxString::From8BitData(DefaultIOPath.c_str()),
wxString::From8BitData(tempC), wxT(".gci"), wxString::From8BitData(tempC), wxT(".gci"),
wxT("Native GCI files(*.gci)|*.gci|") _("Native GCI files(*.gci)") + wxString(wxT("|*.gci|")) +
wxT("MadCatz Gameshark files(*.gcs)|*.gcs|") _("MadCatz Gameshark files(*.gcs)") + wxString(wxT("|*.gcs|")) +
wxT("Datel MaxDrive/Pro files(*.sav)|*.sav"), _("Datel MaxDrive/Pro files(*.sav)") + wxString(wxT("|*.sav")),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE); wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
if (fileName.length() > 0) if (fileName.length() > 0)

View File

@ -162,7 +162,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
const wxString ar_choices[] = { _("Auto [recommended]"), const wxString ar_choices[] = { _("Auto [recommended]"),
_("Force 16:9"), _("Force 4:3"), _("Stretch to Window") }; _("Force 16:9"), _("Force 4:3"), _("Stretch to Window") };
szr_basic->Add(new wxStaticText(page_general, -1, _("Aspect ratio:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_basic->Add(new wxStaticText(page_general, -1, _("Aspect Ratio:")), 1, wxALIGN_CENTER_VERTICAL, 0);
wxChoice* const choice_aspect = new SettingChoice(page_general, wxChoice* const choice_aspect = new SettingChoice(page_general,
vconfig.iAspectRatio, ar_tooltip, sizeof(ar_choices)/sizeof(*ar_choices), ar_choices); vconfig.iAspectRatio, ar_tooltip, sizeof(ar_choices)/sizeof(*ar_choices), ar_choices);
szr_basic->Add(choice_aspect, 1, 0, 0); szr_basic->Add(choice_aspect, 1, 0, 0);
@ -289,7 +289,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// - safe texture cache // - safe texture cache
{ {
wxStaticBoxSizer* const group_safetex = new wxStaticBoxSizer(wxHORIZONTAL, page_general, _("Accurate texture cache")); wxStaticBoxSizer* const group_safetex = new wxStaticBoxSizer(wxHORIZONTAL, page_general, _("Accurate Texture Cache"));
szr_general->Add(group_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); szr_general->Add(group_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
SettingCheckBox* stc_enable = new SettingCheckBox(page_general, _("Enable"), stc_tooltip, vconfig.bSafeTextureCache); SettingCheckBox* stc_enable = new SettingCheckBox(page_general, _("Enable"), stc_tooltip, vconfig.bSafeTextureCache);