From ceead10217d6fa26b746717be9fdbb219f6b7f36 Mon Sep 17 00:00:00 2001 From: Olivier Humbert Date: Fri, 14 Aug 2020 15:17:21 +0200 Subject: Add more _(...) to strings of the UI. --- plugingui/filebrowser.cc | 10 ++++---- plugingui/locale/drumgizmo.pot | 44 ++++++++++++++++++++++++++++++++ plugingui/locale/fr.po | 50 ++++++++++++++++++++++++++++++++++--- plugingui/powerwidget.cc | 8 +++--- plugingui/resamplingframecontent.cc | 6 +++-- 5 files changed, 105 insertions(+), 13 deletions(-) (limited to 'plugingui') diff --git a/plugingui/filebrowser.cc b/plugingui/filebrowser.cc index 2dff5a4..59daab4 100644 --- a/plugingui/filebrowser.cc +++ b/plugingui/filebrowser.cc @@ -63,9 +63,9 @@ FileBrowser::FileBrowser(Widget* parent) above_root = false; #endif - setCaption("Open file..."); + setCaption(_("Open file...")); - lbl_path.setText("Path:"); + lbl_path.setText(_("Path:")); //lineedit.setReadOnly(true); CONNECT(&lineedit, enterPressedNotifier, this, &FileBrowser::handleKeyEvent); @@ -74,13 +74,13 @@ FileBrowser::FileBrowser(Widget* parent) CONNECT(this, fileSelectNotifier, this, &FileBrowser::select); CONNECT(eventHandler(), closeNotifier, this, &FileBrowser::cancel); - btn_sel.setText("Select"); + btn_sel.setText(_("Select")); CONNECT(&btn_sel, clickNotifier, this, &FileBrowser::selectButtonClicked); - btn_def.setText("Set default path"); + btn_def.setText(_("Set default path")); CONNECT(&btn_def, clickNotifier, this, &FileBrowser::setDefaultPath); - btn_esc.setText("Cancel"); + btn_esc.setText(_("Cancel")); CONNECT(&btn_esc, clickNotifier, this, &FileBrowser::cancelButtonClicked); changeDir(); diff --git a/plugingui/locale/drumgizmo.pot b/plugingui/locale/drumgizmo.pot index c19d253..473d9bc 100644 --- a/plugingui/locale/drumgizmo.pot +++ b/plugingui/locale/drumgizmo.pot @@ -52,6 +52,26 @@ msgstr "" msgid "Midimap file:" msgstr "" +#: filebrowser.cc:66 +msgid "Open file..." +msgstr "" + +#: filebrowser.cc:68 +msgid "Path:" +msgstr "" + +#: filebrowser.cc:77 +msgid "Select" +msgstr "" + +#: filebrowser.cc:80 +msgid "Set default path" +msgstr "" + +#: filebrowser.cc:83 +msgid "Cancel" +msgstr "" + #: filebrowser.cc:91 #, c-format msgid "Setting path to '%s'\n" @@ -138,6 +158,30 @@ msgstr "" msgid "About" msgstr "" +#: powerwidget.cc:52 +msgid "Shelf" +msgstr "" + +#: powerwidget.cc:210 +msgid "in" +msgstr "" + +#: powerwidget.cc:211 +msgid "out" +msgstr "" + +#: resamplingframecontent.cc:59 +msgid "Quality" +msgstr "" + +#: resamplingframecontent.cc:105 +msgid "Yes" +msgstr "" + +#: resamplingframecontent.cc:105 +msgid "No" +msgstr "" + #: statusframecontent.cc:88 msgid "No Kit Loaded" msgstr "" diff --git a/plugingui/locale/fr.po b/plugingui/locale/fr.po index acf3787..fe2a8d6 100644 --- a/plugingui/locale/fr.po +++ b/plugingui/locale/fr.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: drumgizmo 0.9.18.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-09-13 21:07+0200\n" -"PO-Revision-Date: 2020-08-12 22:29+0200\n" +"PO-Revision-Date: 2020-08-11 01:11+0200\n" "Last-Translator: Olivier Humbert \n" "Language-Team: none\n" "Language: fr\n" @@ -55,6 +55,26 @@ msgstr "Fichier de kit de batterie :" msgid "Midimap file:" msgstr "Fichier midimap :" +#: filebrowser.cc:66 +msgid "Open file..." +msgstr "Ouvrir un fichier..." + +#: filebrowser.cc:68 +msgid "Path:" +msgstr "Chemin :" + +#: filebrowser.cc:77 +msgid "Select" +msgstr "Sélectionner" + +#: filebrowser.cc:80 +msgid "Set default path" +msgstr "Chemin par défaut" + +#: filebrowser.cc:83 +msgid "Cancel" +msgstr "Annuler" + #: filebrowser.cc:91 #, c-format msgid "Setting path to '%s'\n" @@ -111,11 +131,11 @@ msgstr "Contr #: maintab.cc:127 msgid "Velocity Humanizer" -msgstr "Humanisateur de vélocité" +msgstr "Humaniseur de vélocité" #: maintab.cc:129 msgid "Timing Humanizer" -msgstr "Humanisateur de justesse" +msgstr "Humaniseur de justesse" #: maintab.cc:131 msgid "Sample Selection" @@ -141,6 +161,30 @@ msgstr "Principal" msgid "About" msgstr "À propos" +#: powerwidget.cc:52 +msgid "Shelf" +msgstr "Plateau" + +#: powerwidget.cc:210 +msgid "in" +msgstr "entrée" + +#: powerwidget.cc:211 +msgid "out" +msgstr "sortie" + +#: resamplingframecontent.cc:59 +msgid "Quality" +msgstr "Qualité" + +#: resamplingframecontent.cc:105 +msgid "Yes" +msgstr "Oui" + +#: resamplingframecontent.cc:105 +msgid "No" +msgstr "Non" + #: statusframecontent.cc:88 msgid "No Kit Loaded" msgstr "Pas de kit chargé" diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc index 02e7253..0a565e6 100644 --- a/plugingui/powerwidget.cc +++ b/plugingui/powerwidget.cc @@ -36,6 +36,8 @@ #include #include +#include + PowerWidget::PowerWidget(GUI::Widget* parent, Settings& settings, SettingsNotifier& settings_notifier) @@ -47,7 +49,7 @@ PowerWidget::PowerWidget(GUI::Widget* parent, CONNECT(&shelf_checkbox, stateChangedNotifier, this, &PowerWidget::chk_shelf); - shelf_label.setText("Shelf"); + shelf_label.setText(_("Shelf")); shelf_label.setAlignment(GUI::TextAlignment::center); shelf_label.resize(59, 16); shelf_checkbox.resize(59, 40); @@ -205,8 +207,8 @@ void PowerWidget::Canvas::repaintEvent(GUI::RepaintEvent *repaintEvent) y0 + height0 - std::round(power_map.getFixed2().out * height0), rad + 1); p.setColour(GUI::Colour(1.0f, 1.0f, 1.0f, 0.2f)); - p.drawText(width() / 2 - (font.textWidth("in") / 2), height() - 8, font, "in"); - p.drawText(8, height() / 2 - (font.textWidth("out") / 2), font, "out", false, true); + p.drawText(width() / 2 - (font.textWidth(_("in")) / 2), height() - 8, font, _("in")); + p.drawText(8, height() / 2 - (font.textWidth(_("out")) / 2), font, _("out"), false, true); } void PowerWidget::Canvas::buttonEvent(GUI::ButtonEvent* buttonEvent) diff --git a/plugingui/resamplingframecontent.cc b/plugingui/resamplingframecontent.cc index 717df0f..ef10f0b 100644 --- a/plugingui/resamplingframecontent.cc +++ b/plugingui/resamplingframecontent.cc @@ -28,6 +28,8 @@ #include +#include + namespace GUI { @@ -54,7 +56,7 @@ ResamplingframeContent::ResamplingframeContent(Widget* parent, quality_knob.setDefaultValue(0.7f); quality_knob.showValue(false); - quality_label.setText("Quality"); + quality_label.setText(_("Quality")); quality_label.setAlignment(TextAlignment::center); quality_label.resize(40, 16); @@ -100,7 +102,7 @@ void ResamplingframeContent::updateSessionSamplerate(double samplerate) void ResamplingframeContent::updateResamplingRecommended(bool resampling_recommended) { - this->resampling_recommended = resampling_recommended ? "Yes" : "No"; + this->resampling_recommended = resampling_recommended ? _("Yes") : _("No"); updateContent(); } -- cgit v1.2.3