Skip to content

Run a deep key-drift check between the two locale files:

bash
cd /Users/d/Developer/arxiv-mcp-server-fe977e538dc24bb2da937c6c9e48febb54083226/frontend/src/i18n/locales && node -e "
function flatKeys(obj, prefix) {
  prefix = prefix || '';
  return Object.entries(obj).flatMap(function(entry) {
    var k = entry[0], v = entry[1];
    var full = prefix ? prefix+'.'+k : k;
    return (typeof v === 'object' && v !== null && !Array.isArray(v))
      ? flatKeys(v, full)
      : [full];
  });
}
var en = flatKeys(require('./en.json'));
var tw = flatKeys(require('./zh-TW.json'));
var missingInTW = en.filter(function(k){ return !tw.includes(k); });
var extraInTW   = tw.filter(function(k){ return !en.includes(k); });
console.log('EN keys: ' + en.length + '  |  TW keys: ' + tw.length);
if (missingInTW.length) {
  console.log('\nMissing in zh-TW (' + missingInTW.length + '):');
  missingInTW.forEach(function(k){ console.log('  ' + k); });
}
if (extraInTW.length) {
  console.log('\nExtra in zh-TW not in en (' + extraInTW.length + '):');
  extraInTW.forEach(function(k){ console.log('  ' + k); });
}
if (!missingInTW.length && !extraInTW.length) console.log('\nāœ… All keys in sync!');
"

After reporting the drift, ask the user:

  • For missing in zh-TW: add placeholder values (copy EN value) so the app does not show raw keys
  • For extra in zh-TW: remove stale keys from zh-TW.json

Always ask before making changes. Apply fixes with targeted Edit calls — never rewrite the whole file.

Read-only documentation bundle of the Med Tracker agent stack. AU compliance baked in (AHPRA + Privacy Act 1988 + Spam Act 2003).