-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Refactor delete message translation #992
Changes from 1 commit
3b9f5a2
47bdefc
916bbbb
a5b3b37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,7 +348,7 @@ export default Ember.Controller.extend(BillingCategories, EKMixin, | |
confirmDeleteValue(value) { | ||
let i18n = this.get('i18n'); | ||
let title = i18n.t('admin.lookup.titles.deleteLookupValue'); | ||
let message = i18n.t('admin.lookup.messages.deleteLookupValue', { value }); | ||
let message = i18n.t('messages.delete_singular', { name: value.concat(' value') }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
this.displayConfirm(title, message, 'deleteValue', Ember.Object.create({ | ||
valueToDelete: value | ||
})); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'appointments.messages.deleteAppointmentMessage'}} | ||
{{t 'messages.delete_singular' name='appointment'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'imaging.messages.delete'}} | ||
{{t 'messages.delete_singular' name='imaging request' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'incident.messages.deleteCategory' name=model.incidentCategoryName}} | ||
{{t 'messages.delete' name=model.incidentCategoryName}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This example is using an item name and is done correctly |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ export default AbstractEditController.extend({ | |
|
||
showDeleteItem(item) { | ||
let i18n = get(this, 'i18n'); | ||
let message = i18n.t('incident.messages.deleteItem'); | ||
let message = i18n.t('messages.delete_singular', { name: 'item' }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
let title = i18n.t('incident.titles.deleteItem'); | ||
this.displayConfirm(title, message, 'deleteItem', Ember.Object.create({ | ||
itemToDelete: item | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ | |
updateButtonAction=updateButtonAction | ||
updateButtonText=updateButtonText}} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> {{t 'incident.messages.deleteIncident' name=name}} | ||
<span class="glyphicon glyphicon-warning-sign"></span> {{t 'messages.delete_singular' name='incident'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,7 +205,7 @@ export default AbstractEditController.extend(IncidentStatuses, FriendlyId, Patie | |
|
||
showDeleteAttachment(attachment) { | ||
let i18n = get(this, 'i18n'); | ||
let message = i18n.t('incident.messages.deleteAttachment'); | ||
let message = i18n.t('messages.delete_singular', { name: 'attachment' }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
let model = Ember.Object.create({ | ||
itemToDelete: attachment | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{{#modal-dialog isUpdateDisabled=isUpdateDisabled title=title updateButtonAction=updateButtonAction updateButtonText=updateButtonText}} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'incident.messages.deleteNote'}} | ||
{{t 'messages.delete_singular' name='note'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'labs.messages.confirmDeletion'}} | ||
{{t 'messages.delete_singular' name='lab request'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'medication.messages.confirmDeletion'}} | ||
{{t 'messages.delete_singular' name='medication request'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'patients.messages.deletePatient' firstName=model.firstName lastName=model.lastName}} | ||
{{t 'messages.delete' name=(concat model.firstName " " model.lastName)}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should user model.shortDisplayName instead of concatenating first and lastName |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ export default AbstractEditController.extend(ChargeActions, PatientSubmodule, { | |
closeModalOnConfirm: false, | ||
confirmAction: 'deleteCharge', | ||
title: this.get('i18n').t('procedures.titles.deleteMedicationUsed'), | ||
message: this.get('i18n').t('procedures.messages.deleteMedication'), | ||
message: this.get('i18n').t('messages.delete_singular', { name: 'medication' }), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
chargeToDelete: charge, | ||
updateButtonAction: 'confirm', | ||
updateButtonText: this.get('i18n').t('buttons.ok') | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'messages.areYouSureDelete' user=model.name}} | ||
{{t 'messages.delete' name=(concat "the user " model.name)}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t 'visits.messages.delete'}} | ||
{{t 'messages.delete_singular' name='visit'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
<form role="form"> | ||
<div class="form-group"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t "procedures.messages.delete"}} | ||
{{t "messages.delete_singular" name='procedure'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ | |
updateButtonText=updateButtonText }} | ||
<div class="alert alert-danger"> | ||
<span class="glyphicon glyphicon-warning-sign"></span> | ||
{{t "vitals.messages.delete"}} | ||
{{t "messages.delete_plural" name='vitals'}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. |
||
</div> | ||
{{/modal-dialog}} |
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.
This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted.