summaryrefslogtreecommitdiffstats
path: root/src/verbs.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-02-16 22:44:21 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-02-16 22:44:21 +0000
commit48d75545fec31f7121cdd0073e2ce7a1de2d9ca0 (patch)
treec36a293c23831d2d84ac6d2c03a2a00b5c3767d9 /src/verbs.cpp
parentShow helpful message if tutorials are not installed (diff)
downloadinkscape-48d75545fec31f7121cdd0073e2ce7a1de2d9ca0.tar.gz
inkscape-48d75545fec31f7121cdd0073e2ce7a1de2d9ca0.zip
Tutorials: Improve logic for loading localized versions
There's no need to translate every filename, just translate the language code. Also use Inkscape::IO::Resource::get_filename to ensure we fall-back to Englishstutorials should the localized versions not be available.
Diffstat (limited to 'src/verbs.cpp')
-rw-r--r--src/verbs.cpp39
1 files changed, 10 insertions, 29 deletions
diff --git a/src/verbs.cpp b/src/verbs.cpp
index deedecf75..ad8f21787 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -2305,20 +2305,11 @@ void HelpVerb::perform(SPAction *action, void *data)
case SP_VERB_HELP_ABOUT:
sp_help_about();
break;
- case SP_VERB_HELP_ABOUT_EXTENSIONS: {
+ case SP_VERB_HELP_ABOUT_EXTENSIONS:
// Inkscape::UI::Dialogs::ExtensionsPanel *panel = new Inkscape::UI::Dialogs::ExtensionsPanel();
// panel->set_full(true);
// show_panel( *panel, "dialogs.aboutextensions", SP_VERB_HELP_ABOUT_EXTENSIONS );
break;
- }
-
- /*
- case SP_VERB_SHOW_LICENSE:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(NULL, (gpointer) _("gpl-2.svg"));
- break;
- */
-
case SP_VERB_HELP_MEMORY:
INKSCAPE.dialogs_unhide();
dt->_dlg_mgr->showDialog("Memory");
@@ -2336,45 +2327,35 @@ void TutorialVerb::perform(SPAction *action, void *data)
g_return_if_fail(ensure_desktop_valid(action));
switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_TUTORIAL_BASIC:
- // TRANSLATORS: If you have translated the tutorial-basic.en.svgz file to your language,
- // then translate this string as "tutorial-basic.LANG.svgz" (where LANG is your language
- // code); otherwise leave as "tutorial-basic.svg".
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-basic.svg"));
+ sp_help_open_tutorial("tutorial-basic");
break;
case SP_VERB_TUTORIAL_SHAPES:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-shapes.svg"));
+ sp_help_open_tutorial("tutorial-shapes");
break;
case SP_VERB_TUTORIAL_ADVANCED:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-advanced.svg"));
+ sp_help_open_tutorial("tutorial-advanced");
break;
#if HAVE_POTRACE
case SP_VERB_TUTORIAL_TRACING:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-tracing.svg"));
+ sp_help_open_tutorial("tutorial-tracing");
break;
#endif
case SP_VERB_TUTORIAL_TRACING_PIXELART:
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-tracing-pixelart.svg"));
+ sp_help_open_tutorial("tutorial-tracing-pixelart");
break;
case SP_VERB_TUTORIAL_CALLIGRAPHY:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-calligraphy.svg"));
+ sp_help_open_tutorial("tutorial-calligraphy");
break;
case SP_VERB_TUTORIAL_INTERPOLATE:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-interpolate.svg"));
+ sp_help_open_tutorial("tutorial-interpolate");
break;
case SP_VERB_TUTORIAL_DESIGN:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-elements.svg"));
+ sp_help_open_tutorial("tutorial-elements");
break;
case SP_VERB_TUTORIAL_TIPS:
- // TRANSLATORS: See "tutorial-basic.svg" comment.
- sp_help_open_tutorial(nullptr, (gpointer)_("tutorial-tips.svg"));
+ sp_help_open_tutorial("tutorial-tips");
break;
default:
break;