-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat (*): Add i18n support #2534
Open
stherrienaspnet
wants to merge
23
commits into
angular-fullstack:master
Choose a base branch
from
stherrienaspnet:i18nSupport
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
049c549
imported app/index,js
stherrienaspnet 3354241
Imported yo-rc.json
stherrienaspnet 28f135e
imported yo-rc.json
stherrienaspnet 43d7ed4
Imported i18n files
stherrienaspnet 2b42b0e
Imported get-expected-files.js
stherrienaspnet 16ef89c
Imported app styling files
stherrienaspnet 8b7744e
Imported login files
stherrienaspnet 4a285d5
Imported settings files
stherrienaspnet 7189bfb
Imported signup
stherrienaspnet e05fe51
Imported admin files
stherrienaspnet 48e0481
Imported main
stherrienaspnet 50b3150
Imported footer files
stherrienaspnet 1aad830
Imported navbar files
stherrienaspnet 77eba3f
Imported app.js
stherrienaspnet cf971e0
Imported navbar component.js
stherrienaspnet c87f518
Imported user model and passport.js
stherrienaspnet 4bd9161
Imported app.config.js
stherrienaspnet 4941511
Fixed index file
stherrienaspnet 596bee1
All tests are passing now
stherrienaspnet fb65fc1
Added text for external auth0 provider
stherrienaspnet cea6aec
Completed pug integration
stherrienaspnet 5b163fa
json cocntent ordering
stherrienaspnet 197a8bc
Merge branch 'master' into i18nSupport
Awk34 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
templates/app/client/app/account(auth)/login/login(html).html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<h1>Login</h1> | ||
<p>Accounts are reset on server restart from <code>server/config/seed.js</code>. Default account is <code>[email protected]</code> / <code>test</code></p> | ||
<p>Admin account is <code>[email protected]</code> / <code>admin</code></p> | ||
<h1<% if (filters.i18nSupport) { %> translate="LOGIN"<% } %>><% if (!filters.i18nSupport) { %>Login<% } %></h1> | ||
<p><% if (filters.i18nSupport) { %>{{'ACCOUNT_RESET_MSG' | translate}}<% } else { %>Accounts are reset on server restart from<% } %> <code>server/config/seed.js</code>. <% if (filters.i18nSupport) { %>{{'DEFAUL_ACCOUNT_MSG' | translate}}<% } else { %>Default account is<% } %> <code>[email protected]</code> / <code>test</code></p> | ||
<p><% if (filters.i18nSupport) { %>{{'ADMIN_ACCOUNT_IS_MSG' | translate}}<% } else { %>Admin account is<% } %> <code>[email protected]</code> / <code>admin</code></p> | ||
</div> | ||
<div class="col-sm-12"> | ||
<form class="form" name="form" ng-submit="vm.login(form)" novalidate> | ||
|
||
<div class="form-group"> | ||
<label>Email</label> | ||
<label<% if (filters.i18nSupport) { %> translate="EMAIL"<% } %>><% if (!filters.i18nSupport) { %>Email<% } %></label> | ||
|
||
<input type="email" name="email" class="form-control" ng-model="vm.user.email" required> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label>Password</label> | ||
<label<% if (filters.i18nSupport) { %> translate="PASSWORD"<% } %>><% if (!filters.i18nSupport) { %>Password<% } %></label> | ||
|
||
<input type="password" name="password" class="form-control" ng-model="vm.user.password" required> | ||
</div> | ||
|
||
<div class="form-group has-error"> | ||
<p class="help-block" ng-show="form.email.$error.required && form.password.$error.required && vm.submitted"> | ||
Please enter your email and password. | ||
<p class="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> | ||
<p class="help-block" ng-show="form.email.$error.email && vm.submitted"> | ||
Please enter a valid email. | ||
<p class="help-block" ng-show="form.email.$error.email && vm.submitted"<% if (filters.i18nSupport) { %> translate="ENTER_VALID_EMAIL_MSG"<% } %>> | ||
<% if (!filters.i18nSupport) { %>Please enter a valid email.<% } %> | ||
</p> | ||
|
||
<p class="help-block">{{ vm.errors.login }}</p> | ||
<p class="help-block">{{ vm.errors.login <% if (filters.i18nSupport) { %> | translate<% } %>}}</p> | ||
</div> | ||
|
||
<div> | ||
<button class="btn btn-inverse btn-lg btn-login" type="submit"> | ||
Login | ||
<button class="btn btn-inverse btn-lg btn-login" type="submit"<% if (filters.i18nSupport) { %> translate="LOGIN"<% } %>> | ||
<% if (!filters.i18nSupport) { %>Login<% } %> | ||
</button> | ||
<a class="btn btn-default btn-lg btn-register" <% if (filters.uirouter) { %>ui-sref="signup"<% } else { %>href="/signup"<% } %>> | ||
Register | ||
<a class="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<% } %> | ||
</a> | ||
</div> | ||
<% if (filters.oauth) { %> | ||
|
26 changes: 13 additions & 13 deletions
26
templates/app/client/app/account(auth)/login/login(pug).pug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
.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 [email protected] | ||
| / | ||
code test | ||
p | ||
| Admin account is | ||
| <% if (filters.i18nSupport) { %>{{'ADMIN_ACCOUNT_IS_MSG' | translate}}<% } else { %>Admin account is<% } %> | ||
code [email protected] | ||
| / | ||
code admin | ||
|
||
.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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
templates/app/client/app/account(auth)/settings/settings(pug).pug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
.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' | ||
mongoose-error='') | ||
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<% } %> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be simpler to just call it
i18n