i18n fixes (s/KDVI/okular/) by Luigi Toscano.

CCMAIL: luigi.toscano@tiscali.it

svn path=/trunk/KDE/kdegraphics/okular/; revision=736814
This commit is contained in:
Pino Toscano 2007-11-14 22:12:53 +00:00
parent 76ed5e18e5
commit f1fa4254f3
6 changed files with 44 additions and 48 deletions

View file

@ -151,7 +151,7 @@ void dvifile::find_postamble()
while((*command_pointer == TRAILER) && (command_pointer > dvi_Data())) while((*command_pointer == TRAILER) && (command_pointer > dvi_Data()))
command_pointer--; command_pointer--;
if (command_pointer == dvi_Data()) { if (command_pointer == dvi_Data()) {
errorMsg = i18n("The DVI file is badly corrupted. KDVI was not able to find the postamble."); errorMsg = i18n("The DVI file is badly corrupted. Okular was not able to find the postamble.");
return; return;
} }
@ -410,7 +410,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
*converrorms = i18n("<qt><p>The PDF-file %1 could not be converted to PostScript. Some graphic elements in your " *converrorms = i18n("<qt><p>The PDF-file %1 could not be converted to PostScript. Some graphic elements in your "
"document will therefore not be displayed.</p>" "document will therefore not be displayed.</p>"
"<p><b>Possible reason:</b> The file %1 might be broken, or might not be a PDF-file at all. " "<p><b>Possible reason:</b> The file %1 might be broken, or might not be a PDF-file at all. "
"This is the output of the <strong>pdf2ps</strong> program that KDVI used:</p>" "This is the output of the <strong>pdf2ps</strong> program that okular used:</p>"
"<p><strong>%2</strong></p></qt>", PDFFilename, output); "<p><strong>%2</strong></p></qt>", PDFFilename, output);
} }
return QString(); return QString();

View file

@ -265,7 +265,7 @@ void dviRenderer::getText(RenderedDocumentPagePixmap* page)
_postscript = postscriptBackup; _postscript = postscriptBackup;
} }
#if 0 /*
void dviRenderer::showThatSourceInformationIsPresent() void dviRenderer::showThatSourceInformationIsPresent()
{ {
// In principle, we should use a KMessagebox here, but we want to // In principle, we should use a KMessagebox here, but we want to
@ -319,7 +319,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
config->sync(); config->sync();
} }
} }
#endif */
void dviRenderer::embedPostScript() void dviRenderer::embedPostScript()
{ {
@ -454,12 +454,12 @@ bool dviRenderer::setFile(const QString &fname, const KUrl &base)
// Make sure the file actually exists. // Make sure the file actually exists.
if (!fi.exists() || fi.isDir()) { if (!fi.exists() || fi.isDir()) {
#if 0 /*
KMessageBox::error( parentWidget, KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. " i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. "
"KDVI already tried to add the ending '.dvi'.</qt>", filename), "KDVI already tried to add the ending '.dvi'.</qt>", filename),
i18n("File Error")); i18n("File Error"));
#endif */
return false; return false;
} }
@ -630,14 +630,14 @@ Anchor dviRenderer::parseReference(const QString &reference)
QString refFileName = splitter.filePath(); QString refFileName = splitter.filePath();
if (sourceHyperLinkAnchors.isEmpty()) { if (sourceHyperLinkAnchors.isEmpty()) {
#if 0 /*
KMessageBox::sorry(parentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to " KMessageBox::sorry(parentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to "
"line %1 in the TeX-file <strong>%2</strong>. It seems, however, that the DVI file " "line %1 in the TeX-file <strong>%2</strong>. It seems, however, that the DVI file "
"does not contain the necessary source file information. " "does not contain the necessary source file information. "
"We refer to the manual of KDVI for a detailed explanation on how to include this " "We refer to the manual of KDVI for a detailed explanation on how to include this "
"information. Press the F1 key to open the manual.</qt>", refLineNumber, refFileName), "information. Press the F1 key to open the manual.</qt>", refLineNumber, refFileName),
i18n("Could Not Find Reference")); i18n("Could Not Find Reference"));
#endif */
return Anchor(); return Anchor();
} }
@ -674,11 +674,11 @@ Anchor dviRenderer::parseReference(const QString &reference)
else else
if (anchorForRefFileFound == false) if (anchorForRefFileFound == false)
{ {
#if 0 /*
KMessageBox::sorry(parentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to " KMessageBox::sorry(parentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to "
"line %1 in the TeX-file <strong>%2</strong>.</qt>", refLineNumber, refFileName), "line %1 in the TeX-file <strong>%2</strong>.</qt>", refLineNumber, refFileName),
i18n( "Could Not Find Reference" )); i18n( "Could Not Find Reference" ));
#endif */
} }
else else
return Anchor(); return Anchor();
@ -758,11 +758,11 @@ QString dviRenderer::PDFencodingToQString(const QString& _pdfstring)
void dviRenderer::exportPDF() void dviRenderer::exportPDF()
{ {
#if 0 /*
KSharedPtr<DVIExport> exporter(new DVIExportToPDF(*this, parentWidget)); KSharedPtr<DVIExport> exporter(new DVIExportToPDF(*this, parentWidget));
if (exporter->started()) if (exporter->started())
all_exports_[exporter.data()] = exporter; all_exports_[exporter.data()] = exporter;
#endif */
} }
@ -771,14 +771,14 @@ void dviRenderer::exportPS(const QString& fname, const QStringList& options, QPr
Q_UNUSED( fname ); Q_UNUSED( fname );
Q_UNUSED( options ); Q_UNUSED( options );
Q_UNUSED( printer ); Q_UNUSED( printer );
#if 0 /*
KSharedPtr<DVIExport> exporter(new DVIExportToPS(*this, parentWidget, fname, options, printer)); KSharedPtr<DVIExport> exporter(new DVIExportToPS(*this, parentWidget, fname, options, printer));
if (exporter->started()) if (exporter->started())
all_exports_[exporter.data()] = exporter; all_exports_[exporter.data()] = exporter;
#endif */
} }
#if 0 /*
void dviRenderer::update_info_dialog(const QString& text, bool clear) void dviRenderer::update_info_dialog(const QString& text, bool clear)
{ {
if (clear) if (clear)
@ -791,9 +791,9 @@ void dviRenderer::editor_finished(const DVISourceEditor*)
{ {
editor_.attach(0); editor_.attach(0);
} }
#endif */
#if 0 /*
void dviRenderer::export_finished(const DVIExport* key) void dviRenderer::export_finished(const DVIExport* key)
{ {
typedef QMap<const DVIExport*, KSharedPtr<DVIExport> > ExportMap; typedef QMap<const DVIExport*, KSharedPtr<DVIExport> > ExportMap;
@ -801,6 +801,6 @@ void dviRenderer::export_finished(const DVIExport* key)
if (it != all_exports_.end()) if (it != all_exports_.end())
all_exports_.remove(key); all_exports_.remove(key);
} }
#endif */
#include "dviRenderer.moc" #include "dviRenderer.moc"

View file

@ -11,13 +11,9 @@
#define _dvirenderer_h_ #define _dvirenderer_h_
#include "bigEndianByteReader.h" #include "bigEndianByteReader.h"
#if 0 //#include "documentRenderer.h"
#include "documentRenderer.h" //#include "dviexport.h"
#endif //#include "dvisourceeditor.h"
#include "dviexport.h"
#if 0
#include "dvisourceeditor.h"
#endif
#include "fontpool.h" #include "fontpool.h"
#include "dviPageInfo.h" #include "dviPageInfo.h"
#include "pageSize.h" #include "pageSize.h"
@ -149,14 +145,14 @@ public:
void html_href_special(const QString& msg); void html_href_special(const QString& msg);
void html_anchor_end(); void html_anchor_end();
void draw_page(); void draw_page();
void export_finished(const DVIExport*); //void export_finished(const DVIExport*);
// void editor_finished(const DVISourceEditor*); //void editor_finished(const DVISourceEditor*);
public slots: public slots:
void exportPS(const QString& fname = QString(), const QStringList& options = QStringList(), QPrinter* printer = 0); void exportPS(const QString& fname = QString(), const QStringList& options = QStringList(), QPrinter* printer = 0);
void exportPDF(); void exportPDF();
// void showInfo(); //void showInfo();
void handleSRCLink(const QString &linkText, const QPoint& point, DocumentWidget *widget); void handleSRCLink(const QString &linkText, const QPoint& point, DocumentWidget *widget);
void embedPostScript(); void embedPostScript();
@ -310,7 +306,7 @@ private:
drawinf currinf; drawinf currinf;
RenderedDocumentPagePixmap* currentlyDrawnPage; RenderedDocumentPagePixmap* currentlyDrawnPage;
QMap<const DVIExport*, KSharedPtr<DVIExport> > all_exports_; //QMap<const DVIExport*, KSharedPtr<DVIExport> > all_exports_;
//KSharedPtr<DVISourceEditor> editor_; //KSharedPtr<DVISourceEditor> editor_;
/** Flag if document is modified /** Flag if document is modified

View file

@ -36,12 +36,12 @@ bool fontPoolTimerFlag;
fontPool::fontPool() fontPool::fontPool()
: progress("fontgen", // Chapter in the documentation for help. : progress("fontgen", // Chapter in the documentation for help.
i18n("KDVI is currently generating bitmap fonts..."), i18n("Okular is currently generating bitmap fonts..."),
i18n("Aborts the font generation. Don't do this."), i18n("Aborts the font generation. Don't do this."),
i18n("KDVI is currently generating bitmap fonts which are needed to display your document. " i18n("Okular is currently generating bitmap fonts which are needed to display your document. "
"For this, KDVI uses a number of external programs, such as MetaFont. You can find " "For this, okular uses a number of external programs, such as MetaFont. You can find "
"the output of these programs later in the document info dialog."), "the output of these programs later in the document info dialog."),
i18n("KDVI is generating fonts. Please wait."), i18n("Okular is generating fonts. Please wait."),
0) 0)
{ {
#ifdef DEBUG_FONTPOOL #ifdef DEBUG_FONTPOOL
@ -275,7 +275,7 @@ void fontPool::locateFonts()
if (!areFontsLocated()) { if (!areFontsLocated()) {
markFontsAsLocated(); markFontsAsLocated();
QString details = QString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput); QString details = QString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
KMessageBox::detailedError( 0, i18n("<qt><p>KDVI was not able to locate all the font files " KMessageBox::detailedError( 0, i18n("<qt><p>Okular was not able to locate all the font files "
"which are necessary to display the current DVI file. " "which are necessary to display the current DVI file. "
"Your document might be unreadable.</p></qt>"), "Your document might be unreadable.</p></qt>"),
details, details,
@ -338,7 +338,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
"<p><b>" + kpsewhich_exe + ' ' + kpsewhich_args.join(" ") + "</b></p>"; "<p><b>" + kpsewhich_exe + ' ' + kpsewhich_args.join(" ") + "</b></p>";
const QString importanceOfKPSEWHICH = const QString importanceOfKPSEWHICH =
i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files " i18n("<p>Okular relies on the <b>kpsewhich</b> program to locate font files "
"on your hard disc and to generate PK fonts, if necessary.</p>"); "on your hard disc and to generate PK fonts, if necessary.</p>");
kpsewhich_.start(kpsewhich_exe, kpsewhich_args, kpsewhich_.start(kpsewhich_exe, kpsewhich_args,
@ -351,7 +351,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
"<p><b>Possible reason:</b> The kpsewhich program is perhaps not installed on your system, or it " "<p><b>Possible reason:</b> The kpsewhich program is perhaps not installed on your system, or it "
"cannot be found in the current search path.</p>" "cannot be found in the current search path.</p>"
"<p><b>What you can do:</b> The kpsewhich program is normally contained in distributions of the TeX " "<p><b>What you can do:</b> The kpsewhich program is normally contained in distributions of the TeX "
"typesetting system. If TeX is not installed on your system, you could install the TeTeX distribution (www.tetex.org). " "typesetting system. If TeX is not installed on your system, you could install the TeX Live distribution (www.tug.org/texlive). "
"If you are sure that TeX is installed, please try to use the kpsewhich program from the command line to check if it " "If you are sure that TeX is installed, please try to use the kpsewhich program from the command line to check if it "
"really works.</p>"); "really works.</p>");
const QString details = const QString details =
@ -360,7 +360,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
KMessageBox::detailedError(0, KMessageBox::detailedError(0,
QString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), QString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg),
details, details,
i18n("Problem locating fonts - KDVI")); i18n("Problem locating fonts - okular"));
// This makes sure the we don't try to run kpsewhich again // This makes sure the we don't try to run kpsewhich again
markFontsAsLocated(); markFontsAsLocated();
@ -381,7 +381,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
KMessageBox::sorry(0, KMessageBox::sorry(0,
QString("<qt><p>The font generation by <b>kpsewhich</b> was aborted (exit code %1, error %2). As a result, " QString("<qt><p>The font generation by <b>kpsewhich</b> was aborted (exit code %1, error %2). As a result, "
"some font files could not be located, and your document might be unreadable.</p></qt>").arg(kpsewhich_exit_code).arg(kpsewhich_.errorString()), "some font files could not be located, and your document might be unreadable.</p></qt>").arg(kpsewhich_exit_code).arg(kpsewhich_.errorString()),
i18n("Font generation aborted - KDVI") ); i18n("Font generation aborted - okular") );
// This makes sure the we don't try to run kpsewhich again // This makes sure the we don't try to run kpsewhich again
if (makePK == false) if (makePK == false)

View file

@ -260,26 +260,26 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
// TODO: show a requestor of some sort. // TODO: show a requestor of some sort.
KMessageBox::detailedError(0, KMessageBox::detailedError(0,
i18n("<qt>The version of Ghostview that is installed on this computer does not contain " i18n("<qt>The version of Ghostview that is installed on this computer does not contain "
"any of the Ghostview device drivers that are known to KDVI. PostScript " "any of the Ghostview device drivers that are known to okular. PostScript "
"support has therefore been turned off in KDVI.</qt>"), "support has therefore been turned off in okular.</qt>"),
i18n("<qt><p>The Ghostview program, which KDVI uses internally to display the " i18n("<qt><p>The Ghostview program, which okular uses internally to display the "
"PostScript graphics that is included in this DVI file, is generally able to " "PostScript graphics that is included in this DVI file, is generally able to "
"write its output in a variety of formats. The sub-programs that Ghostview uses " "write its output in a variety of formats. The sub-programs that Ghostview uses "
"for these tasks are called 'device drivers'; there is one device driver for " "for these tasks are called 'device drivers'; there is one device driver for "
"each format that Ghostview is able to write. Different versions of Ghostview " "each format that Ghostview is able to write. Different versions of Ghostview "
"often have different sets of device drivers available. It seems that the " "often have different sets of device drivers available. It seems that the "
"version of Ghostview that is installed on this computer does not contain " "version of Ghostview that is installed on this computer does not contain "
"<strong>any</strong> of the device drivers that are known to KDVI.</p>" "<strong>any</strong> of the device drivers that are known to okular.</p>"
"<p>It seems unlikely that a regular installation of Ghostview would not contain " "<p>It seems unlikely that a regular installation of Ghostview would not contain "
"these drivers. This error may therefore point to a serious misconfiguration of " "these drivers. This error may therefore point to a serious misconfiguration of "
"the Ghostview installation on your computer.</p>" "the Ghostview installation on your computer.</p>"
"<p>If you want to fix the problems with Ghostview, you can use the command " "<p>If you want to fix the problems with Ghostview, you can use the command "
"<strong>gs --help</strong> to display the list of device drivers contained in " "<strong>gs --help</strong> to display the list of device drivers contained in "
"Ghostview. Among others, KDVI can use the 'png256', 'jpeg' and 'pnm' " "Ghostview. Among others, okular can use the 'png256', 'jpeg' and 'pnm' "
"drivers. Note that KDVI needs to be restarted to re-enable PostScript support." "drivers. Note that okular needs to be restarted to re-enable PostScript support."
"</p></qt>")); "</p></qt>"));
else { else {
kDebug(kvs::dvi) << QString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice); kDebug(kvs::dvi) << QString("Okular will now try to use the '%1' device driver.").arg(*gsDevice);
gs_generate_graphics_file(page, filename, magnification); gs_generate_graphics_file(page, filename, magnification);
} }
return; return;

View file

@ -77,11 +77,11 @@ void oops(const QString& message)
i18n("Fatal error.\n\n") + i18n("Fatal error.\n\n") +
message + message +
i18n("\n\n\ i18n("\n\n\
This probably means that either you found a bug in KDVI,\n\ This probably means that either you found a bug in okular,\n\
or that the DVI file, or auxiliary files (such as font files, \n\ or that the DVI file, or auxiliary files (such as font files, \n\
or virtual font files) were really badly broken.\n\ or virtual font files) were really badly broken.\n\
KDVI will abort after this message. If you believe that you \n\ Okular will abort after this message. If you believe that you \n\
found a bug, or that KDVI should behave better in this situation\n\ found a bug, or that okular should behave better in this situation\n\
please report the problem.")); please report the problem."));
exit(1); exit(1);
} }