Skip to content

Commit 5c50d99

Browse files
chore: Correct l10n service usage (#5354)
1 parent 0ca0ef7 commit 5c50d99

File tree

78 files changed

+70088
-35621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+70088
-35621
lines changed

app/components/account/application-section.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default class ApplicationSection extends Component {
4141
});
4242
}
4343
} catch (error) {
44-
this.notify.error(this.l10n.t(error.message), {
44+
this.notify.error(error.message, {
4545
id: 'error_message'
4646
});
4747
this.set('isLoading', false);

app/components/events/view/export/download-zip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class DownloadZip extends Component {
1919
});
2020
} catch (e) {
2121
console.error('Error while downloading event zip', e);
22-
this.notify.error(this.l10n.t(e), {
22+
this.notify.error(e, {
2323
id: 'err_down'
2424
});
2525
}

app/components/forms/admin/settings/system-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default Component.extend(FormMixin, {
152152
},
153153
{
154154
type : 'email',
155-
prompt : this.l10n.t('Please enter a valid email address')
155+
prompt : this.l10n.t('Please enter a valid email address')
156156
}
157157
]
158158
},

app/components/forms/orders/order-form.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export default Component.extend(FormMixin, {
418418
rules : [
419419
{
420420
type : 'empty',
421-
prompt : this.l10n.t('Please enter your city ')
421+
prompt : this.l10n.t('Please enter your city')
422422
}
423423
]
424424
},
@@ -476,7 +476,7 @@ export default Component.extend(FormMixin, {
476476
rules: [
477477
{
478478
type : 'empty',
479-
prompt : this.l10n.t('Please enter ' + field.name)
479+
prompt : 'Please enter ' + field.name
480480
}
481481
]
482482
};

app/components/forms/session-speaker-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export default Component.extend(FormMixin, {
387387
rules: [
388388
{
389389
type : 'empty',
390-
prompt : this.l10n.t('Please enter ' + field.name)
390+
prompt : 'Please enter ' + field.name
391391
}
392392
]
393393
};

app/components/forms/wizard/basic-details-step.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
431431
})
432432
.catch(error => {
433433
console.error('Error while setting stripe authorization in event', error);
434-
this.notify.error(this.l10n.t(`${error.message}. Please try again`), {
434+
this.notify.error(error.message + '. ' + this.l10n.t('Please try again'), {
435435
id: 'basic_detail_err'
436436
});
437437
});

app/components/forms/wizard/custom-form-input.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
<div class="item" data-value="number">Number</div>
1818
</div>
1919
</UiDropdown>
20-
<button class="ui button" {{action 'addFormField'}} disabled={{not this.validIdentifier}}>{{t (if @field 'Save' 'Add')}}</button>
20+
<button class="ui button" {{action 'addFormField'}} disabled={{not this.validIdentifier}}>{{if @field (t 'Save') (t 'Add')}}</button>
2121
</div>

app/components/forms/wizard/custom-forms/table.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{#if @headerText}}
44
<tr>
55
<th colspan="{{if this.editColumn '5' '4'}}" class="text center aligned">
6-
{{t @headerText}}
6+
{{@headerText}}
77
</th>
88
</tr>
99
{{/if}}

app/components/public/ticket-list.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ export default Component.extend(FormMixin, {
223223
rules : [
224224
{
225225
type : `integer[${donationTicket.minPrice}..${donationTicket.maxPrice}]`,
226-
prompt : this.l10n.t(`Please enter a donation amount between ${donationTicket.minPrice} and ${donationTicket.maxPrice}`)
226+
prompt : this.l10n.t('Please enter a donation amount between {{minPrice}} and {{maxPrice}}', {
227+
minPrice : donationTicket.minPrice,
228+
maxPrice : donationTicket.maxPrice
229+
})
227230
}
228231
]
229232
};

app/components/unverified-user-message.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class UnverifiedUserMessage extends Component {
3030
.catch(error => {
3131
console.error('Error while sending verification email', error, error.error);
3232
if (error.error) {
33-
this.notify.error(this.l10n.t(error.error), {
33+
this.notify.error(error.error, {
3434
id: 'ver_mail_serv_error'
3535
});
3636
} else {

0 commit comments

Comments
 (0)