From 8b247c9eff12b4f93b406a6bdbbdf0ff30b401e6 Mon Sep 17 00:00:00 2001 From: flifloo Date: Tue, 18 Aug 2020 17:00:07 +0200 Subject: [PATCH] Add locales to register --- locales/en.json | 17 +++++++++++------ views/index.pug | 6 +++--- views/login.pug | 4 ++-- views/register.pug | 16 ++++++++-------- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/locales/en.json b/locales/en.json index ba5c117..82b0245 100644 --- a/locales/en.json +++ b/locales/en.json @@ -21,9 +21,6 @@ }, "index": { "welcome": "Welcome to Sandwiches Order Doua", - "department": "Department", - "firstName": "First name", - "lastName": "Last name", "command": "Command", "sandwich": "Sandwich", "day": "Day", @@ -31,8 +28,16 @@ }, "login": { "title": "Login", - "username": "Username", - "password": "Password", "submit": "Login" - } + }, + "register": { + "title": "Register", + "email": "Email", + "submit": "Register" + }, + "firstName": "First name", + "lastName": "Last name", + "username": "Username", + "password": "Password", + "department": "Department" } diff --git a/views/index.pug b/views/index.pug index 1202921..be0b36c 100644 --- a/views/index.pug +++ b/views/index.pug @@ -6,17 +6,17 @@ block content p=__("index.welcome") form#command(action="/command" method="POST") div.field - label(for="department")=__("index.department")+":" + label(for="department")=__("department")+":" input#department(type="list" list="department-list" name="department" value=user ? user.DepartmentName : "" autocomplete="off" required) datalist#department-list each department in departments option(value=department.name) div.field - label(for="firstname")=__("index.firstName")+":" + label(for="firstname")=__("firstName")+":" input#firstname(type="text" name="firstName" value=user ? user.firstName : "" required) div.field - label(for="lastname")=__("index.lastName")+":" + label(for="lastname")=__("lastName")+":" input#lastname(type="text" name="lastName" value=user ? user.lastName : "" required) div#command1.command diff --git a/views/login.pug b/views/login.pug index 7f22596..1963a93 100644 --- a/views/login.pug +++ b/views/login.pug @@ -4,10 +4,10 @@ block content form.card(action="/login" method="POST") h1=__("login.title") div.field - label(for="username")=__("login.username")+":" + label(for="username")=__("username")+":" input#username(type="text" name="username" required) div.field - label(for="password")=__("login.password")+":" + label(for="password")=__("password")+":" input#password(type="password" name="password" required) div.field input(type="submit" value=__("login.submit")) diff --git a/views/register.pug b/views/register.pug index d535f7c..4f636f7 100644 --- a/views/register.pug +++ b/views/register.pug @@ -2,27 +2,27 @@ extends layout block content form.card(action="/register" method="POST") - h1 Register + h1=__("register.title") div.field - label(for="username") Username: + label(for="username")=__("username")+":" input#username(type="text" name="username" required) div.field - label(for="email") Email: + label(for="email")=__("register.email")+":" input#email(type="email" name="email" required) div.field - label(for="firstName") First name: + label(for="firstName")=__("firstName")+":" input#firstName(type="text" name="firstName" required) div.field - label(for="lastName") Last name: + label(for="lastName")=__("lastName")+":" input#lastName(type="text" name="lastName" required) div.field - label(for="department") Department: + label(for="department")=__("department")+":" input#department(type="list" list="department-list" name="department" required) div.field - label(for="password") Password: + label(for="password")=__("password")+":" input#password(type="password" name="password" required) div.field - input(type="submit" value="Register") + input(type="submit" value=__("register.submit")) datalist#department-list each department in departments