chore: 清理根目录冗余文件(翻译工具/旧脚本/调试文件/截图等)
删除约50个文件: - 翻译/i18n工具 21个(cjk_*、extract_*、apply_*等) - 部署脚本 3个(build_and_push、deploy) - 诊断调试文件 15个(check_*、query_*、db_output等) - 旧截图 1个 - 杂项配置文件 3个(.antigravityrules .cursorrules tm_schema.txt) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const translationsPath = path.join('d:', 'workspace', 'AuraK', 'web', 'utils', 'translations.ts');
|
||||
let content = fs.readFileSync(translationsPath, 'utf8');
|
||||
|
||||
// Fix the specific syntax error first: key: , -> key: "key",
|
||||
const lines = content.split('\n');
|
||||
const fixedLines = lines.map(line => {
|
||||
const match = line.match(/^(\s+)(["']?[a-zA-Z0-9_-]+["']?):\s*,/);
|
||||
if (match) {
|
||||
const indent = match[1];
|
||||
const key = match[2].replace(/['"]/g, '');
|
||||
return `${indent}${match[2]}: "${key}",`;
|
||||
}
|
||||
return line;
|
||||
});
|
||||
|
||||
fs.writeFileSync(translationsPath, fixedLines.join('\n'), 'utf8');
|
||||
console.log('Fixed empty values in translations.ts!');
|
||||
Reference in New Issue
Block a user