mirror of https://github.com/PCSX2/pcsx2.git
i18n:
* fixed a bug that caused certain confirmation dialogs to not remember their choices, when user had non-english language. * Added wxWidgets-provided strings for a few things, such as Next, Back, and OK / Apply / Cancel. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4076 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
0478382cb1
commit
5c54b8279e
|
@ -233,7 +233,8 @@ protected:
|
|||
m_Close :1;
|
||||
BITFIELD_END
|
||||
|
||||
wxString m_CustomLabel;
|
||||
wxString m_CustomLabel;
|
||||
wxString m_CustomLabelId;
|
||||
|
||||
public:
|
||||
MsgButtons() { bitset = 0; }
|
||||
|
@ -251,9 +252,12 @@ public:
|
|||
MsgButtons& Reset() { m_Reset = true; return *this; }
|
||||
MsgButtons& Close() { m_Close = true; return *this; }
|
||||
|
||||
MsgButtons& Custom( const wxString& label)
|
||||
// label - native language label displayed to user
|
||||
// id - raw ASCII identifier used in the config file (do not translate, hence char*)
|
||||
MsgButtons& Custom( const wxString& label, const char* id )
|
||||
{
|
||||
m_CustomLabel = label;
|
||||
m_CustomLabelId = fromUTF8(id);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,8 @@ public:
|
|||
bool HasClose() const { return m_Close; }
|
||||
|
||||
bool HasCustom() const { return !m_CustomLabel.IsEmpty(); }
|
||||
const wxString& GetCustomLabel() const { return m_CustomLabel; }
|
||||
const wxString& GetCustomLabel() const { return m_CustomLabel; }
|
||||
const wxString& GetCustomLabelId() const { return m_CustomLabelId; }
|
||||
|
||||
bool Allows( wxWindowID id ) const;
|
||||
void SetBestFocus( wxWindow* dialog ) const;
|
||||
|
|
|
@ -787,6 +787,28 @@ protected:
|
|||
Pcsx2App::Pcsx2App()
|
||||
: SysExecutorThread( new SysEvtHandler() )
|
||||
{
|
||||
#if 0
|
||||
{
|
||||
// Some common labels provided by wxWidgets. wxWidgets translation files are chucked full
|
||||
// of worthless crap, and tally more than 200k each. We only need these couple.
|
||||
|
||||
_("OK");
|
||||
_("&OK");
|
||||
_("Cancel");
|
||||
_("&Cancel");
|
||||
_("&Apply");
|
||||
_("&Next >");
|
||||
_("&Back >");
|
||||
_("&Back");
|
||||
_("&Finish");
|
||||
|
||||
_("&Save");
|
||||
_("Save &As...");
|
||||
_("&Help");
|
||||
_("&Home");
|
||||
}
|
||||
#endif
|
||||
|
||||
m_PendingSaves = 0;
|
||||
m_ScheduledTermination = false;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ static wxString ResultToString( int result, const MsgButtons& buttons )
|
|||
case wxID_ABORT: return L"abort";
|
||||
case wxID_RETRY: return L"retry";
|
||||
|
||||
// [TODO] : maybe add in an Ignore All?
|
||||
// [TODO] : maybe add in an Ignore All?
|
||||
case wxID_IGNORE: return L"ignore";
|
||||
|
||||
case wxID_RESET: return L"reset";
|
||||
|
@ -73,7 +73,7 @@ static wxString ResultToString( int result, const MsgButtons& buttons )
|
|||
}
|
||||
|
||||
if (result <= wxID_LOWEST)
|
||||
return buttons.GetCustomLabel();
|
||||
return buttons.GetCustomLabelId();
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ bool FirstTimeWizard::UsermodePage::PrepForApply()
|
|||
dialog += 12;
|
||||
dialog += dialog.Heading( path.ToString() );
|
||||
|
||||
if( wxID_CANCEL == pxIssueConfirmation( dialog, MsgButtons().Custom(_("Create")).Cancel(), L"CreateNewFolder" ) )
|
||||
if( wxID_CANCEL == pxIssueConfirmation( dialog, MsgButtons().Custom(_("Create"), "create").Cancel(), L"CreateNewFolder" ) )
|
||||
return false;
|
||||
}
|
||||
path.Mkdir();
|
||||
|
|
|
@ -43,7 +43,7 @@ Dialogs::StuckThreadDialog::StuckThreadDialog( wxWindow* parent, StuckThreadActi
|
|||
L"\nOr press [Ignore] to suppress further assertions."
|
||||
);
|
||||
|
||||
*this += new ModalButtonPanel( this, MsgButtons().Cancel().Custom(L"Wait") ) | StdCenter();
|
||||
*this += new ModalButtonPanel( this, MsgButtons().Cancel().Custom(L"Wait", "wait") ) | StdCenter();
|
||||
|
||||
if( wxWindow* idyes = FindWindowById( wxID_YES ) )
|
||||
idyes->SetFocus();
|
||||
|
|
|
@ -290,8 +290,8 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
, m_LoadStatesSubmenu( *MakeStatesSubMenu( MenuId_State_Load01 ) )
|
||||
, m_SaveStatesSubmenu( *MakeStatesSubMenu( MenuId_State_Save01 ) )
|
||||
|
||||
, m_MenuItem_Console( *new wxMenuItem( &m_menuMisc, MenuId_Console, L"Show Console", wxEmptyString, wxITEM_CHECK ) )
|
||||
, m_MenuItem_Console_Stdio( *new wxMenuItem( &m_menuMisc, MenuId_Console_Stdio, L"Console to Stdio", wxEmptyString, wxITEM_CHECK ) )
|
||||
, m_MenuItem_Console( *new wxMenuItem( &m_menuMisc, MenuId_Console, _("Show Console"), wxEmptyString, wxITEM_CHECK ) )
|
||||
, m_MenuItem_Console_Stdio( *new wxMenuItem( &m_menuMisc, MenuId_Console_Stdio, _("Console to Stdio"), wxEmptyString, wxITEM_CHECK ) )
|
||||
|
||||
{
|
||||
m_RestartEmuOnDelete = false;
|
||||
|
@ -460,7 +460,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
//m_menuMisc.Append(41, "Patch Browser...", wxEmptyString, wxITEM_NORMAL);
|
||||
//m_menuMisc.Append(42, "Patch Finder...", wxEmptyString, wxITEM_NORMAL);
|
||||
|
||||
m_menuMisc.Append(MenuId_CDVD_Info, _T("Print CDVD Info"), wxEmptyString, wxITEM_CHECK);
|
||||
m_menuMisc.Append(MenuId_CDVD_Info, _("Print CDVD Info"), wxEmptyString, wxITEM_CHECK);
|
||||
m_menuMisc.AppendSeparator();
|
||||
|
||||
//Todo:
|
||||
|
|
|
@ -146,7 +146,7 @@ wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, co
|
|||
dialog += dialog.GetCharHeight();
|
||||
dialog += dialog.Heading(_("Do you want to swap discs or boot the new image (via system reset)?"));
|
||||
|
||||
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop.BootSwapIso" );
|
||||
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc"), "swap"), L"DragDrop.BootSwapIso" );
|
||||
if( result == wxID_CANCEL )
|
||||
{
|
||||
core_control.AllowResume();
|
||||
|
@ -189,7 +189,7 @@ wxWindowID SwapOrReset_CdvdSrc( wxWindow* owner, CDVD_SourceType newsrc )
|
|||
_("Do you want to swap discs or boot the new image (system reset)?")
|
||||
);
|
||||
|
||||
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop.BootSwapIso" );
|
||||
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc"), "swap"), L"DragDrop.BootSwapIso" );
|
||||
|
||||
if( result == wxID_CANCEL )
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ void Panels::DirPickerPanel::Explore_Click( wxCommandEvent &evt )
|
|||
);
|
||||
|
||||
wxWindowID result = pxIssueConfirmation( createPathDlg,
|
||||
MsgButtons().Custom(_("Create")).Cancel(),
|
||||
MsgButtons().Custom(_("Create"), "create").Cancel(),
|
||||
L"DirPicker:CreateOnExplore"
|
||||
);
|
||||
|
||||
|
@ -225,7 +225,7 @@ void Panels::DirPickerPanel::Apply()
|
|||
dialog += 12;
|
||||
dialog += dialog.Heading( path );
|
||||
|
||||
if( wxID_CANCEL == pxIssueConfirmation( dialog, MsgButtons().Custom(_("Create")).Cancel(), L"CreateNewFolder" ) )
|
||||
if( wxID_CANCEL == pxIssueConfirmation( dialog, MsgButtons().Custom(_("Create"), "create").Cancel(), L"CreateNewFolder" ) )
|
||||
throw Exception::CannotApplySettings( this );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue