Charts and titles in Dutch. [skip ci]

This commit is contained in:
James Cole
2015-05-14 13:17:53 +02:00
parent 3895ae63c7
commit 6be42f112a
9 changed files with 72 additions and 44 deletions

View File

@@ -28,7 +28,7 @@ class AccountController extends Controller
{ {
parent::__construct(); parent::__construct();
View::share('mainTitleIcon', 'fa-credit-card'); View::share('mainTitleIcon', 'fa-credit-card');
View::share('title', 'Accounts'); View::share('title', trans('firefly.accounts'));
} }
/** /**

View File

@@ -29,7 +29,7 @@ class BillController extends Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
View::share('title', 'Bills'); View::share('title', trans('firefly.bills'));
View::share('mainTitleIcon', 'fa-calendar-o'); View::share('mainTitleIcon', 'fa-calendar-o');
} }

View File

@@ -29,7 +29,7 @@ class BudgetController extends Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
View::share('title', 'Budgets'); View::share('title', trans('firefly.budgets'));
View::share('mainTitleIcon', 'fa-tasks'); View::share('mainTitleIcon', 'fa-tasks');
View::share('hideBudgets', true); View::share('hideBudgets', true);
} }

View File

@@ -26,7 +26,7 @@ class CategoryController extends Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
View::share('title', 'Categories'); View::share('title', trans('firefly.categories'));
View::share('mainTitleIcon', 'fa-bar-chart'); View::share('mainTitleIcon', 'fa-bar-chart');
} }

View File

@@ -28,7 +28,7 @@ class CurrencyController extends Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
View::share('title', 'Currencies'); View::share('title', trans('firefly.currencies'));
View::share('mainTitleIcon', 'fa-usd'); View::share('mainTitleIcon', 'fa-usd');
} }

View File

@@ -42,7 +42,7 @@ class GoogleChartController extends Controller
*/ */
public function accountBalanceChart(GChart $chart, Account $account) public function accountBalanceChart(GChart $chart, Account $account)
{ {
$chart->addColumn('Day of month', 'date'); $chart->addColumn(trans('firefly.dayOfMonth'), 'date');
$chart->addColumn('Balance for ' . $account->name, 'number'); $chart->addColumn('Balance for ' . $account->name, 'number');
$chart->addCertainty(1); $chart->addCertainty(1);
@@ -71,7 +71,7 @@ class GoogleChartController extends Controller
*/ */
public function allAccountsBalanceChart(GChart $chart, AccountRepositoryInterface $repository) public function allAccountsBalanceChart(GChart $chart, AccountRepositoryInterface $repository)
{ {
$chart->addColumn('Day of the month', 'date'); $chart->addColumn(trans('firefly.dayOfMonth'), 'date');
$frontPage = Preferences::get('frontPageAccounts', []); $frontPage = Preferences::get('frontPageAccounts', []);
$start = Session::get('start', Carbon::now()->startOfMonth()); $start = Session::get('start', Carbon::now()->startOfMonth());
@@ -114,7 +114,7 @@ class GoogleChartController extends Controller
public function allBudgetsAndSpending(GChart $chart, BudgetRepositoryInterface $repository, $year) public function allBudgetsAndSpending(GChart $chart, BudgetRepositoryInterface $repository, $year)
{ {
$budgets = $repository->getBudgets(); $budgets = $repository->getBudgets();
$chart->addColumn('Month', 'date'); $chart->addColumn(trans('firefly.month'), 'date');
foreach ($budgets as $budget) { foreach ($budgets as $budget) {
$chart->addColumn($budget->name, 'number'); $chart->addColumn($budget->name, 'number');
} }
@@ -147,10 +147,10 @@ class GoogleChartController extends Controller
*/ */
public function allBudgetsHomeChart(GChart $chart, BudgetRepositoryInterface $repository) public function allBudgetsHomeChart(GChart $chart, BudgetRepositoryInterface $repository)
{ {
$chart->addColumn('Budget', 'string'); $chart->addColumn(trans('firefly.budget'), 'string');
$chart->addColumn('Left', 'number'); $chart->addColumn(trans('firefly.left'), 'number');
$chart->addColumn('Spent', 'number'); $chart->addColumn(trans('firefly.spent'), 'number');
$chart->addColumn('Overspent', 'number'); $chart->addColumn(trans('firefly.overspent'), 'number');
$budgets = $repository->getBudgets(); $budgets = $repository->getBudgets();
$start = Session::get('start', Carbon::now()->startOfMonth()); $start = Session::get('start', Carbon::now()->startOfMonth());
@@ -181,7 +181,7 @@ class GoogleChartController extends Controller
} }
$noBudgetExpenses = $repository->getWithoutBudgetSum($start, $end); $noBudgetExpenses = $repository->getWithoutBudgetSum($start, $end);
$allEntries->push(['(no budget)', 0, 0, $noBudgetExpenses]); $allEntries->push([trans('firefly.noBudget'), 0, 0, $noBudgetExpenses]);
foreach ($allEntries as $entry) { foreach ($allEntries as $entry) {
if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) { if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) {
@@ -203,8 +203,8 @@ class GoogleChartController extends Controller
*/ */
public function allCategoriesHomeChart(GChart $chart, CategoryRepositoryInterface $repository) public function allCategoriesHomeChart(GChart $chart, CategoryRepositoryInterface $repository)
{ {
$chart->addColumn('Category', 'string'); $chart->addColumn(trans('firefly.category'), 'string');
$chart->addColumn('Spent', 'number'); $chart->addColumn(trans('firefly.spent'), 'number');
$start = Session::get('start', Carbon::now()->startOfMonth()); $start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth()); $end = Session::get('end', Carbon::now()->endOfMonth());
@@ -212,7 +212,7 @@ class GoogleChartController extends Controller
foreach ($set as $entry) { foreach ($set as $entry) {
$isEncrypted = intval($entry->encrypted) == 1 ? true : false; $isEncrypted = intval($entry->encrypted) == 1 ? true : false;
$name = strlen($entry->name) == 0 ? '(no category)' : $entry->name; $name = strlen($entry->name) == 0 ? trans('firefly.noCategory') : $entry->name;
$name = $isEncrypted ? Crypt::decrypt($name) : $name; $name = $isEncrypted ? Crypt::decrypt($name) : $name;
$chart->addRow($name, floatval($entry->sum)); $chart->addRow($name, floatval($entry->sum));
} }
@@ -233,10 +233,10 @@ class GoogleChartController extends Controller
public function billOverview(GChart $chart, BillRepositoryInterface $repository, Bill $bill) public function billOverview(GChart $chart, BillRepositoryInterface $repository, Bill $bill)
{ {
$chart->addColumn('Date', 'date'); $chart->addColumn(trans('firefly.date'), 'date');
$chart->addColumn('Max amount', 'number'); $chart->addColumn(trans('firefly.maxAmount'), 'number');
$chart->addColumn('Min amount', 'number'); $chart->addColumn(trans('firefly.minAmount'), 'number');
$chart->addColumn('Recorded bill entry', 'number'); $chart->addColumn(trans('firefly.billEntry'), 'number');
// get first transaction or today for start: // get first transaction or today for start:
$results = $repository->getJournals($bill); $results = $repository->getJournals($bill);
@@ -261,8 +261,8 @@ class GoogleChartController extends Controller
*/ */
public function billsOverview(GChart $chart, BillRepositoryInterface $repository, AccountRepositoryInterface $accounts) public function billsOverview(GChart $chart, BillRepositoryInterface $repository, AccountRepositoryInterface $accounts)
{ {
$chart->addColumn('Name', 'string'); $chart->addColumn(trans('firefly.name'), 'string');
$chart->addColumn('Amount', 'number'); $chart->addColumn(trans('firefly.amount'), 'number');
$start = Session::get('start', Carbon::now()->startOfMonth()); $start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth()); $end = Session::get('end', Carbon::now()->endOfMonth());
@@ -329,8 +329,8 @@ class GoogleChartController extends Controller
unset($amount, $description); unset($amount, $description);
} }
$chart->addRow('Unpaid: ' . join(', ', $unpaidDescriptions), $unpaidAmount); $chart->addRow(trans('firefly.unpaid') . ': ' . join(', ', $unpaidDescriptions), $unpaidAmount);
$chart->addRow('Paid: ' . join(', ', $paidDescriptions), $paidAmount); $chart->addRow(trans('firefly.paid') . ': ' . join(', ', $paidDescriptions), $paidAmount);
$chart->generate(); $chart->generate();
return Response::json($chart->getData()); return Response::json($chart->getData());
@@ -349,8 +349,8 @@ class GoogleChartController extends Controller
$start = clone $repetition->startdate; $start = clone $repetition->startdate;
$end = $repetition->enddate; $end = $repetition->enddate;
$chart->addColumn('Day', 'date'); $chart->addColumn(trans('firefly.day'), 'date');
$chart->addColumn('Left', 'number'); $chart->addColumn(trans('firefly.left'), 'number');
$amount = $repetition->amount; $amount = $repetition->amount;
@@ -380,9 +380,9 @@ class GoogleChartController extends Controller
*/ */
public function budgetsAndSpending(GChart $chart, BudgetRepositoryInterface $repository, Budget $budget, $year = 0) public function budgetsAndSpending(GChart $chart, BudgetRepositoryInterface $repository, Budget $budget, $year = 0)
{ {
$chart->addColumn('Month', 'date'); $chart->addColumn(trans('firefly.month'), 'date');
$chart->addColumn('Budgeted', 'number'); $chart->addColumn(trans('firefly.budgeted'), 'number');
$chart->addColumn('Spent', 'number'); $chart->addColumn(trans('firefly.spent'), 'number');
if ($year == 0) { if ($year == 0) {
$start = $repository->getFirstBudgetLimitDate($budget); $start = $repository->getFirstBudgetLimitDate($budget);
@@ -424,8 +424,8 @@ class GoogleChartController extends Controller
// jump to start of week / month / year / etc (TODO). // jump to start of week / month / year / etc (TODO).
$start = Navigation::startOfPeriod($start, $range->data); $start = Navigation::startOfPeriod($start, $range->data);
$chart->addColumn('Period', 'date'); $chart->addColumn(trans('firefly.period'), 'date');
$chart->addColumn('Spent', 'number'); $chart->addColumn(trans('firefly.spent'), 'number');
$end = new Carbon; $end = new Carbon;
while ($start <= $end) { while ($start <= $end) {
@@ -454,8 +454,8 @@ class GoogleChartController extends Controller
public function categoryPeriodChart(GChart $chart, CategoryRepositoryInterface $repository, Category $category) public function categoryPeriodChart(GChart $chart, CategoryRepositoryInterface $repository, Category $category)
{ {
$start = clone Session::get('start', Carbon::now()->startOfMonth()); $start = clone Session::get('start', Carbon::now()->startOfMonth());
$chart->addColumn('Period', 'date'); $chart->addColumn(trans('firefly.period'), 'date');
$chart->addColumn('Spent', 'number'); $chart->addColumn(trans('firefly.spent'), 'number');
$end = Session::get('end', Carbon::now()->endOfMonth()); $end = Session::get('end', Carbon::now()->endOfMonth());
while ($start <= $end) { while ($start <= $end) {
@@ -481,8 +481,8 @@ class GoogleChartController extends Controller
*/ */
public function piggyBankHistory(GChart $chart, PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank) public function piggyBankHistory(GChart $chart, PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank)
{ {
$chart->addColumn('Date', 'date'); $chart->addColumn(trans('firefly.date'), 'date');
$chart->addColumn('Balance', 'number'); $chart->addColumn(trans('firefly.balance'), 'number');
/** @var Collection $set */ /** @var Collection $set */
$set = $repository->getEventSummarySet($piggyBank); $set = $repository->getEventSummarySet($piggyBank);
@@ -509,9 +509,9 @@ class GoogleChartController extends Controller
public function yearInExp(GChart $chart, ReportQueryInterface $query, $year) public function yearInExp(GChart $chart, ReportQueryInterface $query, $year)
{ {
$start = new Carbon('01-01-' . $year); $start = new Carbon('01-01-' . $year);
$chart->addColumn('Month', 'date'); $chart->addColumn(trans('firefly.month'), 'date');
$chart->addColumn('Income', 'number'); $chart->addColumn(trans('firefly.income'), 'number');
$chart->addColumn('Expenses', 'number'); $chart->addColumn(trans('firefly.expenses'), 'number');
$pref = Preferences::get('showSharedReports', false); $pref = Preferences::get('showSharedReports', false);
$showSharedReports = $pref->data; $showSharedReports = $pref->data;
@@ -548,9 +548,9 @@ class GoogleChartController extends Controller
public function yearInExpSum(GChart $chart, ReportQueryInterface $query, $year) public function yearInExpSum(GChart $chart, ReportQueryInterface $query, $year)
{ {
$start = new Carbon('01-01-' . $year); $start = new Carbon('01-01-' . $year);
$chart->addColumn('Summary', 'string'); $chart->addColumn(trans('firefly.summary'), 'string');
$chart->addColumn('Income', 'number'); $chart->addColumn(trans('firefly.income'), 'number');
$chart->addColumn('Expenses', 'number'); $chart->addColumn(trans('firefly.expenses'), 'number');
$pref = Preferences::get('showSharedReports', false); $pref = Preferences::get('showSharedReports', false);
$showSharedReports = $pref->data; $showSharedReports = $pref->data;
@@ -576,9 +576,9 @@ class GoogleChartController extends Controller
} }
$chart->addRow('Sum', $income, $expense); $chart->addRow(trans('firefly.sum'), $income, $expense);
$count = $count > 0 ? $count : 1; $count = $count > 0 ? $count : 1;
$chart->addRow('Average', ($income / $count), ($expense / $count)); $chart->addRow(trans('firefly.average'), ($income / $count), ($expense / $count));
$chart->generate(); $chart->generate();

View File

@@ -53,7 +53,7 @@ class HomeController extends Controller
$types = Config::get('firefly.accountTypesByIdentifier.asset'); $types = Config::get('firefly.accountTypesByIdentifier.asset');
$count = $repository->countAccounts($types); $count = $repository->countAccounts($types);
$title = 'Firefly'; $title = 'Firefly';
$subTitle = 'What\'s playing?'; $subTitle = trans('firefly.welcomeBack');
$mainTitleIcon = 'fa-fire'; $mainTitleIcon = 'fa-fire';
$transactions = []; $transactions = [];
$frontPage = Preferences::get('frontPageAccounts', []); $frontPage = Preferences::get('frontPageAccounts', []);

View File

@@ -12,6 +12,7 @@ return [
'actions' => 'Actions', 'actions' => 'Actions',
'edit' => 'Edit', 'edit' => 'Edit',
'delete' => 'Delete', 'delete' => 'Delete',
'welcomeBack' => 'What\'s playing?',
// new user: // new user:
'welcome' => 'Welcome to Firefly!', 'welcome' => 'Welcome to Firefly!',
@@ -44,6 +45,7 @@ return [
'logout' => 'Logout', 'logout' => 'Logout',
'searchPlaceholder' => 'Search...', 'searchPlaceholder' => 'Search...',
'dashboard' => 'Dashboard', 'dashboard' => 'Dashboard',
'currencies' => 'Currencies',
'accounts' => 'Accounts', 'accounts' => 'Accounts',
'assetAccounts' => 'Asset accounts', 'assetAccounts' => 'Asset accounts',
'expenseAccounts' => 'Expense accounts', 'expenseAccounts' => 'Expense accounts',
@@ -65,4 +67,28 @@ return [
'transfer' => 'Transfer', 'transfer' => 'Transfer',
'bill' => 'Rekening', 'bill' => 'Rekening',
// charts:
'dayOfMonth' => 'Dag vd maand',
'month' => 'Maand',
'budget' => 'Budget',
'spent' => 'Uitgegeven',
'overspent' => 'Teveel uitgegeven',
'left' => 'Over',
'noCategory' => '(geen categorie)',
'noBudget' => '(geen budget)',
'category' => 'Categorie',
'maxAmount' => 'Maximaal bedrag',
'minAmount' => 'Minimaal bedrag',
'billEntry' => 'Bedrag voor deze rekening',
'name' => 'Naam',
'date' => 'Datum',
'paid' => 'Betaald',
'unpaid' => 'Niet betaald',
'day' => 'Dag',
'budgeted' => 'Gebudgetteerd',
'period' => 'Periode',
'balance' => 'Saldo',
'summary' => 'Samenvatting',
'sum' => 'Som',
'average' => 'Gemiddeld',
]; ];

View File

@@ -12,6 +12,7 @@ return [
'actions' => 'Acties', 'actions' => 'Acties',
'edit' => 'Wijzig', 'edit' => 'Wijzig',
'delete' => 'Verwijder', 'delete' => 'Verwijder',
'welcomeBack' => 'Hoe staat het er voor?',
// new user: // new user:
'welcome' => 'Welkom bij Firefly!', 'welcome' => 'Welkom bij Firefly!',
@@ -44,6 +45,7 @@ return [
'logout' => 'Uitloggen', 'logout' => 'Uitloggen',
'searchPlaceholder' => 'Zoeken...', 'searchPlaceholder' => 'Zoeken...',
'dashboard' => 'Dashboard', 'dashboard' => 'Dashboard',
'currencies' => 'Munteenheden',
'accounts' => 'Rekeningen', 'accounts' => 'Rekeningen',
'assetAccounts' => 'Betaalrekeningen', 'assetAccounts' => 'Betaalrekeningen',
'expenseAccounts' => 'Crediteuren', 'expenseAccounts' => 'Crediteuren',