diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2010-10-02 15:51:34 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2010-10-02 15:51:34 +0000 |
| commit | f27b65652e72d71411e8b658ecfc8992bbc73836 (patch) | |
| tree | 89f4bf0025b3f475164d2a88b6cdabd77a5f6f10 /src/extension/param/enum.cpp | |
| parent | Dutch translation and pot update (diff) | |
| download | inkscape-f27b65652e72d71411e8b658ecfc8992bbc73836.tar.gz inkscape-f27b65652e72d71411e8b658ecfc8992bbc73836.zip | |
Extensions. New context support in extensions (enum attribute only), should fix Bug #585730 (Please split msgid Lines for ja translation).
Fixed bugs:
- https://launchpad.net/bugs/585730
(bzr r9809)
Diffstat (limited to 'src/extension/param/enum.cpp')
| -rw-r--r-- | src/extension/param/enum.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index 03c1f839b..9ed5aac16 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -63,12 +63,20 @@ ParamComboBox::ParamComboBox (const gchar * name, const gchar * guitext, const g Glib::ustring newguitext, newvalue; const char * contents = NULL; if (node->firstChild()) contents = node->firstChild()->content(); - if (contents != NULL) + if (contents != NULL) { // don't translate when 'item' but do translate when '_item' // NOTE: internal extensions use build_from_mem and don't need _item but // still need to include if are to be localized - newguitext = !strcmp(chname, INKSCAPE_EXTENSION_NS "_item") ? _(contents) : contents; - else + if (!strcmp(chname, INKSCAPE_EXTENSION_NS "_item")) { + if (node->attribute("msgctxt") != NULL) { + newguitext = g_dpgettext2(NULL, node->attribute("msgctxt"), contents); + } else { + newguitext = _(contents); + } + } else { + newguitext = contents; + } + } else continue; const char * val = node->attribute("value"); |
