Fix Spanish translation JSON

This commit is contained in:
Andy Low
2026-03-06 22:29:36 +00:00
parent c77097abd8
commit 1cab4909ef
2 changed files with 19 additions and 1 deletions
+19
View File
@@ -1,6 +1,7 @@
'use strict'; 'use strict';
const fs = require('fs'); const fs = require('fs');
const path = require('path');
require('should'); require('should');
@@ -40,4 +41,22 @@ describe('language', function ( ) {
language.translate('carbs', { ci: true }).should.equal('Sacharidy'); language.translate('carbs', { ci: true }).should.equal('Sacharidy');
}); });
it('parse every translation file as valid JSON', function () {
function parseTranslationTree (dirPath) {
fs.readdirSync(dirPath, { withFileTypes: true }).forEach(function(entry) {
var entryPath = path.join(dirPath, entry.name);
if (entry.isDirectory()) {
parseTranslationTree(entryPath);
return;
}
if (path.extname(entry.name) === '.json') {
JSON.parse(fs.readFileSync(entryPath, 'utf8'));
}
});
}
parseTranslationTree(path.join(__dirname, '..', 'translations'));
});
}); });
-1
View File
@@ -704,5 +704,4 @@
"Weak API_SECRET detected. Please use a mix of small and CAPITAL letters, numbers and non-alphanumeric characters such as !#%&/ to reduce the risk of unauthorized access. The minimum length of the API_SECRET is 12 characters.": "Detectada API_SECRET débil. Por favor, utilice una mezcla de letras en minúscula y en mayúscula, números y caracteres no alfanuméricos como !#%&/ para reducir el riesgo de acceso no autorizado. La longitud mínima de la API_SECRET es de 12 caracteres.", "Weak API_SECRET detected. Please use a mix of small and CAPITAL letters, numbers and non-alphanumeric characters such as !#%&/ to reduce the risk of unauthorized access. The minimum length of the API_SECRET is 12 characters.": "Detectada API_SECRET débil. Por favor, utilice una mezcla de letras en minúscula y en mayúscula, números y caracteres no alfanuméricos como !#%&/ para reducir el riesgo de acceso no autorizado. La longitud mínima de la API_SECRET es de 12 caracteres.",
"less than 1": "menos de 1", "less than 1": "menos de 1",
"MongoDB password and API_SECRET match. This is a really bad idea. Please change both and do not reuse passwords across the system.": "La contraseña de MongoDB y la API_SECRET coinciden. Esto es una muy mala idea. Por favor, cambie ambas contraseñas y no reutilice contraseñas en el sistema." "MongoDB password and API_SECRET match. This is a really bad idea. Please change both and do not reuse passwords across the system.": "La contraseña de MongoDB y la API_SECRET coinciden. Esto es una muy mala idea. Por favor, cambie ambas contraseñas y no reutilice contraseñas en el sistema."
"virtAsstLaunch":"¿Qué quieres saber de Nightscout?"
} }