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"
"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML>
<HEAD>
<meta name="description" content="" />
<meta name="author" content="Hans de Raad"/>
<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" />
<TITLE>KlamAV</TITLE>
<STYLE>BODY {color: black;
font-size: 10pt;
margin-left: 5%;
margin-right: 5%;
}
.KANormal {
font-size: 9pt;
color: black;
}
.KASmall {
font-size: 8pt;
color: black;
}
A:LINK {
font-size: 9pt;
color: black;
}
A:VISITED {
font-size: 9pt;
color: black}
A:HOVER {
font-size: 9pt;
font-weight: bold;
color: #FFFFFF;
background-color: #000000;
} </STYLE>
</HEAD>
<BODY>
<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%>
<p class=KANormal>
<p>KlamAV's Virus Browser allows you to research
the viruses detected by ClamAV. With the virus browser you can:</p>
<p>* Right-click on a virus-name to choose whether to research a virus using Google or VirusPool.</p>
<p>* Right-click on a detected virus in the 'Scan' tab to research it in the virus browser.</p>
<p>* Right-click on a detected virus in the 'Quarantine' tab to research it in the virus browser.</p>
<p></p>
<p>NB: The filter on the top-left is experimental. Filtering can take a while so use with care!!</p>
<p>Good Luck.</p><p></p>
</td></tr></table>
</BODY></HTML>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
<style type="text/css">
/*<![CDATA[*/
@import "%1"; /* klamav.css */
@import "%1"; /* kde_infopage.css */
%1 /* maybe @import "kde_infopage_rtl.css"; */
/*]]>*/
</style>
<title>%1</title>
</head>
<body>
<div id="header">
<div id="headerL"></div>
<div id="headerCenter"></div>
<div id="headerR"></div>
<div id="title">
%1 <!-- Virus Browser-->
</div>
<div id="tagline">
%1 <!-- version number -->
</div>
</div>
<!-- the bar -->
<div id="bar">
<div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
<div id="barL">
<div id="barR">
<div id="barCenter" class="bar_text">
%1 <!-- KlamAV's Virus Browser allows you to research the viruses detected by ClamAV. -->
</div>
</div>
</div>
<div id="barB"><div id="barBL"></div><div id="barBR"></div><div id="barBC"></div></div>
</div>
<!-- the main text box -->
<div id="box">
<div id="boxT"><div id="boxTL"></div><div id="boxTR"></div><div id="boxTC"></div></div>
<div id="boxL">
<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"
"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML>
<HEAD>
<meta name="description" content="" />
<meta name="author" content="Hans de Raad"/>
<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" />
<TITLE>KlamAV</TITLE>
<STYLE>BODY {color: black;
font-size: 10pt;
margin-left: 5%;
margin-right: 5%;
}
.KANormal {
font-size: 9pt;
color: black;
}
.KASmall {
font-size: 8pt;
color: black;
}
A:LINK {
font-size: 9pt;
color: black;
}
A:VISITED {
font-size: 9pt;
color: black}
A:HOVER {
font-size: 9pt;
font-weight: bold;
color: #FFFFFF;
background-color: #000000;
} </STYLE>
</HEAD>
<BODY>
<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%>
<p class=KANormal>
THERE'S NO DATABASE TO LOAD - DOWNLOAD ONE USING THE UPDATES SECTION!!
</p>
</td></tr></table>
</BODY></HTML>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
<style type="text/css">
/*<![CDATA[*/
@import "%1"; /* klamav.css */
@import "%1"; /* kde_infopage.css */
%1 /* maybe @import "kde_infopage_rtl.css"; */
/*]]>*/
</style>
<title>%1</title>
</head>
<body>
<div id="header">
<div id="headerL"></div>
<div id="headerCenter"></div>
<div id="headerR"></div>
<div id="title">
%1 <!-- Virus Browser-->
</div>
<div id="tagline">
%1 <!-- version number -->
</div>
</div>
<!-- the bar -->
<div id="bar">
<div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
<div id="barL">
<div id="barR">
<div id="barCenter" class="bar_text">
<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. -->
</div>
</div>
</div>
<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"
"http://www.w3.org/TR/REC-html40/loose.dtd"><HTML>
<HEAD>
<meta name="description" content="" />
<meta name="author" content="Hans de Raad"/>
<meta name="keywords" content="KlamAV, Anti-Virus, AV, Linux, KDE, ClamAV, Freshklam, GUI" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="shortcut icon" HREF="http://klamav.sf.net/favicon.ico" />
<TITLE>KlamAV</TITLE>
<STYLE>BODY {color: black;
font-size: 10pt;
margin-left: 5%;
margin-right: 5%;
}
.KANormal {
font-size: 9pt;
color: black;
}
.KASmall {
font-size: 8pt;
color: black;
}
A:LINK {
font-size: 9pt;
color: black;
}
A:VISITED {
font-size: 9pt;
color: black}
A:HOVER {
font-size: 9pt;
font-weight: bold;
color: #FFFFFF;
background-color: #000000;
} </STYLE>
</HEAD>
<BODY>
<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%>
<p class=KANormal>
Please wait while the database loads...
</p>
</td></tr></table>
</BODY></HTML>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org" />
<style type="text/css">
/*<![CDATA[*/
@import "%1"; /* klamav.css */
@import "%1"; /* kde_infopage.css */
%1 /* maybe @import "kde_infopage_rtl.css"; */
/*]]>*/
</style>
<title>%1</title>
</head>
<body>
<div id="header">
<div id="headerL"></div>
<div id="headerCenter"></div>
<div id="headerR"></div>
<div id="title">
%1 <!-- Virus Browser-->
</div>
<div id="tagline">
%1 <!-- version number -->
</div>
</div>
<!-- the bar -->
<div id="bar">
<div id="barT"><div id="barTL"></div><div id="barTR"></div><div id="barTC"></div></div>
<div id="barL">
<div id="barR">
<div id="barCenter" class="bar_text">
%1 <!-- Please wait while the database loads... -->
</div>
</div>
</div>
<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 "tabwidget.h"
#include "freshklam.h"
#include "version.h"
#include "../config.h"
#include <tqheader.h>
@ -692,7 +693,7 @@ void KlamDB::shouldIShow(TQWidget * current)
{
static struct cl_stat *dbstat=NULL;
TQString location;
TQString location, res;
if ((current == this) && (!(loadinprogress))){
TQString db = tdemain->freshklam->getCurrentDBDir();
@ -700,7 +701,26 @@ void KlamDB::shouldIShow(TQWidget * current)
if (checkdir(db.ascii()) == -1){
kdDebug() << "returned -1" << endl;
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;
}
@ -708,9 +728,28 @@ void KlamDB::shouldIShow(TQWidget * current)
if ( ((cl_statchkdir(dbstat) == 1) || (dbstat == NULL))) {
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;
sigs = ( int )getSigNos();
progress = new KProgressDialog (this, "progress", i18n( "Loading .." ), i18n( "Loading..." ), true);
progress->setAllowCancel(false);
@ -750,13 +789,31 @@ void KlamDB::shouldIShow(TQWidget * current)
loadinprogress = false;
// Default english
TQString location = locate( "data", "klamav/about/main-" + TDEGlobal::locale()->language() + ".html" );
if( location != TQString::null )
homepage->openURL( location );
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
homepage->openURL( locate("data", "klamav/about/main.html") );
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 <tqclipboard.h>
#include <tqfile.h>
#include <tqpaintdevicemetrics.h>
#include "viewer.h"
@ -67,6 +68,22 @@ bool Viewer::openURL(const KURL &url)
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()
{

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

Loading…
Cancel
Save