GTK: Mark more strings as translatable

This commit is contained in:
bgk 2011-02-24 08:19:59 +00:00
parent 924f9f6492
commit a59c64a292
7 changed files with 59 additions and 57 deletions

View File

@ -45,17 +45,17 @@ CheatEditDialog::CheatEditDialog(GtkDialog* _pstDialog, const Glib::RefPtr<Gtk::
Gtk::TreeModel::Row row = *(m_poCheatTypeStore->append()); Gtk::TreeModel::Row row = *(m_poCheatTypeStore->append());
row[m_oTypeModel.iType] = CheatGeneric; row[m_oTypeModel.iType] = CheatGeneric;
row[m_oTypeModel.uText] = "Generic Code"; row[m_oTypeModel.uText] = _("Generic Code");
row = *(m_poCheatTypeStore->append()); row = *(m_poCheatTypeStore->append());
row[m_oTypeModel.iType] = CheatGSA; row[m_oTypeModel.iType] = CheatGSA;
row[m_oTypeModel.uText] = "Gameshark Advance"; row[m_oTypeModel.uText] = _("Gameshark Advance");
row = *(m_poCheatTypeStore->append()); row = *(m_poCheatTypeStore->append());
row[m_oTypeModel.iType] = CheatCBA; row[m_oTypeModel.iType] = CheatCBA;
row[m_oTypeModel.uText] = "CodeBreaker Advance"; row[m_oTypeModel.uText] = _("CodeBreaker Advance");
m_poCheatTypeComboBox->set_active(CheatGeneric); m_poCheatTypeComboBox->set_active(CheatGeneric);

View File

@ -27,15 +27,15 @@ namespace VBA
const DirectoriesConfigDialog::SDirEntry DirectoriesConfigDialog::m_astDirs[] = const DirectoriesConfigDialog::SDirEntry DirectoriesConfigDialog::m_astDirs[] =
{ {
{ "gba_roms", "GBA roms :", "GBARomsDirEntry" }, { "gba_roms", _("GBA roms :"), "GBARomsDirEntry" },
{ "gb_roms", "GB roms :", "GBRomsDirEntry" }, { "gb_roms", _("GB roms :"), "GBRomsDirEntry" },
{ "batteries", "Batteries :", "BatteriesDirEntry" }, { "batteries", _("Batteries :"), "BatteriesDirEntry" },
{ "saves", "Saves :", "SavesDirEntry" }, { "saves", _("Saves :"), "SavesDirEntry" },
{ "captures", "Captures :", "CapturesDirEntry" } { "captures", _("Captures :"), "CapturesDirEntry" }
}; };
DirectoriesConfigDialog::DirectoriesConfigDialog(Config::Section * _poConfig) : DirectoriesConfigDialog::DirectoriesConfigDialog(Config::Section * _poConfig) :
Gtk::Dialog("Directories config", true, true), Gtk::Dialog(_("Directories config"), true, true),
m_poConfig(_poConfig) m_poConfig(_poConfig)
{ {
Gtk::Table * poTable = Gtk::manage( new Gtk::Table(G_N_ELEMENTS(m_astDirs), 2, false)); Gtk::Table * poTable = Gtk::manage( new Gtk::Table(G_N_ELEMENTS(m_astDirs), 2, false));

View File

@ -17,6 +17,7 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "filters.h" #include "filters.h"
#include "intl.h"
void _2xSaI (u8 *, u32, u8 *, u8 *, u32, int, int); void _2xSaI (u8 *, u32, u8 *, u8 *, u32, int, int);
void _2xSaI32 (u8 *, u32, u8 *, u8 *, u32, int, int); void _2xSaI32 (u8 *, u32, u8 *, u8 *, u32, int, int);
@ -56,18 +57,18 @@ struct {
} }
static const astFilters[] = static const astFilters[] =
{ {
{ "None", 1, { 0, 0 } }, { _("None"), 1, { 0, 0 } },
{ "2xSaI", 2, { _2xSaI, _2xSaI32 } }, { _("2xSaI"), 2, { _2xSaI, _2xSaI32 } },
{ "Super 2xSaI", 2, { Super2xSaI, Super2xSaI32 } }, { _("Super 2xSaI"), 2, { Super2xSaI, Super2xSaI32 } },
{ "Super Eagle", 2, { SuperEagle, SuperEagle32 } }, { _("Super Eagle"), 2, { SuperEagle, SuperEagle32 } },
{ "Pixelate", 2, { Pixelate, Pixelate32 } }, { _("Pixelate"), 2, { Pixelate, Pixelate32 } },
{ "AdvanceMAME Scale2x", 2, { AdMame2x, AdMame2x32 } }, { _("AdvanceMAME Scale2x"), 2, { AdMame2x, AdMame2x32 } },
{ "Bilinear", 2, { Bilinear, Bilinear32 } }, { _("Bilinear"), 2, { Bilinear, Bilinear32 } },
{ "Bilinear Plus", 2, { BilinearPlus, BilinearPlus32 } }, { _("Bilinear Plus"), 2, { BilinearPlus, BilinearPlus32 } },
{ "Scanlines", 2, { Scanlines, Scanlines32 } }, { _("Scanlines"), 2, { Scanlines, Scanlines32 } },
{ "TV Mode", 2, { ScanlinesTV, ScanlinesTV32 } }, { _("TV Mode"), 2, { ScanlinesTV, ScanlinesTV32 } },
{ "hq2x", 2, { hq2x, hq2x32 } }, { _("hq2x"), 2, { hq2x, hq2x32 } },
{ "lq2x", 2, { lq2x, lq2x32 } } { _("lq2x"), 2, { lq2x, lq2x32 } }
}; };
struct { struct {
@ -76,9 +77,9 @@ struct {
} }
static const astFiltersIB[] = static const astFiltersIB[] =
{ {
{ "None", { 0, 0 } }, { _("None"), { 0, 0 } },
{ "Smart interframe blending", { SmartIB, SmartIB32 } }, { _("Smart interframe blending"), { SmartIB, SmartIB32 } },
{ "Interframe motion blur", { MotionBlurIB, MotionBlurIB32 } } { _("Interframe motion blur"), { MotionBlurIB, MotionBlurIB32 } }
}; };
Filter pvGetFilter(EFilter _eFilter, EFilterDepth _eDepth) Filter pvGetFilter(EFilter _eFilter, EFilterDepth _eDepth)

View File

@ -27,27 +27,27 @@ namespace VBA
const JoypadConfigDialog::SJoypadKey JoypadConfigDialog::m_astKeys[] = const JoypadConfigDialog::SJoypadKey JoypadConfigDialog::m_astKeys[] =
{ {
{ KEY_UP, "Up :" }, { KEY_UP, _("Up :") },
{ KEY_DOWN, "Down :" }, { KEY_DOWN, _("Down :") },
{ KEY_LEFT, "Left :" }, { KEY_LEFT, _("Left :") },
{ KEY_RIGHT, "Right :" }, { KEY_RIGHT, _("Right :") },
{ KEY_BUTTON_A, "Button A :" }, { KEY_BUTTON_A, _("Button A :") },
{ KEY_BUTTON_B, "Button B :" }, { KEY_BUTTON_B, _("Button B :") },
{ KEY_BUTTON_L, "Button L :" }, { KEY_BUTTON_L, _("Button L :") },
{ KEY_BUTTON_R, "Button R :" }, { KEY_BUTTON_R, _("Button R :") },
{ KEY_BUTTON_SELECT, "Select :" }, { KEY_BUTTON_SELECT, _("Select :") },
{ KEY_BUTTON_START, "Start :" }, { KEY_BUTTON_START, _("Start :") },
{ KEY_BUTTON_SPEED, "Speed :" }, { KEY_BUTTON_SPEED, _("Speed :") },
{ KEY_BUTTON_CAPTURE, "Capture :" }, { KEY_BUTTON_CAPTURE, _("Capture :") },
{ KEY_BUTTON_AUTO_A, "Autofire A :" }, { KEY_BUTTON_AUTO_A, _("Autofire A :") },
{ KEY_BUTTON_AUTO_B, "Autofire B :" } { KEY_BUTTON_AUTO_B, _("Autofire B :") }
}; };
JoypadConfigDialog::JoypadConfigDialog(Config::Section * _poConfig) : JoypadConfigDialog::JoypadConfigDialog(Config::Section * _poConfig) :
Gtk::Dialog("Joypad config", true, true), Gtk::Dialog(_("Joypad config"), true, true),
m_oTitleHBox(false, 5), m_oTitleHBox(false, 5),
m_oTitleLabel("Joypad :", Gtk::ALIGN_RIGHT), m_oTitleLabel(_("Joypad :"), Gtk::ALIGN_RIGHT),
m_oDefaultJoypad("Default joypad"), m_oDefaultJoypad(_("Default joypad")),
m_oTable(G_N_ELEMENTS(m_astKeys), 2, false), m_oTable(G_N_ELEMENTS(m_astKeys), 2, false),
m_bUpdating(false), m_bUpdating(false),
m_ePad(PAD_MAIN), m_ePad(PAD_MAIN),
@ -126,20 +126,20 @@ void JoypadConfigDialog::vUpdateEntries()
{ {
int what = uiKeyval & 0xffff; int what = uiKeyval & 0xffff;
std::stringstream os; std::stringstream os;
os << "Joy " << dev; os << _("Joy ") << dev;
if(what >= 128) if(what >= 128)
{ {
// joystick button // joystick button
int button = what - 128; int button = what - 128;
os << " Button " << button; os << _(" Button ") << button;
} }
else if (what < 0x20) else if (what < 0x20)
{ {
// joystick axis // joystick axis
int dir = what & 1; int dir = what & 1;
what >>= 1; what >>= 1;
os << " Axis " << what << (dir?'-':'+'); os << _(" Axis ") << what << (dir?'-':'+');
} }
else if (what < 0x30) else if (what < 0x30)
{ {
@ -147,13 +147,13 @@ void JoypadConfigDialog::vUpdateEntries()
int dir = (what & 3); int dir = (what & 3);
what = (what & 15); what = (what & 15);
what >>= 2; what >>= 2;
os << " Hat " << what << " "; os << _(" Hat ") << what << " ";
switch (dir) switch (dir)
{ {
case 0: os << "Up"; break; case 0: os << _("Up"); break;
case 1: os << "Down"; break; case 1: os << _("Down"); break;
case 2: os << "Right"; break; case 2: os << _("Right"); break;
case 3: os << "Left"; break; case 3: os << _("Left"); break;
} }
} }

View File

@ -17,6 +17,7 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "screenarea-opengl.h" #include "screenarea-opengl.h"
#include "intl.h"
#include <cstring> #include <cstring>
@ -37,7 +38,7 @@ ScreenAreaGl::ScreenAreaGl(int _iWidth, int _iHeight, int _iScale) :
Gdk::GL::MODE_DOUBLE); Gdk::GL::MODE_DOUBLE);
if (!glconfig) if (!glconfig)
{ {
fprintf(stderr, "*** OpenGL : Cannot open display.\n"); fprintf(stderr, _("*** OpenGL : Cannot open display.\n"));
throw std::exception(); throw std::exception();
} }

View File

@ -423,7 +423,7 @@ void Window::vApplyConfigScreenArea()
} }
catch (std::exception e) catch (std::exception e)
{ {
fprintf(stderr, "Unable to initialize output, falling back to Cairo\n"); fprintf(stderr, _("Unable to initialize output, falling back to Cairo\n"));
m_poScreenArea = Gtk::manage(new ScreenAreaCairo(m_iScreenWidth, m_iScreenHeight)); m_poScreenArea = Gtk::manage(new ScreenAreaCairo(m_iScreenWidth, m_iScreenHeight));
} }
@ -464,7 +464,7 @@ void Window::vInitSDL()
if (SDL_Init(iFlags) < 0) if (SDL_Init(iFlags) < 0)
{ {
fprintf(stderr, "Failed to init SDL: %s", SDL_GetError()); fprintf(stderr, _("Failed to init SDL: %s"), SDL_GetError());
abort(); abort();
} }
@ -1111,12 +1111,12 @@ void Window::vShowSpeed(int _iSpeed)
if (m_eShowSpeed == ShowPercentage) if (m_eShowSpeed == ShowPercentage)
{ {
snprintf(csTitle, 50, "VBA-M - %d%%", _iSpeed); snprintf(csTitle, 50, _("VBA-M - %d%%"), _iSpeed);
set_title(csTitle); set_title(csTitle);
} }
else if (m_eShowSpeed == ShowDetailed) else if (m_eShowSpeed == ShowDetailed)
{ {
snprintf(csTitle, 50, "VBA-M - %d%% (%d, %d fps)", snprintf(csTitle, 50, _("VBA-M - %d%% (%d, %d fps)"),
_iSpeed, systemFrameSkip, m_iFrameCount); _iSpeed, systemFrameSkip, m_iFrameCount);
set_title(csTitle); set_title(csTitle);
} }
@ -1446,7 +1446,7 @@ std::string Window::sGetUiFilePath(const std::string &_sFileName)
{ {
sUiFile = PKGDATADIR "/ui/" + _sFileName; sUiFile = PKGDATADIR "/ui/" + _sFileName;
} }
return sUiFile; return sUiFile;
} }

View File

@ -493,14 +493,14 @@ void Window::vOnHelpAbout()
oAboutDialog.set_transient_for(*this); oAboutDialog.set_transient_for(*this);
oAboutDialog.set_name("VBA-M"); oAboutDialog.set_name(_("VBA-M"));
oAboutDialog.set_version(VERSION); oAboutDialog.set_version(VERSION);
oAboutDialog.set_comments(_("Nintendo GameBoy Advance emulator.")); oAboutDialog.set_comments(_("Nintendo GameBoy Advance emulator."));
oAboutDialog.set_license(csGPLHeader); oAboutDialog.set_license(csGPLHeader);
oAboutDialog.set_copyright(csCopyright); oAboutDialog.set_copyright(csCopyright);
oAboutDialog.set_logo_icon_name("vbam"); oAboutDialog.set_logo_icon_name("vbam");
oAboutDialog.set_website("http://vba-m.ngemu.com/"); oAboutDialog.set_website("http://http://www.vba-m.com/");
std::list<Glib::ustring> list_authors; std::list<Glib::ustring> list_authors;
list_authors.push_back("Forgotten"); list_authors.push_back("Forgotten");