diff --git a/proxy/routes/weblate.js b/proxy/routes/weblate.js index a5a4c68b3..c5df29fc8 100644 --- a/proxy/routes/weblate.js +++ b/proxy/routes/weblate.js @@ -73,7 +73,7 @@ module.exports = (storagePath) => { fs.promises .writeFile( localeFilePath, - JSON.stringify({ ts: new Date().getTime(), ...data }) + JSON.stringify({ ...data, ts: new Date().getTime() }) ) .then(() => { console.log(`Translation ${cacheFile} renewed`); @@ -186,7 +186,10 @@ module.exports = (storagePath) => { // Save the new loaded data to file system and reset require cache try { - saveFilesystem(`${ns}.${lng}.json`, data); + saveFilesystem( + `${ns}.${lng}.json`, + translationData + ); } catch { // Do nothing we already show an error on loading }