From d9ec085d2c12487ade8534d6c8117f47d2a73a76 Mon Sep 17 00:00:00 2001 From: Wawilski Date: Wed, 6 Mar 2024 17:41:18 +0100 Subject: [PATCH] Inputs setup --- frontend/public/i18n/EN.txt | 19 ++++++-- frontend/public/i18n/FR.txt | 19 ++++++-- frontend/src/Login.vue | 94 ++++++++++++++++++++++++------------- frontend/src/i18n.js | 2 +- 4 files changed, 90 insertions(+), 44 deletions(-) diff --git a/frontend/public/i18n/EN.txt b/frontend/public/i18n/EN.txt index 870abdb..ab7f59d 100644 --- a/frontend/public/i18n/EN.txt +++ b/frontend/public/i18n/EN.txt @@ -1,8 +1,17 @@ # English translations (some examples to remove) -login.guest.login=log in -login.guest.register=register -login.guest.welcome=Please Register here -login.success=You are now registered as $name -login.guest.firstname= Firstname +login.guest.signin=Sign in +login.guest.register=Register +login.guest.alregister=Already Registered +login.guest.welcome=WELCOME TO THE UNIVERSITY +login.guest.email=E-MAIL +login.guest.firstname= FIRSTNAME +login.guest.surname=SURNAME +login.guest.country=COUNTRY +login.guest.address=ADDRESS +login.guest.password=PASSWORD +login.guest.nextpage=Next Page +login.guest.lastpage=Last Page +login.guest.submit=Submit + #===================================================== diff --git a/frontend/public/i18n/FR.txt b/frontend/public/i18n/FR.txt index 4f651ae..b21259b 100644 --- a/frontend/public/i18n/FR.txt +++ b/frontend/public/i18n/FR.txt @@ -1,8 +1,17 @@ # Traductions françaises (Quelques examples a enlever) -login.guest.login=s'identifier -login.guest.register=s'enregistrer -login.guest.welcome=Veuillez vous enregistrer ici -login.success=Vous êtes maintenant identifié comme $name -login.guest.firstrname= Prénom +login.guest.signin=SE CONNECTER +login.guest.register=S'enregistrer +login.guest.alregister=Déjà Enregistré +login.guest.welcome=BIENVENUE A L'UNIVERSITE +login.guest.email=E-MAIL +login.guest.firstname= PRENOM +login.guest.surname= NOM +login.guest.country= PAYS +login.guest.address=ADRESSE +login.guest.password= MOT DE PASSE +login.guest.nextpage=Prochaine Page +login.guest.lastpage=Derniere Page +login.guest.submit=Envoyer + #===================================================== diff --git a/frontend/src/Login.vue b/frontend/src/Login.vue index 1d74c4c..d3a0532 100644 --- a/frontend/src/Login.vue +++ b/frontend/src/Login.vue @@ -1,11 +1,21 @@ @@ -16,66 +26,71 @@
-

SIGN IN

+

{{i18n("login.guest.signin")}}

-

USERNAME

- +

ID / {{i18n("login.guest.email")}}

+
-

PASSWORD

- +

{{i18n("login.guest.password")}}

+
- + +
-

WELCOME TO THE UNIVERSITY

+

{{i18n("login.guest.welcome")}}

-

LASTNAME

- +

{{i18n("login.guest.surname")}}

+
-

{{ message }}

- +

{{i18n("login.guest.firstname")}}

+
-

PASSWORD

- +

{{i18n("login.guest.password")}}

+
-
- +
+ +
-

E-MAIL

- +

{{i18n("login.guest.email")}}

+
-

ADDRESS

- +

{{i18n("login.guest.address")}}

+
-

COUNTRY

- +

{{i18n("login.guest.country")}}

+
-
- +
+
-
- Already Registered +
+ +
+
@@ -119,7 +134,8 @@ } -.inputBox input { +.inputBox input,button { + width:100%; background:rgb(255, 0 255); border: none; @@ -148,9 +164,21 @@ cursor: pointer; } +.switchpage{ + width:100px; + background:rgb(255, 0 255); + border: none; + padding-right:0; + padding-top:10px; + padding-bottom:10px; + outline:none; + border-radius: 4px; + font-size:0.8em; + align-self:right; -button , input[type = "submit"] { - margin-top:40px; +} + +button { margin-bottom:20px; background-color: rgb(239,60,168); cursor: pointer; @@ -161,7 +189,7 @@ button , input[type = "submit"] { } -button:active , input[type = "submit"]:active{ +button:active ,.switchpage:active{ opacity:0.8; } diff --git a/frontend/src/i18n.js b/frontend/src/i18n.js index a72ceee..17fdbce 100644 --- a/frontend/src/i18n.js +++ b/frontend/src/i18n.js @@ -61,7 +61,7 @@ export async function loadLangs(lang){ lang = lang != null ? lang : getCookie("lang"); lang = lang != "" ? lang : default_lang; - const filename = "./i18n/" + lang.toUpperCase() + ".txt"; + const filename = "/i18n/" + lang.toUpperCase() + ".txt"; const content = await (await fetch(filename)).text(); const lines = content.split("\n");