Some new translations [skip ci]

This commit is contained in:
James Cole 2015-05-25 21:39:05 +02:00
parent 56c8a84691
commit 74f098e718
4 changed files with 22 additions and 4 deletions

View File

@ -5,9 +5,11 @@ namespace FireflyIII\Helpers\Reminders;
use Amount;
use Auth;
use Carbon\Carbon;
use Config;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\Reminder;
use Navigation;
use Preferences;
/**
* Class ReminderHelper
@ -154,14 +156,24 @@ class ReminderHelper implements ReminderHelperInterface
$piggyBank = $reminder->remindersable;
if (is_null($piggyBank)) {
return 'Piggy bank no longer exists.';
return trans('firefly.piggy_bank_not_exists');
}
if (is_null($piggyBank->targetdate)) {
return 'Add money to this piggy bank to reach your target of ' . Amount::format($piggyBank->targetamount);
return trans('firefly.add_any_amount_to_piggy', ['amount' => Amount::format($piggyBank->targetamount)]);
}
return 'Add ' . Amount::format($reminder->metadata->perReminder) . ' to fill this piggy bank on ' . $piggyBank->targetdate->format('jS F Y');
$lang = Preferences::get('language', 'en')->data;
return trans(
'firefly.add_set_amount_to_piggy',
[
'amount' => Amount::format($reminder->metadata->perReminder),
'date' => $piggyBank->targetdate->formatLocalized(Config::get('firefly.monthAndDay.' . $lang))
]
);
//return 'Add ' . Amount::format($reminder->metadata->perReminder) . ' to fill this piggy bank on ' . $piggyBank->targetdate->format('jS F Y');
}
}

View File

@ -6,7 +6,7 @@ use Config;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\Request;
use Preferences;
use Carbon\Carbon;
/**
* Class Authenticate
*
@ -54,6 +54,7 @@ class Authenticate
// if logged in, set user language:
$pref = Preferences::get('language', 'en');
App::setLocale($pref->data);
Carbon::setLocale($pref->data);
setlocale(LC_TIME, Config::get('firefly.locales.' . $pref->data));

View File

@ -242,6 +242,9 @@ return [
'expected_amount_per_reminder' => 'Expected amount per reminder',
'todo' => 'to do',
'table' => 'Table',
'piggy_bank_not_exists' => 'Piggy bank no longer exists.',
'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.',
'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date',
];

View File

@ -251,6 +251,8 @@ return [
'expected_amount_per_reminder' => 'Verwacht bedrag per herinnering',
'todo' => 'te doen',
'table' => 'Tabel',
'add_any_amount_to_piggy' => 'Stop geld in dit spaarpotje om het doel van :amount te halen.',
'add_set_amount_to_piggy' => 'Stop voor :date :amount in dit spaarpotje om hem op tijd te vullen.',
];