further translation support

A few more things need to be done, but it's getting a lot closer
This commit is contained in:
MathMan05
2024-11-01 12:16:47 -05:00
parent 4e7d181a14
commit 00c105db28
10 changed files with 194 additions and 106 deletions

View File

@@ -4,6 +4,7 @@ import{ Guild }from"./guild.js";
import{ SnowFlake }from"./snowflake.js";
import{ memberjson, presencejson }from"./jsontypes.js";
import{ Dialog }from"./dialog.js";
import { I18n } from "./i18n.js";
class Member extends SnowFlake{
static already = {};
@@ -213,10 +214,10 @@ class Member extends SnowFlake{
let reason = "";
const menu = new Dialog([
"vdiv",
["title", "Kick " + this.name + " from " + this.guild.properties.name],
["title", I18n.getTranslation("member.kick",this.name,this.guild.properties.name)],
[
"textbox",
"Reason:",
I18n.getTranslation("member.reason:"),
"",
function(e: Event){
reason = (e.target as HTMLInputElement).value;
@@ -225,7 +226,7 @@ class Member extends SnowFlake{
[
"button",
"",
"submit",
I18n.getTranslation("submit"),
()=>{
this.kickAPI(reason);
menu.hide();
@@ -246,10 +247,10 @@ class Member extends SnowFlake{
let reason = "";
const menu = new Dialog([
"vdiv",
["title", "Ban " + this.name + " from " + this.guild.properties.name],
["title", I18n.getTranslation("member.ban",this.name,this.guild.properties.name)],
[
"textbox",
"Reason:",
I18n.getTranslation("member.reason",this.name,this.guild.properties.name),
"",
function(e: Event){
reason = (e.target as HTMLInputElement).value;
@@ -258,7 +259,7 @@ class Member extends SnowFlake{
[
"button",
"",
"submit",
I18n.getTranslation("submit",this.name,this.guild.properties.name),
()=>{
this.banAPI(reason);
menu.hide();