Skip to content

Firefly III: a personal finances manager

Various code cleanup.

James Cole2d67eece5d04
diff --git a/app/Console/Commands/System/OutputsInstructions.php b/app/Console/Commands/System/OutputsInstructions.php
index b144fcdf33..b765083569 100644
--- a/app/Console/Commands/System/OutputsInstructions.php
+++ b/app/Console/Commands/System/OutputsInstructions.php
@@ -133,6 +133,9 @@ class OutputsInstructions extends Command
if ('03-31' === $today) {
$colors = ['bright-blue', 'bright-red', 'white', 'white', 'bright-red', 'bright-blue', 'default', 'default'];
}
+ if ('ru_RU' === config('firefly.default_language')) {
+ $colors = ['blue', 'blue', 'blue', 'yellow', 'yellow', 'yellow', 'default', 'default'];
+ }
$this->line(sprintf('<fg=%s> ______ _ __ _ _____ _____ _____ </>', $colors[0]));
$this->line(sprintf('<fg=%s> | ____(_) / _| | |_ _|_ _|_ _| </>', $colors[1]));
@@ -238,14 +241,38 @@ class OutputsInstructions extends Command
private function someQuote(): void
{
- $lines = [
+ $lines = [
'Forgive yourself for not being at peace.',
'Doesn\'t look like anything to me.',
'Be proud of what you make.',
'Be there or forever wonder.',
'A year from now you will wish you had started today.',
];
- $random = random_int(0, count($lines) - 1);
- $this->line(sprintf(' "%s"', $lines[$random]));
+ $addQuotes = true;
+
+ // fuck the Russian aggression in Ukraine.
+
+ // There is no point even trying to be neutral, because you can’t. When I say you can’t be neutral on
+ // a moving train, it means the world is already moving in certain directions. Children are going
+ // hungry, wars are taking place. In a situation like that, to be neutral or to try to be neutral,
+ // to stand aside, not to take a stand, not to participate, is to collaborate with whatever is
+ // going on, to allow that to happen.
+
+ if ('ru_RU' === config('firefly.default_language')) {
+ $addQuotes = false;
+ $lines = [
+ '🇺🇦 Слава Україні!',
+ '🇺🇦 Slava Ukraini!',
+ ];
+ }
+
+ $random = random_int(0, count($lines) - 1);
+ if ($addQuotes) {
+ $this->line(sprintf(' "%s"', $lines[$random]));
+
+ return;
+ }
+ $this->line(sprintf(' %s', $lines[$random]));
+
}
}
diff --git a/app/Console/Commands/System/RecalculatesRunningBalance.php b/app/Console/Commands/System/RecalculatesRunningBalance.php
index 93e3fc8624..765e4fbc28 100644
--- a/app/Console/Commands/System/RecalculatesRunningBalance.php
+++ b/app/Console/Commands/System/RecalculatesRunningBalance.php
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\System;
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command;
+
class RecalculatesRunningBalance extends Command
{
use ShowsFriendlyMessages;
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig
index 7bbd9428a4..2bda3de9a6 100644
--- a/resources/views/transactions/show.twig
+++ b/resources/views/transactions/show.twig
@@ -165,7 +165,7 @@
{{ formatAmountBySymbol(amount.amount*-1,amount.symbol, amount.decimal_places) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
{% elseif first.transaction_type_type == 'Transfer' %}
<span class="text-info money-transfer">
-
+
{{ formatAmountBySymbol(amount.amount*-1, amount.symbol, amount.decimal_places, false) }}{% if loop.index0 != amounts|length -1 %}, {% endif %}
</span>
{% elseif first.transaction_type_type == 'Opening balance' %}