From 5c63f059ee5bba9c016b97b1ce1e905ebcfe9223 Mon Sep 17 00:00:00 2001 From: filesite Date: Thu, 29 May 2025 11:10:24 +0800 Subject: [PATCH] set default language to english --- index.mjs | 2 +- public/index.html | 110 +++++++++--------- public/zh/index.html | 259 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 311 insertions(+), 60 deletions(-) create mode 100644 public/zh/index.html diff --git a/index.mjs b/index.mjs index 5a13f1d..431332d 100644 --- a/index.mjs +++ b/index.mjs @@ -26,13 +26,13 @@ app.use('/api', apiRouter); app.get('/', (req, res) => { return res.send('Welcome to Hero Union of filesite.io'); }); -*/ app.post('/test', (req, res) => { console.log('Post data got in /test', req.body); return res.status(200).send('Done'); }); +*/ //error handler app.use((err, req, res, next) => { diff --git a/public/index.html b/public/index.html index 21efff5..a92c583 100644 --- a/public/index.html +++ b/public/index.html @@ -4,9 +4,9 @@ - HeroUnion英雄联盟 - 开源的网络爬虫联盟 + HeroUnion - Open source web crawler union. - + -

HeroUnion英雄联盟 - 开源的网络爬虫联盟

+

HeroUnion - Open source web crawler union


@@ -51,120 +51,112 @@ English

-

HeroUnion联盟状态 - 已运行...

+

HeroUnion Stats - It's running ...

-

任务状态(最近...

+

Tasks Stats (Last ...)

... - + ... - +
... - + ... - + ... - +
-

任务通知状态(最近...

+

Notify Stats (Last ...)

... - + ... - + ... - +
-

爬虫状态

+

Bot Stats

... - + ... - + ... - + ... - +
-

JSON数据

+

JSON Data

...
-

HeroUnion联盟公约

-

请大家遵守以下公约,为自己、也为全社会有更好的明天一起坚持!

+

Covenant of the Alliance

+

Please abide by the following conventions and stick to it for a better tomorrow for yourself and the whole society!

-

Hero爬虫列表

-
- -
+

Bots

+
...
-

HeroUnion应用

+

HeroUnion App

-

HeroUnion源码下载

+

HeroUnion download

https://github.com/filesite-io/herounion

-

HeroBot - Machete Hero源码下载

+

HeroBot download

https://github.com/filesite-io/machete_hero

@@ -174,14 +166,14 @@ var formatSeconds = function(secs) { var str = secs + '秒'; if (secs > 86400) { - str = Math.floor(secs/86400) + '天'; + str = Math.floor(secs/86400) + ' days'; }else if (secs > 3600) { - str = Math.floor(secs/3600) + '小时'; + str = Math.floor(secs/3600) + ' hours'; }else if (secs > 300) { - str = Math.floor(secs/60) + '分钟'; + str = Math.floor(secs/60) + ' minutes'; }else if (secs > 86400*365) { - str = Math.floor(secs/86400/365) + '年' - + Math.floor( (secs - Math.floor(secs/86400/365)) / 86400 ) + '天'; + str = Math.floor(secs/86400/365) + ' years' + + Math.floor( (secs - Math.floor(secs/86400/365)) / 86400 ) + ' days'; } return str; @@ -199,11 +191,11 @@ var renderHeros = function(heros) { if (!heros || heros.length == 0) { - $('#herobots').text('暂无爬虫加入联盟。'); + $('#herobots').text('There is no bot online.'); return; } - var txtStatus = {idle: '空闲', busy: '繁忙', offline: '离线'}; + var txtStatus = {idle: 'Idle', busy: 'Busy', offline: 'Offline'}; var html = '', item; for (var index in heros) { item = heros[index]; @@ -211,9 +203,9 @@ + txtStatus[item['status']] + ''; html += '
' + htmlspecialchars(item['description']) - + '
支持平台:' + JSON.stringify(item['platforms']) - + ',支持合约:' + JSON.stringify(item['contracts']) - + ',联系方式:' + htmlspecialchars(item['contact']) + + '
Platforms: ' + JSON.stringify(item['platforms']) + + ', Contracts: ' + JSON.stringify(item['contracts']) + + ', Contact: ' + htmlspecialchars(item['contact']) + '
'; } diff --git a/public/zh/index.html b/public/zh/index.html new file mode 100644 index 0000000..21efff5 --- /dev/null +++ b/public/zh/index.html @@ -0,0 +1,259 @@ + + + + + + + HeroUnion英雄联盟 - 开源的网络爬虫联盟 + + + + + +

HeroUnion英雄联盟 - 开源的网络爬虫联盟

+ +
+

+ 简体中文 + English +

+ +

HeroUnion联盟状态 - 已运行...

+ +

任务状态(最近...

+
+ + ... + + + + ... + + +
+ + ... + + + + ... + + + + ... + + +
+
+ +

任务通知状态(最近...

+
+ + ... + + + + ... + + + + ... + + +
+ +

爬虫状态

+
+ + ... + + + + ... + + + + ... + + + + ... + + +
+ +

JSON数据

+
...
+ +

HeroUnion联盟公约

+

请大家遵守以下公约,为自己、也为全社会有更好的明天一起坚持!

+ + +

Hero爬虫列表

+
+ +
+ +

HeroUnion应用

+ + +

HeroUnion源码下载

+

https://github.com/filesite-io/herounion

+ +

HeroBot - Machete Hero源码下载

+

https://github.com/filesite-io/machete_hero

+ + + + + + + + \ No newline at end of file