Skip to content

I18n support#306

Open
jianghannan wants to merge 5 commits intoopenscopeproject:masterfrom
jianghannan:i18n-support
Open

I18n support#306
jianghannan wants to merge 5 commits intoopenscopeproject:masterfrom
jianghannan:i18n-support

Conversation

@jianghannan
Copy link

I added multi-language support to this software and added Chinese translation, please review

@qu1ck
Copy link
Member

qu1ck commented Jan 7, 2026

This looks promising and mostly aligns with what I had in mind for adding i18n support.

There are some issues however and I don't want to go into all the details right now because I have a rather large refactoring coming up related to upgrading to latest version of Mantine lib and this PR will have to wait for it and be rebased on top of it when it's ready.

In the meantime I will point out some larger things that need to be fixed:

  1. Don't use local storage, only the config. Tighten the type of config.values.app.language to only available language (or undefined) instead of string and use only that.
  2. Don't import i18n in index.tsx, it balloons the initial bundle load time. Load it and init in in app.tsx.
  3. Don't add a localized readme, I will not be able to maintain it and it's guaranteed to get out of sync very soon. glossary.md seems useful but it probably should be glossary.zh-CN.md.
  4. Use i18next v4 format for json files and up to date plural suffixes.

You can fix the above now or when I ping this thread about completion of the mantine update and you can fix them after a rebase.

@qu1ck
Copy link
Member

qu1ck commented Jan 7, 2026

Also just FYI there is a somewhat recent effort that also added Chinese (traditional and simplified) as well as Russian translation in this fork https://github.com/ManuZhu0728/TrguiNG/blob/master/src/i18n.ts
I have not looked into that implementation for details as I didn't get a PR from them but you may use it as a source for ideas/translations if needed.

1.remove local storage items related to i18n
2.move i18n init to app component
3.fix interface panel form field handling for array fields
4.remove readme.zh-CN.md
5.Add Traditional Chinese (zh-Hant) localization for application strings and UI elements
@jianghannan
Copy link
Author

Some revisions. Please review.

jianghannan and others added 2 commits January 7, 2026 17:33
…coverage checker

Major changes:

Add check-i18n-coverage.js script to verify translation completeness across locale files
Core i18n improvements:
Replace PriorityStrings with PriorityTranslationKeys for dynamic priority text translation
Add translation support for details panel tabs via labelRenderer prop
Implement localized country names in peers table using Intl.DisplayNames
Convert hardcoded strings to translation keys (torrent status, peer status, encryption state, etc.)

Translation file updates:
Add translation keys: torrent.status.sequential, torrent.files.mixed, peer status keys
Standardize magnet link copy text with plural forms (copyMagnet_one/copyMagnet_other)
Translate "Tracker" as "索引服务器" in Chinese locales
Add tracker announce state translations (updating, working)

Glossary updates:
Add peer status terminology (optimistic unchoke, can download, incoming/outgoing, etc.)
Fix table alignment formatting
This improves translation consistency and prepares the codebase for better multilingual support.
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.

2 participants