Skip to content

Commit da60bd9

Browse files
authored
Merge pull request #3624 from westlywright/2.3.backport.translations.fixes
[2.3] Translations Fixes
2 parents 9b11762 + 6dc1576 commit da60bd9

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

app/components/form-scoped-roles/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export default Component.extend(NewOrEdit, {
278278
let principal = get(this, 'principal');
279279

280280
if ( !principal ) {
281-
errors.push(this.get('intl').findTranslationByKey('rolesPage.new.errors.memberReq'));
281+
errors.push(this.get('intl').t('rolesPage.new.errors.memberReq'));
282282
set(this, 'errors', errors);
283283

284284
return false;

app/models/mountentry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export default Resource.extend({
2929

3030
switch (permission) {
3131
case 'ro':
32-
out = intl.findTranslationByKey('formVolumeRow.opts.ro');
32+
out = intl.t('formVolumeRow.opts.ro');
3333
break;
3434
case 'rw':
35-
out = intl.findTranslationByKey('formVolumeRow.opts.rw');
35+
out = intl.t('formVolumeRow.opts.rw');
3636
break;
3737
default:
3838
out = permission;

lib/global-admin/addon/accounts/edit/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ export default Controller.extend(NewOrEdit, {
5252
let ok = this.validate();
5353

5454
if (this.canUserLogIn && !this.canUserLogIn()) {
55-
errors.push(this.intl.findTranslationByKey('formGlobalRoles.loginError'));
55+
errors.push(this.intl.t('formGlobalRoles.loginError'));
5656
}
5757

5858
if (!ok) {
5959
return false;
6060
}
6161

6262
if (get(this, 'password.length') > 0 && (get(this, 'password') || '').trim().length === 0) {
63-
errors.push(get(this, 'intl').findTranslationByKey('accountsPage.new.errors.pwReq'));
63+
errors.push(get(this, 'intl').t('accountsPage.new.errors.pwReq'));
6464
}
6565

6666
if (errors.length) {

lib/global-admin/addon/accounts/new/controller.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ export default Controller.extend(NewOrEdit, {
7373
var errors = [];
7474

7575
if (this.canUserLogIn && !this.canUserLogIn()) {
76-
errors.push(this.intl.findTranslationByKey('formGlobalRoles.loginError'));
76+
errors.push(this.intl.t('formGlobalRoles.loginError'));
7777
}
7878

7979
if ((get(this, 'model.account.username') || '').trim().length === 0) {
80-
errors.push(get(this, 'intl').findTranslationByKey('accountsPage.new.errors.usernameReq'));
80+
errors.push(get(this, 'intl').t('accountsPage.new.errors.usernameReq'));
8181
}
8282

8383
if (this.doesExist()) {
84-
errors.push(get(this, 'intl').findTranslationByKey('accountsPage.new.errors.usernameInExists'));
84+
errors.push(get(this, 'intl').t('accountsPage.new.errors.usernameInExists'));
8585
}
8686

8787
if ((get(this, 'model.account.password') || '').trim().length === 0) {
88-
errors.push(get(this, 'intl').findTranslationByKey('accountsPage.new.errors.pwReq'));
88+
errors.push(get(this, 'intl').t('accountsPage.new.errors.pwReq'));
8989
}
9090

9191
if (errors.length) {

lib/global-admin/addon/components/new-edit-role/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default Component.extend(NewOrEdit, {
148148
var errors = get(this, 'errors') || [];
149149

150150
if ((get(this, 'primaryResource.name') || '').trim().length === 0) {
151-
errors.push(get(this, 'intl').findTranslationByKey('rolesPage.new.errors.nameReq'));
151+
errors.push(get(this, 'intl').t('rolesPage.new.errors.nameReq'));
152152
}
153153

154154
set(this, 'errors', errors);

lib/shared/addon/components/input-identity/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ export default Component.extend({
148148
let intl = get(this, 'intl');
149149

150150
if ( get(this, 'access.provider') === 'githubconfig' ) {
151-
out = intl.findTranslationByKey('inputIdentity.dropdownLabel.teams');
151+
out = intl.t('inputIdentity.dropdownLabel.teams');
152152
} else {
153-
out = intl.findTranslationByKey('inputIdentity.dropdownLabel.groups');
153+
out = intl.t('inputIdentity.dropdownLabel.groups');
154154
}
155155

156156
return intl.formatMessage(out);

lib/shared/addon/mixins/upgrade-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default Mixin.create({
6363
}),
6464

6565
currentVersion: computed('model.externalIdInfo.{version}', 'model.externalId', function() {
66-
let text = get(this, 'intl').findTranslationByKey('upgradeBtn.version.current');
66+
let text = get(this, 'intl').t('upgradeBtn.version.current');
6767
let version = get(this, 'model.externalIdInfo.version');
6868

6969
if (typeof version === 'string' || typeof version === 'number') {

0 commit comments

Comments
 (0)