mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2026-11-09 17:57:06 +01:00
final merge jchecca
This commit is contained in:
@@ -55,7 +55,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
fetchTournois();
|
||||
} else if (tableId === 'blockchain-list') {
|
||||
console.log('Opening external page in a new tab');
|
||||
window.open('https://sepolia.etherscan.io/address/0x078d04eb6fb97cd863361fc86000647dc876441b', '_blank');
|
||||
window.open('https://sepolia.etherscan.io/address/0x32a4bf81628fdd65d7b00ac676b80772c920e0c4', '_blank');
|
||||
}
|
||||
|
||||
if (dropdownMenu) {
|
||||
|
||||
@@ -1,39 +1,94 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const translations = {
|
||||
fr: {
|
||||
welcome: "BIENVENUE DANS LE PONG 42",
|
||||
labelWelcome: "BIENVENUE DANS LE PONG 42",
|
||||
labelNickname: "Entrez votre surnom:",
|
||||
labelPassword: "Entrez votre mot de passe:",
|
||||
labelConfirmPassword: "Confirmez votre mot de passe:",
|
||||
labelLoginPassword: "Entrez votre mot de passe:"
|
||||
labelLoginPassword: "Entrez votre mot de passe:",
|
||||
labelSettings: "Paramètres",
|
||||
labelCheckNickname: "Vérifiez votre surnom:",
|
||||
labelLogin: "Se connecter",
|
||||
labelLocalGame: "Jeu local",
|
||||
labelQuickMatch: "Match rapide",
|
||||
labelTournament: "Tournoi",
|
||||
labelHome: "Accueil",
|
||||
labelRetry: "Rejouer"
|
||||
},
|
||||
en: {
|
||||
welcome: "WELCOME TO PONG 42",
|
||||
labelWelcome: "WELCOME TO PONG 42",
|
||||
labelNickname: "Enter your nickname:",
|
||||
labelPassword: "Enter your password:",
|
||||
labelConfirmPassword: "Confirm your password:",
|
||||
labelLoginPassword: "Enter your password:"
|
||||
labelLoginPassword: "Enter your password:",
|
||||
labelSettings: "Settings",
|
||||
labelCheckNickname: "Check your nickname:",
|
||||
labelLogin: "Log in",
|
||||
labelLocalGame: "Local game",
|
||||
labelQuickMatch: "Quick match",
|
||||
labelTournament: "Tournament",
|
||||
labelHome: "Home",
|
||||
labelRetry: "Retry"
|
||||
},
|
||||
it: {
|
||||
welcome: "BENVENUTO A PONG 42",
|
||||
labelWelcome: "BENVENUTO A PONG 42",
|
||||
labelNickname: "Inserisci il tuo soprannome:",
|
||||
labelPassword: "Inserisci la tua password:",
|
||||
labelConfirmPassword: "Conferma la tua password:",
|
||||
labelLoginPassword: "Inserisci la tua password:"
|
||||
labelLoginPassword: "Inserisci la tua password:",
|
||||
labelSettings: "Impostazioni",
|
||||
labelCheckNickname: "Controlla il tuo soprannome:",
|
||||
labelLogin: "Accedi",
|
||||
labelLocalGame: "Gioco locale",
|
||||
labelQuickMatch: "Partita rapida",
|
||||
labelTournament: "Torneo",
|
||||
labelHome: "Home",
|
||||
labelRetry: "Riprova"
|
||||
},
|
||||
es: {
|
||||
welcome: "BIENVENIDO A PONG 42",
|
||||
labelWelcome: "BIENVENIDO A PONG 42",
|
||||
labelNickname: "Introduce tu apodo:",
|
||||
labelPassword: "Introduce tu contraseña:",
|
||||
labelConfirmPassword: "Confirma tu contraseña:",
|
||||
labelLoginPassword: "Introduce tu contraseña:"
|
||||
labelLoginPassword: "Introduce tu contraseña:",
|
||||
labelSettings: "Ajustes",
|
||||
labelCheckNickname: "Comprueba tu apodo:",
|
||||
labelLogin: "Iniciar sesión",
|
||||
labelLocalGame: "Juego local",
|
||||
labelQuickMatch: "Partida rápida",
|
||||
labelTournament: "Torneo",
|
||||
labelHome: "Inicio",
|
||||
labelRetry: "Reintentar"
|
||||
},
|
||||
de: {
|
||||
welcome: "WILLKOMMEN BEI PONG 42",
|
||||
labelWelcome: "WILLKOMMEN BEI PONG 42",
|
||||
labelNickname: "Geben Sie Ihren Spitznamen ein:",
|
||||
labelPassword: "Geben Sie Ihr Passwort ein:",
|
||||
labelConfirmPassword: "Bestätigen Sie Ihr Passwort:",
|
||||
labelLoginPassword: "Geben Sie Ihr Passwort ein:"
|
||||
labelLoginPassword: "Geben Sie Ihr Passwort ein:",
|
||||
labelSettings: "Einstellungen",
|
||||
labelCheckNickname: "Überprüfen Sie Ihren Spitznamen:",
|
||||
labelLogin: "Anmelden",
|
||||
labelLocalGame: "Lokales Spiel",
|
||||
labelQuickMatch: "Schnelles Spiel",
|
||||
labelTournament: "Turnier",
|
||||
labelHome: "Startseite",
|
||||
labelRetry: "Wiederholen"
|
||||
},
|
||||
test: {
|
||||
labelWelcome: "1",
|
||||
labelNickname: "2",
|
||||
labelPassword: "3",
|
||||
labelConfirmPassword: "4",
|
||||
labelLoginPassword: "5",
|
||||
labelSettings: "6",
|
||||
labelCheckNickname: "7",
|
||||
labelLogin: "8",
|
||||
labelLocalGame: "9",
|
||||
labelQuickMatch: "10",
|
||||
labelTournament: "11",
|
||||
labelHome: "12",
|
||||
labelRetry: "13"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -62,11 +117,19 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
function changeLanguage(lang) {
|
||||
setCookie('preferredLanguage', lang, 365);
|
||||
document.getElementById('welcome').innerText = translations[lang].welcome;
|
||||
document.getElementById('welcome').innerText = translations[lang].labelWelcome;
|
||||
document.getElementById('label-nickname').innerText = translations[lang].labelNickname;
|
||||
document.getElementById('label-password').innerText = translations[lang].labelPassword;
|
||||
document.getElementById('label-confirm-password').innerText = translations[lang].labelConfirmPassword;
|
||||
document.getElementById('label-login-password').innerText = translations[lang].labelLoginPassword;
|
||||
document.getElementById('settings-btn').innerText = translations[lang].labelSettings;
|
||||
document.getElementById('check-nickname').innerText = translations[lang].labelCheckNickname;
|
||||
document.getElementById('login').innerText = translations[lang].labelLogin;
|
||||
document.getElementById('local-game').innerText = translations[lang].labelLocalGame;
|
||||
document.getElementById('quick-match').innerText = translations[lang].labelQuickMatch;
|
||||
document.getElementById('tournament').innerText = translations[lang].labelTournament;
|
||||
document.getElementById('home').innerText = translations[lang].labelHome;
|
||||
document.getElementById('retry').innerText = translations[lang].labelRetry;
|
||||
}
|
||||
|
||||
function setLanguageFromCookie() {
|
||||
|
||||
Reference in New Issue
Block a user