Virus Browser: Updated related HTML files and made them translatable.:

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent d827cbfe31
commit 6a1bc5a8e0
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -1,53 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" <?xml version="1.0" encoding="utf-8"?>
"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<HEAD> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta name="description" content="" />
<meta name="author" content="Hans de Raad"/> <html xmlns="http://www.w3.org/1999/xhtml">
<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" /> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="generator" content=
<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" /> "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
<TITLE>KlamAV</TITLE>
<STYLE>BODY {color: black; <style type="text/css">
font-size: 10pt; /*<![CDATA[*/
margin-left: 5%; @import "%1"; /* klamav.css */
margin-right: 5%; @import "%1"; /* kde_infopage.css */
} %1 /* maybe @import "kde_infopage_rtl.css"; */
.KANormal { /*]]>*/
font-size: 9pt; </style>
color: black;
} <title>%1</title>
.KASmall { </head>
font-size: 8pt;
color: black; <body>
} <div id="header">
A:LINK { <div id="headerL"></div>
font-size: 9pt; <div id="headerCenter"></div>
color: black; <div id="headerR"></div>
}
<div id="title">
A:VISITED { %1 <!-- Virus Browser-->
font-size: 9pt; </div>
color: black}
<div id="tagline">
A:HOVER { %1 <!-- version number -->
font-size: 9pt; </div>
font-weight: bold; </div>
color: #FFFFFF;
background-color: #000000; <!-- the bar -->
} </STYLE> <div id="bar">
</HEAD> <div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
<BODY> <div id="barL">
<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>KlamAV Virus Browser</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>News</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=102171"><b>Download KlamAV</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=86638"><b>Download ClamAV</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Security Notes</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%> <div id="barR">
<p class=KANormal> <div id="barCenter" class="bar_text">
<p>KlamAV's Virus Browser allows you to research %1 <!-- KlamAV's Virus Browser allows you to research the viruses detected by ClamAV. -->
the viruses detected by ClamAV. With the virus browser you can:</p> </div>
<p>* Right-click on a virus-name to choose whether to research a virus using Google or VirusPool.</p> </div>
<p>* Right-click on a detected virus in the 'Scan' tab to research it in the virus browser.</p> </div>
<p>* Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser.</p> <div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
<p></p> </div>
<p>NB: The filter on the top-left is experimental. Filtering can take a while so use with care!!</p>
<!-- the main text box -->
<p>Good Luck.</p><p></p> <div id="box">
<div id="boxT"><div id="boxTL"></div><div id="boxTR"></div><div id="boxTC"></div></div>
</td></tr></table> <div id="boxL">
</BODY></HTML> <div id="boxR">
<div id="boxCenter">
%1 <!-- Usage is simple: -->
<ul>
<li>%1</li> <!-- Right-click on a virus-name to choose whether to research a virus using Google or TrendMicro. -->
<li>%1</li> <!-- Right-click on a detected virus in the 'Scan' tab to research it in the virus browser. -->
<li>%1</li> <!-- Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser. -->
</ul>
</div>
</div>
</div>
<div id="boxB"><div id="boxBL"></div><div id="boxBR"></div><div id="boxBC"></div></div>
</div>
<div id="footer"><div id="footerL"></div><div id="footerR"></div></div>
</body>
</html>

@ -1,46 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" <?xml version="1.0" encoding="utf-8"?>
"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<HEAD> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta name="description" content="" />
<meta name="author" content="Hans de Raad"/> <html xmlns="http://www.w3.org/1999/xhtml">
<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" /> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="generator" content=
<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" /> "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
<TITLE>KlamAV</TITLE>
<STYLE>BODY {color: black; <style type="text/css">
font-size: 10pt; /*<![CDATA[*/
margin-left: 5%; @import "%1"; /* klamav.css */
margin-right: 5%; @import "%1"; /* kde_infopage.css */
} %1 /* maybe @import "kde_infopage_rtl.css"; */
.KANormal { /*]]>*/
font-size: 9pt; </style>
color: black;
} <title>%1</title>
.KASmall { </head>
font-size: 8pt;
color: black; <body>
} <div id="header">
A:LINK { <div id="headerL"></div>
font-size: 9pt; <div id="headerCenter"></div>
color: black; <div id="headerR"></div>
}
<div id="title">
A:VISITED { %1 <!-- Virus Browser-->
font-size: 9pt; </div>
color: black}
<div id="tagline">
A:HOVER { %1 <!-- version number -->
font-size: 9pt; </div>
font-weight: bold; </div>
color: #FFFFFF;
background-color: #000000; <!-- the bar -->
} </STYLE> <div id="bar">
</HEAD> <div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
<BODY> <div id="barL">
<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>KlamAV Virus Browser</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>News</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=102171"><b>Download KlamAV</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=86638"><b>Download ClamAV</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Security Notes</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%> <div id="barR">
<p class=KANormal> <div id="barCenter" class="bar_text">
THERE'S NO DATABASE TO LOAD - DOWNLOAD ONE USING THE UPDATES SECTION!! <big>%1</big><br><br> %1 <!-- The virus database could not be loaded. / Please ensure that you have downloaded one (using the Updates section) and try again. -->
</p> </div>
</div>
</td></tr></table> </div>
</BODY></HTML> <div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
</div>
<div id="footer"><div id="footerL"></div><div id="footerR"></div></div>
</body>
</html>

@ -1,46 +1,51 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" <?xml version="1.0" encoding="utf-8"?>
"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<HEAD> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta name="description" content="" />
<meta name="author" content="Hans de Raad"/> <html xmlns="http://www.w3.org/1999/xhtml">
<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" /> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="generator" content=
<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" /> "HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
<TITLE>KlamAV</TITLE>
<STYLE>BODY {color: black; <style type="text/css">
font-size: 10pt; /*<![CDATA[*/
margin-left: 5%; @import "%1"; /* klamav.css */
margin-right: 5%; @import "%1"; /* kde_infopage.css */
} %1 /* maybe @import "kde_infopage_rtl.css"; */
.KANormal { /*]]>*/
font-size: 9pt; </style>
color: black;
} <title>%1</title>
.KASmall { </head>
font-size: 8pt;
color: black; <body>
} <div id="header">
A:LINK { <div id="headerL"></div>
font-size: 9pt; <div id="headerCenter"></div>
color: black; <div id="headerR"></div>
}
<div id="title">
A:VISITED { %1 <!-- Virus Browser-->
font-size: 9pt; </div>
color: black}
<div id="tagline">
A:HOVER { %1 <!-- version number -->
font-size: 9pt; </div>
font-weight: bold; </div>
color: #FFFFFF;
background-color: #000000; <!-- the bar -->
} </STYLE> <div id="bar">
</HEAD> <div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
<BODY> <div id="barL">
<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>KlamAV Virus Browser</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>News</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=102171"><b>Download KlamAV</b></a><br><a href="https://sourceforge.net/project/showfiles.php?group_id=86638"><b>Download ClamAV</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Security Notes</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%> <div id="barR">
<p class=KANormal> <div id="barCenter" class="bar_text">
Please wait while the database loads... %1 <!-- Please wait while the database loads... -->
</p> </div>
</div>
</td></tr></table> </div>
</BODY></HTML> <div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
</div>
<div id="footer"><div id="footerL"></div><div id="footerR"></div></div>
</body>
</html>

@ -12,6 +12,7 @@
#include "pageviewer.h" #include "pageviewer.h"
#include "tabwidget.h" #include "tabwidget.h"
#include "freshklam.h" #include "freshklam.h"
#include "version.h"
#include "../config.h" #include "../config.h"
#include <tqheader.h> #include <tqheader.h>
@ -692,7 +693,7 @@ void KlamDB::shouldIShow(TQWidget * current)
{ {
static struct cl_stat *dbstat=NULL; static struct cl_stat *dbstat=NULL;
TQString location; TQString location, res;
if ((current == this) && (!(loadinprogress))){ if ((current == this) && (!(loadinprogress))){
TQString db = tdemain->freshklam->getCurrentDBDir(); TQString db = tdemain->freshklam->getCurrentDBDir();
@ -700,7 +701,26 @@ void KlamDB::shouldIShow(TQWidget * current)
if (checkdir(db.ascii()) == -1){ if (checkdir(db.ascii()) == -1){
kdDebug() << "returned -1" << endl; kdDebug() << "returned -1" << endl;
location = locate("data", "klamav/about/nodb.html"); location = locate("data", "klamav/about/nodb.html");
homepage->openURL(location); res = homepage->loadFile(location);
/* Stylesheets */
res = res.arg( locate( "data", "klamav/about/klamav.css" ) );
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
res = res.arg( i18n("Virus Browser") )
.arg( i18n("Virus Browser") )
.arg( i18n("Version ")+TQString(KLAMAV_VERSION) )
.arg( i18n("The virus database could not be loaded.") )
.arg( i18n("Please ensure that you have downloaded one (using the Updates section) and try again.") );
homepage->begin();
homepage->write(res);
homepage->end();
return; return;
} }
@ -708,9 +728,28 @@ void KlamDB::shouldIShow(TQWidget * current)
if ( ((cl_statchkdir(dbstat) == 1) || (dbstat == NULL))) { if ( ((cl_statchkdir(dbstat) == 1) || (dbstat == NULL))) {
location = locate("data", "klamav/about/wait.html"); location = locate("data", "klamav/about/wait.html");
homepage->openURL(location); res = homepage->loadFile(location);
/* Stylesheets */
res = res.arg( locate( "data", "klamav/about/klamav.css" ) );
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
res = res.arg( i18n("Virus Browser") )
.arg( i18n("Virus Browser") )
.arg( i18n("Version ")+TQString(KLAMAV_VERSION) )
.arg( i18n("Please wait while the database loads...") );
homepage->begin();
homepage->write(res);
homepage->end();
loadinprogress = true;
loadinprogress = true;
sigs = ( int )getSigNos(); sigs = ( int )getSigNos();
progress = new KProgressDialog (this, "progress", i18n( "Loading .." ), i18n( "Loading..." ), true); progress = new KProgressDialog (this, "progress", i18n( "Loading .." ), i18n( "Loading..." ), true);
progress->setAllowCancel(false); progress->setAllowCancel(false);
@ -750,13 +789,31 @@ void KlamDB::shouldIShow(TQWidget * current)
loadinprogress = false; loadinprogress = false;
// Default english
TQString location = locate( "data", "klamav/about/main-" + TDEGlobal::locale()->language() + ".html" );
if( location != TQString::null )
homepage->openURL( location );
else
homepage->openURL( locate("data", "klamav/about/main.html") );
location = locate("data", "klamav/about/main.html");
res = homepage->loadFile(location);
/* Stylesheets */
res = res.arg( locate( "data", "klamav/about/klamav.css" ) );
res = res.arg( locate( "data", "tdeui/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
res = res.arg( "@import \"%1\";" ).arg( locate( "data", "tdeui/about/kde_infopage_rtl.css" ) );
else
res = res.arg( "" );
res = res.arg( i18n("Virus Browser") )
.arg( i18n("Virus Browser") )
.arg( i18n("Version ")+TQString(KLAMAV_VERSION) )
.arg( i18n("KlamAV's Virus Browser allows you to research the viruses detected by ClamAV.") )
.arg( i18n("Usage is simple:") )
.arg( i18n("Right-click on a virus-name to choose whether to research a virus using Google or TrendMicro.") )
.arg( i18n("Right-click on a detected virus in the 'Scan' tab to research it in the virus browser.") )
.arg( i18n("Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser.") );
homepage->begin();
homepage->write(res);
homepage->end();
} }
} }
} }

@ -13,6 +13,7 @@
#include <tdepopupmenu.h> #include <tdepopupmenu.h>
#include <tqclipboard.h> #include <tqclipboard.h>
#include <tqfile.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include "viewer.h" #include "viewer.h"
@ -67,6 +68,22 @@ bool Viewer::openURL(const KURL &url)
return true; return true;
} }
/* borrowed from Konqueror */
TQString Viewer::loadFile( const TQString& file ) {
TQString res;
if( file.isEmpty() )
return res;
TQFile f(file);
if( !f.open(IO_ReadOnly) )
return res;
TQTextStream t(&f);
res = t.read();
return res;
}
bool Viewer::closeURL() bool Viewer::closeURL()
{ {

@ -26,6 +26,7 @@ namespace KlamAV
Viewer(TQWidget* parent, const char* name); Viewer(TQWidget* parent, const char* name);
virtual bool closeURL(); virtual bool closeURL();
virtual bool openURL(const KURL &); virtual bool openURL(const KURL &);
TQString loadFile( const TQString& file );
/** used by the BrowserRun object to call TDEHTMLPart::openURL() */ /** used by the BrowserRun object to call TDEHTMLPart::openURL() */
void openPage(const KURL& url) { TDEHTMLPart::openURL(url);} void openPage(const KURL& url) { TDEHTMLPart::openURL(url);}

Loading…
Cancel
Save