Skip to content

NOW MANAGED ON CODEBERG

#47 - Fetching values from language files.

Abijeet218376a41c39
diff --git a/resources/assets/js/directives.js b/resources/assets/js/directives.js
index bbdf1a0ae..bbf87adda 100644
--- a/resources/assets/js/directives.js
+++ b/resources/assets/js/directives.js
@@ -936,12 +936,12 @@ module.exports = function (ngApp, events) {
element.on('click', function(e) {
e.preventDefault();
- var resp = $window.confirm('This will remove the content of the comment, are you sure you want to continue?');
- if (!resp) {
- return;
- }
+ var resp = $window.confirm(trans('entities.comment_delete_confirm'));
+ if (!resp) {
+ return;
+ }
- ctrl.delete(scope.comment);
+ ctrl.delete(scope.comment);
});
}
};
diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php
index 08e11cfde..65fba069f 100644
--- a/resources/lang/en/entities.php
+++ b/resources/lang/en/entities.php
@@ -253,5 +253,6 @@ return [
'comment_created' => 'Comment added',
'comment_updated' => 'Comment updated',
'comment_deleted' => 'Comment deleted',
- 'comment_updated_text' => 'Updated :updateDiff by'
+ 'comment_updated_text' => 'Updated :updateDiff by',
+ 'comment_delete_confirm' => 'This will remove the contents of the comment. Are you sure you want to delete this comment?'
];
\ No newline at end of file