mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Localization fixes
This commit is contained in:
parent
8aa5f09f6b
commit
d1cb62b444
@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Eloquent;
|
||||
use Str;
|
||||
|
||||
/**
|
||||
* Class Currency.
|
||||
@ -28,4 +29,12 @@ class Currency extends Eloquent
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTranslatedName()
|
||||
{
|
||||
return trans('texts.currency_' . Str::slug($this->name, '_'));
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Eloquent;
|
||||
use Str;
|
||||
|
||||
/**
|
||||
* Class InvoiceStatus.
|
||||
@ -35,4 +36,12 @@ class InvoiceStatus extends Eloquent
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTranslatedName()
|
||||
{
|
||||
return trans('texts.status_' . Str::slug($this->name, '_'));
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ class User extends Authenticatable
|
||||
} elseif ($this->email) {
|
||||
return $this->email;
|
||||
} else {
|
||||
return 'Guest';
|
||||
return trans('texts.guest');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2609,6 +2609,7 @@ $LANG = array(
|
||||
'copy_shipping' => 'Copy Shipping',
|
||||
'copy_billing' => 'Copy Billing',
|
||||
'quote_has_expired' => 'The quote has expired, please contact the merchant.',
|
||||
'empty_table_footer' => 'Showing 0 to 0 of 0 entries',
|
||||
|
||||
);
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
{!! Former::select('expense_currency_id')->addOption('','')
|
||||
->data_bind('combobox: expense_currency_id')
|
||||
->label(trans('texts.currency_id'))
|
||||
->data_placeholder(Utils::getFromCache($account->getCurrencyId(), 'currencies')->name)
|
||||
->data_placeholder(Utils::getFromCache($account->getCurrencyId(), 'currencies')->getTranslatedName())
|
||||
->fromQuery($currencies, 'name', 'id') !!}
|
||||
|
||||
@if (! $isRecurring)
|
||||
|
@ -124,6 +124,7 @@
|
||||
"bInfo": true,
|
||||
"oLanguage": {
|
||||
'sEmptyTable': "{{ trans('texts.empty_table') }}",
|
||||
'sInfoEmpty': "{{ trans('texts.empty_table_footer') }}",
|
||||
'sLengthMenu': '_MENU_ {{ trans('texts.rows') }}',
|
||||
'sInfo': "{{ trans('texts.datatable_info', ['start' => '_START_', 'end' => '_END_', 'total' => '_TOTAL_']) }}",
|
||||
'sSearch': ''
|
||||
|
@ -138,6 +138,11 @@
|
||||
var clientMap = {};
|
||||
var invoiceMap = {};
|
||||
var invoicesForClientMap = {};
|
||||
var statuses = [];
|
||||
|
||||
@foreach (cache('invoiceStatus') as $status)
|
||||
statuses[{{ $status->id }}] = "{{ $status->getTranslatedName() }}";
|
||||
@endforeach
|
||||
|
||||
for (var i=0; i<clients.length; i++) {
|
||||
var client = clients[i];
|
||||
@ -323,7 +328,7 @@
|
||||
var invoice = list[i];
|
||||
var client = clientMap[invoice.client.public_id];
|
||||
if (!client || !getClientDisplayName(client)) continue; // client is deleted/archived
|
||||
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' +
|
||||
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + statuses[invoice.invoice_status.id] + ' - ' +
|
||||
getClientDisplayName(client) + ' - ' + formatMoneyInvoice(invoice.amount, invoice) + ' | ' +
|
||||
formatMoneyInvoice(invoice.balance, invoice), invoice.public_id));
|
||||
}
|
||||
|
@ -36,19 +36,19 @@
|
||||
<div id="tooltip" class="hidden">
|
||||
<p>
|
||||
<strong><span id="tooltipTitle"></span></strong>
|
||||
<a class="pull-right" href="#" target="_blank">View</a>
|
||||
<a class="pull-right" href="#" target="_blank">{{ trans('texts.view') }}</a>
|
||||
</p>
|
||||
<p>Total <span id="tooltipTotal" class="pull-right"></span></p>
|
||||
<p>Balance <span id="tooltipBalance" class="pull-right"></span></p>
|
||||
<p>Age <span id="tooltipAge" class="pull-right"></span></p>
|
||||
<p>{{ trans('texts.total') }} <span id="tooltipTotal" class="pull-right"></span></p>
|
||||
<p>{{ trans('texts.balance') }} <span id="tooltipBalance" class="pull-right"></span></p>
|
||||
<p>{{ trans('texts.age') }} <span id="tooltipAge" class="pull-right"></span></p>
|
||||
</div>
|
||||
|
||||
<form class="form-inline" role="form">
|
||||
Group By
|
||||
{{ trans('texts.group_by') }}
|
||||
<select id="groupBySelect" class="form-control" onchange="update()" style="background-color:white !important">
|
||||
<option>Clients</option>
|
||||
<option>Invoices</option>
|
||||
<option>Products</option>
|
||||
<option>{{ trans('texts.clients') }}</option>
|
||||
<option>{{ trans('texts.invoices') }}</option>
|
||||
<option>{{ trans('texts.products') }}</option>
|
||||
</select>
|
||||
<b>{!! $message !!}</b>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user