From 828b9d32aa82451d6909bbbc8c3ae3b08e85a8ad Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 7 Nov 2019 06:10:46 +0100 Subject: [PATCH 1/4] Fix #2805 --- app/Validation/AccountValidator.php | 3 +-- config/firefly.php | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Validation/AccountValidator.php b/app/Validation/AccountValidator.php index 9721bca282..b572c5ea30 100644 --- a/app/Validation/AccountValidator.php +++ b/app/Validation/AccountValidator.php @@ -106,7 +106,6 @@ class AccountValidator return false; } - switch ($this->transactionType) { default: $this->destError = sprintf('AccountValidator::validateDestination cannot handle "%s", so it will always return false.', $this->transactionType); @@ -574,7 +573,7 @@ class AccountValidator $found = $this->accountRepository->findNull($accountId); if (null !== $found) { $type = $found->accountType->type; - if (in_array($type, $validTypes)) { + if (in_array($type, $validTypes, true)) { return true; } $this->destError = (string)trans('validation.withdrawal_dest_bad_data', ['id' => $accountId, 'name' => $accountName]); diff --git a/config/firefly.php b/config/firefly.php index baa1248318..1d397f378f 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -684,13 +684,13 @@ return [ 'source_dests' => [ TransactionTypeModel::WITHDRAWAL => [ AccountType::ASSET => [AccountType::EXPENSE, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, AccountType::CASH], - AccountType::LOAN => [AccountType::EXPENSE], - AccountType::DEBT => [AccountType::EXPENSE], - AccountType::MORTGAGE => [AccountType::EXPENSE], + AccountType::LOAN => [AccountType::EXPENSE, AccountType::CASH], + AccountType::DEBT => [AccountType::EXPENSE, AccountType::CASH], + AccountType::MORTGAGE => [AccountType::EXPENSE, AccountType::CASH], ], TransactionTypeModel::DEPOSIT => [ AccountType::REVENUE => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], - AccountType::CASH => [AccountType::ASSET], + AccountType::CASH => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], AccountType::LOAN => [AccountType::ASSET], AccountType::DEBT => [AccountType::ASSET], AccountType::MORTGAGE => [AccountType::ASSET], From bb449e19403af89ace747d2fd9503f2f656d2461 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 7 Nov 2019 06:14:45 +0100 Subject: [PATCH 2/4] Fix alpha builds + version builds. --- .deploy/docker/manifest.sh | 40 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/.deploy/docker/manifest.sh b/.deploy/docker/manifest.sh index 0d1ce25555..de77f0cd6a 100755 --- a/.deploy/docker/manifest.sh +++ b/.deploy/docker/manifest.sh @@ -8,6 +8,7 @@ sudo service docker restart echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +VERSION_TARGET=jc5x/firefly-iii:release-$VERSION # if the github branch is develop, only push the 'develop' tag if [ $TRAVIS_BRANCH == "develop" ]; then @@ -42,6 +43,15 @@ if [ $TRAVIS_BRANCH == "master" ] && [ $CHANNEL == "alpha" ]; then docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux docker manifest push $TARGET + + echo "Push alpha-* builds to $VERSION_TARGET" + + docker manifest create $VERSION_TARGET $ARM32 $ARM64 $AMD64 + docker manifest annotate $VERSION_TARGET $ARM32 --arch arm --os linux + docker manifest annotate $VERSION_TARGET $ARM64 --arch arm64 --os linux + docker manifest annotate $VERSION_TARGET $AMD64 --arch amd64 --os linux + docker manifest push $VERSION_TARGET + fi # if branch is master and channel is alpha, push 'alpha' and 'beta'. @@ -73,6 +83,14 @@ if [ $TRAVIS_BRANCH == "master" ] && [ $CHANNEL == "beta" ]; then docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux docker manifest push $TARGET + + echo "Push beta-* builds to $VERSION_TARGET" + + docker manifest create $VERSION_TARGET $ARM32 $ARM64 $AMD64 + docker manifest annotate $VERSION_TARGET $ARM32 --arch arm --os linux + docker manifest annotate $VERSION_TARGET $ARM64 --arch arm64 --os linux + docker manifest annotate $VERSION_TARGET $AMD64 --arch amd64 --os linux + docker manifest push $VERSION_TARGET fi # if branch is master and channel is stable, push 'alpha' and 'beta' and 'stable'. @@ -130,24 +148,14 @@ if [ $TRAVIS_BRANCH == "master" ] && [ $CHANNEL == "stable" ]; then docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux docker manifest push $TARGET -fi -# push to channel 'version' if master -if [ $TRAVIS_BRANCH == "master" ]; then - TARGET=jc5x/firefly-iii:release-$VERSION - ARM32=jc5x/firefly-iii:stable-arm - ARM64=jc5x/firefly-iii:stable-arm64 - AMD64=jc5x/firefly-iii:stable-amd64 + echo "Push stable-* builds to $VERSION_TARGET" - echo "GitHub branch is $TRAVIS_BRANCH." - echo "Channel is $CHANNEL." - echo "Push stable-* builds to $TARGET" - - docker manifest create $TARGET $ARM32 $ARM64 $AMD64 - docker manifest annotate $TARGET $ARM32 --arch arm --os linux - docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux - docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux - docker manifest push $TARGET + docker manifest create $VERSION_TARGET $ARM32 $ARM64 $AMD64 + docker manifest annotate $VERSION_TARGET $ARM32 --arch arm --os linux + docker manifest annotate $VERSION_TARGET $ARM64 --arch arm64 --os linux + docker manifest annotate $VERSION_TARGET $AMD64 --arch amd64 --os linux + docker manifest push $VERSION_TARGET fi echo 'Done!' From 1294705809083c8e67fd8fedcbdcfab83780cf37 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 7 Nov 2019 06:43:29 +0100 Subject: [PATCH 3/4] Some new translations. --- resources/lang/de_DE/firefly.php | 2 +- resources/lang/fr_FR/firefly.php | 2 +- resources/lang/it_IT/firefly.php | 2 +- resources/lang/zh_CN/firefly.php | 4 ++-- resources/lang/zh_CN/intro.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 26115370b4..d2825ee626 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -1284,7 +1284,7 @@ return [ 'send_test_triggered' => 'Der Test wurde ausgelöst. Überprüfen Sie Ihren Posteingang und die Protokolldateien.', 'split_transaction_title' => 'Beschreibung der Splittbuchung', - 'split_transaction_title_help' => 'If you create a split transaction, there must be a global description for all splits of the transaction.', + 'split_transaction_title_help' => 'Wenn Sie eine Splittbuchung anlegen, muss es eine eindeutige Beschreibung für alle Aufteilungen der Buchung geben.', 'split_title_help' => 'Wenn Sie eine Splittbuchung anlegen, muss es eine eindeutige Beschreibung für alle Aufteilungen der Buchhaltung geben.', 'transaction_information' => 'Buchungsinformation', 'you_create_transfer' => 'Sie erstellen gerade eine Umbuchung.', diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 459bcd890e..88211b7f06 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -1284,7 +1284,7 @@ return [ 'send_test_triggered' => 'Le test a été initié. Vérifiez votre boîte de réception (et les logs si nécessaire).', 'split_transaction_title' => 'Description de l\'opération ventilée', - 'split_transaction_title_help' => 'If you create a split transaction, there must be a global description for all splits of the transaction.', + 'split_transaction_title_help' => 'Si vous créez une opération ventilée, il doit y avoir une description globale pour chaque fraction de l\'opération.', 'split_title_help' => 'Si vous créez une opération ventilée, il doit y avoir une description globale pour chaque fractions de l\'opération.', 'transaction_information' => 'Informations sur l\'opération', 'you_create_transfer' => 'Vous êtes en train de créer un transfert.', diff --git a/resources/lang/it_IT/firefly.php b/resources/lang/it_IT/firefly.php index 721fb6cd9c..ae54f6fff9 100644 --- a/resources/lang/it_IT/firefly.php +++ b/resources/lang/it_IT/firefly.php @@ -1284,7 +1284,7 @@ return [ 'send_test_triggered' => 'Il test è stato attivato. Controlla la tua casella di posta e i file di log.', 'split_transaction_title' => 'Descrizione della transazione suddivisa', - 'split_transaction_title_help' => 'If you create a split transaction, there must be a global description for all splits of the transaction.', + 'split_transaction_title_help' => 'Se crei una transazione suddivisa, è necessario che ci sia una descrizione globale per tutte le suddivisioni della transazione.', 'split_title_help' => 'Se crei una transazione suddivisa è necessario che ci sia una descrizione globale per tutte le suddivisioni della transazione.', 'transaction_information' => 'Informazioni transazione', 'you_create_transfer' => 'Stai creando un trasferimento.', diff --git a/resources/lang/zh_CN/firefly.php b/resources/lang/zh_CN/firefly.php index 792ab0dfc7..1a053ff60d 100644 --- a/resources/lang/zh_CN/firefly.php +++ b/resources/lang/zh_CN/firefly.php @@ -224,7 +224,7 @@ return [ 'admin_update_check_now_title' => '立刻检查更新', 'admin_update_check_now_explain' => '如果您按下此按钮,Firefly III 将会检查您现在的版本是否为最新版。', 'check_for_updates_button' => '马上检查!', - 'update_new_version_alert' => 'A new version of Firefly III is available. You are running :your_version, the latest version is :new_version which was released on :date.', + 'update_new_version_alert' => '较新版本的 Firefly III 已可使用,您目前为 :your_version 版,最新版本为 :new_version 版,于 :date 释出。', 'update_version_beta' => 'This version is a BETA version. You may run into issues.', 'update_version_alpha' => 'This version is a ALPHA version. You may run into issues.', 'update_current_version_alert' => 'You are running :version, which is the latest available release.', @@ -726,7 +726,7 @@ return [ 'update_budget' => '更新预算', 'update_budget_amount_range' => '更新 (预期) 自 :start 至 :end 的可用金额', 'set_budget_limit_title' => 'Set budgeted amount for budget :budget between :start and :end', - 'set_budget_limit' => 'Set budgeted amount', + 'set_budget_limit' => '设置预算金额', 'budget_period_navigator' => '期间导览', 'info_on_available_amount' => '我有甚麽可用?', 'available_amount_indication' => '使用这些金额以获得您总预算可能为何的指标', diff --git a/resources/lang/zh_CN/intro.php b/resources/lang/zh_CN/intro.php index dee62935d8..bf6436892f 100644 --- a/resources/lang/zh_CN/intro.php +++ b/resources/lang/zh_CN/intro.php @@ -24,7 +24,7 @@ declare(strict_types=1); return [ // index - 'index_intro' => '欢迎来到 Firefly III 的首页。请花时间参观一下这个介绍,瞭解 Firefly III 是如何运作的。', + 'index_intro' => '欢迎来到 Firefly III 的首页。请花时间参观一下这个介绍,了解 Firefly III 是如何运作的。', 'index_accounts-chart' => '此图表显示您的资产帐户的目前馀额,您可以在偏好设定中选择此处可见的帐户。', 'index_box_out_holder' => '这个小盒子和这个旁边的盒子会提供您财务状况的快速概览。', 'index_help' => '如果您需要有关页面或表单的说明,请按此按钮。', From a7a76e32d658f0369466cb9da374e652f3b120b2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 7 Nov 2019 06:44:23 +0100 Subject: [PATCH 4/4] New version. --- .travis.yml | 8 ++++---- config/firefly.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5ee33b5bd..6c8f32702d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,21 +14,21 @@ jobs: include: - dist: xenial arch: amd64 - env: ARCH=amd64 CHANNEL=alpha VERSION=4.8.2-alpha.1 + env: ARCH=amd64 CHANNEL=alpha VERSION=4.8.2-alpha.2 stage: build script: ./.deploy/docker/travis.sh - dist: xenial arch: amd64 - env: ARCH=arm CHANNEL=alpha VERSION=4.8.2-alpha.1 + env: ARCH=arm CHANNEL=alpha VERSION=4.8.2-alpha.2 stage: build script: ./.deploy/docker/travis.sh - dist: xenial arch: arm64 - env: ARCH=arm64 CHANNEL=alpha VERSION=4.8.2-alpha.1 + env: ARCH=arm64 CHANNEL=alpha VERSION=4.8.2-alpha.2 stage: build script: ./.deploy/docker/travis.sh - dist: xenial arch: amd64 - env: CHANNEL=alpha VERSION=4.8.2-alpha.1 + env: CHANNEL=alpha VERSION=4.8.2-alpha.2 stage: manifest script: ./.deploy/docker/manifest.sh \ No newline at end of file diff --git a/config/firefly.php b/config/firefly.php index 1d397f378f..6716c1b117 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -125,7 +125,7 @@ return [ 'is_demo_site' => false, ], 'encryption' => null === env('USE_ENCRYPTION') || env('USE_ENCRYPTION') === true, - 'version' => '4.8.2-alpha.1', + 'version' => '4.8.2-alpha.2', 'api_version' => '0.10.5', 'db_version' => 11, 'maxUploadSize' => 15242880,