diff --git a/static/account/index.html b/static/account/index.html index 060e1e7..dc0740b 100644 --- a/static/account/index.html +++ b/static/account/index.html @@ -1,7 +1,7 @@ - Account | SPFN + @@ -19,17 +19,17 @@
-

Loading...

+

+
\ No newline at end of file diff --git a/static/account/login/index.html b/static/account/login/index.html index f278707..3dd2af2 100644 --- a/static/account/login/index.html +++ b/static/account/login/index.html @@ -19,10 +19,10 @@ @@ -33,23 +33,24 @@
-

Please log in to access your account.

+

- +
- +
- -

Please ask an SPFN Developer in the discord server for assistance with password resets

+ +

+ \ No newline at end of file diff --git a/static/downloads/index.html b/static/downloads/index.html index f26a0ea..03d20d6 100644 --- a/static/downloads/index.html +++ b/static/downloads/index.html @@ -1,7 +1,7 @@ - Downloads | SPFN + @@ -15,14 +15,14 @@
-

Downloads

+

@@ -56,9 +56,11 @@ + + \ No newline at end of file diff --git a/static/guides/index.html b/static/guides/index.html index a12a090..079481f 100644 --- a/static/guides/index.html +++ b/static/guides/index.html @@ -1,7 +1,7 @@ - Guides | SPFN + @@ -19,14 +19,14 @@
-

Guides

+

@@ -35,7 +35,7 @@
-

Languages

+

English EspaƱol @@ -47,7 +47,7 @@
-

Guides

+

Installation - Wii U @@ -62,10 +62,12 @@
+ + \ No newline at end of file diff --git a/static/index.html b/static/index.html index 5273bf3..fa99d1c 100644 --- a/static/index.html +++ b/static/index.html @@ -1,7 +1,7 @@ - Home | SPFN + @@ -15,33 +15,27 @@
-

Splatfestival Network

+

-

Splatfestival Network

-

Restoring Splatfests to Splatoon on the Wii U

+

+

-

Where to Find Us

-

- Join the Splatfestival discord server for updates to the - servers and news about current or future Splatfests. -

-

- Our code is also all open source, - which can all be found on our self-hosted Forgejo instance. -

+

+

+

@@ -63,29 +57,29 @@
-

Credits

-

Members or Groups that made Splatfestival Network what it is today

+

+

Pretendo Network

-

Original Server Code and Reverse Engineering

+

RusticMaple

-

Owner and Server Developer

+

Ceantix

-

Server Developer

+

@@ -94,21 +88,21 @@

BloxerHD

-

Website and Server Developer

+

Kinnay

-

Documentation of PRUDP and RMC

+

PurplePote

-

Splatfestival Admin who Supported Development

+

@@ -117,7 +111,7 @@

Splatfestival Staff

-

Supported Development and Deployment of SPFN

+

@@ -125,9 +119,10 @@ + \ No newline at end of file diff --git a/static/js/guides.js b/static/js/guides.js index b5a7061..b6ee52f 100644 --- a/static/js/guides.js +++ b/static/js/guides.js @@ -1,12 +1,3 @@ -const langs = [ - "en", // [x] English - "es", // [ ] Spanish - "ja", // [ ] Japanese - "fr", // [ ] French - "it", // [ ] Italian - "de", // [ ] German -] - async function updateGuide(guide, lang) { let buttonsRes = await fetch(`/md/${lang}/buttons.html`); diff --git a/static/js/locale.js b/static/js/locale.js new file mode 100644 index 0000000..b85fc11 --- /dev/null +++ b/static/js/locale.js @@ -0,0 +1,36 @@ +const langs = [ + "en", + "es", + "ja", + "fr", + "it", + "de", +] + +function t(key, locale) { + return key + .split(".") + .reduce((obj, part) => obj && obj[part], locale) +} + +window.addEventListener("load", async () => { + let lang = "en"; + let savedLang = localStorage.getItem("lang"); + + if (savedLang) { + lang = savedLang; + } else { + let currentLang = navigator.language.split("-")[0]; + + if (langs.includes(currentLang)) { + localStorage.setItem("lang", currentLang); + lang = currentLang; + } + } + + const locale = await fetch(`/locales/${lang}.json`).then(r => r.json()); + + document.querySelectorAll("[data-i18n]").forEach(e => { + e.innerHTML = t(e.dataset.i18n, locale) + }); +}) diff --git a/static/locales/de.json b/static/locales/de.json new file mode 100644 index 0000000..dbbf550 --- /dev/null +++ b/static/locales/de.json @@ -0,0 +1,63 @@ +{ + "header": { + "home": "Home", + "guides": "Guides", + "downloads": "Downloads", + "account": "Account" + }, + "footer": { + "assistance": "Need assistance? Join the Discord" + }, + "home": { + "window": "Home | SPFN", + "title": "Splatfestival Network", + "subtitle": "Restoring Splatfests to Splatoon on the Wii U", + "findus": { + "title": "Where to Find Us", + "discord": "Join the Splatfestival discord server for updates to the servers and news about current or future Splatfests", + "forgejo": "Our code is also all open soure, which can all be found on our self-hosted Forgejo instance." + }, + "credits": { + "title": "Credits", + "subtitle": "Members or Groups that made Splatfestival Network what it is today", + "pretendo": "Legacy Server Code and Reverse Engineering", + "rusticmaple": "Owner and Server Developer", + "ceantix": "Server Developer", + "bloxerhd": "Website and Server Developer", + "kinnay": "Documentation of PRUDP and RMC", + "purplepote": "Splatfestival Admin who Supported Development", + "splatfestival": "Supported Development and Deployment of SPFN" + } + }, + "guides": { + "window": "Guides | SPFN", + "title": "Guides", + "langs": "Languages", + "loading": "Loading..." + }, + "downloads": { + "window": "Downloads | SPFN", + "title": "Downloads" + }, + "account": { + "window": "Account | SPFN", + "delete": { + "warningTitle": "WARNING: This Action Is Irreversible", + "unrecoverable": "Deleting your account is an irreversible action. You cannot recover your account once this has been done.", + "dbOnly": "This will delete your account from our database, not from your Wii U or Cemu. You will need to manually remove it from these.", + "confirm": "Delete Account", + "cancel": "Cancel", + "success": "Account Deleted Successfully", + "deleted": "Your account has been removed from our database. You can no longer log in to this account on this website, your Wii U or on Cemu. If you wish to use these services again, you will need to create a new account on your Wii U. Your old SFID can be reused on this new account if it remains unused.", + "dbOnly2": "This does not remove your account from your devices. You will need to manually remove the files with FTPiiU or by removing the files from your Cemu MLC folder. If you are not sure how to do this, ask in the discord." + } + }, + "login": { + "window": "Log In | SPFN", + "prompt": "Please log in to access your account.", + "username": "SFID / Username:", + "password": "Password:", + "submit": "Login", + "passwordReset": "Please ask an SPFN Developer in the discord server for assistance with password resets" + } +} diff --git a/static/locales/en.json b/static/locales/en.json new file mode 100644 index 0000000..dbbf550 --- /dev/null +++ b/static/locales/en.json @@ -0,0 +1,63 @@ +{ + "header": { + "home": "Home", + "guides": "Guides", + "downloads": "Downloads", + "account": "Account" + }, + "footer": { + "assistance": "Need assistance? Join the Discord" + }, + "home": { + "window": "Home | SPFN", + "title": "Splatfestival Network", + "subtitle": "Restoring Splatfests to Splatoon on the Wii U", + "findus": { + "title": "Where to Find Us", + "discord": "Join the Splatfestival discord server for updates to the servers and news about current or future Splatfests", + "forgejo": "Our code is also all open soure, which can all be found on our self-hosted Forgejo instance." + }, + "credits": { + "title": "Credits", + "subtitle": "Members or Groups that made Splatfestival Network what it is today", + "pretendo": "Legacy Server Code and Reverse Engineering", + "rusticmaple": "Owner and Server Developer", + "ceantix": "Server Developer", + "bloxerhd": "Website and Server Developer", + "kinnay": "Documentation of PRUDP and RMC", + "purplepote": "Splatfestival Admin who Supported Development", + "splatfestival": "Supported Development and Deployment of SPFN" + } + }, + "guides": { + "window": "Guides | SPFN", + "title": "Guides", + "langs": "Languages", + "loading": "Loading..." + }, + "downloads": { + "window": "Downloads | SPFN", + "title": "Downloads" + }, + "account": { + "window": "Account | SPFN", + "delete": { + "warningTitle": "WARNING: This Action Is Irreversible", + "unrecoverable": "Deleting your account is an irreversible action. You cannot recover your account once this has been done.", + "dbOnly": "This will delete your account from our database, not from your Wii U or Cemu. You will need to manually remove it from these.", + "confirm": "Delete Account", + "cancel": "Cancel", + "success": "Account Deleted Successfully", + "deleted": "Your account has been removed from our database. You can no longer log in to this account on this website, your Wii U or on Cemu. If you wish to use these services again, you will need to create a new account on your Wii U. Your old SFID can be reused on this new account if it remains unused.", + "dbOnly2": "This does not remove your account from your devices. You will need to manually remove the files with FTPiiU or by removing the files from your Cemu MLC folder. If you are not sure how to do this, ask in the discord." + } + }, + "login": { + "window": "Log In | SPFN", + "prompt": "Please log in to access your account.", + "username": "SFID / Username:", + "password": "Password:", + "submit": "Login", + "passwordReset": "Please ask an SPFN Developer in the discord server for assistance with password resets" + } +} diff --git a/static/locales/es.json b/static/locales/es.json new file mode 100644 index 0000000..dbbf550 --- /dev/null +++ b/static/locales/es.json @@ -0,0 +1,63 @@ +{ + "header": { + "home": "Home", + "guides": "Guides", + "downloads": "Downloads", + "account": "Account" + }, + "footer": { + "assistance": "Need assistance? Join the Discord" + }, + "home": { + "window": "Home | SPFN", + "title": "Splatfestival Network", + "subtitle": "Restoring Splatfests to Splatoon on the Wii U", + "findus": { + "title": "Where to Find Us", + "discord": "Join the Splatfestival discord server for updates to the servers and news about current or future Splatfests", + "forgejo": "Our code is also all open soure, which can all be found on our self-hosted Forgejo instance." + }, + "credits": { + "title": "Credits", + "subtitle": "Members or Groups that made Splatfestival Network what it is today", + "pretendo": "Legacy Server Code and Reverse Engineering", + "rusticmaple": "Owner and Server Developer", + "ceantix": "Server Developer", + "bloxerhd": "Website and Server Developer", + "kinnay": "Documentation of PRUDP and RMC", + "purplepote": "Splatfestival Admin who Supported Development", + "splatfestival": "Supported Development and Deployment of SPFN" + } + }, + "guides": { + "window": "Guides | SPFN", + "title": "Guides", + "langs": "Languages", + "loading": "Loading..." + }, + "downloads": { + "window": "Downloads | SPFN", + "title": "Downloads" + }, + "account": { + "window": "Account | SPFN", + "delete": { + "warningTitle": "WARNING: This Action Is Irreversible", + "unrecoverable": "Deleting your account is an irreversible action. You cannot recover your account once this has been done.", + "dbOnly": "This will delete your account from our database, not from your Wii U or Cemu. You will need to manually remove it from these.", + "confirm": "Delete Account", + "cancel": "Cancel", + "success": "Account Deleted Successfully", + "deleted": "Your account has been removed from our database. You can no longer log in to this account on this website, your Wii U or on Cemu. If you wish to use these services again, you will need to create a new account on your Wii U. Your old SFID can be reused on this new account if it remains unused.", + "dbOnly2": "This does not remove your account from your devices. You will need to manually remove the files with FTPiiU or by removing the files from your Cemu MLC folder. If you are not sure how to do this, ask in the discord." + } + }, + "login": { + "window": "Log In | SPFN", + "prompt": "Please log in to access your account.", + "username": "SFID / Username:", + "password": "Password:", + "submit": "Login", + "passwordReset": "Please ask an SPFN Developer in the discord server for assistance with password resets" + } +} diff --git a/static/locales/fr.json b/static/locales/fr.json new file mode 100644 index 0000000..dbbf550 --- /dev/null +++ b/static/locales/fr.json @@ -0,0 +1,63 @@ +{ + "header": { + "home": "Home", + "guides": "Guides", + "downloads": "Downloads", + "account": "Account" + }, + "footer": { + "assistance": "Need assistance? Join the Discord" + }, + "home": { + "window": "Home | SPFN", + "title": "Splatfestival Network", + "subtitle": "Restoring Splatfests to Splatoon on the Wii U", + "findus": { + "title": "Where to Find Us", + "discord": "Join the Splatfestival discord server for updates to the servers and news about current or future Splatfests", + "forgejo": "Our code is also all open soure, which can all be found on our self-hosted Forgejo instance." + }, + "credits": { + "title": "Credits", + "subtitle": "Members or Groups that made Splatfestival Network what it is today", + "pretendo": "Legacy Server Code and Reverse Engineering", + "rusticmaple": "Owner and Server Developer", + "ceantix": "Server Developer", + "bloxerhd": "Website and Server Developer", + "kinnay": "Documentation of PRUDP and RMC", + "purplepote": "Splatfestival Admin who Supported Development", + "splatfestival": "Supported Development and Deployment of SPFN" + } + }, + "guides": { + "window": "Guides | SPFN", + "title": "Guides", + "langs": "Languages", + "loading": "Loading..." + }, + "downloads": { + "window": "Downloads | SPFN", + "title": "Downloads" + }, + "account": { + "window": "Account | SPFN", + "delete": { + "warningTitle": "WARNING: This Action Is Irreversible", + "unrecoverable": "Deleting your account is an irreversible action. You cannot recover your account once this has been done.", + "dbOnly": "This will delete your account from our database, not from your Wii U or Cemu. You will need to manually remove it from these.", + "confirm": "Delete Account", + "cancel": "Cancel", + "success": "Account Deleted Successfully", + "deleted": "Your account has been removed from our database. You can no longer log in to this account on this website, your Wii U or on Cemu. If you wish to use these services again, you will need to create a new account on your Wii U. Your old SFID can be reused on this new account if it remains unused.", + "dbOnly2": "This does not remove your account from your devices. You will need to manually remove the files with FTPiiU or by removing the files from your Cemu MLC folder. If you are not sure how to do this, ask in the discord." + } + }, + "login": { + "window": "Log In | SPFN", + "prompt": "Please log in to access your account.", + "username": "SFID / Username:", + "password": "Password:", + "submit": "Login", + "passwordReset": "Please ask an SPFN Developer in the discord server for assistance with password resets" + } +} diff --git a/static/locales/it.json b/static/locales/it.json new file mode 100644 index 0000000..dbbf550 --- /dev/null +++ b/static/locales/it.json @@ -0,0 +1,63 @@ +{ + "header": { + "home": "Home", + "guides": "Guides", + "downloads": "Downloads", + "account": "Account" + }, + "footer": { + "assistance": "Need assistance? Join the Discord" + }, + "home": { + "window": "Home | SPFN", + "title": "Splatfestival Network", + "subtitle": "Restoring Splatfests to Splatoon on the Wii U", + "findus": { + "title": "Where to Find Us", + "discord": "Join the Splatfestival discord server for updates to the servers and news about current or future Splatfests", + "forgejo": "Our code is also all open soure, which can all be found on our self-hosted Forgejo instance." + }, + "credits": { + "title": "Credits", + "subtitle": "Members or Groups that made Splatfestival Network what it is today", + "pretendo": "Legacy Server Code and Reverse Engineering", + "rusticmaple": "Owner and Server Developer", + "ceantix": "Server Developer", + "bloxerhd": "Website and Server Developer", + "kinnay": "Documentation of PRUDP and RMC", + "purplepote": "Splatfestival Admin who Supported Development", + "splatfestival": "Supported Development and Deployment of SPFN" + } + }, + "guides": { + "window": "Guides | SPFN", + "title": "Guides", + "langs": "Languages", + "loading": "Loading..." + }, + "downloads": { + "window": "Downloads | SPFN", + "title": "Downloads" + }, + "account": { + "window": "Account | SPFN", + "delete": { + "warningTitle": "WARNING: This Action Is Irreversible", + "unrecoverable": "Deleting your account is an irreversible action. You cannot recover your account once this has been done.", + "dbOnly": "This will delete your account from our database, not from your Wii U or Cemu. You will need to manually remove it from these.", + "confirm": "Delete Account", + "cancel": "Cancel", + "success": "Account Deleted Successfully", + "deleted": "Your account has been removed from our database. You can no longer log in to this account on this website, your Wii U or on Cemu. If you wish to use these services again, you will need to create a new account on your Wii U. Your old SFID can be reused on this new account if it remains unused.", + "dbOnly2": "This does not remove your account from your devices. You will need to manually remove the files with FTPiiU or by removing the files from your Cemu MLC folder. If you are not sure how to do this, ask in the discord." + } + }, + "login": { + "window": "Log In | SPFN", + "prompt": "Please log in to access your account.", + "username": "SFID / Username:", + "password": "Password:", + "submit": "Login", + "passwordReset": "Please ask an SPFN Developer in the discord server for assistance with password resets" + } +} diff --git a/static/locales/ja.json b/static/locales/ja.json new file mode 100644 index 0000000..dbbf550 --- /dev/null +++ b/static/locales/ja.json @@ -0,0 +1,63 @@ +{ + "header": { + "home": "Home", + "guides": "Guides", + "downloads": "Downloads", + "account": "Account" + }, + "footer": { + "assistance": "Need assistance? Join the Discord" + }, + "home": { + "window": "Home | SPFN", + "title": "Splatfestival Network", + "subtitle": "Restoring Splatfests to Splatoon on the Wii U", + "findus": { + "title": "Where to Find Us", + "discord": "Join the Splatfestival discord server for updates to the servers and news about current or future Splatfests", + "forgejo": "Our code is also all open soure, which can all be found on our self-hosted Forgejo instance." + }, + "credits": { + "title": "Credits", + "subtitle": "Members or Groups that made Splatfestival Network what it is today", + "pretendo": "Legacy Server Code and Reverse Engineering", + "rusticmaple": "Owner and Server Developer", + "ceantix": "Server Developer", + "bloxerhd": "Website and Server Developer", + "kinnay": "Documentation of PRUDP and RMC", + "purplepote": "Splatfestival Admin who Supported Development", + "splatfestival": "Supported Development and Deployment of SPFN" + } + }, + "guides": { + "window": "Guides | SPFN", + "title": "Guides", + "langs": "Languages", + "loading": "Loading..." + }, + "downloads": { + "window": "Downloads | SPFN", + "title": "Downloads" + }, + "account": { + "window": "Account | SPFN", + "delete": { + "warningTitle": "WARNING: This Action Is Irreversible", + "unrecoverable": "Deleting your account is an irreversible action. You cannot recover your account once this has been done.", + "dbOnly": "This will delete your account from our database, not from your Wii U or Cemu. You will need to manually remove it from these.", + "confirm": "Delete Account", + "cancel": "Cancel", + "success": "Account Deleted Successfully", + "deleted": "Your account has been removed from our database. You can no longer log in to this account on this website, your Wii U or on Cemu. If you wish to use these services again, you will need to create a new account on your Wii U. Your old SFID can be reused on this new account if it remains unused.", + "dbOnly2": "This does not remove your account from your devices. You will need to manually remove the files with FTPiiU or by removing the files from your Cemu MLC folder. If you are not sure how to do this, ask in the discord." + } + }, + "login": { + "window": "Log In | SPFN", + "prompt": "Please log in to access your account.", + "username": "SFID / Username:", + "password": "Password:", + "submit": "Login", + "passwordReset": "Please ask an SPFN Developer in the discord server for assistance with password resets" + } +}