mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01: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
|
||||
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
|
||||
|
@ -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 />
|
||||
|
@ -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 />
|
||||
|
Loading…
Reference in New Issue
Block a user