From 705aac419ab9b990cfcc93129292f511cad68ec5 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 14:00:37 +0100 Subject: [PATCH] Auto commit for release 'branch-v6.2' on 2024-12-22 --- .../Model/ExchangeRate/DestroyController.php | 3 +- .../Model/ExchangeRate/StoreController.php | 21 ++-- .../Model/ExchangeRate/UpdateController.php | 12 +- .../Model/ExchangeRate/DestroyRequest.php | 2 +- .../Model/ExchangeRate/StoreRequest.php | 9 +- .../Model/ExchangeRate/UpdateRequest.php | 5 +- .../PiggyBank/ModifiesPiggyBanks.php | 48 ++++---- .../PiggyBank/PiggyBankRepository.php | 22 ++-- .../ExchangeRate/ExchangeRateRepository.php | 47 ++++---- .../ExchangeRateRepositoryInterface.php | 1 - app/Support/Binder/UserGroupExchangeRate.php | 5 +- app/Support/Preferences.php | 46 ++++---- config/bindables.php | 107 +++++++++--------- config/firefly.php | 30 ----- config/translations.php | 2 +- resources/assets/v1/mix-manifest.json | 9 +- resources/assets/v1/src/locales/bg.json | 2 +- resources/assets/v1/src/locales/ca.json | 2 +- resources/assets/v1/src/locales/cs.json | 2 +- resources/assets/v1/src/locales/da.json | 2 +- resources/assets/v1/src/locales/de.json | 10 +- resources/assets/v1/src/locales/el.json | 2 +- resources/assets/v1/src/locales/en-gb.json | 2 +- resources/assets/v1/src/locales/es.json | 2 +- resources/assets/v1/src/locales/fi.json | 2 +- resources/assets/v1/src/locales/fr.json | 10 +- resources/assets/v1/src/locales/hu.json | 2 +- resources/assets/v1/src/locales/id.json | 2 +- resources/assets/v1/src/locales/it.json | 2 +- resources/assets/v1/src/locales/ja.json | 2 +- resources/assets/v1/src/locales/ko.json | 2 +- resources/assets/v1/src/locales/nb.json | 2 +- resources/assets/v1/src/locales/nl.json | 2 +- resources/assets/v1/src/locales/nn.json | 2 +- resources/assets/v1/src/locales/pl.json | 2 +- resources/assets/v1/src/locales/pt-br.json | 2 +- resources/assets/v1/src/locales/pt.json | 2 +- resources/assets/v1/src/locales/ro.json | 2 +- resources/assets/v1/src/locales/ru.json | 2 +- resources/assets/v1/src/locales/sk.json | 2 +- resources/assets/v1/src/locales/sl.json | 2 +- resources/assets/v1/src/locales/sv.json | 2 +- resources/assets/v1/src/locales/tr.json | 2 +- resources/assets/v1/src/locales/uk.json | 2 +- resources/assets/v1/src/locales/vi.json | 2 +- resources/assets/v1/src/locales/zh-cn.json | 2 +- resources/assets/v1/src/locales/zh-tw.json | 2 +- resources/lang/en_US/firefly.php | 6 +- resources/lang/en_US/form.php | 2 +- 49 files changed, 218 insertions(+), 237 deletions(-) diff --git a/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.php b/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.php index f1575f0d4c..e46cc5375d 100644 --- a/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.php +++ b/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.php @@ -1,4 +1,5 @@ repository->deleteRate($rate); + return response()->json([], 204); } - } diff --git a/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.php b/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.php index 4cc701320c..73e14892a7 100644 --- a/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.php +++ b/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.php @@ -1,4 +1,5 @@ getDate(); - $rate = $request->getRate(); - $from = $request->getFromCurrency(); - $to = $request->getToCurrency(); + $date = $request->getDate(); + $rate = $request->getRate(); + $from = $request->getFromCurrency(); + $to = $request->getToCurrency(); // already has rate? - $object = $this->repository->getSpecificRateOnDate($from, $to, $date); - if(null !== $object) { + $object = $this->repository->getSpecificRateOnDate($from, $to, $date); + if (null !== $object) { // just update it, no matter. $rate = $this->repository->updateExchangeRate($object, $rate, $date); } - if(null === $object) { + if (null === $object) { // store new $rate = $this->repository->storeExchangeRate($from, $to, $rate, $date); } @@ -76,7 +75,7 @@ class StoreController extends Controller return response() ->api($this->jsonApiObject(self::RESOURCE_KEY, $rate, $transformer)) - ->header('Content-Type', self::CONTENT_TYPE); + ->header('Content-Type', self::CONTENT_TYPE) + ; } - } diff --git a/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.php b/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.php index 367e17d96d..31275864a4 100644 --- a/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.php +++ b/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.php @@ -1,4 +1,5 @@ getDate(); - $rate = $request->getRate(); + $date = $request->getDate(); + $rate = $request->getRate(); $exchangeRate = $this->repository->updateExchangeRate($exchangeRate, $rate, $date); - $transformer = new ExchangeRateTransformer(); + $transformer = new ExchangeRateTransformer(); $transformer->setParameters($this->parameters); return response() ->api($this->jsonApiObject(self::RESOURCE_KEY, $exchangeRate, $transformer)) - ->header('Content-Type', self::CONTENT_TYPE); + ->header('Content-Type', self::CONTENT_TYPE) + ; } - } diff --git a/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.php b/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.php index 0db1d18b3e..d7e0ce45f3 100644 --- a/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.php +++ b/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.php @@ -1,4 +1,5 @@ 'required|date|after:1900-01-01|before:2099-12-31', ]; } - } diff --git a/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.php b/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.php index 16ae36cdf3..89f9e8f381 100644 --- a/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.php +++ b/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.php @@ -1,4 +1,5 @@ get('rate'); } - public function getFromCurrency(): TransactionCurrency { + public function getFromCurrency(): TransactionCurrency + { return TransactionCurrency::where('code', $this->get('from'))->first(); } - public function getToCurrency(): TransactionCurrency { + + public function getToCurrency(): TransactionCurrency + { return TransactionCurrency::where('code', $this->get('to'))->first(); } @@ -63,5 +67,4 @@ class StoreRequest extends FormRequest 'to' => 'required|exists:transaction_currencies,code', ]; } - } diff --git a/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.php b/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.php index 7bda832ba4..d55489421f 100644 --- a/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.php +++ b/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.php @@ -1,4 +1,5 @@ getCarbonDate('date'); } - public function getRate(): string { + public function getRate(): string + { return (string) $this->get('rate'); } @@ -52,5 +54,4 @@ class UpdateRequest extends FormRequest 'rate' => 'required|numeric|gt:0', ]; } - } diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php index 0722f69bf1..1fea74a370 100644 --- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php +++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php @@ -68,9 +68,9 @@ trait ModifiesPiggyBanks $pivot->native_current_amount = null; // also update native_current_amount. - $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); + $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); if ($userCurrency->id !== $piggyBank->transaction_currency_id) { - $converter = new ExchangeRateConverter(); + $converter = new ExchangeRateConverter(); $converter->setIgnoreSettings(true); $pivot->native_current_amount = $converter->convert($piggyBank->transactionCurrency, $userCurrency, today(), $pivot->current_amount); } @@ -91,9 +91,9 @@ trait ModifiesPiggyBanks $pivot->native_current_amount = null; // also update native_current_amount. - $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); + $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); if ($userCurrency->id !== $piggyBank->transaction_currency_id) { - $converter = new ExchangeRateConverter(); + $converter = new ExchangeRateConverter(); $converter->setIgnoreSettings(true); $pivot->native_current_amount = $converter->convert($piggyBank->transactionCurrency, $userCurrency, today(), $pivot->current_amount); } @@ -125,8 +125,8 @@ trait ModifiesPiggyBanks Log::debug(sprintf('Maximum amount: %s', $maxAmount)); } - $compare = bccomp($amount, $maxAmount); - $result = $compare <= 0; + $compare = bccomp($amount, $maxAmount); + $result = $compare <= 0; Log::debug(sprintf('Compare <= 0? %d, so canAddAmount is %s', $compare, var_export($result, true))); @@ -160,11 +160,11 @@ trait ModifiesPiggyBanks public function setCurrentAmount(PiggyBank $piggyBank, string $amount): PiggyBank { - $repetition = $this->getRepetition($piggyBank); + $repetition = $this->getRepetition($piggyBank); if (null === $repetition) { return $piggyBank; } - $max = $piggyBank->target_amount; + $max = $piggyBank->target_amount; if (1 === bccomp($amount, $max) && 0 !== bccomp($piggyBank->target_amount, '0')) { $amount = $max; } @@ -207,14 +207,14 @@ trait ModifiesPiggyBanks public function update(PiggyBank $piggyBank, array $data): PiggyBank { - $piggyBank = $this->updateProperties($piggyBank, $data); + $piggyBank = $this->updateProperties($piggyBank, $data); if (array_key_exists('notes', $data)) { $this->updateNote($piggyBank, (string) $data['notes']); } // update the order of the piggy bank: - $oldOrder = $piggyBank->order; - $newOrder = (int) ($data['order'] ?? $oldOrder); + $oldOrder = $piggyBank->order; + $newOrder = (int) ($data['order'] ?? $oldOrder); if ($oldOrder !== $newOrder) { $this->setOrder($piggyBank, $newOrder); } @@ -306,7 +306,7 @@ trait ModifiesPiggyBanks return; } - $dbNote = $piggyBank->notes()->first(); + $dbNote = $piggyBank->notes()->first(); if (null === $dbNote) { $dbNote = new Note(); $dbNote->noteable()->associate($piggyBank); @@ -317,15 +317,16 @@ trait ModifiesPiggyBanks public function setOrder(PiggyBank $piggyBank, int $newOrder): bool { - $oldOrder = $piggyBank->order; + $oldOrder = $piggyBank->order; // Log::debug(sprintf('Will move piggy bank #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); if ($newOrder > $oldOrder) { PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', $this->user->id) - ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder) - ->where('piggy_banks.id', '!=', $piggyBank->id) - ->distinct()->decrement('piggy_banks.order'); + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', $this->user->id) + ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder) + ->where('piggy_banks.id', '!=', $piggyBank->id) + ->distinct()->decrement('piggy_banks.order') + ; $piggyBank->order = $newOrder; Log::debug(sprintf('[1] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); @@ -334,11 +335,12 @@ trait ModifiesPiggyBanks return true; } PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', $this->user->id) - ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder) - ->where('piggy_banks.id', '!=', $piggyBank->id) - ->distinct()->increment('piggy_banks.order'); + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', $this->user->id) + ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder) + ->where('piggy_banks.id', '!=', $piggyBank->id) + ->distinct()->increment('piggy_banks.order') + ; $piggyBank->order = $newOrder; Log::debug(sprintf('[2] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 127077083d..e2775e1073 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -133,26 +133,26 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface { app('log')->debug(sprintf('Now in getExactAmount(%d, %d)', $piggyBank->id, $journal->id)); - $operator = null; - $currency = null; + $operator = null; + $currency = null; /** @var JournalRepositoryInterface $journalRepost */ - $journalRepost = app(JournalRepositoryInterface::class); + $journalRepost = app(JournalRepositoryInterface::class); $journalRepost->setUser($this->user); /** @var AccountRepositoryInterface $accountRepos */ - $accountRepos = app(AccountRepositoryInterface::class); + $accountRepos = app(AccountRepositoryInterface::class); $accountRepos->setUser($this->user); - $defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); + $defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup); app('log')->debug(sprintf('Piggy bank #%d currency is %s', $piggyBank->id, $piggyBank->transactionCurrency->code)); /** @var Transaction $source */ - $source = $journal->transactions()->with(['account'])->where('amount', '<', 0)->first(); + $source = $journal->transactions()->with(['account'])->where('amount', '<', 0)->first(); /** @var Transaction $destination */ - $destination = $journal->transactions()->with(['account'])->where('amount', '>', 0)->first(); + $destination = $journal->transactions()->with(['account'])->where('amount', '>', 0)->first(); // matches source, which means amount will be removed from piggy: if ($source->account_id === $piggyBank->account_id) { @@ -174,7 +174,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface } // currency of the account + the piggy bank currency are almost the same. // which amount from the transaction matches? - $amount = null; + $amount = null; if ((int) $source->transaction_currency_id === $currency->id) { app('log')->debug('Use normal amount'); $amount = app('steam')->{$operator}($source->amount); // @phpstan-ignore-line @@ -190,9 +190,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface } app('log')->debug(sprintf('The currency is %s and the amount is %s', $currency->code, $amount)); - $currentAmount = $this->getCurrentAmount($piggyBank); - $room = bcsub($piggyBank->target_amount, $currentAmount); - $compare = bcmul($currentAmount, '-1'); + $currentAmount = $this->getCurrentAmount($piggyBank); + $room = bcsub($piggyBank->target_amount, $currentAmount); + $compare = bcmul($currentAmount, '-1'); if (0 === bccomp($piggyBank->target_amount, '0')) { // amount is zero? then the "room" is positive amount of we wish to add or remove. diff --git a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php index 727cae0dd6..12150987ac 100644 --- a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php +++ b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php @@ -41,46 +41,55 @@ class ExchangeRateRepository implements ExchangeRateRepositoryInterface // orderBy('date', 'DESC')->toRawSql(); return $this->userGroup->currencyExchangeRates() - ->where(function (Builder $q1) use ($from, $to): void { - $q1->where(function (Builder $q) use ($from, $to): void { - $q->where('from_currency_id', $from->id) - ->where('to_currency_id', $to->id); - })->orWhere(function (Builder $q) use ($from, $to): void { - $q->where('from_currency_id', $to->id) - ->where('to_currency_id', $from->id); - }); - }) - ->orderBy('date', 'DESC') - ->get(['currency_exchange_rates.*']); + ->where(function (Builder $q1) use ($from, $to): void { + $q1->where(function (Builder $q) use ($from, $to): void { + $q->where('from_currency_id', $from->id) + ->where('to_currency_id', $to->id) + ; + })->orWhere(function (Builder $q) use ($from, $to): void { + $q->where('from_currency_id', $to->id) + ->where('to_currency_id', $from->id) + ; + }); + }) + ->orderBy('date', 'DESC') + ->get(['currency_exchange_rates.*']) + ; } - #[\Override] public function getSpecificRateOnDate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): ?CurrencyExchangeRate + #[\Override] + public function getSpecificRateOnDate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): ?CurrencyExchangeRate { return $this->userGroup->currencyExchangeRates() - ->where('from_currency_id', $from->id) - ->where('to_currency_id', $to->id) - ->where('date', $date->format('Y-m-d')) - ->first(); + ->where('from_currency_id', $from->id) + ->where('to_currency_id', $to->id) + ->where('date', $date->format('Y-m-d')) + ->first() + ; } - #[\Override] public function deleteRate(CurrencyExchangeRate $rate): void + #[\Override] + public function deleteRate(CurrencyExchangeRate $rate): void { $this->userGroup->currencyExchangeRates()->where('id', $rate->id)->delete(); } - #[\Override] public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate + #[\Override] + public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate { $object->rate = $rate; if (null !== $date) { $object->date = $date; } $object->save(); + return $object; } - #[\Override] public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate + #[\Override] + public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate { $object = new CurrencyExchangeRate(); $object->user_id = auth()->user()->id; diff --git a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php index e5c1035f42..3acd4d3d06 100644 --- a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php +++ b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php @@ -40,5 +40,4 @@ interface ExchangeRateRepositoryInterface public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate; public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate; - } diff --git a/app/Support/Binder/UserGroupExchangeRate.php b/app/Support/Binder/UserGroupExchangeRate.php index af5a23cc5a..74a65c9348 100644 --- a/app/Support/Binder/UserGroupExchangeRate.php +++ b/app/Support/Binder/UserGroupExchangeRate.php @@ -39,8 +39,9 @@ class UserGroupExchangeRate implements BinderInterface /** @var User $user */ $user = auth()->user(); $rate = CurrencyExchangeRate::where('id', (int) $value) - ->where('user_group_id', $user->user_group_id) - ->first(); + ->where('user_group_id', $user->user_group_id) + ->first() + ; if (null !== $rate) { return $rate; } diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index 46bca8be78..d0927b4736 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -47,15 +47,16 @@ class Preferences } return Preference::where('user_id', $user->id) - ->where('name', '!=', 'currencyPreference') - ->where(function (Builder $q) use ($user): void { - $q->whereNull('user_group_id'); - $q->orWhere('user_group_id', $user->user_group_id); - }) - ->get(); + ->where('name', '!=', 'currencyPreference') + ->where(function (Builder $q) use ($user): void { + $q->whereNull('user_group_id'); + $q->orWhere('user_group_id', $user->user_group_id); + }) + ->get() + ; } - public function get(string $name, null | array | bool | int | string $default = null): ?Preference + public function get(string $name, null|array|bool|int|string $default = null): ?Preference { /** @var null|User $user */ $user = auth()->user(); @@ -69,7 +70,7 @@ class Preferences return $this->getForUser($user, $name, $default); } - public function getForUser(User $user, string $name, null | array | bool | int | string $default = null): ?Preference + public function getForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference { // don't care about user group ID, except for some specific preferences. $userGroupId = $this->getUserGroupId($user, $name); @@ -121,16 +122,16 @@ class Preferences Cache::put($key, '', 5); } - public function setForUser(User $user, string $name, null | array | bool | int | string $value): Preference + public function setForUser(User $user, string $name, null|array|bool|int|string $value): Preference { - $fullName = sprintf('preference%s%s', $user->id, $name); - $groupId = $this->getUserGroupId($user, $name); - $groupId = 0 === (int)$groupId ? null : (int) $groupId; + $fullName = sprintf('preference%s%s', $user->id, $name); + $groupId = $this->getUserGroupId($user, $name); + $groupId = 0 === (int)$groupId ? null : (int) $groupId; Cache::forget($fullName); /** @var null|Preference $pref */ - $pref = Preference::where('user_group_id', $groupId)->where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']); + $pref = Preference::where('user_group_id', $groupId)->where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']); if (null !== $pref && null === $value) { $pref->delete(); @@ -173,12 +174,13 @@ class Preferences { $result = []; $preferences = Preference::where('user_id', $user->id) - ->where(function (Builder $q) use ($user): void { - $q->whereNull('user_group_id'); - $q->orWhere('user_group_id', $user->user_group_id); - }) - ->whereIn('name', $list) - ->get(['id', 'name', 'data']); + ->where(function (Builder $q) use ($user): void { + $q->whereNull('user_group_id'); + $q->orWhere('user_group_id', $user->user_group_id); + }) + ->whereIn('name', $list) + ->get(['id', 'name', 'data']) + ; /** @var Preference $preference */ foreach ($preferences as $preference) { @@ -216,7 +218,7 @@ class Preferences return $result; } - public function getEncryptedForUser(User $user, string $name, null | array | bool | int | string $default = null): ?Preference + public function getEncryptedForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference { $result = $this->getForUser($user, $name, $default); if ('' === $result->data) { @@ -237,7 +239,7 @@ class Preferences return $result; } - public function getFresh(string $name, null | array | bool | int | string $default = null): ?Preference + public function getFresh(string $name, null|array|bool|int|string $default = null): ?Preference { /** @var null|User $user */ $user = auth()->user(); @@ -288,7 +290,7 @@ class Preferences return $this->set($name, $encrypted); } - public function set(string $name, null | array | bool | int | string $value): Preference + public function set(string $name, null|array|bool|int|string $value): Preference { /** @var null|User $user */ $user = auth()->user(); diff --git a/config/bindables.php b/config/bindables.php index fc660382e7..4467cb466d 100644 --- a/config/bindables.php +++ b/config/bindables.php @@ -1,4 +1,5 @@ [ - // models - 'account' => Account::class, - 'attachment' => Attachment::class, - 'availableBudget' => AvailableBudget::class, - 'bill' => Bill::class, - 'budget' => Budget::class, - 'budgetLimit' => BudgetLimit::class, - 'category' => Category::class, - 'linkType' => LinkType::class, - 'transactionType' => TransactionType::class, - 'journalLink' => TransactionJournalLink::class, - 'currency' => TransactionCurrency::class, - 'objectGroup' => ObjectGroup::class, - 'piggyBank' => PiggyBank::class, - 'preference' => Preference::class, - 'tj' => TransactionJournal::class, - 'tag' => Tag::class, - 'recurrence' => Recurrence::class, - 'rule' => Rule::class, - 'ruleGroup' => RuleGroup::class, - 'transactionGroup' => TransactionGroup::class, - 'user' => User::class, - 'webhook' => Webhook::class, - 'webhookMessage' => WebhookMessage::class, - 'webhookAttempt' => WebhookAttempt::class, - 'invitedUser' => InvitedUser::class, + // models + 'account' => Account::class, + 'attachment' => Attachment::class, + 'availableBudget' => AvailableBudget::class, + 'bill' => Bill::class, + 'budget' => Budget::class, + 'budgetLimit' => BudgetLimit::class, + 'category' => Category::class, + 'linkType' => LinkType::class, + 'transactionType' => TransactionType::class, + 'journalLink' => TransactionJournalLink::class, + 'currency' => TransactionCurrency::class, + 'objectGroup' => ObjectGroup::class, + 'piggyBank' => PiggyBank::class, + 'preference' => Preference::class, + 'tj' => TransactionJournal::class, + 'tag' => Tag::class, + 'recurrence' => Recurrence::class, + 'rule' => Rule::class, + 'ruleGroup' => RuleGroup::class, + 'transactionGroup' => TransactionGroup::class, + 'user' => User::class, + 'webhook' => Webhook::class, + 'webhookMessage' => WebhookMessage::class, + 'webhookAttempt' => WebhookAttempt::class, + 'invitedUser' => InvitedUser::class, - // strings - 'currency_code' => CurrencyCode::class, + // strings + 'currency_code' => CurrencyCode::class, - // dates - 'start_date' => Date::class, - 'end_date' => Date::class, - 'date' => Date::class, + // dates + 'start_date' => Date::class, + 'end_date' => Date::class, + 'date' => Date::class, - // lists - 'accountList' => AccountList::class, - 'doubleList' => AccountList::class, - 'budgetList' => BudgetList::class, - 'journalList' => JournalList::class, - 'categoryList' => CategoryList::class, - 'tagList' => TagList::class, + // lists + 'accountList' => AccountList::class, + 'doubleList' => AccountList::class, + 'budgetList' => BudgetList::class, + 'journalList' => JournalList::class, + 'categoryList' => CategoryList::class, + 'tagList' => TagList::class, - // others - 'fromCurrencyCode' => CurrencyCode::class, - 'toCurrencyCode' => CurrencyCode::class, - 'cliToken' => CLIToken::class, - 'tagOrId' => TagOrId::class, - 'dynamicConfigKey' => DynamicConfigKey::class, - 'eitherConfigKey' => EitherConfigKey::class, + // others + 'fromCurrencyCode' => CurrencyCode::class, + 'toCurrencyCode' => CurrencyCode::class, + 'cliToken' => CLIToken::class, + 'tagOrId' => TagOrId::class, + 'dynamicConfigKey' => DynamicConfigKey::class, + 'eitherConfigKey' => EitherConfigKey::class, - // V2 API endpoints: - 'userGroupAccount' => UserGroupAccount::class, - 'userGroupTransaction' => UserGroupTransaction::class, - 'userGroupBill' => UserGroupBill::class, - 'userGroupExchangeRate' => UserGroupExchangeRate::class, - 'userGroup' => UserGroup::class, -], + // V2 API endpoints: + 'userGroupAccount' => UserGroupAccount::class, + 'userGroupTransaction' => UserGroupTransaction::class, + 'userGroupBill' => UserGroupBill::class, + 'userGroupExchangeRate' => UserGroupExchangeRate::class, + 'userGroup' => UserGroup::class, + ], ]; diff --git a/config/firefly.php b/config/firefly.php index 82b079c994..604621b9c4 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -25,46 +25,16 @@ declare(strict_types=1); use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\TransactionTypeEnum; use FireflyIII\Models\Account; -use FireflyIII\Models\Attachment; -use FireflyIII\Models\AvailableBudget; use FireflyIII\Models\Bill; use FireflyIII\Models\Budget; -use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\Category; -use FireflyIII\Models\InvitedUser; -use FireflyIII\Models\LinkType; -use FireflyIII\Models\ObjectGroup; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\Preference; use FireflyIII\Models\Recurrence; -use FireflyIII\Models\Rule; -use FireflyIII\Models\RuleGroup; use FireflyIII\Models\Tag; use FireflyIII\Models\Transaction; -use FireflyIII\Models\TransactionCurrency; -use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; -use FireflyIII\Models\TransactionJournalLink; -use FireflyIII\Models\TransactionType as TransactionTypeModel; -use FireflyIII\Models\UserGroup; -use FireflyIII\Models\Webhook; -use FireflyIII\Models\WebhookAttempt; -use FireflyIII\Models\WebhookMessage; -use FireflyIII\Support\Binder\AccountList; -use FireflyIII\Support\Binder\BudgetList; -use FireflyIII\Support\Binder\CategoryList; -use FireflyIII\Support\Binder\CLIToken; -use FireflyIII\Support\Binder\CurrencyCode; use FireflyIII\Support\Binder\Date; -use FireflyIII\Support\Binder\DynamicConfigKey; -use FireflyIII\Support\Binder\EitherConfigKey; -use FireflyIII\Support\Binder\JournalList; -use FireflyIII\Support\Binder\TagList; -use FireflyIII\Support\Binder\TagOrId; -use FireflyIII\Support\Binder\UserGroupAccount; -use FireflyIII\Support\Binder\UserGroupBill; -use FireflyIII\Support\Binder\UserGroupExchangeRate; -use FireflyIII\Support\Binder\UserGroupTransaction; use FireflyIII\TransactionRules\Actions\AddTag; use FireflyIII\TransactionRules\Actions\ClearBudget; use FireflyIII\TransactionRules\Actions\ClearCategory; diff --git a/config/translations.php b/config/translations.php index a9c2c9152c..8bbe20401d 100644 --- a/config/translations.php +++ b/config/translations.php @@ -278,7 +278,7 @@ return [ 'header_exchange_rates_table', 'help_rate_form', 'add_new_rate', - 'save_new_rate' + 'save_new_rate', ], 'form' => [ 'url', diff --git a/resources/assets/v1/mix-manifest.json b/resources/assets/v1/mix-manifest.json index 56b2171215..528ebcb2cf 100644 --- a/resources/assets/v1/mix-manifest.json +++ b/resources/assets/v1/mix-manifest.json @@ -14,17 +14,14 @@ "/public/v1/js/app.js.LICENSE.txt": "/public/v1/js/app.js.LICENSE.txt", "/public/v1/js/app_vue.js": "/public/v1/js/app_vue.js", "/public/v1/js/app_vue.js.LICENSE.txt": "/public/v1/js/app_vue.js.LICENSE.txt", - "/public/v1/js/create.js": "/public/v1/js/create.js", - "/public/v1/js/create.js.LICENSE.txt": "/public/v1/js/create.js.LICENSE.txt", "/public/v1/js/create_transaction.js": "/public/v1/js/create_transaction.js", "/public/v1/js/create_transaction.js.LICENSE.txt": "/public/v1/js/create_transaction.js.LICENSE.txt", - "/public/v1/js/edit.js": "/public/v1/js/edit.js", - "/public/v1/js/edit.js.LICENSE.txt": "/public/v1/js/edit.js.LICENSE.txt", "/public/v1/js/edit_transaction.js": "/public/v1/js/edit_transaction.js", "/public/v1/js/edit_transaction.js.LICENSE.txt": "/public/v1/js/edit_transaction.js.LICENSE.txt", "/public/v1/js/exchange-rates/index.js": "/public/v1/js/exchange-rates/index.js", "/public/v1/js/exchange-rates/index.js.LICENSE.txt": "/public/v1/js/exchange-rates/index.js.LICENSE.txt", "/public/v1/js/exchange-rates/rates.js": "/public/v1/js/exchange-rates/rates.js", + "/public/v1/js/exchange-rates/rates.js.LICENSE.txt": "/public/v1/js/exchange-rates/rates.js.LICENSE.txt", "/public/v1/js/ff/accounts/create.js": "/public/v1/js/ff/accounts/create.js", "/public/v1/js/ff/accounts/edit-reconciliation.js": "/public/v1/js/ff/accounts/edit-reconciliation.js", "/public/v1/js/ff/accounts/edit.js": "/public/v1/js/ff/accounts/edit.js", @@ -93,8 +90,6 @@ "/public/v1/js/ff/transactions/mass/edit-bulk.js": "/public/v1/js/ff/transactions/mass/edit-bulk.js", "/public/v1/js/ff/transactions/mass/edit.js": "/public/v1/js/ff/transactions/mass/edit.js", "/public/v1/js/ff/transactions/show.js": "/public/v1/js/ff/transactions/show.js", - "/public/v1/js/index.js": "/public/v1/js/index.js", - "/public/v1/js/index.js.LICENSE.txt": "/public/v1/js/index.js.LICENSE.txt", "/public/v1/js/lib/Chart.bundle.min.js": "/public/v1/js/lib/Chart.bundle.min.js", "/public/v1/js/lib/accounting.min.js": "/public/v1/js/lib/accounting.min.js", "/public/v1/js/lib/bootstrap-multiselect.js": "/public/v1/js/lib/bootstrap-multiselect.js", @@ -153,8 +148,6 @@ "/public/v1/js/lib/vue.js": "/public/v1/js/lib/vue.js", "/public/v1/js/profile.js": "/public/v1/js/profile.js", "/public/v1/js/profile.js.LICENSE.txt": "/public/v1/js/profile.js.LICENSE.txt", - "/public/v1/js/show.js": "/public/v1/js/show.js", - "/public/v1/js/show.js.LICENSE.txt": "/public/v1/js/show.js.LICENSE.txt", "/public/v1/js/webhooks/create.js": "/public/v1/js/webhooks/create.js", "/public/v1/js/webhooks/create.js.LICENSE.txt": "/public/v1/js/webhooks/create.js.LICENSE.txt", "/public/v1/js/webhooks/edit.js": "/public/v1/js/webhooks/edit.js", diff --git a/resources/assets/v1/src/locales/bg.json b/resources/assets/v1/src/locales/bg.json index dac499c8b3..bb4bc79d69 100644 --- a/resources/assets/v1/src/locales/bg.json +++ b/resources/assets/v1/src/locales/bg.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/ca.json b/resources/assets/v1/src/locales/ca.json index 8aa11c8c02..c0ed447830 100644 --- a/resources/assets/v1/src/locales/ca.json +++ b/resources/assets/v1/src/locales/ca.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reiniciar el secret del webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/cs.json b/resources/assets/v1/src/locales/cs.json index c339f3b69d..f5663bb725 100644 --- a/resources/assets/v1/src/locales/cs.json +++ b/resources/assets/v1/src/locales/cs.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Restartovat tajn\u00fd kl\u00ed\u010d webhooku", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/da.json b/resources/assets/v1/src/locales/da.json index 6307f8b998..b00fb9c3c9 100644 --- a/resources/assets/v1/src/locales/da.json +++ b/resources/assets/v1/src/locales/da.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Nulstil webhook-hemmelighed", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/de.json b/resources/assets/v1/src/locales/de.json index a3b66b504d..63dc009fe9 100644 --- a/resources/assets/v1/src/locales/de.json +++ b/resources/assets/v1/src/locales/de.json @@ -130,12 +130,12 @@ "response": "Antwort", "visit_webhook_url": "Webhook-URL besuchen", "reset_webhook_secret": "Webhook Secret zur\u00fccksetzen", - "header_exchange_rates": "Exchange rates", - "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "header_exchange_rates": "Wechselkurse", + "exchange_rates_intro": "Firefly III unterst\u00fctzt das Herunterladen und Verwenden von Wechselkursen. Lesen Sie mehr dar\u00fcber in der Dokumentation<\/a>.", + "exchange_rates_from_to": "Zwischen {from} und {to} (und umgekehrt)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", - "header_exchange_rates_rates": "Exchange rates", - "header_exchange_rates_table": "Table with exchange rates", + "header_exchange_rates_rates": "Wechselkurse", + "header_exchange_rates_table": "Tabelle mit Wechselkursen", "help_rate_form": "On this day, how many {to} will you get for one {from}?", "add_new_rate": "Add a new exchange rate", "save_new_rate": "Save new rate" diff --git a/resources/assets/v1/src/locales/el.json b/resources/assets/v1/src/locales/el.json index 3618448e89..e3434fa69d 100644 --- a/resources/assets/v1/src/locales/el.json +++ b/resources/assets/v1/src/locales/el.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "\u0395\u03c0\u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03bc\u03c5\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/en-gb.json b/resources/assets/v1/src/locales/en-gb.json index f3471704ec..86bda984dd 100644 --- a/resources/assets/v1/src/locales/en-gb.json +++ b/resources/assets/v1/src/locales/en-gb.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/es.json b/resources/assets/v1/src/locales/es.json index 9407a2f4aa..48857fd65e 100644 --- a/resources/assets/v1/src/locales/es.json +++ b/resources/assets/v1/src/locales/es.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Restablecer secreto del webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/fi.json b/resources/assets/v1/src/locales/fi.json index 60e07447ff..4198091d15 100644 --- a/resources/assets/v1/src/locales/fi.json +++ b/resources/assets/v1/src/locales/fi.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/fr.json b/resources/assets/v1/src/locales/fr.json index 80c61e7bf4..d9a7fd5ff6 100644 --- a/resources/assets/v1/src/locales/fr.json +++ b/resources/assets/v1/src/locales/fr.json @@ -130,12 +130,12 @@ "response": "R\u00e9ponse", "visit_webhook_url": "Visiter l'URL du webhook", "reset_webhook_secret": "R\u00e9initialiser le secret du webhook", - "header_exchange_rates": "Exchange rates", - "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "header_exchange_rates": "Taux de change", + "exchange_rates_intro": "Firefly III prend en charge le chargement et l'utilisation des taux de change. En savoir plus \u00e0 ce sujet dans la documentation<\/a>.", + "exchange_rates_from_to": "Entre {from} et {to} (et l'inverse)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", - "header_exchange_rates_rates": "Exchange rates", - "header_exchange_rates_table": "Table with exchange rates", + "header_exchange_rates_rates": "Taux de change", + "header_exchange_rates_table": "Table avec taux de change", "help_rate_form": "On this day, how many {to} will you get for one {from}?", "add_new_rate": "Add a new exchange rate", "save_new_rate": "Save new rate" diff --git a/resources/assets/v1/src/locales/hu.json b/resources/assets/v1/src/locales/hu.json index ac01e9d779..30bdf66b8d 100644 --- a/resources/assets/v1/src/locales/hu.json +++ b/resources/assets/v1/src/locales/hu.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Webhook titok vissza\u00e1ll\u00edt\u00e1sa", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/id.json b/resources/assets/v1/src/locales/id.json index 830b7e5688..38e4e0c348 100644 --- a/resources/assets/v1/src/locales/id.json +++ b/resources/assets/v1/src/locales/id.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/it.json b/resources/assets/v1/src/locales/it.json index 8247418bb8..069b4096c5 100644 --- a/resources/assets/v1/src/locales/it.json +++ b/resources/assets/v1/src/locales/it.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reimposta il segreto del webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/ja.json b/resources/assets/v1/src/locales/ja.json index f1e5888eda..ced630e9c7 100644 --- a/resources/assets/v1/src/locales/ja.json +++ b/resources/assets/v1/src/locales/ja.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Webhook\u306e\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u30ea\u30bb\u30c3\u30c8", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/ko.json b/resources/assets/v1/src/locales/ko.json index 57d7c02669..0b8907ec1d 100644 --- a/resources/assets/v1/src/locales/ko.json +++ b/resources/assets/v1/src/locales/ko.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "\uc6f9\ud6c5 \uc2dc\ud06c\ub9bf \uc7ac\uc124\uc815", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/nb.json b/resources/assets/v1/src/locales/nb.json index bf5b40ea44..797f296220 100644 --- a/resources/assets/v1/src/locales/nb.json +++ b/resources/assets/v1/src/locales/nb.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Tilbakestill Webhook n\u00f8kkel", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/nl.json b/resources/assets/v1/src/locales/nl.json index 4c91f0f3c5..16b8d5bd3d 100644 --- a/resources/assets/v1/src/locales/nl.json +++ b/resources/assets/v1/src/locales/nl.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook-geheim", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/nn.json b/resources/assets/v1/src/locales/nn.json index 657dbe58ce..b1b7119083 100644 --- a/resources/assets/v1/src/locales/nn.json +++ b/resources/assets/v1/src/locales/nn.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Tilbakestill Webhook hemmelegheit", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/pl.json b/resources/assets/v1/src/locales/pl.json index fca2630724..600f9dea74 100644 --- a/resources/assets/v1/src/locales/pl.json +++ b/resources/assets/v1/src/locales/pl.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Resetuj sekret webhooka", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/pt-br.json b/resources/assets/v1/src/locales/pt-br.json index 5a9c58b5f4..43420f1a78 100644 --- a/resources/assets/v1/src/locales/pt-br.json +++ b/resources/assets/v1/src/locales/pt-br.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Redefinir chave do webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/pt.json b/resources/assets/v1/src/locales/pt.json index 91bc8f037a..9a2a7e192d 100644 --- a/resources/assets/v1/src/locales/pt.json +++ b/resources/assets/v1/src/locales/pt.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Redefinir segredo webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/ro.json b/resources/assets/v1/src/locales/ro.json index eea958ac58..35498b7158 100644 --- a/resources/assets/v1/src/locales/ro.json +++ b/resources/assets/v1/src/locales/ro.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Resetare secret webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/ru.json b/resources/assets/v1/src/locales/ru.json index 7f3218a265..ebf063df54 100644 --- a/resources/assets/v1/src/locales/ru.json +++ b/resources/assets/v1/src/locales/ru.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/sk.json b/resources/assets/v1/src/locales/sk.json index 4d22663eab..8c9d02c9e4 100644 --- a/resources/assets/v1/src/locales/sk.json +++ b/resources/assets/v1/src/locales/sk.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/sl.json b/resources/assets/v1/src/locales/sl.json index 0fd0f5a43e..528d47a497 100644 --- a/resources/assets/v1/src/locales/sl.json +++ b/resources/assets/v1/src/locales/sl.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Ponastavi skrivno kodo webhooka", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/sv.json b/resources/assets/v1/src/locales/sv.json index 59e6d0f912..6bf1a4d954 100644 --- a/resources/assets/v1/src/locales/sv.json +++ b/resources/assets/v1/src/locales/sv.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/tr.json b/resources/assets/v1/src/locales/tr.json index d0660e7f30..52c5c309e1 100644 --- a/resources/assets/v1/src/locales/tr.json +++ b/resources/assets/v1/src/locales/tr.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/uk.json b/resources/assets/v1/src/locales/uk.json index b664e78b9a..7cd61753fb 100644 --- a/resources/assets/v1/src/locales/uk.json +++ b/resources/assets/v1/src/locales/uk.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "\u0412\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0441\u0456\u043a\u0440\u0435\u0442 \u0432\u0435\u0431-\u0445\u0443\u043a\u0430", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/vi.json b/resources/assets/v1/src/locales/vi.json index 41667c0b2b..2e3b49fb22 100644 --- a/resources/assets/v1/src/locales/vi.json +++ b/resources/assets/v1/src/locales/vi.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "C\u00e0i l\u1ea1i kh\u00f3a webhook", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/zh-cn.json b/resources/assets/v1/src/locales/zh-cn.json index 1983b79d00..3c74a2ae10 100644 --- a/resources/assets/v1/src/locales/zh-cn.json +++ b/resources/assets/v1/src/locales/zh-cn.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "\u91cd\u7f6e webhook \u5bc6\u94a5", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/assets/v1/src/locales/zh-tw.json b/resources/assets/v1/src/locales/zh-tw.json index 50c197cf19..b045e1b087 100644 --- a/resources/assets/v1/src/locales/zh-tw.json +++ b/resources/assets/v1/src/locales/zh-tw.json @@ -132,7 +132,7 @@ "reset_webhook_secret": "Reset webhook secret", "header_exchange_rates": "Exchange rates", "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between :from and :to", + "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.", "header_exchange_rates_rates": "Exchange rates", "header_exchange_rates_table": "Table with exchange rates", diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index b07159e4cc..606b5030e9 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1402,9 +1402,9 @@ return [ 'header_exchange_rates_rates' => 'Exchange rates', 'exchange_rates_intro_rates' => 'Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.', 'header_exchange_rates_table' => 'Table with exchange rates', - 'help_rate_form' => 'On this day, how many {to} will you get for one {from}?', - 'save_new_rate' => 'Save new rate', - 'add_new_rate' => 'Add a new exchange rate', + 'help_rate_form' => 'On this day, how many {to} will you get for one {from}?', + 'save_new_rate' => 'Save new rate', + 'add_new_rate' => 'Add a new exchange rate', // Financial administrations 'administration_index' => 'Financial administration', diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index 5eaab4684c..1f0e4eb6b1 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -115,7 +115,7 @@ return [ // exchange rates 'from_currency_to_currency' => '{from} → {to}', 'to_currency_from_currency' => '{to} → {from}', - 'rate' => 'Rate', + 'rate' => 'Rate', 'under' => 'Under', 'symbol' => 'Symbol',