ActionManager::session_sensitive_actions.push_back (act);
ActionManager::register_action (common_actions, X_("About"), _("About"), sigc::mem_fun(*this, &ARDOUR_UI::show_about));
ActionManager::register_action (common_actions, X_("Chat"), _("Chat"), sigc::mem_fun(*this, &ARDOUR_UI::launch_chat));
- ActionManager::register_action (common_actions, X_("Manual"), _("Manual"), mem_fun(*this, &ARDOUR_UI::launch_manual));
+ /** TRANSLATORS: This is `Manual' in the sense of an instruction book that tells a user how to use Ardour */
+ ActionManager::register_action (common_actions, X_("Manual"), S_("Help|Manual"), mem_fun(*this, &ARDOUR_UI::launch_manual));
ActionManager::register_action (common_actions, X_("Reference"), _("Reference"), mem_fun(*this, &ARDOUR_UI::launch_reference));
ActionManager::register_toggle_action (common_actions, X_("ToggleThemeManager"), _("Theme Manager"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_theme_manager));
ActionManager::register_toggle_action (common_actions, X_("ToggleKeyEditor"), _("Key Bindings"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_key_editor));
automation_menu->set_name ("ArdourContextMenu");
MenuList& items (automation_menu->items());
- items.push_back (MenuElem (_("Manual"), sigc::bind (sigc::mem_fun(*this,
+ items.push_back (MenuElem (S_("Automation|Manual"), sigc::bind (sigc::mem_fun(*this,
&AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
items.push_back (MenuElem (_("Play"), sigc::bind (sigc::mem_fun(*this,
&AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
switch (state & (Off|Play|Touch|Write)) {
case Off:
- auto_button.set_label (_("Manual"));
+ auto_button.set_label (S_("Automation|Manual"));
if (auto_off_item) {
ignore_state_request = true;
auto_off_item->set_active (true);
auto_state_menu->set_name ("ArdourContextMenu");
MenuList& as_items = auto_state_menu->items();
- as_items.push_back (CheckMenuElem (_("Manual"), sigc::bind (
+ as_items.push_back (CheckMenuElem (S_("Automation|Manual"), sigc::bind (
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
(AutoState) Off)));
auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
gain_astate_menu.items().clear ();
- gain_astate_menu.items().push_back (MenuElem (_("Manual"),
+ gain_astate_menu.items().push_back (MenuElem (S_("Automation|Manual"),
sigc::bind (sigc::mem_fun (*(amp.get()), &Automatable::set_parameter_automation_state),
Evoral::Parameter(GainAutomation), (AutoState) Off)));
gain_astate_menu.items().push_back (MenuElem (_("Play"),
switch (insert->get_parameter_automation_state (cui->parameter())
& (Off|Play|Touch|Write)) {
case Off:
- cui->automate_button.set_label (_("Manual"));
+ cui->automate_button.set_label (S_("Automation|Manual"));
break;
case Play:
cui->automate_button.set_label (_("Play"));
MenuList& items (automation_menu->items());
items.clear ();
- items.push_back (MenuElem (_("Manual"),
+ items.push_back (MenuElem (S_("Automation|Manual"),
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Off, cui)));
items.push_back (MenuElem (_("Play"),
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Play, cui)));
#define N_(Text) gettext_noop (Text)
#define X_(Text) Text
#define I18N(Array) PBD::internationalize (PACKAGE, Array)
+/** Use this to translate strings that have different meanings in different places.
+ * Text should be of the form Context|Message.
+ */
+#define S_(Text) sgettext (PACKAGE, Text)
#endif // __i18n_h__
pan_astate_menu->items().clear ();
}
- pan_astate_menu->items().push_back (MenuElem (_("Manual"), sigc::bind (
+ /** TRANSLATORS: this is `Manual' in the sense of automation not being played,
+ so that changes to pan must be done by hand.
+ */
+ pan_astate_menu->items().push_back (MenuElem (S_("Automation|Manual"), sigc::bind (
sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
(AutoState) Off)));
pan_astate_menu->items().push_back (MenuElem (_("Play"), sigc::bind (
#include <stdlib.h>
#include <cstdio>
#include <ctype.h>
+#include <cstring>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
return false;
}
+/** A wrapper for dgettext that takes a msgid of the form Context|Text.
+ * If Context|Text is translated, the translation is returned, otherwise
+ * just Text is returned. Useful for getting translations of words or phrases
+ * that have different meanings in different contexts.
+ */
+const char *
+sgettext (const char* domain_name, const char* msgid)
+{
+ const char * msgval = dgettext (domain_name, msgid);
+ if (msgval == msgid) {
+ msgval = strrchr (msgid, '|') + 1;
+ }
+ return msgval;
+}
} // namespace PBD
return oss.str();
}
+const char *
+sgettext (const char *, const char *);
+
} //namespace PBD
#endif /* __pbd_convert_h__ */