Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit dc39f0c

Browse files
committed
Translatable buttons in index.html
1 parent f3243fa commit dc39f0c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ <h2 class="txt-center">
8181
<i class="ion-android-sync spinner fontSize30 spinner-with-logo-icon"></i>
8282
</div>
8383
<div class="width100 positionTop">
84-
<a class="btn btn-txt rowTop10 marginRight10 pull-right js-indexReload"><i class="ion-android-sync"></i> Reload</a>
85-
<a class="btn btn-txt rowTop10 marginRight10 pull-right" href="#home"><i class="ion-home"></i> Load Index</a>
84+
<a class="btn btn-txt rowTop10 marginRight10 pull-right js-indexReload"><i class="ion-android-sync"></i> <t>Reload</t></a>
85+
<a class="btn btn-txt rowTop10 marginRight10 pull-right" href="#home"><i class="ion-home"></i> <t>LoadIndex</t></a>
8686
</div>
8787
</div>
8888

@@ -114,6 +114,10 @@ <h2 class="txt-center">
114114
$('.js-defaultServerIndexApp').on('click', function(){
115115
app.loadNewServer("http://localhost:18469/api/v1/");
116116
});
117+
$('t').each(function() {
118+
var translationKey = $(this).html();
119+
$(this).replaceWith(polyglot.t(translationKey));
120+
});
117121
</script>
118122
</body>
119123
</html>

js/languages/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"EnterMessage": "Enter message...",
77
"Recommended": "Recommended",
88
"Reload": "Reload",
9+
"LoadIndex": "Load Index",
910
"You": "You",
1011
"Skip": "Skip",
1112
"Done": "Done",

js/languages/pl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"EnterMessage": "Wprowadź tekst...",
77
"Recommended": "Rekomendowane",
88
"Reload": "Odśwież",
9+
"LoadIndex": "Strona główna",
910
"You": "Ja",
1011
"Skip": "Pomiń",
1112
"Done": "Gotowe",

0 commit comments

Comments
 (0)