From 54cf9683acab1774593cd25018c1cb7ee327af54 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 3 Apr 2019 17:58:20 +0200 Subject: [PATCH] Improve error message * Take preceding line break out of the l10n range. This is bound to get lost in translation * Display encoding names that people actually find in the GUI --- src/Buffer.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 05ef608b6e..eeadf0a4f1 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -4456,12 +4456,15 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir if (!put_in_tempdir) { // Only show this alert if this is an export to a non-temporary // file (not for previewing). - docstring s = _("No information for exporting the format %1$s."); + docstring s = bformat(_("No information for exporting the format %1$s."), + theFormats().prettyName(format)); if (format == "pdf4") - s += "\n" + _("Hint: use non-TeX fonts or set input encoding " - " to'utf8' or 'ascii'"); - Alert::error(_("Couldn't export file"), - bformat(s, theFormats().prettyName(format))); + s += "\n" + + bformat(_("Hint: use non-TeX fonts or set input encoding " + " to '%1$s' or '%2$s'"), + from_utf8(encodings.fromLyXName("utf8")->guiName()), + from_utf8(encodings.fromLyXName("ascii")->guiName())); + Alert::error(_("Couldn't export file"), s); } return ExportNoPathToFormat; } -- 2.39.5