Commit 9fc25e04 authored by Luigi Toscano's avatar Luigi Toscano

Cleanup messages for the info message widget

- use proper HTML tags so that it is easy to read complex messages
- remove one unused string
- minor string fixes
parent 3827df7d
......@@ -396,7 +396,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
"contained in distributions of the ghostscript PostScript interpreter system. If "
"ghostscript is not installed on your system, you could install it now. "
"If you are sure that ghostscript is installed, try to use <strong>pdf2ps</strong> "
"from the command line to check if it really works.</p><p><b>PATH:</b> %2</p></qt>", PDFFilename, getenv("PATH"));
"from the command line to check if it really works.</p><p><em>PATH:</em> %2</p></qt>", PDFFilename, getenv("PATH"));
have_complainedAboutMissingPDF2PS = true;
}
return QString();
......
......@@ -126,14 +126,14 @@ DVIExportToPDF::DVIExportToPDF(dviRenderer& parent, const QString& output_name)
return;
if (KStandardDirs::findExe("dvipdfm").isEmpty()) {
emit error(i18n("Okular could not locate the program 'dvipdfm' on your computer. This program is "
emit error(i18n("<qt><p>Okular could not locate the program <em>dvipdfm</em> on your computer. This program is "
"essential for the export function to work. You can, however, convert "
"the DVI-file to PDF using the print function of Okular, but that will often "
"produce documents which print okay, but are of inferior quality if viewed in "
"Acrobat Reader. It may be wise to upgrade to a more recent version of your "
"TeX distribution which includes the 'dvipdfm' program.\n"
"Hint to the perplexed system administrator: Okular uses the PATH environment variable "
"when looking for programs."), -1);
"TeX distribution which includes the <em>dvipdfm</em> program.</p>"
"<p>Hint to the perplexed system administrator: Okular uses the PATH environment variable "
"when looking for programs.</p></qt>"), -1);
return;
}
......@@ -176,17 +176,17 @@ DVIExportToPS::DVIExportToPS(dviRenderer& parent,
return;
if (dvi.numberOfExternalNONPSFiles != 0) {
emit error(i18n("This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the "
"'dvips' program that Okular uses internally to print or to export to PostScript. The functionality that "
"you require is therefore unavailable in this version of Okular."), -1);
emit error(i18n("<qt>This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the "
"<em>dvips</em> program that Okular uses internally to print or to export to PostScript. The functionality that "
"you require is therefore unavailable in this version of Okular.</qt>"), -1);
return;
}
if (KStandardDirs::findExe("dvips").isEmpty()) {
emit error(i18n("Okular could not locate the program 'dvips' on your computer. That program is "
"essential for the export function to work.\n"
"Hint to the perplexed system administrator: Okular uses the PATH environment variable "
"when looking for programs."), -1);
emit error(i18n("<qt><p>Okular could not locate the program <em>dvips</em> on your computer. "
"That program is essential for the export function to work.</p>"
"<p>Hint to the perplexed system administrator: Okular uses the PATH environment "
"variable when looking for programs.</p></qt>"), -1);
return;
}
......
......@@ -206,10 +206,12 @@ void fontPool::locateFonts()
// present an error message to the user.
if (!areFontsLocated()) {
markFontsAsLocated();
emit error(i18n("Okular was not able to locate all the font files "
emit error(i18n("<qt><p>Okular was not able to locate all the font files "
"which are necessary to display the current DVI file. "
"Your document might be unreadable.\n"
"PATH: %1\nkpswhich: %2", getenv("PATH"), kpsewhichOutput), -1);
"Your document might be unreadable.</p>"
"<p><small><b>PATH:</b> %1</small></p>"
"<p><small>%2</small></p></qt>", getenv("PATH"),
kpsewhichOutput.replace(QLatin1String("\n"), QLatin1String("<br/>"))), -1);
}
}
......@@ -269,21 +271,19 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// a real command line, but who cares?
const QString kpsewhich_exe = "kpsewhich";
kpsewhichOutput +=
"<p><b>" + kpsewhich_exe + ' ' + kpsewhich_args.join(" ") + "</b></p>";
const QString importanceOfKPSEWHICH =
i18n("<p>Okular relies on the <b>kpsewhich</b> program to locate font files "
"on your hard disk and to generate PK fonts, if necessary.</p>");
"<b>" + kpsewhich_exe + ' ' + kpsewhich_args.join(" ") + "</b>";
kpsewhich_->start(kpsewhich_exe, kpsewhich_args,
QIODevice::ReadOnly|QIODevice::Text);
if (!kpsewhich_->waitForStarted()) {
QApplication::restoreOverrideCursor();
emit error(i18n("There were problems running 'kpsewhich'. As a result, "
"some font files could not be located, and your document might be unreadable.\n"
"Possible reason: The kpsewhich program is perhaps not installed on your system, or it "
"cannot be found in the current search path.\n"
"PATH: %1\nkpswhich: %2", getenv("PATH"), kpsewhichOutput), -1);
emit error(i18n("<qt><p>There were problems running <em>kpsewhich</em>. As a result, "
"some font files could not be located, and your document might be unreadable.<br/>"
"Possible reason: the <em>kpsewhich</em> program is perhaps not installed on your system, "
"or it cannot be found in the current search path.</p>"
"<p><small><b>PATH:</b> %1</small></p>"
"<p><small>%2</small></p></qt>", getenv("PATH"),
kpsewhichOutput.replace(QLatin1String("\n"), QLatin1String("<br/>"))), -1);
// This makes sure the we don't try to run kpsewhich again
markFontsAsLocated();
......@@ -296,8 +296,8 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// Handle fatal errors.
int const kpsewhich_exit_code = kpsewhich_->exitCode();
if (kpsewhich_exit_code < 0) {
emit warning(i18n("The font generation by 'kpsewhich' was aborted (exit code %1, error %2). As a "
"result, some font files could not be located, and your document might be unreadable.",
emit warning(i18n("<qt>The font generation by <em>kpsewhich</em> was aborted (exit code %1, error %2). As a "
"result, some font files could not be located, and your document might be unreadable.</qt>",
kpsewhich_exit_code, kpsewhich_->errorString()), -1);
// This makes sure the we don't try to run kpsewhich again
......@@ -474,7 +474,7 @@ void fontPool::mf_output_receiver()
int secondblank = startLine.lastIndexOf(' ',lastblank-1);
QString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1);
emit warning( i18n("Currently generating %1 at %2 dpi", fontName, dpi), -1 );
emit warning( i18n("Currently generating %1 at %2 dpi...", fontName, dpi), -1 );
}
MetafontOutput = MetafontOutput.remove(0,numleft+1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment