update locales

Signed-off-by: vladmandic <mandic00@live.com>
pull/4706/head^2
vladmandic 2026-03-24 09:50:38 +01:00
parent 14c3cf9172
commit acf475ee45
3 changed files with 1690 additions and 1628 deletions

File diff suppressed because it is too large Load Diff

View File

@ -135,6 +135,8 @@ import pydantic # pylint: disable=W0611,C0411
timer.startup.record("pydantic")
try:
# transformers==5.x has different dependency stack so switching between v4 and v5 becomes very painful
# this temporarily disables dependency version checks so we can use either v4 or v5 until we drop support for v4
fake_version_check = types.ModuleType("transformers.dependency_versions_check")
sys.modules["transformers.dependency_versions_check"] = fake_version_check # disable transformers version checks
fake_version_check.dep_version_check = lambda pkg, hint=None: None

55
test/reformat.js Normal file
View File

@ -0,0 +1,55 @@
const fs = require('fs');
/**
* Custom stringifier that switches to minified format at a specific depth
*/
const mixedStringify = (data, maxDepth, indent = 2, currentDepth = 0) => {
if (currentDepth >= maxDepth) {
return JSON.stringify(data);
}
const spacing = ' '.repeat(indent * currentDepth);
const nextSpacing = ' '.repeat(indent * (currentDepth + 1));
if (Array.isArray(data)) {
if (data.length === 0) return '[]';
const items = data.map((item) => nextSpacing + mixedStringify(item, maxDepth, indent, currentDepth + 1));
return `[\n${items.join(',\n')}\n${spacing}]`;
}
if (typeof data === 'object' && data !== null) {
const keys = Object.keys(data);
if (keys.length === 0) return '{}';
const items = keys.map((key) => {
const value = mixedStringify(data[key], maxDepth, indent, currentDepth + 1);
return `${nextSpacing}"${key}": ${value}`;
});
return `{\n${items.join(',\n')}\n${spacing}}`;
}
return JSON.stringify(data);
};
// Capture CLI arguments
const [,, inputFile, outputFile, maxDepth] = process.argv;
console.log(`Input File: ${inputFile}, Output File: ${outputFile}, Max Depth: ${maxDepth}`);
if (!inputFile || !outputFile || !maxDepth) {
console.log('Usage: node reformat.js <input.json> <output.json> <depth>');
process.exit(1);
}
try {
// Read input file
const rawData = fs.readFileSync(inputFile, 'utf8');
const jsonData = JSON.parse(rawData);
// Reformat with mixed depth
const result = mixedStringify(jsonData, parseInt(maxDepth, 10));
// Write output file
fs.writeFileSync(outputFile, result);
console.log(`Success! File saved to ${outputFile} (levels expanded: ${maxDepth})`);
} catch (err) {
console.error('Error processing JSON:', err.message);
}