1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-17 16:42:48 +01:00

fix garbled characters when cjk lang is selected.

This commit is contained in:
Akira Matsuda 2016-03-02 20:38:51 +09:00
parent 2d5a30490e
commit 0b9b3cb7bc
2 changed files with 7 additions and 2 deletions

View File

@ -19,8 +19,13 @@ class AppServiceProvider extends ServiceProvider {
public function boot()
{
HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') {
$capitalize = config('former.capitalize_translations');
$class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2.'/*') ) ? ' class="active"' : '';
$title = ucwords(trans("texts.$text")) . Utils::getProLabel($text);
if($capitalize){
$title = ucwords(trans("texts.$text")) . Utils::getProLabel($text);
} else {
$title = trans("texts.$text") . Utils::getProLabel($text);
}
return '<li'.$class.'><a href="'.URL::to($url).'" '.$extra.'>'.$title.'</a></li>';
});

View File

@ -49,7 +49,7 @@
// Whether text that comes out of the translated
// should be capitalized (ex: email => Email) automatically
'capitalize_translations' => true,
'capitalize_translations' => false,
// An array of attributes to automatically translate
'translatable' => array(