From ac40d1226ad4b0170dc3df567074c54ca20d9469 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sun, 22 Aug 2010 21:33:18 +0200 Subject: i18n. Context cleanup (context|string replaced with C_). (bzr r9722) --- src/ui/widget/panel.cpp | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) (limited to 'src/ui/widget/panel.cpp') diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 4b806afb5..66342ad1f 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -131,20 +131,15 @@ void Panel::_init() } { - //TRANSLATORS: only translate "string" in "context|string". - // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS - Glib::ustring heightItemLabel(Q_("swatches|Size")); + Glib::ustring heightItemLabel(C_("Swatches", "Size")); //TRANSLATORS: Indicates size of colour swatches const gchar *heightLabels[] = { - N_("tiny"), - N_("small"), - //TRANSLATORS: only translate "string" in "context|string". - // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS - // "medium" indicates size of colour swatches - N_("swatchesHeight|medium"), - N_("large"), - N_("huge") + N_("Tiny"), + N_("Small"), + NC_("Swatches height", "Medium"), + N_("Large"), + N_("Huge") }; Gtk::MenuItem *sizeItem = manage(new Gtk::MenuItem(heightItemLabel)); @@ -166,20 +161,15 @@ void Panel::_init() } { - //TRANSLATORS: only translate "string" in "context|string". - // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS - Glib::ustring widthItemLabel(Q_("swatches|Width")); + Glib::ustring widthItemLabel(C_("Swatches", "Width")); //TRANSLATORS: Indicates width of colour swatches const gchar *widthLabels[] = { - N_("narrower"), - N_("narrow"), - //TRANSLATORS: only translate "string" in "context|string". - // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS - // "medium" indicates width of colour swatches - N_("swatchesWidth|medium"), - N_("wide"), - N_("wider") + N_("Narrower"), + N_("Narrow"), + NC_("Swatches width", "Medium"), + N_("Wide"), + N_("Wider") }; Gtk::MenuItem *item = manage( new Gtk::MenuItem(widthItemLabel)); @@ -209,10 +199,8 @@ void Panel::_init() } { - //TRANSLATORS: only translate "string" in "context|string". - // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS - // "Wrap" indicates how colour swatches are displayed - Glib::ustring wrap_label(Q_("swatches|Wrap")); + //TRANSLATORS: "Wrap" indicates how colour swatches are displayed + Glib::ustring wrap_label(C_("Swatches","Wrap")); Gtk::CheckMenuItem *check = manage(new Gtk::CheckMenuItem(wrap_label)); check->set_active(panel_wrap); _menu->append(*check); -- cgit v1.2.3 From 49089d8d377d2660af00e3b9bb7ad91168974375 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Fri, 24 Sep 2010 18:11:21 +0200 Subject: i18n. Fix for bug #644967 (Translation of strings using NC_() macro are not applied properly). (bzr r9781) --- src/ui/widget/panel.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/ui/widget/panel.cpp') diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 66342ad1f..f3cb0967c 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -135,11 +135,11 @@ void Panel::_init() //TRANSLATORS: Indicates size of colour swatches const gchar *heightLabels[] = { - N_("Tiny"), - N_("Small"), + NC_("Swatches height", "Tiny"), + NC_("Swatches height", "Small"), NC_("Swatches height", "Medium"), - N_("Large"), - N_("Huge") + NC_("Swatches height", "Large"), + NC_("Swatches height", "Huge") }; Gtk::MenuItem *sizeItem = manage(new Gtk::MenuItem(heightItemLabel)); @@ -148,7 +148,7 @@ void Panel::_init() Gtk::RadioMenuItem::Group heightGroup; for (unsigned int i = 0; i < G_N_ELEMENTS(heightLabels); i++) { - Glib::ustring _label(Q_(heightLabels[i])); + Glib::ustring _label(g_dpgettext2(NULL, "Swatches height", heightLabels[i])); Gtk::RadioMenuItem* _item = manage(new Gtk::RadioMenuItem(heightGroup, _label)); sizeMenu->append(*_item); if (i == panel_size) { @@ -165,11 +165,11 @@ void Panel::_init() //TRANSLATORS: Indicates width of colour swatches const gchar *widthLabels[] = { - N_("Narrower"), - N_("Narrow"), + NC_("Swatches width", "Narrower"), + NC_("Swatches width", "Narrow"), NC_("Swatches width", "Medium"), - N_("Wide"), - N_("Wider") + NC_("Swatches width", "Wide"), + NC_("Swatches width", "Wider") }; Gtk::MenuItem *item = manage( new Gtk::MenuItem(widthItemLabel)); @@ -188,7 +188,7 @@ void Panel::_init() } } for ( guint i = 0; i < G_N_ELEMENTS(widthLabels); ++i ) { - Glib::ustring _label(Q_(widthLabels[i])); + Glib::ustring _label(g_dpgettext2(NULL, "Swatches width", widthLabels[i])); Gtk::RadioMenuItem *_item = manage(new Gtk::RadioMenuItem(widthGroup, _label)); type_menu->append(*_item); if ( i <= hot_index ) { -- cgit v1.2.3 From 144819c918dc761641c3cb5a490205fb73194ee3 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 17 Nov 2010 13:12:56 +1100 Subject: Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in all 1074 Vim modelines. The reason for this is that (a) setting the encoding isn't nice, and (b) Vim 7.3 (with modeline enabled) disallows it and pops up an error whenever you open any file with it ("invalid modeline"). Also corrected five deviant modestrings: * src/ui/widget/dock.cpp and src/ui/widget/dock.h: missing colon at the end * src/ui/dialog/tile.cpp: removed gratuitous second colon at the end * src/helper/units-test.h: removed gratuitous space before a colon * share/extensions/export_gimp_palette.py: missing textwidth=99 That's my geekiest commit yet. (bzr r9900) --- src/ui/widget/panel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/widget/panel.cpp') diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index f3cb0967c..b3c8ce376 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -601,4 +601,4 @@ Inkscape::Selection *Panel::_getSelection() fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : -- cgit v1.2.3