Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Localization PR #231

Merged

Conversation

Jerry23011
Copy link
Collaborator

Changes

  • Added Canadian English Localization

@tisfeng
Copy link
Owner

tisfeng commented Nov 19, 2023

离谱,不看不知道,English 居然有这么多变种?请问它们之间变化大吗?能否简单举几个示例

image

@Jerry23011
Copy link
Collaborator Author

个人觉得不会特别大,加拿大的英语和英国的拼写基本一样,几个比较典型的例子:

US CA
Center Centre
Color Colour
Check Cheque
Favorite Favourite
Theater Theatre
Organizer Organiser
Canceled Cancelled

@Jerry23011
Copy link
Collaborator Author

离谱,不看不知道,English 居然有这么多变种?请问它们之间变化大吗?能否简单举几个示例

Apple 这里还提供了 English (China mainland),真的不知道我们的 English 是怎么变的 😂

@tisfeng
Copy link
Owner

tisfeng commented Nov 19, 2023

个人觉得不会特别大,加拿大的英语和英国的拼写基本一样,几个比较典型的例子:

US CA
Center Centre
Color Colour
Check Cheque
Favorite Favourite
Theater Theatre
Organizer Organiser
Canceled Cancelled

变化不大,看起来一般的英语大家应该都能认识。

@Jerry23011
Copy link
Collaborator Author

变化不大,看起来一般的英语大家应该都能认识。

是的,能想到这个主要是因为之前参与的一个项目有人提到了这点😄
Dimillian/IceCubesApp#498 (comment)

@tisfeng
Copy link
Owner

tisfeng commented Nov 19, 2023

仔细想了一下,发现不妥,有些东西之前我没考虑周到。

第一,目前项目中获取系统偏好语言的方法,只能处理常规的语言种类设置,不支持 en_ca 这种变种语言,可能会导致问题。

第二,目前设置页的 UI 实现方式不太好,这个布局和系统语言有关联,因为不同语言 label 显示的文本长度不一样,会导致窗口宽度也不一样。

第二点尤其麻烦,如果要支持其他语言,这里的代码需要变动,会难以维护。

image
image image

@tisfeng
Copy link
Owner

tisfeng commented Nov 19, 2023

因此,目前本地化暂时只能添加繁体中文。在代码中,繁体中文被我归纳到“中文”类了,只要对应的文本和简体中文长度保持一致,应该就能很好适配布局。

其他语言的适配,需要等 @Kyle-Ye 重写设置页后 #212 再来做。

@Jerry23011
Copy link
Collaborator Author

我邀请了几个小伙伴(韩语、俄罗斯语、和捷克语),他们说这周来看看

如果都翻译完了可以先开着 PR等等,适配工作完了再merge,毕竟本地化的改动并没有那么大

@tisfeng
Copy link
Owner

tisfeng commented Nov 20, 2023

这样也可以。

@tisfeng
Copy link
Owner

tisfeng commented Nov 20, 2023

请将修改一下提交分支 #228 (comment)

@Jerry23011 Jerry23011 changed the base branch from dev to localization November 20, 2023 16:03
@tisfeng tisfeng merged commit a6c3db1 into tisfeng:localization Nov 20, 2023
2 checks passed
@Jerry23011
Copy link
Collaborator Author

过几个小时我修改一下文档,更新一下提交分支

@Jerry23011 Jerry23011 deleted the localization-canadian-english branch November 20, 2023 16:14
@tisfeng tisfeng mentioned this pull request Aug 23, 2024
2 tasks
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