From f66c77213050e2ebd09b63ba062dead5242cfe03 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 12 Mar 2012 23:35:20 +0000 Subject: [PATCH] Ensure the hotkey descriptions in the translation and styling assistants actually get marked as translatable Originally committed to SVN as r6582. --- aegisub/src/dialog_styling_assistant.cpp | 16 ++++++++-------- aegisub/src/dialog_translation.cpp | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/aegisub/src/dialog_styling_assistant.cpp b/aegisub/src/dialog_styling_assistant.cpp index 1cdd83dc3..12cc949c6 100644 --- a/aegisub/src/dialog_styling_assistant.cpp +++ b/aegisub/src/dialog_styling_assistant.cpp @@ -50,8 +50,8 @@ #include #endif -static void add_hotkey(wxSizer *sizer, wxWindow *parent, const char *command, const char *text) { - sizer->Add(new wxStaticText(parent, -1, _(text))); +static void add_hotkey(wxSizer *sizer, wxWindow *parent, const char *command, wxString const& text) { + sizer->Add(new wxStaticText(parent, -1, text)); sizer->Add(new wxStaticText(parent, -1, hotkey::get_hotkey_str_first("Styling Assistant", command))); } @@ -91,12 +91,12 @@ DialogStyling::DialogStyling(agi::Context *context) wxSizer *hotkey_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Keys")); wxSizer *hotkey_grid = new wxGridSizer(2, 0, 5); - add_hotkey(hotkey_grid, this, "tool/styling_assistant/commit", "Accept changes"); - add_hotkey(hotkey_grid, this, "tool/styling_assistant/preview", "Preview changes"); - add_hotkey(hotkey_grid, this, "grid/line/prev", "Previous line"); - add_hotkey(hotkey_grid, this, "grid/line/next", "Next line"); - add_hotkey(hotkey_grid, this, "video/play/line", "Play video"); - add_hotkey(hotkey_grid, this, "audio/play/selection", "Play audio"); + add_hotkey(hotkey_grid, this, "tool/styling_assistant/commit", _("Accept changes")); + add_hotkey(hotkey_grid, this, "tool/styling_assistant/preview", _("Preview changes")); + add_hotkey(hotkey_grid, this, "grid/line/prev", _("Previous line")); + add_hotkey(hotkey_grid, this, "grid/line/next", _("Next line")); + add_hotkey(hotkey_grid, this, "video/play/line", _("Play video")); + add_hotkey(hotkey_grid, this, "audio/play/selection", _("Play audio")); hotkey_grid->Add(new wxStaticText(this, -1, _("Click on list"))); hotkey_grid->Add(new wxStaticText(this, -1, _("Select style"))); diff --git a/aegisub/src/dialog_translation.cpp b/aegisub/src/dialog_translation.cpp index 106cc81a7..06a80853b 100644 --- a/aegisub/src/dialog_translation.cpp +++ b/aegisub/src/dialog_translation.cpp @@ -49,8 +49,8 @@ #include #endif -static void add_hotkey(wxSizer *sizer, wxWindow *parent, const char *command, const char *text) { - sizer->Add(new wxStaticText(parent, -1, _(text))); +static void add_hotkey(wxSizer *sizer, wxWindow *parent, const char *command, wxString const& text) { + sizer->Add(new wxStaticText(parent, -1, text)); sizer->Add(new wxStaticText(parent, -1, hotkey::get_hotkey_str_first("Translation Assistant", command))); } @@ -112,14 +112,14 @@ DialogTranslation::DialogTranslation(agi::Context *c) wxSizer *hotkey_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Keys")); wxSizer *hotkey_grid = new wxGridSizer(2, 0, 5); - add_hotkey(hotkey_grid, this, "tool/translation_assistant/commit", "Accept changes"); - add_hotkey(hotkey_grid, this, "tool/translation_assistant/preview", "Preview changes"); - add_hotkey(hotkey_grid, this, "tool/translation_assistant/prev", "Previous line"); - add_hotkey(hotkey_grid, this, "tool/translation_assistant/next", "Next line"); - add_hotkey(hotkey_grid, this, "tool/translation_assistant/insert_original", "Insert original"); - add_hotkey(hotkey_grid, this, "video/play/line", "Play video"); - add_hotkey(hotkey_grid, this, "audio/play/selection", "Play audio"); - add_hotkey(hotkey_grid, this, "edit/line/delete", "Delete line"); + add_hotkey(hotkey_grid, this, "tool/translation_assistant/commit", _("Accept changes")); + add_hotkey(hotkey_grid, this, "tool/translation_assistant/preview", _("Preview changes")); + add_hotkey(hotkey_grid, this, "tool/translation_assistant/prev", _("Previous line")); + add_hotkey(hotkey_grid, this, "tool/translation_assistant/next", _("Next line")); + add_hotkey(hotkey_grid, this, "tool/translation_assistant/insert_original", _("Insert original")); + add_hotkey(hotkey_grid, this, "video/play/line", _("Play video")); + add_hotkey(hotkey_grid, this, "audio/play/selection", _("Play audio")); + add_hotkey(hotkey_grid, this, "edit/line/delete", _("Delete line")); hotkey_box->Add(hotkey_grid, 0, wxEXPAND, 0); seek_video = new wxCheckBox(this, -1, _("Enable &preview"));