diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2018-04-05 03:23:38 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-04-05 03:23:52 +0200 | 
| commit | c0165f8b48852a1aca782d606ba4f1ea48eee6ba (patch) | |
| tree | 433441689808ca741889b078407bc49fade746de /proto-vjoystick | |
| parent | eb32a2ac02c6d1adcfeb0a1a5522f8aaea442489 (diff) | |
modules: now use i18n
Diffstat (limited to 'proto-vjoystick')
| -rw-r--r-- | proto-vjoystick/vjoystick.cpp | 14 | ||||
| -rw-r--r-- | proto-vjoystick/vjoystick.h | 11 | 
2 files changed, 14 insertions, 11 deletions
diff --git a/proto-vjoystick/vjoystick.cpp b/proto-vjoystick/vjoystick.cpp index e5e18157..a55f8ca4 100644 --- a/proto-vjoystick/vjoystick.cpp +++ b/proto-vjoystick/vjoystick.cpp @@ -115,11 +115,11 @@ module_status vjoystick_proto::initialize()      {          QMessageBox msgbox;          msgbox.setIcon(QMessageBox::Critical); -        msgbox.setText(otr_tr("vjoystick driver missing")); -        msgbox.setInformativeText(otr_tr("vjoystick won't work without the driver installed.")); +        msgbox.setText(tr("vjoystick driver missing")); +        msgbox.setInformativeText(tr("vjoystick won't work without the driver installed.")); -        QPushButton* driver_button = msgbox.addButton(otr_tr("Download the driver"), QMessageBox::ActionRole); -        QPushButton* project_site_button = msgbox.addButton(otr_tr("Visit project site"), QMessageBox::ActionRole); +        QPushButton* driver_button = msgbox.addButton(tr("Download the driver"), QMessageBox::ActionRole); +        QPushButton* project_site_button = msgbox.addButton(tr("Visit project site"), QMessageBox::ActionRole);          msgbox.addButton(QMessageBox::Close);          (void) msgbox.exec(); @@ -139,13 +139,13 @@ module_status vjoystick_proto::initialize()      switch (h.get_state())      {      case state_notent: -        return error(_("vjoystick not installed or disabled")); +        return error(tr("vjoystick not installed or disabled"));      case state_fail: -        return error(_("can't initialize vjoystick")); +        return error(tr("can't initialize vjoystick"));      case state_success:          return status_ok();      default: -        return error(_("unknown error")); +        return error(tr("unknown error"));      }  } diff --git a/proto-vjoystick/vjoystick.h b/proto-vjoystick/vjoystick.h index 72dde0f0..d859d8a9 100644 --- a/proto-vjoystick/vjoystick.h +++ b/proto-vjoystick/vjoystick.h @@ -38,15 +38,17 @@ public:      LONG to_axis_value(unsigned axis_id, double val);  }; -class vjoystick_proto : public IProtocol +class vjoystick_proto : public TR, public IProtocol  { +    Q_OBJECT +      handle h;  public:      vjoystick_proto();      ~vjoystick_proto() override;      module_status initialize() override;      void pose( const double *headpose ) override; -    QString game_name() override { return otr_tr("Virtual joystick"); } +    QString game_name() override { return tr("Virtual joystick"); }  private:  }; @@ -64,7 +66,8 @@ private:  class vjoystick_metadata : public Metadata  { -public: -    QString name() { return otr_tr("Joystick emulation -- vjoystick"); } +    Q_OBJECT + +    QString name() { return tr("Joystick emulation -- vjoystick"); }      QIcon icon() { return QIcon(":/images/vjoystick.png"); }  };  | 
