From 2a065b5ef24441b0df2c06fbcae6dcf6fd5f5251 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Tue, 6 Jan 2009 10:20:36 -0700 Subject: Added support for internationalization Merged from the mainline client. Originally implemented by Guillaume Melquiond, starting with commit 1828eee6a6d91fd385ad1e69d93044516493aa91. Conflicts: INSTALL configure.ac src/Makefile.am src/gui/buy.cpp src/gui/confirm_dialog.cpp src/gui/inventorywindow.cpp src/gui/login.cpp src/gui/menuwindow.cpp src/gui/minimap.cpp src/gui/ok_dialog.cpp src/gui/popupmenu.cpp src/gui/register.cpp src/gui/sell.cpp src/gui/setup.cpp src/gui/setup_video.cpp Signed-off-by: Ira Rice --- src/gui/setup_joystick.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/gui/setup_joystick.cpp') diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp index 723d0597..b55ccb7e 100644 --- a/src/gui/setup_joystick.cpp +++ b/src/gui/setup_joystick.cpp @@ -28,12 +28,14 @@ #include "../configuration.h" #include "../joystick.h" +#include "../utils/gettext.h" + extern Joystick *joystick; Setup_Joystick::Setup_Joystick(): - mCalibrateLabel(new gcn::Label("Press the button to start calibration")), - mCalibrateButton(new Button("Calibrate", "calibrate", this)), - mJoystickEnabled(new CheckBox("Enable joystick")) + mCalibrateLabel(new gcn::Label(_("Press the button to start calibration"))), + mCalibrateButton(new Button(_("Calibrate"), "calibrate", this)), + mJoystickEnabled(new CheckBox(_("Enable joystick"))) { setOpaque(false); mJoystickEnabled->setPosition(10, 10); @@ -63,13 +65,13 @@ void Setup_Joystick::action(const gcn::ActionEvent &event) else { if (joystick->isCalibrating()) { - mCalibrateButton->setCaption("Calibrate"); - mCalibrateLabel->setCaption( - "Press the button to start calibration"); + mCalibrateButton->setCaption(_("Calibrate")); + mCalibrateLabel->setCaption + (_("Press the button to start calibration")); joystick->finishCalibration(); } else { - mCalibrateButton->setCaption("Stop"); - mCalibrateLabel->setCaption("Rotate the stick"); + mCalibrateButton->setCaption(_("Stop")); + mCalibrateLabel->setCaption(_("Rotate the stick")); joystick->startCalibration(); } } -- cgit v1.2.3-70-g09d2