summaryrefslogtreecommitdiffstats
path: root/src/extension/param
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/param')
-rw-r--r--src/extension/param/bool.cpp3
-rw-r--r--src/extension/param/enum.cpp2
-rw-r--r--src/extension/param/float.cpp5
-rw-r--r--src/extension/param/int.cpp5
-rw-r--r--src/extension/param/parameter.cpp12
-rw-r--r--src/extension/param/radiobutton.cpp2
-rw-r--r--src/extension/param/string.cpp2
7 files changed, 20 insertions, 11 deletions
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index de9b1c586..d64f798ba 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -19,7 +19,6 @@
#include "../extension.h"
#include "bool.h"
#include "preferences.h"
-#include <glibmm/i18n.h>
namespace Inkscape {
namespace Extension {
@@ -137,7 +136,7 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node,
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
#endif
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
label->show();
hbox->pack_end(*label, true, true);
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 8bc0fbda7..4e7420807 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -251,7 +251,7 @@ Gtk::Widget *ParamComboBox::get_widget(SPDocument * doc, Inkscape::XML::Node * n
}
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp
index 81508f6c0..dff7cbf46 100644
--- a/src/extension/param/float.cpp
+++ b/src/extension/param/float.cpp
@@ -20,7 +20,6 @@
#include "extension/extension.h"
#include "preferences.h"
#include "float.h"
-#include <glibmm/i18n.h>
namespace Inkscape {
namespace Extension {
@@ -186,7 +185,7 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
if (_mode == FULL) {
- UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, _precision);
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_text, fadjust, _precision);
scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
@@ -194,7 +193,7 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
}
else if (_mode == MINIMAL) {
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, true, true, _indent);
diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp
index c286018fd..dda801282 100644
--- a/src/extension/param/int.cpp
+++ b/src/extension/param/int.cpp
@@ -20,7 +20,6 @@
#include "extension/extension.h"
#include "preferences.h"
#include "int.h"
-#include <glibmm/i18n.h>
namespace Inkscape {
namespace Extension {
@@ -168,14 +167,14 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal
if (_mode == FULL) {
- UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, 0);
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_text, fadjust, 0);
scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
}
else if (_mode == MINIMAL) {
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, true, true, _indent);
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp
index 10029893f..e4a614667 100644
--- a/src/extension/param/parameter.cpp
+++ b/src/extension/param/parameter.cpp
@@ -40,6 +40,8 @@
#include "radiobutton.h"
#include "string.h"
+#include <glibmm/i18n.h>
+
namespace Inkscape {
namespace Extension {
@@ -56,6 +58,16 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex
const char *guitext = in_repr->attribute("gui-text");
if (guitext == NULL) {
guitext = in_repr->attribute("_gui-text");
+ if (guitext == NULL) {
+ // guitext = ""; // propably better to require devs to explicitly set an empty gui-text if this is what they want
+ } else {
+ const char *context = in_repr->attribute("msgctxt");
+ if (context != NULL) {
+ guitext = g_dpgettext2(NULL, context, guitext);
+ } else {
+ guitext = _(guitext);
+ }
+ }
}
const char *gui_tip = in_repr->attribute("gui-tip");
if (gui_tip == NULL) {
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp
index 8181c6f51..1d1b860c6 100644
--- a/src/extension/param/radiobutton.cpp
+++ b/src/extension/param/radiobutton.cpp
@@ -313,7 +313,7 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node
Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0));
#endif
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp
index 1d9205502..6b082b133 100644
--- a/src/extension/param/string.cpp
+++ b/src/extension/param/string.cpp
@@ -166,7 +166,7 @@ Gtk::Widget * ParamString::get_widget(SPDocument * doc, Inkscape::XML::Node * no
}
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);