mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Country not translated in Clients' details view #1828
This commit is contained in:
parent
4fb50f75cf
commit
88e4c773c7
@ -117,10 +117,10 @@ class ClientPortalController extends BaseController
|
||||
|
||||
// translate the country names
|
||||
if ($invoice->client->country) {
|
||||
$invoice->client->country->name = trans('texts.country_' . $invoice->client->country->name);
|
||||
$invoice->client->country->name = $invoice->client->country->getName();
|
||||
}
|
||||
if ($invoice->account->country) {
|
||||
$invoice->account->country->name = trans('texts.country_' . $invoice->account->country->name);
|
||||
$invoice->account->country->name = $invoice->account->country->getName();
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
@ -40,6 +40,6 @@ class Country extends Eloquent
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
return trans('texts.country_' . $this->name);
|
||||
}
|
||||
}
|
||||
|
@ -8,12 +8,12 @@ class ClientPresenter extends EntityPresenter
|
||||
{
|
||||
public function country()
|
||||
{
|
||||
return $this->entity->country ? $this->entity->country->name : '';
|
||||
return $this->entity->country ? $this->entity->country->getName() : '';
|
||||
}
|
||||
|
||||
public function shipping_country()
|
||||
{
|
||||
return $this->entity->shipping_country ? $this->entity->shipping_country->name : '';
|
||||
return $this->entity->shipping_country ? $this->entity->shipping_country->getName() : '';
|
||||
}
|
||||
|
||||
public function balance()
|
||||
@ -72,7 +72,7 @@ class ClientPresenter extends EntityPresenter
|
||||
$str .= e($cityState) . '<br/>';
|
||||
}
|
||||
if ($country = $client->{$prefix . 'country'}) {
|
||||
$str .= e($country->name) . '<br/>';
|
||||
$str .= e($country->getName()) . '<br/>';
|
||||
}
|
||||
|
||||
if ($str) {
|
||||
|
@ -9,6 +9,6 @@ class VendorPresenter extends EntityPresenter
|
||||
*/
|
||||
public function country()
|
||||
{
|
||||
return $this->entity->country ? $this->entity->country->name : '';
|
||||
return $this->entity->country ? $this->entity->country->getName() : '';
|
||||
}
|
||||
}
|
||||
|
@ -372,7 +372,7 @@
|
||||
};
|
||||
|
||||
var map = new google.maps.Map(mapCanvas, mapOptions)
|
||||
var address = {!! json_encode(e("{$client->address1} {$client->address2} {$client->city} {$client->state} {$client->postal_code} " . ($client->country ? $client->country->name : ''))) !!};
|
||||
var address = {!! json_encode(e("{$client->address1} {$client->address2} {$client->city} {$client->state} {$client->postal_code} " . ($client->country ? $client->country->getName() : ''))) !!};
|
||||
|
||||
geocoder = new google.maps.Geocoder();
|
||||
geocoder.geocode( { 'address': address}, function(results, status) {
|
||||
|
@ -293,7 +293,7 @@
|
||||
{{ $client->getCityState() }}<br/>
|
||||
@endif
|
||||
@if ($client->country)
|
||||
{{ $client->country->name }}<br/>
|
||||
{{ $client->country->getName() }}<br/>
|
||||
@endif
|
||||
<br>
|
||||
@if ($contact->email)
|
||||
@ -381,7 +381,7 @@
|
||||
{{ $account->getCityState() }}<br/>
|
||||
@endif
|
||||
@if ($account->country)
|
||||
{{ $account->country->name }}
|
||||
{{ $account->country->getName() }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-3 phone-web-details">
|
||||
|
4
resources/views/vendors/show.blade.php
vendored
4
resources/views/vendors/show.blade.php
vendored
@ -98,7 +98,7 @@
|
||||
{{ $vendor->getCityState() }}<br/>
|
||||
@endif
|
||||
@if ($vendor->country)
|
||||
{{ $vendor->country->name }}<br/>
|
||||
{{ $vendor->country->getName() }}<br/>
|
||||
@endif
|
||||
|
||||
@if ($vendor->account->custom_vendor_label1 && $vendor->custom_value1)
|
||||
@ -228,7 +228,7 @@
|
||||
};
|
||||
|
||||
var map = new google.maps.Map(mapCanvas, mapOptions)
|
||||
var address = {!! json_encode(e("{$vendor->address1} {$vendor->address2} {$vendor->city} {$vendor->state} {$vendor->postal_code} " . ($vendor->country ? $vendor->country->name : ''))) !!};
|
||||
var address = {!! json_encode(e("{$vendor->address1} {$vendor->address2} {$vendor->city} {$vendor->state} {$vendor->postal_code} " . ($vendor->country ? $vendor->country->getName() : ''))) !!};
|
||||
|
||||
geocoder = new google.maps.Geocoder();
|
||||
geocoder.geocode( { 'address': address}, function(results, status) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user