Skip to content

🌐 Comprehensive AST-Based English Localization - #124

Open
kliffdafunkfacekilla-arch wants to merge 1 commit into
ExplosiveCoderflome:mainfrom
kliffdafunkfacekilla-arch:feature/english-localization
Open

🌐 Comprehensive AST-Based English Localization#124
kliffdafunkfacekilla-arch wants to merge 1 commit into
ExplosiveCoderflome:mainfrom
kliffdafunkfacekilla-arch:feature/english-localization

Conversation

@kliffdafunkfacekilla-arch

Copy link
Copy Markdown

This PR introduces a massive, nearly 100% complete English translation of the AI Novel Writing Assistant v2 codebase.

Previously, large portions of the UI (such as menus, tooltips, and deep settings pages) remained in Chinese because they were deeply nested inside React components where standard regex find-and-replace tools would fail or break the syntax.

To solve this, we used a robust AST parser (ts-morph) combined with the Google Translate API to systematically extract and translate 3,042 hidden string literals and JSX Text nodes across ~307 files.

What was changed:

  • Safely translated thousands of hardcoded Chinese strings to English across all React components, hooks, and shared utilities.
  • Used an Abstract Syntax Tree (AST) approach to ensure that the code identifiers, logic, and component structures remained perfectly intact.
  • Maintained the integrity of complex JSX structures (4 particularly complex files were intentionally skipped to ensure build stability).

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