Also log missing localization found in frontend (only when MODE == dev)

This commit is contained in:
Bernd Bestel
2018-09-30 13:02:07 +02:00
parent 176333df5b
commit f451e65278
7 changed files with 86 additions and 2 deletions

View File

@@ -3,6 +3,22 @@
var localizedText = Grocy.LocalizationStrings[text];
if (localizedText === undefined)
{
if (Grocy.Mode === 'dev')
{
jsonData = {};
jsonData.text = text;
Grocy.Api.Post('system/log-missing-localization', jsonData,
function(result)
{
// Nothing to do...
},
function(xhr)
{
console.log(xhr)
}
);
}
localizedText = text;
}

View File

@@ -64,7 +64,6 @@ $("#auto-reload-enabled").on("change", function()
jsonData = { };
jsonData.value = value;
console.log(jsonData);
Grocy.Api.Post('user/settings/auto_reload_on_db_change', jsonData,
function(result)
{