]> git.lyx.org Git - features.git/commitdiff
Improve error message
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 3 Apr 2019 15:58:20 +0000 (17:58 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:24 +0000 (15:48 +0200)
* 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

index 05ef608b6e47009b3184feab0a3a7abc5a39c1b8..eeadf0a4f1d17c710e9eec7272cf7b57bd75c2c9 100644 (file)
@@ -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;
                }