1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Fix captialization

This commit is contained in:
Hillel Coren 2017-08-15 20:09:24 +03:00
parent 3c40cd460e
commit d31f23dcd3
3 changed files with 15 additions and 5 deletions

View File

@ -573,10 +573,20 @@ if (! defined('APP_NAME')) {
// Fix for mPDF: https://github.com/kartik-v/yii2-mpdf/issues/9
define('_MPDF_TTFONTDATAPATH', storage_path('framework/cache/'));
// TODO remove these translation functions
function uctrans($text)
function uctrans($text, $data = [])
{
return ucwords(trans($text));
$locale = Session::get(SESSION_LOCALE);
$text = trans($text, $data);
return $locale == 'en' ? ucwords($text) : $text;
}
function utrans($text, $data = [])
{
$locale = Session::get(SESSION_LOCALE);
$text = trans($text, $data);
return $locale == 'en' ? strtoupper($text) : $text;
}
// optional trans: only return the string if it's translated

View File

@ -28,7 +28,7 @@
@if ($account->hasCustomLabel('due_date'))
{{ $account->getLabel('due_date') }} {{ $account->formatDate($invoice->due_date) }}
@else
{{ strtoupper(trans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)])) }}
{{ utrans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)]) }}
@endif
@endif
</span><br />

View File

@ -28,7 +28,7 @@
@if ($account->hasCustomLabel('due_date'))
{{ $account->getLabel('due_date') }} {{ $account->formatDate($invoice->due_date) }}
@else
{{ strtoupper(trans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)])) }}
{{ utrans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)]) }}
@endif
@endif
</span><br />