Skip to content

Feat/i18n - #6

Merged
mojimoon merged 4 commits into
mainfrom
feat/i18n
Aug 23, 2026
Merged

mojimoon merged 4 commits into
mainfrom
feat/i18n

Conversation

@mojimoon

Copy link
Copy Markdown
Owner

This pull request significantly expands the codebase to support full multi-language output for all game data, not just English and Chinese. It introduces a new list of supported languages, updates all data structures and effect text generation to handle all languages, and adds utilities to prune data for per-language output. The changes ensure that every relevant text field (names, effect descriptions, UI strings, etc.) is now available in all supported languages and can be efficiently reduced to a single language for frontend consumption.

Multi-language support and data structure updates:

  • Introduced LANGS (list of supported languages) and LANG_META (native language names) at the top of main.py for consistent language handling throughout the codebase.
  • All translation lookups and effect text generation now produce dictionaries keyed by every language in LANGS, rather than just 'en' and 'zh'. This affects translation loading, merged translation handling, effect text dicts, and special-case metadata. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Per-language pruning utilities:

  • Added a suite of _prune_* functions to reduce multi-language data structures to a single language, including effect texts, special metadata, weapons, items, characters, and sets. The main entry point is prune_data_for_lang, which produces a data dict containing only the selected language's text and UI strings for frontend use.

UI strings and metadata:

  • Added load_ui_strings to load per-language UI strings and integrate them into the per-language data output.
  • Ensured UI strings, section names, and tag translations are also pruned to the selected language in the final output.

Consistent multi-language naming:

  • All weapon, item, and character entries now include names for every language (e.g., name_fr, name_ja, etc.), and the pruning logic extracts only the relevant name for the selected language. [1] [2] [3] [4]

Improved translation merging logic:

  • The merged translation loader now pulls all available languages for matched entries, not just English and Chinese, by referencing the candidate rows in the game's translation CSVs. [1] [2]

These changes lay the groundwork for robust multi-language support across the entire data pipeline and frontend.

@mojimoon
mojimoon requested a lite review from Copilot August 23, 2026 04:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mojimoon

Copy link
Copy Markdown
Owner Author

@codex[agent] review this

@Codex

Codex AI commented Aug 23, 2026

Copy link
Copy Markdown

@mojimoon The model is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 0c5c5a0a-69a3-424e-a1c9-a9fe6f9d3e8d

1 similar comment
@Codex

Codex AI commented Aug 23, 2026

Copy link
Copy Markdown

@mojimoon The model is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 0c5c5a0a-69a3-424e-a1c9-a9fe6f9d3e8d

@mojimoon

Copy link
Copy Markdown
Owner Author

@copilot review this

@Codex

Codex AI commented Aug 23, 2026

Copy link
Copy Markdown

@mojimoon The model is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 0c5c5a0a-69a3-424e-a1c9-a9fe6f9d3e8d

@Codex

Codex AI commented Aug 23, 2026

Copy link
Copy Markdown

@mojimoon The model is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 0c5c5a0a-69a3-424e-a1c9-a9fe6f9d3e8d

2 similar comments
@Codex

Codex AI commented Aug 23, 2026

Copy link
Copy Markdown

@mojimoon The model is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 0c5c5a0a-69a3-424e-a1c9-a9fe6f9d3e8d

@Codex

Codex AI commented Aug 23, 2026

Copy link
Copy Markdown

@mojimoon The model is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 0c5c5a0a-69a3-424e-a1c9-a9fe6f9d3e8d

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

@copilot review this

I reviewed the current PR changes on this branch and didn’t find additional actionable issues to update in code at this time. If you want, I can do a focused pass on a specific file or behavior.

@mojimoon
mojimoon merged commit e6ddf06 into main Aug 23, 2026
1 check passed
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.

4 participants