From 049c5499ee8c1d74afdcaabf3a61cc487dce8240 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:17:08 -0400 Subject: [PATCH 01/22] imported app/index,js --- src/generators/app/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/generators/app/index.js b/src/generators/app/index.js index fe914e588..f65959848 100644 --- a/src/generators/app/index.js +++ b/src/generators/app/index.js @@ -189,6 +189,11 @@ export class Generator extends Base { filter: val => val.toLowerCase() }, { type: 'confirm', + name: 'i18nSupport', + default: false, + message: 'Would you like to include i18n support (multi-language)?', + }, { + type: 'confirm', name: 'bootstrap', message: 'Would you like to include Bootstrap?' }, { @@ -219,6 +224,9 @@ export class Generator extends Base { this.filters.uibootstrap = !!answers.uibootstrap; insight.track('uibootstrap', !!answers.uibootstrap); + this.filters.i18nSupport = !!answers.i18nSupport; + insight.track('i18nSupport', !!answers.i18nSupport); + this.scriptExt = answers.transpiler === 'ts' ? 'ts' : 'js'; this.templateExt = answers.markup; @@ -444,6 +452,7 @@ export class Generator extends Base { if(this.filters.socketio) angModules.push("'btford.socket-io'"); if(this.filters.uirouter) angModules.push("'ui.router'"); if(this.filters.uibootstrap) angModules.push("'ui.bootstrap'"); + if(this.filters.auth) { angModules.unshift(`'${this.scriptAppName}.admin'`); angModules.unshift(`'${this.scriptAppName}.auth'`); @@ -548,6 +557,10 @@ export class Generator extends Base { ['uiBootstrap', 'angular-ui-bootstrap'], ['ngMessages', 'angular-messages'], ['io', 'socket.io-client'], + ['i18n', 'angular-translate'], + ['i18nCookie', 'angular-translate-storage-cookie'], + ['i18nLocal', 'angular-translate-storage-local'], + ['i18nLoader', 'angular-translate-loader-static-files'] ['ngValidationMatch', 'angular-validation-match'] ]; function replacer(contents) { From 335424198ec9a158caa402d68bd23d77fcf6cde1 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:21:23 -0400 Subject: [PATCH 02/22] Imported yo-rc.json --- src/test/fixtures/.yo-rc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/fixtures/.yo-rc.json b/src/test/fixtures/.yo-rc.json index ca971c119..1cfff6c65 100644 --- a/src/test/fixtures/.yo-rc.json +++ b/src/test/fixtures/.yo-rc.json @@ -21,6 +21,7 @@ "uirouter": true, "bootstrap": true, "uibootstrap": true, + "i18nSupport": false, "socketio": true, "auth": true, "models": true, From 28f135e361e656ab83a6077c2f70026801965167 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:24:11 -0400 Subject: [PATCH 03/22] imported yo-rc.json --- test/fixtures/.yo-rc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/test/fixtures/.yo-rc.json b/test/fixtures/.yo-rc.json index ca971c119..1cfff6c65 100644 --- a/test/fixtures/.yo-rc.json +++ b/test/fixtures/.yo-rc.json @@ -21,6 +21,7 @@ "uirouter": true, "bootstrap": true, "uibootstrap": true, + "i18nSupport": false, "socketio": true, "auth": true, "models": true, From 43d7ed43f19241092fdeac21d0d6398106d62158 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:35:42 -0400 Subject: [PATCH 04/22] Imported i18n files --- .../components/i18n(i18nSupport)/!flags.png | Bin 0 -> 2165 bytes .../i18n(i18nSupport)/flags(css).css | 22 +++++++++ .../i18n(i18nSupport)/flags(less).less | 23 ++++++++++ .../i18n(i18nSupport)/flags(sass).scss | 24 ++++++++++ .../i18n(i18nSupport)/flags(stylus).styl | 19 ++++++++ .../i18n(i18nSupport)/locale-en.json | 42 ++++++++++++++++++ .../i18n(i18nSupport)/locale-fr.json | 42 ++++++++++++++++++ 7 files changed, 172 insertions(+) create mode 100644 templates/app/client/components/i18n(i18nSupport)/!flags.png create mode 100644 templates/app/client/components/i18n(i18nSupport)/flags(css).css create mode 100644 templates/app/client/components/i18n(i18nSupport)/flags(less).less create mode 100644 templates/app/client/components/i18n(i18nSupport)/flags(sass).scss create mode 100644 templates/app/client/components/i18n(i18nSupport)/flags(stylus).styl create mode 100644 templates/app/client/components/i18n(i18nSupport)/locale-en.json create mode 100644 templates/app/client/components/i18n(i18nSupport)/locale-fr.json diff --git a/templates/app/client/components/i18n(i18nSupport)/!flags.png b/templates/app/client/components/i18n(i18nSupport)/!flags.png new file mode 100644 index 0000000000000000000000000000000000000000..892f75e67e3abdaca726517252c34537095ffb81 GIT binary patch literal 2165 zcmV-*2#WWKP)zpW3N`A;tJ9+{gjUNf<=m~T*6u<_=TKE4a3?N{&JIucwNY2T5^R~^_ zvKUHB^IK*4%2V@O?xZSY9^R7%aBI(dw^Qd#Ls3;KDr$J+jZ&(rZea3q=bUYnmgaML z!fX_~$(b|^GC$f&ZtfO90~~jZ3()()KCF0d1U)`JNd4(ANt-j1w0YCh>_CdDs*D>q zuvNje28m-IZ?TWR?B4(>0Pf-gC^nU(+#CiB=s{uOT#g_AhO)A2m{}TH9FqWm#Brlg ztVNT;Jju)$bii))7XS>-?#q}5;t?l5L+g@8M$wzZ^v!^Iq}YL2T^9rb8uj&FBxYVj zLIO$~PD|~^O>3YvNKsI%wgl{*laavySWB$FvKsq^uc<94r1LXVi68zDlO_$LXU|j) z9Xf-{?M0Ceq++001n4z4z-~8v2s6-{ng$efQ0#z4Lgy5wP8`CZhVQ7~aTLekL8Q%l z1~n;>TerOcv339<1U_F7zh7&8lu;o4fxG_}(H8yyLf0Fgf3^J#YgYc8%+#~o-t`AM zjT%YkX;a9~?nCd4R7&=JK}E&)m`X5LR|Enmx?$Qj%zGf9VWvQkpA75IjFG)a`1C_= zUc5rew5cSG9SJ~rc{Q6iABB)LO%wQh8a`h;5#aMj|J~t$V3>gaT)xh(-KThT^Z+K# zpNnr_3Dw_}(`CUNx@BeZ(y}KweCQm95C4M@mD1~n&>kR60(?FVRGp`O`3O&@xN&VS z!kyloZY%SN>DwF45PWdpD^8!jM0IsTm;hZjaJvI|Ji&G$!0>pZcd)6*2nFc6g4^lm z;NH*q*RTg!n)f0J2lr9^$~sc#&n0E@c&1JrPDVy5n>Kv{fbjYn3BXc-#}i~l{#b@y z{5!SpmXh@31kx7F0=tdt*Ig799pl1UML`C_ zWb1kWm&=RCqjC1sIr7V{vEf7k5{l`$7gsvP9O$F@e&MrBMC5YI{odY0NDZoQp!6B zkT{(IJRS{Dak*~so7X;K)#{0i-~1T9OP4TQF4UA{)VNrS056I~fHchI)Ek_{<&Gn5 zcsBO*E&v=kQpTnYrIsffU?7Bs&!>h7&@=;=E6~gy5Yj^1G-0?y1T;Th8Uhgv6L9X_ z+Nky%S($hH@On{f;W_{ywtqij`}b?oZ_gB1DdHCD+P31 zE`g@$QOCCy!sChhyAlk7Eu!+33ex9CYOOzoWblr3ZOd!D5RLvD72tMz(KMs=MxwyD zT_5###o@q~lGOMt4IRTT%UeUSyndH^A-`?Ev=EnMjsKW zrY3a4XlS7N)s2)rFqquhvlJH1CO#z=DLqK313HEg3=^R1(weu7dbJi(N~DNFq@ti} zk)^OX6(M|NW%cI7iI>UG&mk_>&h_=1`F8vSdObFr%5__?_gZWE5D`ACxvAeoy^@-}}hS;*i=h9HCwP|!3HCcv;NsdiI{LGp) zniD5iGh#$Pg5Oo~?UdQvTKiivH@(jOC-Rv5{GRYUnz1RRWYVNf6c!!>Ri)>;)ntBf zkeV;fk+x(3AFmw7!evtc1H;h51PCEe?kqU&Cltlpge-LGWaq877EoOL0^QORsek{^ zRAi6Fap?ldB_%Ao+=C@~@8GR#Xwh^app&1!n;A2e410PP`n|uK?pq4DvUVdA4{hNguR>IhznrS664n5F|vB z3BiU9?{W0#8Mbbn%fNxX=z3r`+M12AJR(_cYlMv r-v|IMtKDJ#l^_2(`UA%go`C-XdoNB3Q}-zk00000NkvXXu0mjf?+gtF literal 0 HcmV?d00001 diff --git a/templates/app/client/components/i18n(i18nSupport)/flags(css).css b/templates/app/client/components/i18n(i18nSupport)/flags(css).css new file mode 100644 index 000000000..7cd16fc30 --- /dev/null +++ b/templates/app/client/components/i18n(i18nSupport)/flags(css).css @@ -0,0 +1,22 @@ +/*! + * Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/) + */ +#locale-selector{ + display: inline-block; + float: left; + margin-left: 10px; + margin-right: 10px; + margin-top: 10px; +} +.flag { + display: inline-block; + width: 32px; + height: 32px; + background: url('/components/i18n/flags.png') no-repeat; +} +.flag.flag-gb { + background-position: -32px 0; +} +.flag.flag-fr { + background-position: 0 0; +} diff --git a/templates/app/client/components/i18n(i18nSupport)/flags(less).less b/templates/app/client/components/i18n(i18nSupport)/flags(less).less new file mode 100644 index 000000000..8086813c3 --- /dev/null +++ b/templates/app/client/components/i18n(i18nSupport)/flags(less).less @@ -0,0 +1,23 @@ + +/*! + * Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/) + */ +#locale-selector { + display: inline-block; + float: left; + margin-left: 10px; + margin-right: 10px; + margin-top: 10px; +} +.flag { + display: inline-block; + width: 32px; + height: 32px; + background: url('/components/i18n/flags.png') no-repeat; +} +.flag.flag-gb { + background-position: -32px 0; +} +.flag.flag-fr { + background-position: 0 0; +} \ No newline at end of file diff --git a/templates/app/client/components/i18n(i18nSupport)/flags(sass).scss b/templates/app/client/components/i18n(i18nSupport)/flags(sass).scss new file mode 100644 index 000000000..933bb892d --- /dev/null +++ b/templates/app/client/components/i18n(i18nSupport)/flags(sass).scss @@ -0,0 +1,24 @@ +/*! + * Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/) + */ + +#locale-selector { + display: inline-block; + float: left; + margin-left: 10px; + margin-right: 10px; + margin-top: 10px; +} + +.flag { + display: inline-block; + width: 32px; + height: 32px; + background: url('/components/i18n/flags.png') no-repeat; + &.flag-gb { + background-position: -32px 0; + } + &.flag-fr { + background-position: 0 0; + } +} \ No newline at end of file diff --git a/templates/app/client/components/i18n(i18nSupport)/flags(stylus).styl b/templates/app/client/components/i18n(i18nSupport)/flags(stylus).styl new file mode 100644 index 000000000..843531339 --- /dev/null +++ b/templates/app/client/components/i18n(i18nSupport)/flags(stylus).styl @@ -0,0 +1,19 @@ +/*! + * Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/) + */ +#locale-selector + display inline-block + float left + margin-left 10px + margin-right 10px + margin-top 10px + +.flag + display inline-block + width 32px + height 32px + background url('/components/i18n/flags.png') no-repeat + &.flag-gb + background-position -32px 0 + &.flag-fr + background-position 0 0 \ No newline at end of file diff --git a/templates/app/client/components/i18n(i18nSupport)/locale-en.json b/templates/app/client/components/i18n(i18nSupport)/locale-en.json new file mode 100644 index 000000000..bd9665b45 --- /dev/null +++ b/templates/app/client/components/i18n(i18nSupport)/locale-en.json @@ -0,0 +1,42 @@ +{ + "HOME":"Home", + "TITLE":"Hello, Hello!", + "WELCOME_MSG": "Kick-start your next web app with Angular Fullstack", + "FEATURES":"Features", + "SIGN_UP":"Sign up", + "LOGIN":"Login", + "REAL_TIME_SYNC_MSG": "Syncs in realtime across clients", + "ADD_NEW":"Add New", + "ADD_NEW_THING_HERE":"Add a new thing here.", + "LOGOUT":"Logout", + "ADMIN":"Admin", + "PASSWORD":"Password", + "EMAIL":"Email", + "ENTER_EMAIL_PASSWORD_MSG":"Please enter your email and password.", + "ENTER_VALID_EMAIL_MSG":"Please enter a valid email.", + "REGISTER":"Register", + "ADMIN_ACCOUNT_IS_MSG":"Admin account is ", + "ACCOUNT_RESET_MSG":"Accounts are reset on server restart from ", + "DEFAUL_ACCOUNT_MSG":"Default account is ", + "NAME":"Name", + "NAME_REQUIRED_MSG":"A name is required", + "CONFIRM_PASSWORD":"Confirm Password", + "PASSWORDS_MATCH_MSG":"Passwords must match.", + "PASSWORD_LENGTH_MSG":"Password must be at least 3 characters.", + "ADMIN_RESTRICT_MSG":"The delete user and user index api routes are restricted to users with the 'admin' role.", + "HELLO":"Hello", + "CHANGE_PASSWORD":"Change Password", + "CURRENT_PASSWORD":"Current Password", + "NEW_PASSWORD":"New Password", + "CONFIRM_NEW_PASSWORD":"Confirm New Password", + "SAVE_CHANGES":"Save changes", + "DOCUMENTATION":"Documentation", + "CHAT_ON_GITTER":"Chat on Gitter", + "ISSUES":"Issues", + "DONATION_MSG":"Donate to our Open Collective", + "EMAIL_IN_USE_MSG":"The specified email address is already in use.", + "EMAIL_INVALID_FORMAT_MSG":"Doesn't look like a valid email.", + "EMAIL_QUESTION_MSG":"What's your email address?", + "PASSWORD_INVALID_MSG":"This password is not correct.", + "EMAIL_UNREGISTRED_MSG":"This email is not registered." +} \ No newline at end of file diff --git a/templates/app/client/components/i18n(i18nSupport)/locale-fr.json b/templates/app/client/components/i18n(i18nSupport)/locale-fr.json new file mode 100644 index 000000000..a01f8fb2d --- /dev/null +++ b/templates/app/client/components/i18n(i18nSupport)/locale-fr.json @@ -0,0 +1,42 @@ +{ + "HOME":"Accueil", + "TITLE":"Bonjour, Bonjour!", + "WELCOME_MSG": "Démarrez votre prochaine application Web avec Angular Fullstack", + "FEATURES":"Caractéristiques", + "SIGN_UP":"Inscription", + "LOGIN":"Connection", + "REAL_TIME_SYNC_MSG": "Synchronisation en temps réel sur les clients", + "ADD_NEW":"Ajouter", + "ADD_NEW_THING_HERE":"Ajouter un nouvel item ici.", + "LOGOUT":"Déconnection", + "ADMIN":"Administration", + "PASSWORD":"Mot de passe", + "EMAIL":"Courriel", + "ENTER_EMAIL_PASSWORD_MSG":"Veuillez saisir votre adresse courriel et votre mot de passe.", + "ENTER_VALID_EMAIL_MSG":"Veuillez saisir une adresse courriel valide.", + "REGISTER":"Enregistrer", + "ADMIN_ACCOUNT_IS_MSG":"Le compte administrateur est ", + "ACCOUNT_RESET_MSG":"Les comptes sont réinitialisés au redémarrage du serveur à partir de ", + "DEFAUL_ACCOUNT_MSG":"Le compte par défaut est ", + "NAME":"Nom", + "NAME_REQUIRED_MSG":"Un nom est requis", + "CONFIRM_PASSWORD":"Confirmation du mot de passe", + "PASSWORDS_MATCH_MSG":"Les mots de passe doivent correspondre.", + "PASSWORD_LENGTH_MSG":"Le mot de passe doit contenir au moins 3 caractères.", + "ADMIN_RESTRICT_MSG":"Les routes d'api 'user index' et 'delete user' sont limités aux utilisateurs ayant le rôle 'admin'.", + "HELLO":"Bonjour", + "CHANGE_PASSWORD":"Modification du mot de passe", + "CURRENT_PASSWORD":"Mot de passe actuel", + "NEW_PASSWORD":"Nouveau mot de passe", + "CONFIRM_NEW_PASSWORD":"Confirmer le nouveau mot de passe", + "SAVE_CHANGES":"Savegarder les changements", + "DOCUMENTATION":"Documentation", + "CHAT_ON_GITTER":"Clavarder sur Gitter", + "ISSUES":"Anomalies", + "DONATION_MSG":"Faire un don à notre collectif ouvert", + "EMAIL_IN_USE_MSG":"L'adresse courriel spécifiée est déjà utilisée.", + "EMAIL_INVALID_FORMAT_MSG":"Ca ne ressemble pas à un courriel valide.", + "EMAIL_QUESTION_MSG":"Quelle est votre adresse courriel?", + "PASSWORD_INVALID_MSG":"Ce mot de passe est incorrect.", + "EMAIL_UNREGISTRED_MSG":"This email is not registered." +} \ No newline at end of file From 2b42b0e775ef9b441e2450f9749b20c1fc41d088 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:40:10 -0400 Subject: [PATCH 05/22] Imported get-expected-files.js --- src/test/get-expected-files.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/get-expected-files.js b/src/test/get-expected-files.js index 70b4bfc9c..9443d7ec3 100644 --- a/src/test/get-expected-files.js +++ b/src/test/get-expected-files.js @@ -136,6 +136,16 @@ export function app(options) { 'client/components/ui-router/ui-router.mock.' + script ]); } + + /* i18n Support */ + if (options.i18nSupport) { + files = files.concat([ + 'client/components/i18n/flags.png', + 'client/components/i18n/flags.' + stylesheet, + 'client/components/i18n/locale-en.json', + 'client/components/i18n/locale-fr.json' + ]); + } /* Ui-Bootstrap */ if (options.uibootstrap) { From 16ef89cb893399838240562760c0858bf0fba245 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:48:08 -0400 Subject: [PATCH 06/22] Imported app styling files --- templates/app/client/app/app(css).css | 6 ++++++ templates/app/client/app/app(less).less | 3 +++ templates/app/client/app/app(sass).scss | 3 +++ templates/app/client/app/app(stylus).styl | 3 +++ 4 files changed, 15 insertions(+) diff --git a/templates/app/client/app/app(css).css b/templates/app/client/app/app(css).css index d1b63a10f..b027f3ba6 100644 --- a/templates/app/client/app/app(css).css +++ b/templates/app/client/app/app(css).css @@ -3,6 +3,7 @@ <%_ if(filters.oauth) { -%> @import '~bootstrap-social/bootstrap-social.css'; <%_ } -%> + /** * Bootstrap Fonts */ @@ -44,6 +45,11 @@ color: #000; padding: 0.2em 0; } + +<% if (filters.i18nSupport) { %> +@import '../components/i18n/flags.css'; +<% } %> + <% if(!filters.bootstrap) { %> /* Responsive: Portrait tablets and up */ @media screen and (min-width: 768px) { diff --git a/templates/app/client/app/app(less).less b/templates/app/client/app/app(less).less index 191118fbb..e68efb400 100644 --- a/templates/app/client/app/app(less).less +++ b/templates/app/client/app/app(less).less @@ -15,6 +15,9 @@ color: #000; padding: 0.2em 0; } +<% if (filters.i18nSupport) { %> +@import '../components/i18n/flags.less'; +<% } %> <% if(!filters.bootstrap) { %> /* Responsive: Portrait tablets and up */ @media screen and (min-width: 768px) { diff --git a/templates/app/client/app/app(sass).scss b/templates/app/client/app/app(sass).scss index 1f774272e..af2583592 100644 --- a/templates/app/client/app/app(sass).scss +++ b/templates/app/client/app/app(sass).scss @@ -19,6 +19,9 @@ $fa-font-path: '/assets/fonts/font-awesome/'; color: #000; padding: 0.2em 0; } +<% if (filters.i18nSupport) { %> +@import '../components/i18n/flags.scss'; +<% } %> <% if(!filters.bootstrap) { %> /* Responsive: Portrait tablets and up */ @media screen and (min-width: 768px) { diff --git a/templates/app/client/app/app(stylus).styl b/templates/app/client/app/app(stylus).styl index a38c5b193..c98f76cb0 100644 --- a/templates/app/client/app/app(stylus).styl +++ b/templates/app/client/app/app(stylus).styl @@ -16,6 +16,9 @@ $icon-font-path = '../assets/fonts/bootstrap/' color #000 margin 0.2em 0 padding 0.2em 0 +<% if (filters.i18nSupport) { %> +@import '../components/i18n/flags.styl'; +<% } %> <% if(!filters.bootstrap) { %> // Responsive: Portrait tablets and up @media screen and (min-width: 768px) From 8b7744e85a1fcc43027fe9c8299df7a764acb2e2 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 12:57:04 -0400 Subject: [PATCH 07/22] Imported login files --- .../app/account(auth)/login/login(html).html | 28 +++++++++---------- .../app/account(auth)/login/login(pug).pug | 26 ++++++++--------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/templates/app/client/app/account(auth)/login/login(html).html b/templates/app/client/app/account(auth)/login/login(html).html index 2f72c7268..c33d8ce6b 100644 --- a/templates/app/client/app/account(auth)/login/login(html).html +++ b/templates/app/client/app/account(auth)/login/login(html).html @@ -1,42 +1,42 @@
-

Login

-

Accounts are reset on server restart from server/config/seed.js. Default account is test@example.com / test

-

Admin account is admin@example.com / admin

+ translate="LOGIN"<% } %>><% if (!filters.i18nSupport) { %>Login<% } %> +

<% if (filters.i18nSupport) { %>{{'ACCOUNT_RESET_MSG' | translate}}<% } else { %>Accounts are reset on server restart from<% } %> server/config/seed.js. <% if (filters.i18nSupport) { %>{{'DEFAUL_ACCOUNT_MSG' | translate}}<% } else { %>Default account is<% } %> test@example.com / test

+

<% if (filters.i18nSupport) { %>{{'ADMIN_ACCOUNT_IS_MSG' | translate}}<% } else { %>Admin account is<% } %> admin@example.com / admin

- + translate="EMAIL"<% } %>><% if (!filters.i18nSupport) { %>Email<% } %>
- + translate="PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Password<% } %>
-

- Please enter your email and password. +

translate="ENTER_EMAIL_PASSWORD_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Please enter your email and password.<% } %>

-

- Please enter a valid email. +

translate="ENTER_VALID_EMAIL_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Please enter a valid email.<% } %>

-

{{ vm.errors.login }}

+

{{ vm.errors.login <% if (filters.i18nSupport) { %> | translate<% } %>}}

<% if (filters.oauth) { %> diff --git a/templates/app/client/app/account(auth)/login/login(pug).pug b/templates/app/client/app/account(auth)/login/login(pug).pug index a463419d4..4ee882d65 100644 --- a/templates/app/client/app/account(auth)/login/login(pug).pug +++ b/templates/app/client/app/account(auth)/login/login(pug).pug @@ -1,16 +1,16 @@ .container .row .col-sm-12 - h1 Login + h1<% if (filters.i18nSupport) { %>(translate="LOGIN")<% } else { %>Login<% } %> p - | Accounts are reset on server restart from + | <% if (filters.i18nSupport) { %>{{'ACCOUNT_RESET_MSG' | translate}}<% } else { %>Accounts are reset on server restart from<% } %> code server/config/seed.js - | . Default account is + | . <% if (filters.i18nSupport) { %>{{'DEFAUL_ACCOUNT_MSG' | translate}}<% } else { %>Default account is<% } %> code test@example.com | / code test p - | Admin account is + | <% if (filters.i18nSupport) { %>{{'ADMIN_ACCOUNT_IS_MSG' | translate}}<% } else { %>Admin account is<% } %> code admin@example.com | / code admin @@ -18,23 +18,23 @@ .col-sm-12 form.form(name='form', ng-submit='vm.login(form)', novalidate='') .form-group - label Email + label<% if (filters.i18nSupport) { %>(translate="EMAIL")<% } else { %>Email<% } %> input.form-control(type='email', name='email', ng-model='vm.user.email') .form-group - label Password + label<% if (filters.i18nSupport) { %>(translate="PASSWORD")<% } else { %>Password<% } %> input.form-control(type='password', name='password', ng-model='vm.user.password') .form-group.has-error - p.help-block(ng-show='form.email.$error.required && form.password.$error.required && vm.submitted') - | Please enter your email and password. - p.help-block {{ vm.errors.login }} + p.help-block(ng-show='form.email.$error.required && form.password.$error.required && vm.submitted'<% if (filters.i18nSupport) { %> translate="ENTER_EMAIL_PASSWORD_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>Please enter your email and password.<% } %> + p.help-block {{ vm.errors.login <% if (filters.i18nSupport) { %> | translate<% } %>}} div - button.btn.btn-inverse.btn-lg.btn-login(type='submit') - | Login + button.btn.btn-inverse.btn-lg.btn-login(type='submit'<% if (filters.i18nSupport) { %> translate="LOGIN"<% } %>) + | <% if (!filters.i18nSupport) { %>Login<% } %> = ' ' - a.btn.btn-default.btn-lg.btn-register(<% if (filters.uirouter) { %>ui-sref='signup'<% } else { %>href='/signup'<% } %>) - | Register + a.btn.btn-default.btn-lg.btn-register(<% if (filters.uirouter) { %>ui-sref='signup'<% } else { %>href='/signup'<% } %><% if (filters.i18nSupport) { %> translate="REGISTER"<% } %>) + | <% if (!filters.i18nSupport) { %>Register<% } %> <% if (filters.oauth) {%> hr From 4a285d599e48793a1b7676acf9c8983887a9b12c Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 13:03:45 -0400 Subject: [PATCH 08/22] Imported settings files --- .../account(auth)/settings/settings(html).html | 18 +++++++++--------- .../account(auth)/settings/settings(pug).pug | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/templates/app/client/app/account(auth)/settings/settings(html).html b/templates/app/client/app/account(auth)/settings/settings(html).html index 690b0cf3f..2b98dffa8 100644 --- a/templates/app/client/app/account(auth)/settings/settings(html).html +++ b/templates/app/client/app/account(auth)/settings/settings(html).html @@ -1,13 +1,13 @@
-

Change Password

+ translate="CHANGE_PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Change Password<% } %>
- + translate="CURRENT_PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Current Password<% } %> @@ -17,34 +17,34 @@

Change Password

- + translate="NEW_PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>New Password<% } %>

- Password must be at least 3 characters. + ng-show="(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || vm.submitted)"<% if (filters.i18nSupport) { %> translate="PASSWORD_LENGTH_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Password must be at least 3 characters.<% } %>

- + translate="CONFIRM_NEW_PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Confirm New Password<% } %>

- Passwords must match. + ng-show="form.confirmPassword.$error.match && vm.submitted"<% if (filters.i18nSupport) { %> translate="PASSWORDS_MATCH_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Passwords must match.<% } %>

{{ vm.message }}

- +
diff --git a/templates/app/client/app/account(auth)/settings/settings(pug).pug b/templates/app/client/app/account(auth)/settings/settings(pug).pug index fc4bee87f..d028cd2e5 100644 --- a/templates/app/client/app/account(auth)/settings/settings(pug).pug +++ b/templates/app/client/app/account(auth)/settings/settings(pug).pug @@ -1,11 +1,11 @@ .container .row .col-sm-12 - h1 Change Password + h1<% if (filters.i18nSupport) { %>(translate="CHANGE_PASSWORD")<% } else { %> Change Password<% } %> .col-sm-12 form.form(name='form', ng-submit='vm.changePassword(form)', novalidate='') .form-group - label Current Password + label<% if (filters.i18nSupport) { %>(translate="CURRENT_PASSWORD")<% } else { %> Current Password<% } %> input.form-control(type='password' name='password' ng-model='vm.user.oldPassword' @@ -13,23 +13,23 @@ p.help-block(ng-show='form.password.$error.mongoose') | {{ vm.errors.other }} .form-group - label New Password + label<% if (filters.i18nSupport) { %>(translate="NEW_PASSWORD")<% } else { %> New Password<% } %> input.form-control(type='password' name='newPassword' ng-model='vm.user.newPassword' ng-minlength='3', required='') - p.help-block(ng-show='(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || vm.submitted)') - | Password must be at least 3 characters. + p.help-block(ng-show='(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || vm.submitted)'<% if (filters.i18nSupport) { %> translate="PASSWORD_LENGTH_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>Password must be at least 3 characters.<% } %> .form-group - label Confirm New Password + label<% if (filters.i18nSupport) { %>(translate="CONFIRM_NEW_PASSWORD")<% } else { %> Confirm New Password<% } %> input.form-control(type='password' name='confirmPassword' ng-model='vm.user.confirmPassword' match="vm.user.newPassword" ng-minlength='3', required='') - p.help-block(ng-show='fvm.orm.confirmPassword.$error.match && vm.submitted') - | Passwords must match. + p.help-block(ng-show='fvm.orm.confirmPassword.$error.match && vm.submitted'<% if (filters.i18nSupport) { %> translate="PASSWORDS_MATCH_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>Passwords must match.<% } %> p.help-block {{ vm.message }} - button.btn.btn-lg.btn-primary(type='submit') Save changes + button.btn.btn-lg.btn-primary(type='submit'<% if (filters.i18nSupport) { %> translate="SAVE_CHANGES"<% } %>) <% if (!filters.i18nSupport) { %>Save changes<% } %> From 7189bfbf25c3341a58c0638e9d0fac5a44316aaa Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 13:08:18 -0400 Subject: [PATCH 09/22] Imported signup --- .../account(auth)/signup/signup(html).html | 42 +++++++++---------- .../app/account(auth)/signup/signup(pug).pug | 42 +++++++++---------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/templates/app/client/app/account(auth)/signup/signup(html).html b/templates/app/client/app/account(auth)/signup/signup(html).html index 6b6cad4b7..11834260d 100644 --- a/templates/app/client/app/account(auth)/signup/signup(html).html +++ b/templates/app/client/app/account(auth)/signup/signup(html).html @@ -1,75 +1,75 @@
-

Sign up

+ translate="SIGN_UP"<% } %>><% if (!filters.i18nSupport) { %>Sign up<% } %>
- + translate="NAME"<% } %>><% if (!filters.i18nSupport) { %>Name<% } %> -

- A name is required +

translate="NAME_REQUIRED_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>A name is required<% } %>

- + translate="EMAIL"<% } %>><% if (!filters.i18nSupport) { %>Email<% } %> -

- Doesn't look like a valid email. +

translate="EMAIL_INVALID_FORMAT_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Doesn't look like a valid email.<% } %>

-

- What's your email address? +

translate="EMAIL_QUESTION_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>What's your email address?<% } %>

- {{ vm.errors.email }} + {{ vm.errors.email <% if (filters.i18nSupport) { %>| translate <% } %>}}

- + translate="PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Password<% } %>

- Password must be at least 3 characters. + ng-show="(form.password.$error.minlength || form.password.$error.required) && vm.submitted"<% if (filters.i18nSupport) { %> translate="PASSWORD_LENGTH_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Password must be at least 3 characters.<% } %>

- {{ vm.errors.password }} + {{ vm.errors.password <% if (filters.i18nSupport) { %>| translate <% } %>}}

- + translate="CONFIRM_PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Confirm Password<% } %>

- Passwords must match. + ng-show="form.confirmPassword.$error.match && vm.submitted"<% if (filters.i18nSupport) { %> translate="PASSWORDS_MATCH_MSG"<% } %>> + <% if (!filters.i18nSupport) { %>Passwords must match.<% } %>

<% if (filters.oauth) { %> diff --git a/templates/app/client/app/account(auth)/signup/signup(pug).pug b/templates/app/client/app/account(auth)/signup/signup(pug).pug index 51480eefb..d82c894d4 100644 --- a/templates/app/client/app/account(auth)/signup/signup(pug).pug +++ b/templates/app/client/app/account(auth)/signup/signup(pug).pug @@ -1,58 +1,58 @@ .container .row .col-sm-12 - h1 Sign up + h1<% if (filters.i18nSupport) { %>(translate="SIGN_UP")<% } else { %> Sign up<% } %> .col-sm-12 form.form(name='form', ng-submit='vm.register(form)', novalidate='') .form-group(ng-class='{ "has-success": form.name.$valid && vm.submitted,\ "has-error": form.name.$invalid && vm.submitted }') - label Name + label<% if (filters.i18nSupport) { %>(translate="NAME")<% } else { %> Name<% } %> input.form-control(type='text', name='name', ng-model='vm.user.name', required='') - p.help-block(ng-show='form.name.$error.required && vm.submitted') - | A name is required + p.help-block(ng-show='form.name.$error.required && vm.submitted'<% if (filters.i18nSupport) { %> translate="NAME_REQUIRED_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>A name is required<% } %> .form-group(ng-class='{ "has-success": form.email.$valid && vm.submitted,\ "has-error": form.email.$invalid && vm.submitted }') - label Email + label<% if (filters.i18nSupport) { %>(translate="EMAIL")<% } else { %> Email<% } %> input.form-control(type='email', name='email', ng-model='vm.user.email', required='', mongoose-error='') - p.help-block(ng-show='form.email.$error.email && vm.submitted') - | Doesn't look like a valid email. - p.help-block(ng-show='form.email.$error.required && vm.submitted') - | What's your email address? + p.help-block(ng-show='form.email.$error.email && vm.submitted'<% if (filters.i18nSupport) { %> translate="EMAIL_INVALID_FORMAT_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>Doesn't look like a valid email.<% } %> + p.help-block(ng-show='form.email.$error.required && vm.submitted'<% if (filters.i18nSupport) { %> translate="EMAIL_QUESTION_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>What's your email address?<% } %> p.help-block(ng-show='form.email.$error.mongoose') - | {{ vm.errors.email }} + | {{ vm.errors.email <% if (filters.i18nSupport) { %>| translate<% } %>}} .form-group(ng-class='{ "has-success": form.password.$valid && vm.submitted,\ "has-error": form.password.$invalid && vm.submitted }') - label Password + label<% if (filters.i18nSupport) { %>(translate="PASSWORD")<% } else { %> Password<% } %> input.form-control(type='password' name='password' ng-model='vm.user.password' mongoose-error='' ng-minlength='3', required='') - p.help-block(ng-show='(form.password.$error.minlength || form.password.$error.required) && vm.submitted') - | Password must be at least 3 characters. + p.help-block(ng-show='(form.password.$error.minlength || form.password.$error.required) && vm.submitted'<% if (filters.i18nSupport) { %> translate="PASSWORD_LENGTH_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>Password must be at least 3 characters.<% } %> p.help-block(ng-show='form.password.$error.mongoose') - | {{ vm.errors.password }} + | {{ vm.errors.password <% if (filters.i18nSupport) { %>| translate<% } %>}} .form-group(ng-class='{ "has-success": form.confirmPassword.$valid && vm.submitted,\ "has-error": form.confirmPassword.$invalid && vm.submitted }') - label Confirm Password + label<% if (filters.i18nSupport) { %>(translate="CONFIRM_PASSWORD")<% } else { %> Confirm Password<% } %> input.form-control(type='password' name='confirmPassword' ng-model='vm.user.confirmPassword' match="vm.user.password" ng-minlength='3', required='') - p.help-block(ng-show='form.confirmPassword.$error.match && vm.submitted') - | Passwords must match. + p.help-block(ng-show='form.confirmPassword.$error.match && vm.submitted'<% if (filters.i18nSupport) { %> translate="PASSWORDS_MATCH_MSG"<% } %>) + | <% if (!filters.i18nSupport) { %>Passwords must match.<% } %> div - button.btn.btn-inverse.btn-lg.btn-register(type='submit') - | Sign up + button.btn.btn-inverse.btn-lg.btn-register(type='submit'<% if (filters.i18nSupport) { %> translate="SIGN_UP"<% } %>) + | <% if (!filters.i18nSupport) { %>Sign up<% } %> = ' ' - a.btn.btn-default.btn-lg.btn-login(<% if (filters.uirouter) { %>ui-sref='login'<% } else { %>href='/login'<% } %>) - | Login + a.btn.btn-default.btn-lg.btn-login(<% if (filters.uirouter) { %>ui-sref='login'<% } else { %>href='/login'<% } %><% if (filters.i18nSupport) { %> translate="LOGIN"<% } %>) + | <% if (!filters.i18nSupport) { %>Login<% } %> <% if (filters.oauth) {%> hr From e05fe51648cecae551f6c32b771af38ddb8f6be7 Mon Sep 17 00:00:00 2001 From: stherrienaspnet Date: Tue, 4 Apr 2017 13:12:35 -0400 Subject: [PATCH 10/22] Imported admin files --- templates/app/client/app/admin(auth)/admin(html).html | 2 +- templates/app/client/app/admin(auth)/admin(pug).pug | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/app/client/app/admin(auth)/admin(html).html b/templates/app/client/app/admin(auth)/admin(html).html index cbbe68a40..829829d09 100644 --- a/templates/app/client/app/admin(auth)/admin(html).html +++ b/templates/app/client/app/admin(auth)/admin(html).html @@ -1,5 +1,5 @@
-

The delete user and user index api routes are restricted to users with the 'admin' role.

+

translate="ADMIN_RESTRICT_MSG"<% } %>><% if (!filters.i18nSupport) { %>The delete user and user index api routes are restricted to users with the 'admin' role.<% } %>