Skip to content

Commit

Permalink
localized & updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RoderickQiu committed Mar 3, 2019
1 parent 2606a4d commit 44da4e1
Show file tree
Hide file tree
Showing 13 changed files with 656 additions and 127 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# wnr

##### Download: [GitHub release](https://github.com/RoderickQiu/wnr/releases) | [Softpedia](https://www.softpedia.com/get/Desktop-Enhancements/Clocks-Time-Management/wnr.shtml)
**Download: [GitHub release](https://github.com/RoderickQiu/wnr/releases) | [Softpedia](https://www.softpedia.com/get/Desktop-Enhancements/Clocks-Time-Management/wnr.shtml)**

## Introduction

**[中文版](https://scris.top/wnr/)**

**The name is an abbr of "Work & Rest". It's a timer app with strong expansibility for computers.**

![Preview](https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-1.png)
Expand Down Expand Up @@ -34,12 +36,14 @@ As a timer app, wnr is simple but useful.

## To-do List

Please go and see [Githhub Project](https://github.com/RoderickQiu/wnr/projects/1).
Please go and see [GitHub Project](https://github.com/RoderickQiu/wnr/projects/1).

## Contact

- Homepage: [wnr.scris.top](https://wnr.scris.top/)

- Downloads: [Releases](https://github.com/RoderickQiu/wnr/releases/)

- Need Help: [Go to Help Page](https://wnr.scris.top/help.html) or [Contact Me](https://roderickqiu.scris.top/)

---
Expand Down
38 changes: 25 additions & 13 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,49 @@
</head>

<body>
<script src="renderer.js"></script>
<div class="d-flex mx-auto justify-content-center align-items-center text-dark" id="main">
<div id="controller">
<a href="javascript:window.close()" class="small rest"><i class="fa fa-times fa-fw" title="Close"></i></a>
<a href="javascript:window.close()" class="small rest"><i class="fa fa-times fa-fw" id="close"></i></a>
<script>
$('#close').attr('title', i18n.__('close'));
</script>
</div>
<div id="about" class="justify-content-center text-center">
<p class="lead rest font-weight-bolder">wnr</p>
<p class="small text-muted">
<script>document.write("version " + require("./package.json").version);</script>
<script>document.write(i18n.__('version') + require("./package.json").version);</script>
</p>
<p>
<a class="rest"
href="javascript:require('electron').shell.openExternal(require('./package.json').homepage)"><i
class="fa fa-home" title="Homepage / Need Help"></i></a>&nbsp;&nbsp;
class="fa fa-home" id="homepage"></i></a>&nbsp;&nbsp;
<a class="rest"
href="javascript:require('electron').shell.openExternal('https://github.com/RoderickQiu/wnr/')"><i
class="fa fa-github" title="View it on GitHub"></i></a>&nbsp;&nbsp;
class="fa fa-github" id="ongithub"></i></a>&nbsp;&nbsp;
<a class="rest"
href="javascript:require('electron').shell.openExternal('https://github.com/RoderickQiu/wnr/issues/')"><i
class="fa fa-exclamation-circle" title="Issues"></i></a>
class="fa fa-exclamation-circle" id="issues"></i></a>
<script>
$('#homepage').attr('title', i18n.__('homepage'));
$('#ongithub').attr('title', i18n.__('ongithub'));
$('#issues').attr('title', i18n.__('issues'));
</script>
</p>
<hr />
<p class="extreme-small">If you have problems or you want to</p>
<p class="extreme-small"> some suggestion, just <a href="mailto:[email protected]">tell me</a>!</p>
<p class="extreme-small">
<script>document.write(i18n.__('tip1'));</script>
</p>
<p class="extreme-small">
<script>document.write(i18n.__('tip2'));</script>
<a href="mailto:[email protected]" id="emailto">
<script>$("#emailto").attr("title", i18n.__('emailto'));</script>
<script>document.write(i18n.__('tip3'));</script>
</a>
<script>document.write(i18n.__('tip4'));</script>
</p>
</div>
</div>
<script>
var ipc = require('electron').ipcRenderer;
const Store = require('electron-store');
const store = new Store();
</script>
<script src="renderer.js"></script>
</body>

</html>
46 changes: 33 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

<body onpaste="return false">
<!-- prevent people from pasting abnormal content -->
<script src="renderer.js"></script>
<script src="updater.js"></script>
<script>
function about() {
ipc.send("about");
Expand All @@ -42,33 +44,51 @@
<div class="d-flex mx-auto justify-content-center align-items-center text-dark" id="main">
<div id="controller">
<a href="javascript:settings()" class="small rest"><i class="fa fa-cog fa-fw"
title="Settings"></i></a>&nbsp;&nbsp;
<a href="javascript:about()" class="small rest"><i class="fa fa-info fa-fw"
title="About wnr"></i></a>&nbsp;&nbsp;
id="settings"></i></a>&nbsp;&nbsp;
<a href="javascript:about()" class="small rest"><i class="fa fa-info fa-fw" id="info"></i></a>&nbsp;&nbsp;
<a href="javascript:winhider()" class="small rest" id="win-hider"><i class="fa fa-sort-desc fa-fw"
title="Hide the window to system tray"></i></a><span id="no-use-space">&nbsp;&nbsp;</span>
id="winhider"></i></a><span id="no-use-space">&nbsp;&nbsp;</span>
<a href="javascript:minimizer()" class="small rest"><i class="fa fa-minus fa-fw"
title="Minimize to taskbar"></i></a>&nbsp;&nbsp;
<a href="javascript:window.close()" class="small rest"><i class="fa fa-times fa-fw" title="Exit"></i></a>
id="minimizer"></i></a>&nbsp;&nbsp;
<a href="javascript:window.close()" class="small rest"><i class="fa fa-times fa-fw" id="exit"></i></a>
<script>
$('#settings').attr('title', i18n.__('settings'));
$('#info').attr('title', i18n.__('info'));
$('#winhider').attr('title', i18n.__('winhider'));
$('#minimizer').attr('title', i18n.__('minimizer'));
$('#exit').attr('title', i18n.__('exit'));
</script>
</div>
<div id="tip" class="small font-weight-bold text-black-50">
<script>document.write(i18n.__('tip'));</script>
</div>
<div id="set" class="justify-content-center">
<form action="timer.html" method="GET">
<input name="title" id="title" placeholder="please enter a title" type="text" class="small"
maxlength="14" /><br /><br />
<input name="work-time" id="work-time" placeholder="work for (minutes)" type="number"
<input name="title" id="title" type="text" class="small" maxlength="14" /><br /><br />
<input name="work-time" id="work-time" type="number"
onkeypress="return (/[0-9]/.test(String.fromCharCode(event.keyCode)))" style="ime-mode:Disabled"
class="work lead" autofocus required /><br /><br />
<input name="rest-time" id="rest-time" placeholder="then rest for (minutes)" type="number"
<input name="rest-time" id="rest-time" type="number"
onkeypress="return (/[0-9]/.test(String.fromCharCode(event.keyCode)))" style="ime-mode:Disabled"
class="rest lead" required /><br /><br />
<input name="loop" id="loop" placeholder="loop for (times)" type="number"
<input name="loop" id="loop" type="number"
onkeypress="return (/[0-9]/.test(String.fromCharCode(event.keyCode)))" style="ime-mode:Disabled"
class="small" required /><br /><!-- control that only numbers are OK -->
</form>
<script>
$('#work-time').attr('placeholder', i18n.__('worktime'));
$('#title').attr('placeholder', i18n.__('title'));
$('#rest-time').attr('placeholder', i18n.__('resttime'));
$('#loop').attr('placeholder', i18n.__('loop'));
$("input").mouseenter(function () {
$("#tip").css('opacity', '1');
});
$("input").mouseleave(function () {
$("#tip").css('opacity', '0');
});
</script>
</div>
</div>
<script src="updater.js"></script>
<script src="renderer.js"></script>
<script>
isTimerWindow(false);
$("#work-time").val(store.get("worktime"));
Expand Down
78 changes: 78 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"v": " v",
"startorstop": "Start / Stop",
"website": "Website",
"helppage": "Help Page",
"github": "GitHub",
"ongithub": "View it on Github",
"showorhide": "Show / Hide",
"exit": "Exit",
"quit": "Quit",
"help": "Help",
"worktimeend": "Your work time is now ended!",
"worktimemsg": "Your work time is now ended. Enjoy your rest time!",
"resttimeend": "Your rest time is now ended!",
"resttimemsg": "Your rest time is now ended. Start working!",
"allend": "Your schedule is now finished!",
"allmsg": "Your schedule is now finished. You can now set another one.",
"update": "New version available!",
"updatemsg": "A new version of wnr is now available. To enjoy wnr better, you should download and install the update.",
"updatechk": "Go to GitHub and download the new release",
"noupdate": "No update available.",
"noupdatemsg": "No update available. Thanks for using wnr!",
"settings": "Settings",
"info": "About wnr",
"winhider": "Hide the window to system tray",
"minimizer": "Minimize to taskbar",
"title": "please enter a title",
"worktime": "work for (minutes)",
"resttime": "then rest for (minutes)",
"loop": "loop for (times)",
"tip": "Press Enter to submit.",
"backindex": "Give up the timer & Back",
"notenough": "Some information wasn't given so we cannot start the timer.",
"toolong": "The time is too long. Please make your work time and your rest time less than a day.",
"back": "Back",
"ended": "End!",
"version": "version ",
"tip1": "If you have problems or you want to",
"tip2": "give some suggestion, just ",
"tip3": "tell me",
"tip4": "!",
"emailto": "Send an email to me.",
"exitsave": "Close & Save",
"close": "Close",
"homepage": "Homepage / Need Help",
"issues": "Issues",
"timeset": "Time Settings",
"defwork": "Default work time: ",
"defrest": "Default rest time: ",
"defloop": "Default number of loops: ",
"defworktip": "Set the default work time for every loop. ",
"defresttip": "Set the default rest time for every loop. ",
"deflooptip": "Set the default number of loops. ",
"resettip": "Set it to \"0\" to delete the former setting.",
"globalset": "Global Settings",
"langset": "Language: ",
"langtip": "If the checkbox is checked, wnr will display in English, and vice versa.",
"soundnotify": "Play sound to notify: ",
"soundtip": "If it is enabled, then every time your time is ended, a notice sound is played.",
"alwaysontop": "Always on top: ",
"alwaystip": "If it is enabled, then every time you start wnr, it will stay on the top of the screen.",
"restarttip": "Restart for wnr is required.",
"restartnow": "Restart Now",
"autostart": "Start up with system: ",
"autotip": "If it is enabled, then every time your system starts, wnr starts.",
"fullscreenrest": "Fullscreen rest time: ",
"fullscreentip": "If it is enabled, when it's rest time, wnr will enter full-screen mode to prevent you from using computer.",
"autocheck": "Auto check for update: ",
"checktip": "If it is enabled, wnr will automatically check for update (every day).",
"otherthings": "Other Things",
"manuallycheck": "Manually check for update",
"checker1": "(Now ",
"checker2": ")",
"hotkeytip": "Open/Hide hotkey: ",
"hotkeyusage": "(Hide to the system tray)",
"hotkey2tip": "Start/Stop hotkey: ",
"hotkey2usage": "(Fast start/stop the timer. Only available when there is a timer working.)"
}
78 changes: 78 additions & 0 deletions locales/zh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"v": "版本",
"startorstop": "开始/暂停",
"website": "官方网站",
"helppage": "帮助手册",
"github": "GitHub项目",
"ongithub": "在Github上查看项目",
"showorhide": "显示/隐藏",
"exit": "退出",
"quit": "退出",
"help": "帮助",
"worktimeend": "工作时间结束了!",
"worktimemsg": "享受休息时间吧!",
"resttimeend": "休息时间结束了!",
"resttimemsg": "马上开始工作!",
"allend": "时间计划完成了!",
"allmsg": "祝贺你!设置一个新的计划如何?",
"update": "新版本可用!",
"updatemsg": "请下载并安装wnr,来体验新功能并避免受到漏洞干扰。",
"updatechk": "前往GitHub下载更新!",
"noupdate": "暂时没有更新。",
"noupdatemsg": "暂时没有更新,请经常回来看看。",
"settings": "设置",
"info": "关于wnr",
"winhider": "隐藏至托盘菜单",
"minimizer": "最小化至任务栏",
"title": "任务名称是什么?",
"worktime": "先工作多少分钟?",
"resttime": "然后再休息多少分钟?",
"loop": "循环几次?",
"tip": "输入所有项目,然后按Enter键开始计时器。",
"backindex": "放弃计时器并返回首页",
"notenough": "请合法输入全部项目。",
"toolong": "长度超过一天的计划暂时不能添加。",
"back": "返回首页",
"ended": "完成了!",
"version": "版本",
"tip1": "如果你使用时遇到了问题,或者",
"tip2": "想给开发者一些建议,请",
"tip3": "告诉我",
"tip4": "",
"emailto": "给我发邮件",
"exitsave": "关闭窗口并且保存",
"close": "关闭窗口",
"homepage": "官网/帮助手册",
"issues": "已知问题列表",
"timeset": "默认时间设置",
"defwork": "默认工作时间:",
"defrest": "默认休息时间:",
"defloop": "默认循环次数:",
"defworktip": "设置默认工作时间。",
"defresttip": "设置默认休息时间。",
"deflooptip": "设置默认循环几次。",
"resettip": "将选项设置为零来清除设置。",
"globalset": "wnr全局设置",
"langset": "语言设置:",
"langtip": "选中选框则设置为英语,否则设置为中文。",
"soundnotify": "提示音设置:",
"soundtip": "在一段时间结束后,是否要播放提示音?",
"alwaysontop": "置顶设置:",
"alwaystip": "是否要让wnr始终在最上层?",
"restarttip": "需要重启软件让设置生效。",
"restartnow": "现在就重启软件",
"autostart": "开机自启设置:",
"autotip": "是否要让wnr开机时自动启动?",
"fullscreenrest": "专心休息设置:",
"fullscreentip": "如果你在休息时,还总是要看电脑,不妨开启专心休息模式(全屏休息模式)试一下?",
"autocheck": "自动更新设置:",
"checktip": "是否要wnr每天自动检测更新?",
"otherthings": "其他注意事项",
"manuallycheck": "现在就检测更新",
"checker1": "(现在你正在使用",
"checker2": "",
"hotkeytip": "显示/隐藏的快捷键:",
"hotkeyusage": "(将会把wnr隐藏至托盘菜单。全局有效。)",
"hotkey2tip": "开始/暂停的快捷键:",
"hotkey2usage": "(将会开始或暂停计时。仅在计时器页面打开时有效。)"
}
Loading

0 comments on commit 44da4e1

Please sign in to comment.