Skip to content

feat: add Chinese translation and auto language detection#160

Open
x114514z wants to merge 1 commit into
Kwasow:mainfrom
x114514z:feature/chinese-translation
Open

feat: add Chinese translation and auto language detection#160
x114514z wants to merge 1 commit into
Kwasow:mainfrom
x114514z:feature/chinese-translation

Conversation

@x114514z

Copy link
Copy Markdown

🇨🇳 中文翻译支持

改动内容

  1. 完整中文翻译 ()

    • 110 条字符串完整翻译
    • 覆盖底部导航、调音器、节拍器、练习记录、设置、主题等所有模块
  2. 自动语言检测 ()

    • 检测系统语言是否为中文
    • 若是则自动切换 App 语言为中文
    • 兼容 Android 13+ Per-App Language API

翻译参考

参考了已有的捷克语(cs)、德语(de)、波兰语(pl)、葡萄牙语(pt)翻译风格。

截图

已本地编译并测试通过。

@Kwasow Kwasow left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi, thank you for the pull request! I just have one question about the applyChineseLocaleIfNeeded() function that I posted below.

* 当系统语言为中文时,将应用语言设置为中文。
* 使用 AppCompatDelegate.setApplicationLocales() 兼容 Android 13+ 及更低版本。
*/
private fun applyChineseLocaleIfNeeded() {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why is this necessary? Doesn't Android handle this automatically?

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