From 47b89a4146896dae650f5f4389acbb43e0bb6d27 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sun, 30 May 2010 13:24:44 +0000 Subject: [PATCH] * Improved conformity of translation tokens. * MemoryCard -> memory card (bositman's decree!) DevNote: pxE() macro is replaced by many pxE_* macros for specific types of message uses. See code comments for pxE_Panel, pxE_Tooltip, etc for details. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3125 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/System.cpp | 2 +- pcsx2/gui/AppInit.cpp | 4 +-- pcsx2/gui/AppMain.cpp | 2 +- pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp | 24 ++++++------- pcsx2/gui/Dialogs/FirstTimeWizard.cpp | 8 ++--- pcsx2/gui/Dialogs/ImportSettingsDialog.cpp | 2 +- pcsx2/gui/Dialogs/McdConfigDialog.cpp | 14 ++++---- pcsx2/gui/Dialogs/StuckThreadDialog.cpp | 2 +- pcsx2/gui/IsoDropTarget.cpp | 2 +- pcsx2/gui/MainFrame.cpp | 2 +- pcsx2/gui/MainMenuClicks.cpp | 2 +- pcsx2/gui/MemoryCardFile.cpp | 20 +++++------ pcsx2/gui/Panels/BiosSelectorPanel.cpp | 2 +- pcsx2/gui/Panels/DirPickerPanel.cpp | 4 +-- pcsx2/gui/Panels/GSWindowPanel.cpp | 10 +++--- pcsx2/gui/Panels/GameFixesPanel.cpp | 4 +-- pcsx2/gui/Panels/MemoryCardListPanel.cpp | 36 ++++++++++---------- pcsx2/gui/Panels/MemoryCardsPanel.cpp | 8 ++--- pcsx2/gui/Panels/MiscPanelStuff.cpp | 4 +-- pcsx2/gui/Panels/PathsPanel.cpp | 6 ++-- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 4 +-- pcsx2/gui/Panels/SpeedhacksPanel.cpp | 30 ++++++++-------- pcsx2/gui/Panels/VideoPanel.cpp | 15 ++++---- pcsx2/gui/i18n.h | 22 +++++++++++- 24 files changed, 124 insertions(+), 105 deletions(-) diff --git a/pcsx2/System.cpp b/pcsx2/System.cpp index 0146c09b2f..5718c10f84 100644 --- a/pcsx2/System.cpp +++ b/pcsx2/System.cpp @@ -238,7 +238,7 @@ public: // returns the translated error message for the Virtual Machine failing to allocate! static wxString GetMemoryErrorVM() { - return pxE( ".Popup Error:EmuCore::MemoryForVM", + return pxE_Error( "EmuCore::MemoryForVM", L"PCSX2 is unable to allocate memory needed for the PS2 virtual machine. " L"Close out some memory hogging background tasks and try again." ); diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index 6727843d95..90a5da54d2 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -39,7 +39,7 @@ static void CpuCheckSSE2() wxDialogWithHelpers exconf( NULL, _("PCSX2 - SSE2 Recommended"), wxVERTICAL ); - exconf += exconf.Heading( pxE( ".Error:Startup:NoSSE2", + exconf += exconf.Heading( pxE_Error( "Startup:NoSSE2", L"Warning: Your computer does not support SSE2, which is required by many PCSX2 recompilers and plugins. " L"Your options will be limited and emulation will be *very* slow." ) ); @@ -255,7 +255,7 @@ void Pcsx2App::AllocateCoreStuffs() wxDialogWithHelpers exconf( NULL, _("PCSX2 Recompiler Error(s)"), wxVERTICAL ); exconf += 12; - exconf += exconf.Heading( pxE( ".Error:RecompilerInit", + exconf += exconf.Heading( pxE_Error( "RecompilerInit", L"Warning: Some of the configured PS2 recompilers failed to initialize and will not be available for this session:\n" ) ); diff --git a/pcsx2/gui/AppMain.cpp b/pcsx2/gui/AppMain.cpp index a1f88f6e28..ce8efb96dd 100644 --- a/pcsx2/gui/AppMain.cpp +++ b/pcsx2/gui/AppMain.cpp @@ -363,7 +363,7 @@ void Pcsx2App::OnEmuKeyDown( wxKeyEvent& evt ) // are multiple variations on the BIOS and BIOS folder checks). wxString BIOS_GetMsg_Required() { - return pxE( ".Popup:BiosDumpRequired", + return pxE_Popup( "BiosDumpRequired", L"\n\n" L"PCSX2 requires a PS2 BIOS in order to run. For legal reasons, you *must* obtain \n" L"a BIOS from an actual PS2 unit that you own (borrowing doesn't count).\n" diff --git a/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp b/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp index f294a8c17b..46e303bde2 100644 --- a/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp +++ b/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp @@ -29,7 +29,7 @@ extern wxString GetMsg_McdNtfsCompress(); wxFilePickerCtrl* CreateMemoryCardFilePicker( wxWindow* parent, uint portidx, uint slotidx, const wxString& filename=wxEmptyString ) { return new wxFilePickerCtrl( parent, wxID_ANY, filename, - wxsFormat(_("Select memorycard for Port %u / Slot %u"), portidx+1, slotidx+1), // picker window title + wxsFormat(_("Select memory card for Port %u / Slot %u"), portidx+1, slotidx+1), // picker window title L"*.ps2", // default wildcard wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE & ~wxFLP_FILE_MUST_EXIST @@ -37,12 +37,8 @@ wxFilePickerCtrl* CreateMemoryCardFilePicker( wxWindow* parent, uint portidx, ui } - /*pxSetToolTip( m_button_Recreate, pxE( ".Tooltip:MemoryCard:Recreate", - L"Deletes the existing memory card and creates a new one. All existing card contents will be lost." - ) );*/ - Dialogs::CreateMemoryCardDialog::CreateMemoryCardDialog( wxWindow* parent, uint slot, const wxDirName& mcdpath, const wxString& mcdfile ) - : wxDialogWithHelpers( parent, _("Create new MemoryCard"), wxVERTICAL ) + : wxDialogWithHelpers( parent, _("Create new memory card"), wxVERTICAL ) , m_mcdpath( mcdpath.IsOk() ? mcdpath : (wxDirName)g_Conf->Mcd[slot].Filename.GetPath() ) , m_mcdfile( mcdfile.IsEmpty() ? g_Conf->Mcd[slot].Filename.GetFullName() : mcdfile ) { @@ -67,7 +63,7 @@ Dialogs::CreateMemoryCardDialog::CreateMemoryCardDialog( wxWindow* parent, uint wxBoxSizer& s_padding( *new wxBoxSizer(wxVERTICAL) ); - //s_padding += Heading(_("Select the size for your new MemoryCard.")); + //s_padding += Heading(_("Select the size for your new memory card.")); if( m_filepicker ) s_padding += m_filepicker | StdExpand(); @@ -107,7 +103,7 @@ static bool CreateIt( const wxString& mcdFile, uint sizeInMB ) u8 m_effeffs[528*16]; memset8<0xff>( m_effeffs ); - Console.WriteLn( L"(FileMcd) Creating new %uMB MemoryCard: " + mcdFile, sizeInMB ); + Console.WriteLn( L"(FileMcd) Creating new %uMB memory card: " + mcdFile, sizeInMB ); wxFFile fp( mcdFile, L"wb" ); if( !fp.IsOpened() ) return false; @@ -130,8 +126,8 @@ void Dialogs::CreateMemoryCardDialog::OnOk_Click( wxCommandEvent& evt ) ) ) { Msgbox::Alert( - _("Error: The MemoryCard could not be created."), - _("MemoryCard creation error") + _("Error: The memory card could not be created."), + _("memory card creation error") ); return; } @@ -150,19 +146,19 @@ void Dialogs::CreateMemoryCardDialog::CreateControls() const RadioPanelItem tbl_CardSizes[] = { RadioPanelItem(_("8 MB [most compatible]"), _("This is the standard Sony-provisioned size, and is supported by all games and BIOS versions.")) - . SetToolTip(_("Always use this option if you want the safest and surest MemoryCard behavior.")) + . SetToolTip(_("Always use this option if you want the safest and surest memory card behavior.")) . SetInt(8), - RadioPanelItem(_("16 MB"), _("A typical size for 3rd-party MemoryCards which should work with most games.")) + RadioPanelItem(_("16 MB"), _("A typical size for 3rd-party memory cards which should work with most games.")) . SetToolTip(_("16 and 32 MB cards have roughly the same compatibility factor.")) . SetInt(16), - RadioPanelItem(_("32 MB"), _("A typical size for 3rd-party MemoryCards which should work with most games.")) + RadioPanelItem(_("32 MB"), _("A typical size for 3rd-party memory cards which should work with most games.")) . SetToolTip(_("16 and 32 MB cards have roughly the same compatibility factor.")) . SetInt(32), RadioPanelItem(_("64 MB"), _("Low compatibility warning: Yes it's very big, but may not work with many games.")) - . SetToolTip(_("Use at your own risk. Erratic memorycard behavior is possible (though unlikely).")) + . SetToolTip(_("Use at your own risk. Erratic memory card behavior is possible (though unlikely).")) . SetInt(64) }; diff --git a/pcsx2/gui/Dialogs/FirstTimeWizard.cpp b/pcsx2/gui/Dialogs/FirstTimeWizard.cpp index 0f4814714c..7f13dfa987 100644 --- a/pcsx2/gui/Dialogs/FirstTimeWizard.cpp +++ b/pcsx2/gui/Dialogs/FirstTimeWizard.cpp @@ -45,7 +45,7 @@ bool ApplicableWizardPage::PrepForApply() Panels::SettingsDirPickerPanel::SettingsDirPickerPanel( wxWindow* parent ) : DirPickerPanel( parent, FolderId_Settings, _("Settings"), _("Select a folder for PCSX2 settings") ) { - pxSetToolTip( this, pxE( ".Tooltips:Folders:Settings", + pxSetToolTip( this, pxE_Tooltip( "Folders:Settings", L"This is the folder where PCSX2 saves your settings, including settings generated " L"by most plugins (some older plugins may not respect this value)." ) ); @@ -53,7 +53,7 @@ Panels::SettingsDirPickerPanel::SettingsDirPickerPanel( wxWindow* parent ) : // Insert this into the top of the staticboxsizer created by the constructor. GetSizer()->Insert( 0, new wxStaticText( this, wxID_ANY, - pxE( ".Dialogs:SettingsDirPicker", + pxE_Panel( "SettingsDirPicker", L"You may optionally specify a location for your PCSX2 settings here. If the location \n" L"contains existing PCSX2 settings, you will be given the option to import or overwrite them." ), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE @@ -111,7 +111,7 @@ bool FirstTimeWizard::UsermodePage::PrepForApply() // FIXME: There's already a file by the same name.. not sure what we should do here. throw Exception::BadStream( path.ToString(), L"Targeted documents folder is already occupied by a file.", - pxE( "Error:DocsFolderFileConflict", + pxE_Error( "DocsFolderFileConflict", L"PCSX2 cannot create a documents folder in the requested location. " L"The path name matches an existing file. Delete the file or change the documents location, " L"and then try again." @@ -155,7 +155,7 @@ FirstTimeWizard::FirstTimeWizard( wxWindow* parent ) // Temporary tutorial message for the BIOS, needs proof-reading!! m_page_bios += 12; m_page_bios += new pxStaticHeading( &m_page_bios, - pxE( ".Wizard:Bios:Tutorial", + pxE_Wizard( "Bios:Tutorial", L"PCSX2 requires a *legal* copy of the PS2 BIOS in order to run games.\n" L"You cannot use a copy obtained from a friend or the Internet.\n" L"You must dump the BIOS from your *own* Playstation 2 console." diff --git a/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp b/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp index 938960d4a1..cdc7b5c8bb 100644 --- a/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp +++ b/pcsx2/gui/Dialogs/ImportSettingsDialog.cpp @@ -25,7 +25,7 @@ Dialogs::ImportSettingsDialog::ImportSettingsDialog( wxWindow* parent ) { m_idealWidth = 440; - pxStaticText* heading = new pxStaticHeading( this, pxE( ".Popup:ImportExistingSettings", + pxStaticText* heading = new pxStaticHeading( this, pxE_Popup( "ImportExistingSettings", L"Existing PCSX2 settings have been found in the configured settings folder. " L"Would you like to import these settings or overwrite them with PCSX2 default values?" L"\n\n(or press Cancel to select a different settings folder)" ) diff --git a/pcsx2/gui/Dialogs/McdConfigDialog.cpp b/pcsx2/gui/Dialogs/McdConfigDialog.cpp index 400f2a1397..4ca0395bab 100644 --- a/pcsx2/gui/Dialogs/McdConfigDialog.cpp +++ b/pcsx2/gui/Dialogs/McdConfigDialog.cpp @@ -38,8 +38,8 @@ namespace Panels wxString GetMsg_McdNtfsCompress() { - return pxE( ".Dialog:Memorycards:NtfsCompress", - L"NTFS compression is built-in, fast, and completely reliable; and typically compresses MemoryCards " + return pxE_Panel( "Mcd:NtfsCompress", + L"NTFS compression is built-in, fast, and completely reliable; and typically compresses memory cards " L"very well (this option is highly recommended)." ); } @@ -50,9 +50,9 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent) m_idealWidth -= 48; m_check_Ejection = new pxCheckBox( this, - _("Auto-eject memorycards when loading savestates"), - pxE( ".Dialog:Memorycards:EnableEjection", - L"Avoids memorycard corruption by forcing games to re-index card contents after " + _("Auto-eject memory cards when loading savestates"), + pxE_Panel( "Mcd:EnableEjection", + L"Avoids memory card corruption by forcing games to re-index card contents after " L"loading from savestates. May not be compatible with all games (Guitar Hero)." ) ); @@ -168,12 +168,12 @@ Dialogs::McdConfigDialog::McdConfigDialog( wxWindow* parent ) m_panel_mcdlist = new MemoryCardListPanel_Simple( this ); // [TODO] : Plan here is to add an advanced tab which gives the user the ability - // to configure the names of each memorycard slot. + // to configure the names of each memory card slot. //AddPage ( wxLt("Settings"), cfgid.MemoryCard ); //AddPage ( wxLt("Slots 1/2"), cfgid.MemoryCard ); - *this += Heading(_("Drag items in the list over other items to swap or copy MemoryCards.")); + *this += Heading(_("Drag items in the list over other items to swap or copy memory cards.")); *this += StdPadding; *this += m_panel_mcdlist | StdExpand(); diff --git a/pcsx2/gui/Dialogs/StuckThreadDialog.cpp b/pcsx2/gui/Dialogs/StuckThreadDialog.cpp index ad2018f2b3..1e01545028 100644 --- a/pcsx2/gui/Dialogs/StuckThreadDialog.cpp +++ b/pcsx2/gui/Dialogs/StuckThreadDialog.cpp @@ -32,7 +32,7 @@ Dialogs::StuckThreadDialog::StuckThreadDialog( wxWindow* parent, StuckThreadActi stuck_thread.AddListener( this ); *this += Heading( wxsFormat( - pxE( ".Dialog:StuckThread:Heading", + pxE_Panel( "StuckThread:Heading", L"The thread '%s' is not responding. It could be deadlocked, or it might " L"just be running *really* slowly." ), diff --git a/pcsx2/gui/IsoDropTarget.cpp b/pcsx2/gui/IsoDropTarget.cpp index 6a921f9b14..2e3e6f4bf4 100644 --- a/pcsx2/gui/IsoDropTarget.cpp +++ b/pcsx2/gui/IsoDropTarget.cpp @@ -27,7 +27,7 @@ wxString GetMsg_ConfirmSysReset() { - return pxE( ".Popup:ConfirmSysReset", + return pxE_Popup( "ConfirmSysReset", L"This action will reset the existing PS2 virtual machine state; " L"all current progress will be lost. Are you sure?" ); diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index fb95a11219..fa3330b21f 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -418,7 +418,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title) // ------------------------------------------------------------------------ m_menuConfig.Append(MenuId_Config_SysSettings, _("Emulation &Settings") ); - m_menuConfig.Append(MenuId_Config_McdSettings, _("&MemoryCards") ); + m_menuConfig.Append(MenuId_Config_McdSettings, _("&Memory cards") ); m_menuConfig.Append(MenuId_Config_BIOS, _("&Plugin/BIOS Selector...") ); m_menuConfig.AppendSeparator(); diff --git a/pcsx2/gui/MainMenuClicks.cpp b/pcsx2/gui/MainMenuClicks.cpp index e8573ce8cd..363ac61b62 100644 --- a/pcsx2/gui/MainMenuClicks.cpp +++ b/pcsx2/gui/MainMenuClicks.cpp @@ -100,7 +100,7 @@ void MainEmuFrame::Menu_ResetAllSettings_Click(wxCommandEvent &event) { ScopedCoreThreadPopup suspender; if( !Msgbox::OkCancel( - pxE( ".Popup Warning:DeleteSettings", + pxE_Popup( "DeleteSettings", L"This command clears PCSX2 settings and allows you to re-run the First-Time Wizard. You will need to " L"manually restart PCSX2 after this operation.\n\n" L"WARNING!! Click OK to delete *ALL* settings for PCSX2 and force PCSX2 to shudown, losing any current emulation progress. Are you absolutely sure?" diff --git a/pcsx2/gui/MemoryCardFile.cpp b/pcsx2/gui/MemoryCardFile.cpp index dc082c8efd..e32ce49bcd 100644 --- a/pcsx2/gui/MemoryCardFile.cpp +++ b/pcsx2/gui/MemoryCardFile.cpp @@ -74,9 +74,9 @@ protected: wxString GetDisabledMessage( uint slot ) const { - return pxE( ".Popup:MemoryCard:HasBeenDisabled", wxsFormat( - L"The MemoryCard in slot %d has been automatically disabled. You can correct the problem\n" - L"and re-enable the MemoryCard at any time using Config:MemoryCards from the main menu.", + return pxE_Popup( "Mcd:HasBeenDisabled", wxsFormat( + L"The memory card in slot %d has been automatically disabled. You can correct the problem\n" + L"and re-enable the memory card at any time using Config:Memory cards from the main menu.", slot ) ); } @@ -173,13 +173,13 @@ void FileMemoryCard::Open() if( (fsz == 0) || (fsz == wxInvalidSize) ) { // FIXME : Ideally this should prompt the user for the size of the - // memorycard file they would like to create, instead of trying to + // memory card file they would like to create, instead of trying to // create one automatically. if( !Create( str, 8 ) ) { Msgbox::Alert( - wxsFormat(_( "Could not create a MemoryCard file: \n\n%s\n\n" ), str.c_str()) + + wxsFormat(_( "Could not create a memory card file: \n\n%s\n\n" ), str.c_str()) + GetDisabledMessage( slot ) ); } @@ -197,7 +197,7 @@ void FileMemoryCard::Open() // Translation note: detailed description should mention that the memory card will be disabled // for the duration of this session. Msgbox::Alert( - wxsFormat(_( "Access denied to MemoryCard file: \n\n%s\n\n" ), str.c_str()) + + wxsFormat(_( "Access denied to memory card file: \n\n%s\n\n" ), str.c_str()) + GetDisabledMessage( slot ) ); } @@ -238,7 +238,7 @@ bool FileMemoryCard::Create( const wxString& mcdFile, uint sizeInMB ) { //int enc[16] = {0x77,0x7f,0x7f,0x77,0x7f,0x7f,0x77,0x7f,0x7f,0x77,0x7f,0x7f,0,0,0,0}; - Console.WriteLn( L"(FileMcd) Creating new %uMB MemoryCard: " + mcdFile, sizeInMB ); + Console.WriteLn( L"(FileMcd) Creating new %uMB memory card: " + mcdFile, sizeInMB ); wxFFile fp( mcdFile, L"wb" ); if( !fp.IsOpened() ) return false; @@ -272,7 +272,7 @@ s32 FileMemoryCard::Read( uint slot, u8 *dest, u32 adr, int size ) wxFFile& mcfp( m_file[slot] ); if( !mcfp.IsOpened() ) { - DevCon.Error( "MemoryCard: Ignoring attempted read from disabled card." ); + DevCon.Error( "(FileMcd) Ignoring attempted read from disabled card." ); memset(dest, 0, size); return 1; } @@ -286,7 +286,7 @@ s32 FileMemoryCard::Save( uint slot, const u8 *src, u32 adr, int size ) if( !mcfp.IsOpened() ) { - DevCon.Error( "MemoryCard: Ignoring attempted save/write to disabled card." ); + DevCon.Error( "(FileMcd) Ignoring attempted save/write to disabled card." ); return 1; } @@ -297,7 +297,7 @@ s32 FileMemoryCard::Save( uint slot, const u8 *src, u32 adr, int size ) for (int i=0; iSetToolTip( pxE( ".Tooltips:Video:Vsync", + m_check_VsyncEnable->SetToolTip( pxE_Tooltip( "Window:Vsync", L"Vsync eliminates screen tearing but typically has a big performance hit. " L"It usually only applies to fullscreen mode, and may not work with all GS plugins." ) ); - m_check_HideMouse->SetToolTip( pxE( ".Tooltips:Video:HideMouse", + m_check_HideMouse->SetToolTip( pxE_Tooltip( "Window:HideMouse", L"Check this to force the mouse cursor invisible inside the GS window; useful if using " L"the mouse as a primary control device for gaming. By default the mouse auto-hides after " L"2 seconds of inactivity." ) ); - m_check_Fullscreen->SetToolTip( pxE( ".Tooltips:Video:Fullscreen", + m_check_Fullscreen->SetToolTip( pxE_Tooltip( "Window:Fullscreen", L"Enables automatic mode switch to fullscreen when starting or resuming emulation. " L"You can still toggle fullscreen display at any time using alt-enter." ) ); - m_check_ExclusiveFS->SetToolTip( pxE( ".Video:FullscreenExclusive", + m_check_ExclusiveFS->SetToolTip( pxE_Tooltip( "Window:FullscreenExclusive", L"Fullscreen Exclusive Mode may look better on older CRTs and might be a little faster on older video cards, " L"but typically can lead to memory leaks or random crashes when entering/leaving fullscreen mode." ) ); - m_check_CloseGS->SetToolTip( pxE( ".Tooltips:Video:HideGS", + m_check_CloseGS->SetToolTip( pxE_Tooltip( "Window:HideGS", L"Completely closes the often large and bulky GS window when pressing " L"ESC or suspending the emulator." ) ); diff --git a/pcsx2/gui/Panels/GameFixesPanel.cpp b/pcsx2/gui/Panels/GameFixesPanel.cpp index 578d6c6d0f..6077461109 100644 --- a/pcsx2/gui/Panels/GameFixesPanel.cpp +++ b/pcsx2/gui/Panels/GameFixesPanel.cpp @@ -66,7 +66,7 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) : }, { _("EE timing hack - Multi purpose hack. Try if all else fails."), - pxE( ".Tooltips:Gamefixes:EE Timing Hack", + pxE_Tooltip( "Gamefixes:EE Timing Hack", L"Known to affect following games:\n" L" * Digital Devil Saga (Fixes FMV and crashes)\n" L" * SSX (Fixes bad graphics and crashes)\n" @@ -93,7 +93,7 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) : *this += groupSizer | pxCenter; *this += m_check_Enable | StdExpand(); - *this += Heading( pxE( ".Panels:Gamefixes:Compat Warning", + *this += Heading( pxE_Panel( "Gamefixes:Compat Warning", L"Enabling game fixes can cause compatibility or performance issues in other games. You " L"will need to turn off fixes manually when changing games." )); diff --git a/pcsx2/gui/Panels/MemoryCardListPanel.cpp b/pcsx2/gui/Panels/MemoryCardListPanel.cpp index dbf7a82f19..32c60c1f1f 100644 --- a/pcsx2/gui/Panels/MemoryCardListPanel.cpp +++ b/pcsx2/gui/Panels/MemoryCardListPanel.cpp @@ -71,7 +71,7 @@ bool EnumerateMemoryCard( McdListItem& dest, const wxFileName& filename ) static int EnumerateMemoryCards( McdList& dest, const wxArrayString& files ) { int pushed = 0; - Console.WriteLn( Color_StrongBlue, "Enumerating MemoryCards..." ); + Console.WriteLn( Color_StrongBlue, "Enumerating memory cards..." ); for( size_t i=0; i 0 ) - Console.WriteLn( Color_StrongBlue, "MemoryCard Enumeration Complete." ); + Console.WriteLn( Color_StrongBlue, "Memory card Enumeration Complete." ); else - Console.WriteLn( Color_StrongBlue, "No valid MemoryCards found." ); + Console.WriteLn( Color_StrongBlue, "No valid memory card found." ); return pushed; } @@ -139,8 +139,8 @@ Panels::BaseMcdListPanel::BaseMcdListPanel( wxWindow* parent ) : _parent( parent ) { m_FolderPicker = new DirPickerPanel( this, FolderId_MemoryCards, - //_("MemoryCard Search Path:"), // static box label - _("Select folder with PS2 MemoryCards") // dir picker popup label + //_("memory card Search Path:"), // static box label + _("Select folder with PS2 memory cards") // dir picker popup label ); m_listview = NULL; @@ -208,7 +208,7 @@ public: uint GetSlot() const { - pxAssumeDev( m_slot >= 0, "Memorycard Index is uninitialized (invalid drag&drop object state)" ); + pxAssumeDev( m_slot >= 0, "memory card Index is uninitialized (invalid drag&drop object state)" ); return (uint)m_slot; } @@ -225,7 +225,7 @@ public: virtual bool SetData(size_t len, const void *buf) { - if( !pxAssertDev( len == sizeof(u32), "Data length mismatch on memorycard drag&drop operation." ) ) return false; + if( !pxAssertDev( len == sizeof(u32), "Data length mismatch on memory card drag&drop operation." ) ) return false; m_slot = *(u32*)buf; return ( (uint)m_slot < 8 ); // sanity check (unsigned, so that -1 also is invalid) :) @@ -340,8 +340,8 @@ public: if( dest.IsPresent && dest.IsFormatted ) { - wxsFormat( pxE( ".Popup:Mcd:Overwrite", - L"This will copy the contents of the MemoryCard in slot %u over the Memorycard in slot %u. " + wxsFormat( pxE_Popup( "Mcd:Overwrite", + L"This will copy the contents of the memory card in slot %u over the memory card in slot %u. " L"All data on the target slot will be lost. Are you sure?" ), src.Slot, dest.Slot ); @@ -354,8 +354,8 @@ public: if( !wxCopyFile( srcfile.GetFullPath(), destfile.GetFullPath(), true ) ) { wxString heading; - heading.Printf( pxE( ".Error:Mcd:Copy Failed", - L"Error! Could not copy the MemoryCard into slot %u. The destination file is in use." ), + heading.Printf( pxE_Error( "Mcd:Copy Failed", + L"Error! Could not copy the memory card into slot %u. The destination file is in use." ), dest.Slot ); @@ -397,7 +397,7 @@ public: { // TODO : Popup an error to the user. - Console.Error( "(McdFile) Memorycard swap failed." ); + Console.Error( "(FileMcd) memory card swap failed." ); Console.Indent().WriteLn( L"Src : " + srcfile.GetFullPath() ); Console.Indent().WriteLn( L"Dest: " + destfile.GetFullPath() ); } @@ -475,16 +475,16 @@ void Panels::MemoryCardListPanel_Simple::UpdateUI() m_button_Create->SetLabel( item.IsPresent ? _("Delete") : _("Create") ); pxSetToolTip( m_button_Create, item.IsPresent - ? _("Deletes the existing MemoryCard from disk (all contents are lost)." ) - : _("Creates a new MemoryCard in the empty slot." ) + ? _("Deletes the existing memory card from disk (all contents are lost)." ) + : _("Creates a new memory card in the empty slot." ) ); m_button_Mount->Enable( item.IsPresent ); m_button_Mount->SetLabel( item.IsEnabled ? _("Disable") : _("Enable") ); pxSetToolTip( m_button_Mount, item.IsEnabled - ? _("Disables the selected MemoryCard, so that it will not be seen by games or BIOS.") - : _("Mounts the selected MemoryCard, so that games can see it again.") + ? _("Disables the selected memory card, so that it will not be seen by games or BIOS.") + : _("Mounts the selected memory card, so that games can see it again.") ); } @@ -558,13 +558,13 @@ void Panels::MemoryCardListPanel_Simple::OnCreateCard(wxCommandEvent& evt) { wxString content; content.Printf(wxsFormat( - pxE(".Popup:DeleteMemoryCard", + pxE_Popup("Mcd:Delete", L"You are about to delete the formatted memory card in slot %u. " L"All data on this card will be lost! Are you absolutely and quite positively sure?" ), slot ) ); - result = Msgbox::YesNo( content, _("Delete MemoryCard?") ); + result = Msgbox::YesNo( content, _("Delete memory card?") ); } if( result == wxID_YES ) diff --git a/pcsx2/gui/Panels/MemoryCardsPanel.cpp b/pcsx2/gui/Panels/MemoryCardsPanel.cpp index 20872e49a7..ecb2fc8d21 100644 --- a/pcsx2/gui/Panels/MemoryCardsPanel.cpp +++ b/pcsx2/gui/Panels/MemoryCardsPanel.cpp @@ -94,10 +94,10 @@ void MemoryCardInfoPanel::Apply() Eject(); throw Exception::CannotApplySettings( this, // Diagnostic - wxsFormat( L"Memorycard in slot %u conflicts with an existing directory.", m_slot ), + wxsFormat( L"Memory card in slot %u conflicts with an existing directory.", m_slot ), // Translated wxsFormat( - _("Cannot use or create the memorycard in slot %u: the filename conflicts with an existing directory."), + _("Cannot use or create the memory card in slot %u: the filename conflicts with an existing directory."), m_slot ) ); @@ -108,10 +108,10 @@ void MemoryCardInfoPanel::Apply() Eject(); throw Exception::CannotApplySettings( this, // Diagnostic - wxsFormat( L"Memorycard in slot %u is no longer valid.", m_slot ), + wxsFormat( L"Memory card in slot %u is no longer valid.", m_slot ), // Translated wxsFormat( - _("The configured memorycard in slot %u no longer exists. Please create a new memory card, or leave the slot unmounted."), + _("The configured memory card in slot %u no longer exists. Please create a new memory card, or leave the slot unmounted."), m_slot ) ); diff --git a/pcsx2/gui/Panels/MiscPanelStuff.cpp b/pcsx2/gui/Panels/MiscPanelStuff.cpp index d2f8b78c96..9ece78f26a 100644 --- a/pcsx2/gui/Panels/MiscPanelStuff.cpp +++ b/pcsx2/gui/Panels/MiscPanelStuff.cpp @@ -32,13 +32,13 @@ using namespace pxSizerFlags; Panels::DocsFolderPickerPanel::DocsFolderPickerPanel( wxWindow* parent, bool isFirstTime ) : BaseApplicableConfigPanel( parent, wxVERTICAL, _("Usermode Selection") ) { - const wxString usermodeExplained( pxE( ".Panels:Usermode:Explained", + const wxString usermodeExplained( pxE_Panel( "Usermode:Explained", L"Please select your preferred default location for PCSX2 user-level documents below " L"(includes memory cards, screenshots, settings, and savestates). " L"These folder locations can be overridden at any time using the Core Settings panel." ) ); - const wxString usermodeWarning( pxE( ".Panels:Usermode:Warning", + const wxString usermodeWarning( pxE_Panel( "Usermode:Warning", L"You can change the preferred default location for PCSX2 user-level documents here " L"(includes memory cards, screenshots, settings, and savestates). " L"This option only affects Standard Paths which are set to use the installation default value." diff --git a/pcsx2/gui/Panels/PathsPanel.cpp b/pcsx2/gui/Panels/PathsPanel.cpp index fe4d54670f..cdf217e11e 100644 --- a/pcsx2/gui/Panels/PathsPanel.cpp +++ b/pcsx2/gui/Panels/PathsPanel.cpp @@ -36,7 +36,7 @@ Panels::StandardPathsPanel::StandardPathsPanel( wxWindow* parent ) : *this += (new DirPickerPanel( this, FolderId_Savestates, _("Savestates:"), _("Select folder for Savestates") ))-> - SetToolTip( pxE( ".Tooltips:Folders:Savestates", + SetToolTip( pxE_Tooltip( "Folders:Savestates", L"This folder is where PCSX2 records savestates; which are recorded either by using " L"menus/toolbars, or by pressing F1/F3 (load/save)." ) @@ -46,7 +46,7 @@ Panels::StandardPathsPanel::StandardPathsPanel( wxWindow* parent ) : *this += (new DirPickerPanel( this, FolderId_Snapshots, _("Snapshots:"), _("Select a folder for Snapshots") ))-> - SetToolTip( pxE( ".Tooltips:Folders:Snapshots", + SetToolTip( pxE_Tooltip( "Folders:Snapshots", L"This folder is where PCSX2 saves screenshots. Actual screenshot image format and style " L"may vary depending on the GS plugin being used." ) @@ -56,7 +56,7 @@ Panels::StandardPathsPanel::StandardPathsPanel( wxWindow* parent ) : *this += (new DirPickerPanel( this, FolderId_Logs, _("Logs/Dumps:" ), _("Select a folder for logs/dumps") ))-> - SetToolTip( pxE( ".Tooltips:Folders:Logs", + SetToolTip( pxE_Tooltip( "Folders:Logs", L"This folder is where PCSX2 saves its logfiles and diagnostic dumps. Most plugins will " L"also adhere to this folder, however some older plugins may ignore it." ) diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index db72b0f672..f2c90bb296 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -230,7 +230,7 @@ void ApplyOverValidStateEvent::InvokeEvent() { wxDialogWithHelpers dialog( m_owner, _("Shutdown PS2 virtual machine?"), wxVERTICAL ); - dialog += dialog.Heading( pxE( ".Popup:PluginSelector:ConfirmShutdown", + dialog += dialog.Heading( pxE_Popup( "PluginSelector:ConfirmShutdown", L"Warning! Changing plugins requires a complete shutdown and reset of the PS2 virtual machine. " L"PCSX2 will attempt to save and restore the state, but if the newly selected plugins are " L"incompatible the recovery may fail, and current progress will be lost." @@ -446,7 +446,7 @@ void Panels::PluginSelectorPanel::AppStatusEvent_OnSettingsApplied() static wxString GetApplyFailedMsg() { - return pxE( ".Popup Error:PluginSelector:ApplyFailed", + return pxE_Error( "PluginSelector:ApplyFailed", L"All plugins must have valid selections for PCSX2 to run. If you are unable to make\n" L"a valid selection due to missing plugins or an incomplete install of PCSX2, then\n" L"press cancel to close the Configuration panel." diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index e2f8f29456..b87994d5ee 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -32,17 +32,17 @@ const wxChar* Panels::SpeedHacksPanel::GetEEcycleSliderMsg( int val ) switch( val ) { case 1: - return pxE( ".Panels:Speedhacks:EECycleX1", + return pxE_Panel( "Speedhacks:EECycleX1", L"1 - Default cyclerate. This closely matches the actual speed of a real PS2 EmotionEngine." ); case 2: - return pxE( ".Panels:Speedhacks:EECycleX2", + return pxE_Panel( "Speedhacks:EECycleX2", L"2 - Reduces the EE's cyclerate by about 33%. Mild speedup for most games with high compatibility." ); case 3: - return pxE( ".Panels:Speedhacks:EECycleX3", + return pxE_Panel( "Speedhacks:EECycleX3", L"3 - Reduces the EE's cyclerate by about 50%. Moderate speedup, but *will* cause stuttering " L"audio on many FMVs." ); @@ -59,23 +59,23 @@ const wxChar* Panels::SpeedHacksPanel::GetVUcycleSliderMsg( int val ) switch( val ) { case 0: - return pxE( ".Panels:Speedhacks:VUCycleStealOff", + return pxE_Panel( "Speedhacks:VUCycleStealOff", L"0 - Disables VU Cycle Stealing. Most compatible setting!" ); case 1: - return pxE( ".Panels:Speedhacks:VUCycleSteal1", + return pxE_Panel( "Speedhacks:VUCycleSteal1", L"1 - Mild VU Cycle Stealing. Lower compatibility, but some speedup for most games." ); case 2: - return pxE( ".Panels:Speedhacks:VUCycleSteal2", + return pxE_Panel( "Speedhacks:VUCycleSteal2", L"2 - Moderate VU Cycle Stealing. Even lower compatibility, but significant speedups in some games." ); case 3: // TODO: Mention specific games that benefit from this setting here. - return pxE( ".Panels:Speedhacks:VUCycleSteal3", + return pxE_Panel( "Speedhacks:VUCycleSteal3", L"3 - Maximum VU Cycle Stealing. Usefulness is limited, as this will cause flickering " L"visuals or slowdown in most games." ); @@ -101,7 +101,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) { const wxSizerFlags sliderFlags( wxSizerFlags().Border( wxLEFT | wxRIGHT, 8 ).Expand() ); - pxStaticText* heading = new pxStaticHeading( this, pxE( ".Panels:Speedhacks:Overview", + pxStaticText* heading = new pxStaticHeading( this, pxE_Panel( "Speedhacks:Overview", L"These hacks will usually improve the speed of PCSX2 emulation, but compromise compatibility. " L"If you have issues, always try disabling these hacks first." ) ); @@ -134,7 +134,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) m_msg_eecycle->SetForegroundColour( wxColour( L"Red" ) ); m_msg_eecycle->SetMinSize( wxSize( wxDefaultCoord, pxGetTextHeight(m_msg_eecycle, 3) ) ); - const wxChar* ee_tooltip = pxE( ".Tooltips:Speedhacks:EECycleRate Slider", + const wxChar* ee_tooltip = pxE_Tooltip( "Speedhacks:EECycleRate Slider", L"Setting higher values on this slider effectively reduces the clock speed of the EmotionEngine's " L"R5900 core cpu, and typically brings big speedups to games that fail to utilize " L"the full potential of the real PS2 hardware." @@ -155,7 +155,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) m_msg_vustealer->SetForegroundColour( wxColour( L"Red" ) ); m_msg_vustealer->SetMinSize( wxSize( wxDefaultCoord, pxGetTextHeight(m_msg_vustealer, 3) ) ); - const wxChar* vu_tooltip = pxE( ".Tooltips:Speedhacks:VUCycleStealing Slider", + const wxChar* vu_tooltip = pxE_Tooltip( "Speedhacks:VUCycleStealing Slider", L"This slider controls the amount of cycles the VU unit steals from the EmotionEngine. Higher values increase the number of " L"cycles stolen from the EE for each VU microprogram the game runs." ); @@ -174,12 +174,12 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) m_check_vuMinMax = new pxCheckBox( vuHacksPanel, _("mVU Min/Max Hack"), _("Small Speedup; may cause black screens, garbage graphics, SPS, etc... [Not Recommended]") ); - m_check_vuFlagHack->SetToolTip( pxE( ".Tooltips:Speedhacks:vuFlagHack", + m_check_vuFlagHack->SetToolTip( pxE_Tooltip( "Speedhacks:vuFlagHack", L"Updates Status Flags only on blocks which will read them, instead of all the time. " L"This is safe most of the time, and Super VU does something similar by default." ) ); - m_check_vuMinMax->SetToolTip( pxE( ".Tooltips:Speedhacks:vuMinMax", + m_check_vuMinMax->SetToolTip( pxE_Tooltip( "Speedhacks:vuMinMax", L"Uses SSE's Min/Max Floating Point Operations instead of custom logical Min/Max routines. " L"Known to break Gran Turismo 4, Tekken 5." ) ); @@ -199,19 +199,19 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) _("Small Speedup. Works well with some games but may cause issues in others. [Not Recommended]") ); - m_check_intc->SetToolTip( pxE( ".Tooltips:Speedhacks:INTC", + m_check_intc->SetToolTip( pxE_Tooltip( "Speedhacks:INTC", L"This hack works best for games that use the INTC Status register to wait for vsyncs, which includes primarily non-3D " L"RPG titles. Games that do not use this method of vsync will see little or no speedup from this hack." ) ); - m_check_waitloop->SetToolTip( pxE( ".Tooltips:Speedhacks:BIFC0", + m_check_waitloop->SetToolTip( pxE_Tooltip( "Speedhacks:BIFC0", L"Primarily targetting the EE idle loop at address 0x81FC0 in the kernel, this hack attempts to " L"detect loops whose bodies are guaranteed to result in the same machine state for every iteration " L"until a scheduled event triggers emulation of another unit. After a single iteration of such loops, " L"we advance to the time of the next event or the end of the processor's timeslice, whichever comes first." ) ); - m_check_IOPx2->SetToolTip( pxE( ".Tooltips:Speedhacks:IOPx2", + m_check_IOPx2->SetToolTip( pxE_Tooltip( "Speedhacks:IOPx2", L"Halves the cycle rate of the IOP, giving it an effective emulated speed of roughly 18 MHz. " L"The speedup is very minor, so this hack is generally not recommended." ) ); diff --git a/pcsx2/gui/Panels/VideoPanel.cpp b/pcsx2/gui/Panels/VideoPanel.cpp index 7778e3ce28..90cc6e9e8b 100644 --- a/pcsx2/gui/Panels/VideoPanel.cpp +++ b/pcsx2/gui/Panels/VideoPanel.cpp @@ -32,7 +32,7 @@ Panels::FramelimiterPanel::FramelimiterPanel( wxWindow* parent ) m_check_LimiterDisable = new pxCheckBox( this, _("Disable Framelimiting"), _("Useful for running benchmarks. Toggle this option in-game by pressing F4.") ); - m_check_LimiterDisable->SetToolTip( pxE( ".Tooltip:Framelimiter:Disable", + m_check_LimiterDisable->SetToolTip( pxE_Tooltip( "Framelimiter:Disable", L"Note that when Framelimiting is disabled, Turbo and SlowMotion modes will not " L"be available either." ) ); @@ -100,7 +100,7 @@ Panels::FramelimiterPanel::FramelimiterPanel( wxWindow* parent ) *this += 5; - *this += Heading( pxE( ".Framelimiter:Heading", + *this += Heading( pxE_Panel( "Framelimiter:Heading", L"The internal framelimiter regulates the speed of the virtual machine. Adjustment values below are in " L"percentages of the default region-based framerate, which can also be configured below." ) ); @@ -166,7 +166,7 @@ Panels::FrameSkipPanel::FrameSkipPanel( wxWindow* parent ) L"" ) ); - m_check_EnableSkipOnTurbo->SetToolTip( pxE( ".Tooltip:Framelimiter:UseForTurbo", + m_check_EnableSkipOnTurbo->SetToolTip( pxE_Tooltip( "Frameskip:UseForTurbo", L"Recommended option! Since frameskipping glitches typically aren't as annoying when you're " L" just trying to speed through stuff." ) );*/ @@ -221,7 +221,7 @@ Panels::FrameSkipPanel::FrameSkipPanel( wxWindow* parent ) *this += s_spins | StdExpand(); - *this += Heading( pxE( ".FrameSkip:Heading", + *this += Heading( pxE_Panel( "Frameskip:Heading", L"Notice: Due to PS2 hardware design, precise frame skipping is impossible. " L"Enabling it will cause severe graphical errors in some games, and so it should be considered a speedhack." ) ); @@ -292,8 +292,11 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : _("Completely disables all GS plugin activity; ideal for benchmarking EEcore components.") ); - m_check_SynchronousGS->SetToolTip(_("Enable this if you think MTGS thread sync is causing crashes or graphical errors.")); - m_check_DisableOutput->SetToolTip( pxE( ".Tooltip:Video:DisableOutput", + m_check_SynchronousGS->SetToolTip( pxE_Tooltip( "GS:SyncMTGS", + L"Enable this if you think MTGS thread sync is causing crashes or graphical errors.") + ) ; + + m_check_DisableOutput->SetToolTip( pxE_Tooltip( "GS:DisableOutput", L"Removes any benchmark noise caused by the MTGS thread or GPU overhead. This option is best used in conjunction with savestates: " L"save a state at an ideal scene, enable this option, and re-load the savestate.\n\n" L"Warning: This option can be enabled on-the-fly but typically cannot be disabled on-the-fly (video will typically be garbage)." diff --git a/pcsx2/gui/i18n.h b/pcsx2/gui/i18n.h index 0be5654196..63f416faab 100644 --- a/pcsx2/gui/i18n.h +++ b/pcsx2/gui/i18n.h @@ -45,5 +45,25 @@ extern const wxChar* __fastcall pxGetTranslation( const wxChar* message ); // source code identifiers, and then reference the source code to see what the current // english version is. // -#define pxE(key,english) pxExpandMsg( wxT(key), english ) +//#define pxE(key, english) pxExpandMsg( wxT(key), english ) +// Key-based translation of a panel or dialog text; usually either a header or checkbox description, +// by may also include some controls with long labels. +#define pxE_Panel(key, english) pxExpandMsg( wxT(".Panel:") wxT(key), english ) + +// Key-based translation of a popup dialog box; either a notice or confirmation. Popup erros should +// use pxE_Error instead. +#define pxE_Popup(key, english) pxExpandMsg( wxT(".Popup:") wxT(key), english ) + +// Key-based translation of a popup error. +#define pxE_Error(key, english) pxExpandMsg( wxT(".Error:") wxT(key), english ) + +// Key-based translation of a heading, checkbox item, description, or other text associated with +// the First-time wizard. Translation of these items is considered lower-priority to most other +// messages; but equal or higher priority to tooltips. +#define pxE_Wizard(key, english) pxExpandMsg( wxT(".Wizard:") wxT(key), english ) + +// Key-based translation of a tooltip for a control on a dialog/panel. Tanslation of these items +// is typically considered "lowest priority" as they usually provide the most tertiary of info +// to the user. +#define pxE_Tooltip(key, english) pxExpandMsg( wxT(".Error:") wxT(key), english )