use the correct translation for cancellations

* Some languages have different words for cancelling an action vs
  cancelling an invoice.
This commit is contained in:
novag 2023-01-14 10:48:25 +01:00 committed by Hendrik Hagendorn
parent 8a5eeea642
commit fc52a2456c
5 changed files with 8 additions and 4 deletions

View File

@ -31,7 +31,7 @@ class Bills extends BulkAction
], ],
'cancelled' => [ 'cancelled' => [
'icon' => 'cancel', 'icon' => 'cancel',
'name' => 'general.cancel', 'name' => 'documents.actions.cancel',
'message' => 'bulk_actions.message.cancelled', 'message' => 'bulk_actions.message.cancelled',
'permission' => 'update-purchases-bills', 'permission' => 'update-purchases-bills',
], ],

View File

@ -31,7 +31,7 @@ class Invoices extends BulkAction
], ],
'cancelled' => [ 'cancelled' => [
'icon' => 'cancel', 'icon' => 'cancel',
'name' => 'general.cancel', 'name' => 'documents.actions.cancel',
'message' => 'bulk_actions.message.cancelled', 'message' => 'bulk_actions.message.cancelled',
'permission' => 'update-sales-invoices', 'permission' => 'update-sales-invoices',
], ],

View File

@ -614,7 +614,7 @@ class Document extends Model
if (! in_array($this->status, ['cancelled', 'draft'])) { if (! in_array($this->status, ['cancelled', 'draft'])) {
try { try {
$actions[] = [ $actions[] = [
'title' => trans('general.cancel'), 'title' => trans('documents.actions.cancel'),
'icon' => 'cancel', 'icon' => 'cancel',
'url' => route($prefix . '.cancelled', $this->id), 'url' => route($prefix . '.cancelled', $this->id),
'permission' => 'update-' . $group . '-' . $permission_prefix, 'permission' => 'update-' . $group . '-' . $permission_prefix,

View File

@ -10,6 +10,10 @@ return [
'billing' => 'Billing', 'billing' => 'Billing',
'advanced' => 'Advanced', 'advanced' => 'Advanced',
'actions' => [
'cancel' => 'Cancel',
],
'invoice_detail' => [ 'invoice_detail' => [
'marked' => '<b>You</b> marked this invoice as', 'marked' => '<b>You</b> marked this invoice as',
'services' => 'Services', 'services' => 'Services',

View File

@ -113,7 +113,7 @@
<x-dropdown.divider /> <x-dropdown.divider />
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}"> <x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }} {{ trans('documents.actions.cancel') }}
</x-dropdown.link> </x-dropdown.link>
@endcan @endcan
@endif @endif