add translate to homepage

This commit is contained in:
MathMan05 2025-04-29 14:48:22 -05:00
parent ba5ab05408
commit 4ecc6ba2fe
3 changed files with 30 additions and 2 deletions

View file

@ -55,6 +55,20 @@
<h2 id="compatableInstances">Spacebar-Compatible Instances:</h2>
<div id="instancebox"></div>
</div>
<div class="pagebox">
<h2 id="box4title">Translate Jank Client</h2>
<p id="box4description">You can help translate Jank Client into your own language!</p>
<br />
<a
href="https://translatewiki.net/wiki/Translating:JankClient"
class="TitleButtons"
id="translate"
>
Translate
</a>
</div>
<div class="pagebox">
<h2 id="box3title">Contribute to Jank Client</h2>
<p id="box3description">

View file

@ -13,6 +13,10 @@ const serverbox = document.getElementById("instancebox") as HTMLDivElement;
const compatableInstances = document.getElementById("compatableInstances");
const box3title = document.getElementById("box3title");
const box3description = document.getElementById("box3description");
const box4title = document.getElementById("box4title");
const box4description = document.getElementById("box4description");
const translate = document.getElementById("translate");
if (
openClient &&
welcomeJank &&
@ -20,7 +24,10 @@ const serverbox = document.getElementById("instancebox") as HTMLDivElement;
box3title &&
box3description &&
box1title &&
box1Items
box1Items &&
box4title &&
box4description &&
translate
) {
openClient.textContent = I18n.getTranslation("htmlPages.openClient");
welcomeJank.textContent = I18n.getTranslation("htmlPages.welcomeJank");
@ -30,6 +37,10 @@ const serverbox = document.getElementById("instancebox") as HTMLDivElement;
box3title.textContent = I18n.getTranslation("htmlPages.box3title");
box3description.textContent = I18n.getTranslation("htmlPages.box3description");
box4title.textContent = I18n.htmlPages.transTitle();
box4title.textContent = I18n.htmlPages.transDesc();
box4title.textContent = I18n.htmlPages.trans();
const items = I18n.getTranslation("htmlPages.box1Items").split("|");
let i = 0;
//@ts-ignore ts is being dumb here

View file

@ -230,7 +230,10 @@
"box1Items": "Direct Messaging|Reactions support|Invites|Account switching|User settings|Developer portal|Bot invites|Translation support",
"compatableInstances": "Spacebar-Compatible Instances:",
"box3title": "Contribute to Jank Client",
"box3description": "We always appreciate some help, whether that be in the form of bug reports, or code, or even just pointing out some typos."
"box3description": "We always appreciate some help, whether that be in the form of bug reports, or code, or even just pointing out some typos.",
"trans": "Translate",
"transTitle": "Translate Jank Client",
"transDesc": "You can help translate Jank Client into your own language!"
},
"form": {
"captcha": "Wait, are you a human?"