Appearance
i18n Check
Run missing-key scan
bash
node -e "
const fs = require('fs');
const base = '/Users/d/Developer/arxiv-mcp-server-fe977e538dc24bb2da937c6c9e48febb54083226/frontend/src/i18n/locales';
const en = JSON.parse(fs.readFileSync(base + '/en.json', 'utf8'));
const locales = ['zh-TW', 'zh-CN', 'vi', 'hi', 'ar', 'el'];
let totalMissing = 0;
locales.forEach(l => {
const t = JSON.parse(fs.readFileSync(base + '/' + l + '.json', 'utf8'));
const missing = Object.keys(en).filter(k => !(k in t));
if (missing.length) {
console.log('\n' + l + ' (' + missing.length + ' missing):');
missing.forEach(k => console.log(' ' + k + ': \"' + en[k] + '\"'));
totalMissing += missing.length;
}
});
if (totalMissing === 0) console.log('All locales complete!');
else console.log('\nTotal missing: ' + totalMissing);
"After identifying missing keys
- For English-safe placeholders (non-user-facing), copy EN value to missing locales
- For user-facing strings, flag for human translation
- Add missing keys to all locale files — always keep all 7 in sync
- Reference:
docs/guides/I18N_GUIDE.mdfor locale file structure
Check for hardcoded strings (not using t())
bash
grep -r 'className\|return (' frontend/src/pages/ --include="*.tsx" -l | head -10 | xargs grep -L "useTranslation\|t(" 2>/dev/null