Skip to content

Complete missing Chinese translation keys#52

Open
XXXBusy wants to merge 1 commit into
kryptokrona:masterfrom
XXXBusy:fix/zh-translation-complete-13
Open

Complete missing Chinese translation keys#52
XXXBusy wants to merge 1 commit into
kryptokrona:masterfrom
XXXBusy:fix/zh-translation-complete-13

Conversation

@XXXBusy

@XXXBusy XXXBusy commented May 14, 2026

Copy link
Copy Markdown

Refs #13

Summary

  • Completes the missing Simplified Chinese translation keys in src/i18n/translations/zh.json
  • Adds translations for theme color, XKR buy/sell, node picker labels, splash words, reaction hint, and feed unread-message labels
  • Keeps the existing Chinese translation file structure unchanged

Verification

node - <<'NODE'
const fs=require('fs');
const base='src/i18n/translations';
function loadJsonc(file){
  let s=fs.readFileSync(file,'utf8');
  s=s.replace(/^\s*\/\/.*$/mg,'');
  s=s.replace(/,\s*\/\/[^\n]*/g, ',');
  s=s.replace(/"\s*\/\/[^\n]*/g, '"');
  return JSON.parse(s);
}
function placeholders(value){
  return [...String(value).matchAll(/{{\s*([^}]+?)\s*}}/g)].map(m=>m[1].trim()).sort();
}
const en=loadJsonc(`${base}/en.json`);
const zh=JSON.parse(fs.readFileSync(`${base}/zh.json`,'utf8'));
const enKeys=Object.keys(en);
const zhKeys=Object.keys(zh);
const missing=enKeys.filter(k=>!(k in zh));
const extra=zhKeys.filter(k=>!(k in en));
const placeholderMismatch=enKeys.filter(k=>k in zh && JSON.stringify(placeholders(en[k])) !== JSON.stringify(placeholders(zh[k])));
console.log(JSON.stringify({en:enKeys.length, zh:zhKeys.length, missing, extra, placeholderMismatch}, null, 2));
if (missing.length || extra.length || placeholderMismatch.length) process.exit(1);
NODE

Result:

{
  "en": 139,
  "zh": 139,
  "missing": [],
  "extra": [],
  "placeholderMismatch": []
}

Translation note

The Chinese lines were reviewed for app context before submission.

XKR address

SEKReYxQRcuPYYXgPbGq9oZsEX87oawWUTjdSY5dJ5n6QUw3PTqwJGudF3cMpEup7SVj69D2QvJK4RGKegRjJUZdfQsEr8yvkdr9a00dbd98be5fcf3c1ec4f88f16351d30f96ddf4f056ade9d226ccc78173a507

@XXXBusy

XXXBusy commented May 15, 2026

Copy link
Copy Markdown
Author

Validation update:

  • Ran a translation key parity check against en.json.
  • enKeys: 139, zhKeys: 139.
  • Missing keys: none.
  • Extra keys: none.

Note on newMessage / newMessages: Chinese does not need a different suffix here because the UI already renders the count before the translated string, so both become natural output like 1 条新消息 and 2 条新消息.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant