commit 324bfe90df5ee60a7783747cdbb8276951b21294
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Apr 3 17:58:20 2019 +0200

    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 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 05ef608..eeadf0a 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;
                }

Reply via email to