mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix captialization
This commit is contained in:
parent
3c40cd460e
commit
d31f23dcd3
@ -573,10 +573,20 @@ if (! defined('APP_NAME')) {
|
|||||||
// Fix for mPDF: https://github.com/kartik-v/yii2-mpdf/issues/9
|
// Fix for mPDF: https://github.com/kartik-v/yii2-mpdf/issues/9
|
||||||
define('_MPDF_TTFONTDATAPATH', storage_path('framework/cache/'));
|
define('_MPDF_TTFONTDATAPATH', storage_path('framework/cache/'));
|
||||||
|
|
||||||
// TODO remove these translation functions
|
function uctrans($text, $data = [])
|
||||||
function uctrans($text)
|
|
||||||
{
|
{
|
||||||
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
|
// optional trans: only return the string if it's translated
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
@if ($account->hasCustomLabel('due_date'))
|
@if ($account->hasCustomLabel('due_date'))
|
||||||
{{ $account->getLabel('due_date') }} {{ $account->formatDate($invoice->due_date) }}
|
{{ $account->getLabel('due_date') }} {{ $account->formatDate($invoice->due_date) }}
|
||||||
@else
|
@else
|
||||||
{{ strtoupper(trans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)])) }}
|
{{ utrans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)]) }}
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</span><br />
|
</span><br />
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
@if ($account->hasCustomLabel('due_date'))
|
@if ($account->hasCustomLabel('due_date'))
|
||||||
{{ $account->getLabel('due_date') }} {{ $account->formatDate($invoice->due_date) }}
|
{{ $account->getLabel('due_date') }} {{ $account->formatDate($invoice->due_date) }}
|
||||||
@else
|
@else
|
||||||
{{ strtoupper(trans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)])) }}
|
{{ utrans('texts.due_by', ['date' => $account->formatDate($invoice->due_date)]) }}
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</span><br />
|
</span><br />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user