+docstring InsetInfo::toolTip(BufferView const &, int, int) const
+{
+ docstring result;
+ switch (nameTranslator().find(params_.infoType())) {
+ case InsetInfoParams::UNKNOWN_INFO:
+ result = _("Invalid information inset");
+ break;
+ case InsetInfoParams::SHORTCUT_INFO:
+ result = bformat(_("The keybard shortcut for the function '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::SHORTCUTS_INFO:
+ result = bformat(_("The keybard shortcuts for the function '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::MENU_INFO:
+ result = bformat(_("The menu location for the function '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::L7N_INFO:
+ result = bformat(_("The localization for the string '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::ICON_INFO:
+ result = bformat(_("The toolbar icon for the function '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::LYXRC_INFO:
+ result = bformat(_("The preference setting for the preference key '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::PACKAGE_INFO:
+ result = bformat(_("Availability of the LaTeX package '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::TEXTCLASS_INFO:
+ result = bformat(_("Availability of the LaTeX class '%1$s'"),
+ from_utf8(params_.name));
+ break;
+ case InsetInfoParams::BUFFER_INFO:
+ if (params_.name == "name")
+ result = _("The name of this file (incl. extension)");
+ else if (params_.name == "name-noext")
+ result = _("The name of this file (without extension)");
+ else if (params_.name == "path")
+ result = _("The path where this file is saved");
+ else if (params_.name == "class")
+ result = _("The class this document uses");
+ break;
+ case InsetInfoParams::VCS_INFO:
+ if (params_.name == "revision")
+ result = _("Version control revision");
+ else if (params_.name == "revision-abbrev")
+ result = _("Version control abbreviated revision");
+ else if (params_.name == "tree-revision")
+ result = _("Version control tree revision");
+ else if (params_.name == "author")
+ result = _("Version control author");
+ else if (params_.name == "date")
+ result = _("Version control date");
+ else if (params_.name == "time")
+ result = _("Version control time");
+ break;
+ case InsetInfoParams::LYX_INFO:
+ if (params_.name == "version")
+ result = _("The current LyX version");
+ else if (params_.name == "layoutformat")
+ result = _("The current LyX layout format");
+ break;
+ case InsetInfoParams::DATE_INFO:
+ result = _("The current date");
+ break;
+ case InsetInfoParams::MODDATE_INFO:
+ result = _("The date of last save");
+ break;
+ case InsetInfoParams::FIXDATE_INFO:
+ result = _("A static date");
+ break;
+ case InsetInfoParams::TIME_INFO:
+ result = _("The current time");
+ break;
+ case InsetInfoParams::MODTIME_INFO:
+ result = _("The time of last save");
+ break;
+ case InsetInfoParams::FIXTIME_INFO:
+ result = _("A static time");