mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for localizaition
This commit is contained in:
parent
58a09087db
commit
fc3074ad51
@ -80,6 +80,9 @@ class MobileLocalization extends Command
|
|||||||
|
|
||||||
foreach ($resources as $key => $val) {
|
foreach ($resources as $key => $val) {
|
||||||
$text = trim(addslashes(trans("texts.{$key}", [], $language->locale)));
|
$text = trim(addslashes(trans("texts.{$key}", [], $language->locale)));
|
||||||
|
if (substr($text, 0, 6) == 'texts.') {
|
||||||
|
$text = $resources->$key;
|
||||||
|
}
|
||||||
echo "'$key': '$text',\n";
|
echo "'$key': '$text',\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +103,7 @@ class MobileLocalization extends Command
|
|||||||
$data = str_replace("\"", "\'", $data);
|
$data = str_replace("\"", "\'", $data);
|
||||||
$data = str_replace("'", "\"", $data);
|
$data = str_replace("'", "\"", $data);
|
||||||
|
|
||||||
return json_decode('{' . $data . '}');
|
return json_decode('{' . rtrim($data, ',') . '}');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getOptions()
|
protected function getOptions()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user