-
Jank Client is a Spacebar-compatible client seeking to be as good as it can be with many features including:
-
+ Jank Client is a Spacebar-compatible client seeking to be as good as it can be with many features including:
+
- Direct Messaging
- Reactions support
- Invites
@@ -42,17 +42,17 @@
- User settings
- Developer portal
- Bot invites
+ - Translation support
-
Contribute to Jank Client
-
We always appreciate some help, whether that be in the form of bug reports, or code, or even just pointing out
- some typos.
+
Contribute to Jank Client
+
We always appreciate some help, whether that be in the form of bug reports, code, help translate, or even just pointing out some typos.
Github
diff --git a/src/webpage/home.ts b/src/webpage/home.ts
index 57c4824..a04772b 100644
--- a/src/webpage/home.ts
+++ b/src/webpage/home.ts
@@ -3,6 +3,36 @@ import{ mobile }from"./login.js";
console.log(mobile);
const serverbox = document.getElementById("instancebox") as HTMLDivElement;
+(async ()=>{
+ await I18n.done;
+ const openClient=document.getElementById("openClient")
+ const welcomeJank=document.getElementById("welcomeJank")
+ const box1title=document.getElementById("box1title")
+ const box1Items=document.getElementById("box1Items")
+ const compatableInstances=document.getElementById("compatableInstances")
+ const box3title=document.getElementById("box3title")
+ const box3description=document.getElementById("box3description")
+ if(openClient&&welcomeJank&&compatableInstances&&box3title&&box3description&&box1title&&box1Items){
+ openClient.textContent=I18n.getTranslation("htmlPages.openClient");
+ welcomeJank.textContent=I18n.getTranslation("htmlPages.welcomeJank");
+ box1title.textContent=I18n.getTranslation("htmlPages.box1title");
+
+ compatableInstances.textContent=I18n.getTranslation("htmlPages.compatableInstances");
+ box3title.textContent=I18n.getTranslation("htmlPages.box3title");
+ box3description.textContent=I18n.getTranslation("htmlPages.box3description");
+
+ const items=I18n.getTranslation("htmlPages.box1Items").split("|");
+ let i=0;
+ //@ts-ignore ts is being dumb here
+ for(const item of box1Items.children){
+ (item as HTMLElement).textContent=items[i];
+ i++;
+ }
+ }else{
+ console.error(openClient,welcomeJank,compatableInstances,box3title,box3description,box1title,box1Items)
+ }
+})()
+
fetch("/instances.json")
.then(_=>_.json())
.then(
diff --git a/src/webpage/index.html b/src/webpage/index.html
index fcf0797..1fef553 100644
--- a/src/webpage/index.html
+++ b/src/webpage/index.html
@@ -21,7 +21,7 @@

-
Jank Client is loading
+
Jank Client is loading
This shouldn't take long
Switch Accounts
diff --git a/src/webpage/index.ts b/src/webpage/index.ts
index 1b40b9d..54c8c9f 100644
--- a/src/webpage/index.ts
+++ b/src/webpage/index.ts
@@ -20,7 +20,17 @@ import { I18n } from "./i18n.js";
window.location.href = "/login.html";
return;
}
-
+ {
+ const loadingText=document.getElementById("loadingText");
+ const loaddesc=document.getElementById("load-desc");
+ const switchaccounts=document.getElementById("switchaccounts");
+ if(loadingText&&loaddesc&&switchaccounts){
+ loadingText.textContent=I18n.getTranslation("htmlPages.loadingText");
+ loaddesc.textContent=I18n.getTranslation("htmlPages.loaddesc");
+ switchaccounts.textContent=I18n.getTranslation("htmlPages.switchaccounts");
+ }
+ }
+ I18n
function showAccountSwitcher(): void{
const table = document.createElement("div");
table.classList.add("flexttb","accountSwitcher");
diff --git a/src/webpage/login.html b/src/webpage/login.html
index dcaf1d1..836e06b 100644
--- a/src/webpage/login.html
+++ b/src/webpage/login.html
@@ -19,7 +19,7 @@