1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Fix for localizaition

This commit is contained in:
Hillel Coren 2020-02-23 12:32:04 +02:00
parent 58a09087db
commit fc3074ad51

View File

@ -80,6 +80,9 @@ class MobileLocalization extends Command
foreach ($resources as $key => $val) {
$text = trim(addslashes(trans("texts.{$key}", [], $language->locale)));
if (substr($text, 0, 6) == 'texts.') {
$text = $resources->$key;
}
echo "'$key': '$text',\n";
}
@ -100,7 +103,7 @@ class MobileLocalization extends Command
$data = str_replace("\"", "\'", $data);
$data = str_replace("'", "\"", $data);
return json_decode('{' . $data . '}');
return json_decode('{' . rtrim($data, ',') . '}');
}
protected function getOptions()