Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

I18N #276

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

I18N #276

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ a good pool operator. For starters be sure to read:
Clone the repository and run `npm update` for all the dependencies to be installed:

```bash
sudo apt-get install build-essential libsodium-dev npm
sudo apt-get install build-essential libsodium-dev npm libboost-system-dev
sudo npm install n -g
sudo n stable
git clone https://github.com/joshuayabut/node-open-mining-portal.git z-nomp
Expand Down
31 changes: 26 additions & 5 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>

<script src="/static/jquery.i18n.properties.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.5/d3.min.js"></script>
<script src="/static/nvd3.js"></script>
<link rel="stylesheet" href="/static/nvd3.css">
Expand All @@ -36,31 +38,31 @@
<li class="{{? it.selected === 'getting_started' }}pure-menu-selected{{?}}">
<a class="hot-swapper" href="/getting_started">
<i class="fa fa-rocket"></i>&nbsp;
Getting Started
<span id="start"></span>
</a>
</li>
<li class="{{? it.selected === 'stats' }}pure-menu-selected{{?}}">
<a class="hot-swapper" href="/stats">
<i class="fa fa-bar-chart-o"></i>&nbsp;
Graph Stats
<span id="stats_graph"></span>
</a>
</li>
<li class="{{? it.selected === 'tbs' }}pure-menu-selected{{?}}">
<a class="hot-swapper" href="/tbs">
<i class="fa fa-table"></i>&nbsp;
Tab Stats
<span id="stats_tab"></span>
</a>
</li>
<li class="{{? it.selected === 'workers' }}pure-menu-selected{{?}}">
<a class="hot-swapper" href="/workers">
<i class="fa fa-cogs"></i>&nbsp;
Workers Stats
<span id="stats_workers"></span>
</a>
</li>
<li class="{{? it.selected === 'api' }}pure-menu-selected{{?}}">
<a class="hot-swapper" href="/api">
<i class="fa fa-code"></i>&nbsp;
API
<span id="api"></span>
</a>
</li>
</ul>
Expand Down Expand Up @@ -91,5 +93,24 @@

</footer>

<script type="text/javascript">
$(function(){
console.info("ready");
jQuery.i18n.properties({
name : 'string',
path : '/static/i18n/',
mode : 'map',
//language : 'zh',
callback : function() {
$('#start').html($.i18n.prop('start'));
$('#stats_graph').html($.i18n.prop('stats_graph'));
$('#stats_tab').html($.i18n.prop('stats_tab'));
$('#stats_workers').html($.i18n.prop('stats_workers'));
$('#api').html($.i18n.prop('api'));
}
});
});
</script>

</body>
</html>
5 changes: 5 additions & 0 deletions website/static/i18n/strings.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
start=Getting Started
stats_graph=Graph Stats
stats_tab=Tab Stats
stats_workers=Workers Stats
api=API
5 changes: 5 additions & 0 deletions website/static/i18n/strings_zh.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
start=配置
stats_graph=数据图表
stats_tab=数据表格
stats_workers=矿工数据
api=API
9 changes: 9 additions & 0 deletions website/static/jquery.i18n.properties.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.