From 13a29a66c8a41638994d772427c9fdb2788c8b94 Mon Sep 17 00:00:00 2001 From: Dominic Guhl <--global> Date: Sat, 26 Oct 2019 16:29:04 +0200 Subject: [PATCH] worked in feedback by JC5 --- .../V1/Controllers/BudgetLimitController.php | 2 +- app/Api/V1/Controllers/CategoryController.php | 2 +- .../Controllers/ConfigurationController.php | 2 +- app/Api/V1/Controllers/LinkTypeController.php | 2 +- .../Controllers/TransactionLinkController.php | 2 +- resources/lang/cs_CZ/api.php | 26 ------------------- resources/lang/de_DE/api.php | 26 ------------------- resources/lang/el_GR/api.php | 26 ------------------- resources/lang/es_ES/api.php | 26 ------------------- resources/lang/fr_FR/api.php | 26 ------------------- resources/lang/hu_HU/api.php | 26 ------------------- resources/lang/id_ID/api.php | 26 ------------------- resources/lang/it_IT/api.php | 26 ------------------- resources/lang/nb_NO/api.php | 26 ------------------- resources/lang/nl_NL/api.php | 26 ------------------- resources/lang/pl_PL/api.php | 26 ------------------- resources/lang/pt_BR/api.php | 26 ------------------- resources/lang/ro_RO/api.php | 26 ------------------- resources/lang/ru_RU/api.php | 26 ------------------- resources/lang/tr_TR/api.php | 26 ------------------- resources/lang/zh_CN/api.php | 26 ------------------- resources/lang/zh_TW/api.php | 26 ------------------- 22 files changed, 5 insertions(+), 447 deletions(-) delete mode 100644 resources/lang/cs_CZ/api.php delete mode 100644 resources/lang/de_DE/api.php delete mode 100644 resources/lang/el_GR/api.php delete mode 100644 resources/lang/es_ES/api.php delete mode 100644 resources/lang/fr_FR/api.php delete mode 100644 resources/lang/hu_HU/api.php delete mode 100644 resources/lang/id_ID/api.php delete mode 100644 resources/lang/it_IT/api.php delete mode 100644 resources/lang/nb_NO/api.php delete mode 100644 resources/lang/nl_NL/api.php delete mode 100644 resources/lang/pl_PL/api.php delete mode 100644 resources/lang/pt_BR/api.php delete mode 100644 resources/lang/ro_RO/api.php delete mode 100644 resources/lang/ru_RU/api.php delete mode 100644 resources/lang/tr_TR/api.php delete mode 100644 resources/lang/zh_CN/api.php delete mode 100644 resources/lang/zh_TW/api.php diff --git a/app/Api/V1/Controllers/BudgetLimitController.php b/app/Api/V1/Controllers/BudgetLimitController.php index a7158c8dac..d1ac952326 100644 --- a/app/Api/V1/Controllers/BudgetLimitController.php +++ b/app/Api/V1/Controllers/BudgetLimitController.php @@ -165,7 +165,7 @@ class BudgetLimitController extends Controller $data = $request->getAll(); $budget = $this->repository->findNull($data['budget_id']); if (null === $budget) { - throw new FireflyException(trans('error_unknown_budget')); + throw new FireflyException(trans('api.error_unknown_budget')); } $data['budget'] = $budget; $budgetLimit = $this->blRepository->storeBudgetLimit($data); diff --git a/app/Api/V1/Controllers/CategoryController.php b/app/Api/V1/Controllers/CategoryController.php index 1f808f5b60..c2ff07d87b 100644 --- a/app/Api/V1/Controllers/CategoryController.php +++ b/app/Api/V1/Controllers/CategoryController.php @@ -163,7 +163,7 @@ class CategoryController extends Controller return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json'); } - throw new FireflyException(trans('error_store_new_category')); // @codeCoverageIgnore + throw new FireflyException(trans('api.error_store_new_category')); // @codeCoverageIgnore } /** diff --git a/app/Api/V1/Controllers/ConfigurationController.php b/app/Api/V1/Controllers/ConfigurationController.php index 28a099f114..95a969b7c3 100644 --- a/app/Api/V1/Controllers/ConfigurationController.php +++ b/app/Api/V1/Controllers/ConfigurationController.php @@ -57,7 +57,7 @@ class ConfigurationController extends Controller $admin = auth()->user(); if (!$this->repository->hasRole($admin, 'owner')) { - throw new FireflyException(trans('error_no_access')); // @codeCoverageIgnore + throw new FireflyException(trans('api.error_no_access')); // @codeCoverageIgnore } return $next($request); diff --git a/app/Api/V1/Controllers/LinkTypeController.php b/app/Api/V1/Controllers/LinkTypeController.php index f4a9a38a88..01969a9425 100644 --- a/app/Api/V1/Controllers/LinkTypeController.php +++ b/app/Api/V1/Controllers/LinkTypeController.php @@ -86,7 +86,7 @@ class LinkTypeController extends Controller public function delete(LinkType $linkType): JsonResponse { if (false === $linkType->editable) { - throw new FireflyException(trans('error_delete_link_type', [':id' => $linkType->id, ':name' => $linkType->name])); + throw new FireflyException(trans('api.error_delete_link_type', [':id' => $linkType->id, ':name' => $linkType->name])); } $this->repository->destroy($linkType); diff --git a/app/Api/V1/Controllers/TransactionLinkController.php b/app/Api/V1/Controllers/TransactionLinkController.php index 6e84e6b775..ca369509d5 100644 --- a/app/Api/V1/Controllers/TransactionLinkController.php +++ b/app/Api/V1/Controllers/TransactionLinkController.php @@ -165,7 +165,7 @@ class TransactionLinkController extends Controller $inward = $this->journalRepository->findNull($data['inward_id'] ?? 0); $outward = $this->journalRepository->findNull($data['outward_id'] ?? 0); if (null === $inward || null === $outward) { - throw new FireflyException(trans('error_source_or_dest_null')); + throw new FireflyException(trans('api.error_source_or_dest_null')); } $data['direction'] = 'inward'; diff --git a/resources/lang/cs_CZ/api.php b/resources/lang/cs_CZ/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/cs_CZ/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/de_DE/api.php b/resources/lang/de_DE/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/de_DE/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/el_GR/api.php b/resources/lang/el_GR/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/el_GR/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/es_ES/api.php b/resources/lang/es_ES/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/es_ES/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/fr_FR/api.php b/resources/lang/fr_FR/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/fr_FR/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/hu_HU/api.php b/resources/lang/hu_HU/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/hu_HU/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/id_ID/api.php b/resources/lang/id_ID/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/id_ID/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/it_IT/api.php b/resources/lang/it_IT/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/it_IT/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/nb_NO/api.php b/resources/lang/nb_NO/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/nb_NO/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/nl_NL/api.php b/resources/lang/nl_NL/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/nl_NL/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/pl_PL/api.php b/resources/lang/pl_PL/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/pl_PL/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/pt_BR/api.php b/resources/lang/pt_BR/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/pt_BR/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/ro_RO/api.php b/resources/lang/ro_RO/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/ro_RO/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/ru_RU/api.php b/resources/lang/ru_RU/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/ru_RU/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/tr_TR/api.php b/resources/lang/tr_TR/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/tr_TR/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/zh_CN/api.php b/resources/lang/zh_CN/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/zh_CN/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file diff --git a/resources/lang/zh_TW/api.php b/resources/lang/zh_TW/api.php deleted file mode 100644 index c0daaf8ad9..0000000000 --- a/resources/lang/zh_TW/api.php +++ /dev/null @@ -1,26 +0,0 @@ -. - */ - -declare(strict_types=1); - -return [ - -]; \ No newline at end of file