Translation for popup [skip ci]

This commit is contained in:
James Cole
2016-04-25 09:11:09 +02:00
parent 53760766a0
commit ce5304277d
3 changed files with 12 additions and 7 deletions

View File

@@ -336,13 +336,15 @@ class BudgetController extends Controller
$range = Preferences::get('viewRange', '1M')->data; $range = Preferences::get('viewRange', '1M')->data;
/** @var Carbon $date */ /** @var Carbon $date */
$date = session('start', new Carbon); $date = session('start', new Carbon);
$start = Navigation::startOfPeriod($date, $range); $start = Navigation::startOfPeriod($date, $range);
$end = Navigation::endOfPeriod($start, $range); $end = Navigation::endOfPeriod($start, $range);
$key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd'); $key = 'budgetIncomeTotal' . $start->format('Ymd') . $end->format('Ymd');
$amount = Preferences::get($key, 1000); $amount = Preferences::get($key, 1000);
$displayStart = Navigation::periodShow($start, $range);
$displayEnd = Navigation::periodShow($end, $range);
return view('budgets.income', compact('amount')); return view('budgets.income', compact('amount', 'displayStart', 'displayEnd'));
} }
} }

View File

@@ -471,6 +471,7 @@ return [
'updated_budget' => 'Updated budget ":name"', 'updated_budget' => 'Updated budget ":name"',
'update_amount' => 'Update amount', 'update_amount' => 'Update amount',
'update_budget' => 'Update budget', 'update_budget' => 'Update budget',
'update_budget_amount_range' => 'Update (expected) available amount between :start and :end',
// bills: // bills:
'matching_on' => 'Matching on', 'matching_on' => 'Matching on',

View File

@@ -3,7 +3,9 @@
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">{{ 'close'|_ }}</span> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
</button> </button>
<h4 class="modal-title" id="myModalLabel">Update (expected) available amount for {{ Session.get('start').format('F Y') }}</h4> <h4 class="modal-title" id="myModalLabel">
{{ trans('firefly.update_budget_amount_range', {start: displayStart, end: displayEnd}) }}
</h4>
</div> </div>
<form style="display: inline;" id="income" action="{{ route('budgets.postIncome') }}" method="POST"> <form style="display: inline;" id="income" action="{{ route('budgets.postIncome') }}" method="POST">