From: Juergen Spitzmueller Date: Sun, 29 Jul 2018 16:28:18 +0000 (+0200) Subject: InsetInfo: add useful shortcuts. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3234 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5075ce02975481fe4bd6910d26a93a8ba7d0d32d;p=features.git InsetInfo: add useful shortcuts. --- diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 5f815ac17b..3da1d00470 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -126,8 +126,63 @@ docstring InsetInfo::layoutName() const docstring InsetInfo::toolTip(BufferView const &, int, int) const { - return bformat(_("Information regarding %1$s '%2$s'"), - _(infoType()), from_utf8(name_)); + docstring result; + switch (nameTranslator().find(infoType())) { + case UNKNOWN_INFO: + result = _("Invalid information inset"); + break; + case SHORTCUT_INFO: + result = bformat(_("The keybard shortcut for the function '%1$s'"), + from_utf8(name_)); + break; + case SHORTCUTS_INFO: + result = bformat(_("The keybard shortcuts for the function '%1$s'"), + from_utf8(name_)); + break; + case MENU_INFO: + result = bformat(_("The menu location for the function '%1$s'"), + from_utf8(name_)); + break; + case ICON_INFO: + result = bformat(_("The toolbar icon for the function '%1$s'"), + from_utf8(name_)); + break; + case LYXRC_INFO: + result = bformat(_("The preference setting for the preference key '%1$s'"), + from_utf8(name_)); + break; + case PACKAGE_INFO: + result = bformat(_("Availability of the LaTeX package '%1$s'"), + from_utf8(name_)); + break; + case TEXTCLASS_INFO: + result = bformat(_("Availability of the LaTeX class '%1$s'"), + from_utf8(name_)); + break; + case BUFFER_INFO: + if (name_ == "name") + result = _("The name of this file"); + else if (name_ == "path") + result = _("The path were this file is saved"); + else if (name_ == "class") + result = _("The class this document uses"); + else if (name_ == "vcs-revision") + result = _("Version control revision"); + else if (name_ == "vcs-tree-revision") + result = _("Version control tree revision"); + else if (name_ == "vcs-author") + result = _("Version control author"); + else if (name_ == "vcs-date") + result = _("Version control date"); + else if (name_ == "vcs-time") + result = _("Version control time"); + break; + case LYX_INFO: + result = _("The current LyX version"); + break; + } + + return result; }