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

feat(i18n): add Simplified Chinese for i18n #154

Merged
merged 8 commits into from
Jul 21, 2022
Merged

feat(i18n): add Simplified Chinese for i18n #154

merged 8 commits into from
Jul 21, 2022

Conversation

AuroraTea
Copy link
Contributor

Added Simplified Chinese support, using two-letter locale code according to README.md. However, it should be noted that this will result in Traditional Chinese and even various regions of Simplified Chinese and Traditional Chinese not being represented. My suggestion is to use zh_CN and zh_TW and so on with regional abbreviations after the two-letter locale code to distinguish them.

Added Simplified Chinese support, using two-letter locale code according to README.md. However, it should be noted that this will result in Traditional Chinese and even various regions of Simplified Chinese and Traditional Chinese not being represented. My suggestion is to use zh_CN and zh_TW and so on with regional abbreviations after the two-letter locale code to distinguish them.
@antonreshetov
Copy link
Member

@AuroraTea Thanks! Good point. What code should be used for this PR?

@AuroraTea
Copy link
Contributor Author

@antonreshetov zh_CN~
It is important to note that the CN and TW here are regional abbreviations rather than national abbreviations~

@antonreshetov
Copy link
Member

@antonreshetov zh_CN~ It is important to note that the CN and TW here are regional abbreviations rather than national abbreviations~

Thanks

"button": {
"moveStorage": "移动存储位置",
"openStorage": "打开对应路径",
"fromMassCodeV1": "来自massCode v1.0",
Copy link
Member

Choose a reason for hiding this comment

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

Here where there is untranslated text and then where there are variables it looks like there are no spaces. Is it supposed to be like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Untranslated text here is Name of Software. And there is no space between Chinese words. The use of spaces between Chinese and English is also a controversial issue in our country. The mainstream view is that the space is too wide, I agree with this view. The font renderer of the general system will automatically generate a (blank?I don't know how to say it, it seems to be called space too...) smaller than the space.

Copy link
Member

Choose a reason for hiding this comment

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

I understood about the combination of Chinese and English words and their space. But still, as it seems to me, the issue with variables remains, both numbers and Chinese words can be substituted into the variables. How to be in this case? Does the same rule apply?

Copy link
Member

Choose a reason for hiding this comment

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

PR #155 has spaces in it.

Copy link
Contributor Author

@AuroraTea AuroraTea Jul 21, 2022

Choose a reason for hiding this comment

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

PR #155 has spaces in it.

😄That's why I said "The use of spaces between Chinese and English is also a controversial issue in our country. "

By variables do you mean Russian syntax or programming syntax, I'm not quite sure what variables means in this context.

I was dissuaded by you I also think we should add spaces. At least try adding spaces first, and we can rediscuss if gap is too big.

Copy link
Contributor

Choose a reason for hiding this comment

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

其实这个争论和花括号换不换行有些类似 😀

Copy link
Member

Choose a reason for hiding this comment

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

I trust your choice, as you are a native speaker. I just wanted more understanding for myself in this matter.

Copy link
Member

Choose a reason for hiding this comment

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

In general, I would leave the spaces as they are really more aesthetically pleasing to me. But the choice is still up to the author of the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sangyuxiaowu

我知道哈哈哈,中英文之间是应该有空隙的。但是主要是这个空隙其实应该由排版系统提供而非手工输入空格,可以参考Office Word。手工的空格往往太大了,然而令人悲伤的是,web前端好像就没有很好的处理方法哇咔咔

Copy link
Contributor Author

@AuroraTea AuroraTea Jul 21, 2022

Choose a reason for hiding this comment

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

I just wanted more understanding for myself in this matter.

Learn Chinese and tease Evan You!

"error": {
"folderNotContainDb": "文件夹内不存在 \"db.json\"."
},
"unsponsored": "未赞助的",
Copy link
Contributor

Choose a reason for hiding this comment

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

这个地方我本来想翻译为“下次一定”,我以为是对话框的按钮,但是看到显示的位置有些微妙 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我也觉得有点微妙就暂时直译了。
我觉得你的那个创建副本翻译的太好了。我是按照macOS的访达的逻辑翻译成复制的,而且同一个右键菜单里面没有copy就不会混淆——但是访达这个拷贝和复制我第一次遇到就懵逼哈哈,你的创建副本好太多。

Copy link
Contributor

Choose a reason for hiding this comment

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

我也觉得有点微妙就暂时直译了。 我觉得你的那个创建副本翻译的太好了。我是按照macOS的访达的逻辑翻译成复制的,而且同一个右键菜单里面没有copy就不会混淆——但是访达这个拷贝和复制我第一次遇到就懵逼哈哈,你的创建副本好太多。

“创建副本”是想了很久才想起来这个最合适。不过,不清楚他能不能 get 到“下次一定” 😁

Copy link
Contributor

Choose a reason for hiding this comment

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

“下次一定” Direct translation is ‘’next time definitely‘’.
Chinese internet buzzwords, A video site from bilibili. It is said that a certain UP owner prayed to the audience for three tasks at the end of the video (like, coin, and favorite), and one audience posted "下次一定". Because there are many UP masters praying for, the audience finds this polite remark very useful. Therefore, everyone often hits "下次一定" on the barrage to deal with it perfectly, save the face of both parties, and then continue to hit "下次一定" next time.
We commonly call this type of friends "white whore monsters". Of course, there will be many people who will meet the request of the UP master.

Copy link
Member

Choose a reason for hiding this comment

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

@sangyuxiaowu I can't translate or make sense of it. Are you amused by the fact that it says "Unsponsored" in the app? )

Copy link
Contributor

Choose a reason for hiding this comment

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

@sangyuxiaowu I can't translate or make sense of it. Are you amused by the fact that it says "Unsponsored" in the app? )

Of course not, it's not funny, just for translation. Open source has helped everyone, and everyone should provide support and help for you. Later, I will continue to help you promote the project in the Chinese community, so that more people can understand and help the project do better.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sangyuxiaowu I can't translate or make sense of it. Are you amused by the fact that it says "Unsponsored" in the app? )

I'm sorry to make you misunderstand. It is indeed a social phenomenon that people are unwilling to pay. My words are also translated. With cultural differences, the misunderstanding may be deeper.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the understanding and support

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sangyuxiaowu 说起来这个显示在哪里 我一直没找到

"line": "行",
"column": "列",
"sidebar": {
"inbox": "收件箱",
Copy link
Contributor

Choose a reason for hiding this comment

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

收件箱这个感觉翻译上也有些困难,inbox 是个俚语,我们没有这个类似的表述,原本想翻译“未分类”,但是也不清楚功能设计上是不是这样。

Copy link

@EGQM EGQM Jul 21, 2022

Choose a reason for hiding this comment

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

@sangyuxiaowu 我昨晚也在翻译这个,后来看已经有相关RP了。我觉得这个inbox,或许叫“暂存区”,“导入暂存区”,或“工作暂存区”。

Copy link
Contributor

Choose a reason for hiding this comment

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

@sangyuxiaowu 我昨晚也在翻译这个,后来看已经有相关RP了。我觉得这个inbox,或许叫“暂存区”,“导入暂存区”,或“工作暂存区”。

嗯,确实。我同意“暂存区”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

昨天我对这个也纠结了很久,我还以为作者有插件可以直接从浏览器发到massCode所以叫收件箱哈哈哈哈哈

Copy link

Choose a reason for hiding this comment

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

@AuroraTea 这个俄文的翻译是“导入”,再根据inbox的英文翻译,大致的意思,这个文件夹就是存储待处理数据的,所以“暂存区”就是比较贴切的翻译

Copy link

Choose a reason for hiding this comment

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

我参考的cubox,我认为这里翻译为“收集箱”也是合适的

Copy link
Contributor

Choose a reason for hiding this comment

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

我参考的cubox,我认为这里翻译为“收集箱”也是合适的

是的,也挺好。让我想起小时候到处抄录的文章段落,叫什么“采蜜集”,哈哈

Copy link

Choose a reason for hiding this comment

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

我觉得大多数人能快速理解的表述更好,使用masscode的人基本上都会git,而git中就这个“暂存区”的叫法。属于一个准备确定收录的状态。当然了,这是我个人的理解,看大家最后的决定

"storage": {
"label": "存储",
"migrate": "迁徙",
"count": "计数"
Copy link

Choose a reason for hiding this comment

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

建议改为“总计”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实!

"rename": "重命名",
"duplicate": "复制",
"delete": "删除",
"deleteNow": "现在删除",
Copy link

Choose a reason for hiding this comment

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

建议改为“立即删除”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实!

Copy link

Choose a reason for hiding this comment

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

这么说来 叫 马上删 也可以 哈哈哈 虽然太口语了

"column": "列",
"sidebar": {
"inbox": "收件箱",
"favorites": "收藏",
Copy link

Choose a reason for hiding this comment

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

建议统一翻译为“收藏夹”

"title": "首选项",
"storage": {
"label": "存储",
"migrate": "迁徙",
Copy link

Choose a reason for hiding this comment

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

建议改为“数据导入”,或“数据迁移”,迁徙一般用于动物

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实!说得好!

{
"button": {
"moveStorage": "移动存储位置",
"openStorage": "打开对应路径",
Copy link

Choose a reason for hiding this comment

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

建议改为“打开当前存储路径”,这样表述更明确

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这是两个并列的按钮,所以感觉字数一样比较好,而且打开对应存储路径作为按钮太长了。这个地方其实挺奇怪的,因为路径的位置只有一个,却有两个按钮,虽然针对的对象不一样,但是感觉功能是重叠的

Copy link
Contributor

Choose a reason for hiding this comment

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

功能不是重叠的,我昨晚是一边试用,一边找资料比对翻译的。这个一个是将之前的存储位置的文件移动走,一个是打开一个其他的存储位置,如果打开的位置么有db.json会报错的

Copy link

Choose a reason for hiding this comment

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

@antonreshetov 其实疑惑的时候,可以看看俄文的翻译,对照英文,就会八九不离十

Copy link

Choose a reason for hiding this comment

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

折衷一下,觉得“打开当前路径”也比较好

Copy link
Member

Choose a reason for hiding this comment

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

@EGQM The actions of the buttons are based on one thing - open path, but the functions are different, the first moves the database to the specified path, the second opens the database from the specified path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这就是为什么我觉得其实功能是重叠的哈哈,这不是可以做成一个“浏览”嘛,如果选中的路径没有db文件就是把现在的db文件移动过去,有就是打开那个db文件。或者后者是“打开”,前者是“浏览”,我一开始就在想这个(指浏览-打开)

Copy link

Choose a reason for hiding this comment

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

@antonreshetov 3Q!
@antonreshetov 我看作者的意思也就是“切换存储路径”的意思,如果我没有理解错误的话。

Copy link
Member

Choose a reason for hiding this comment

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

Once again, I would like to make it clear.

  • The first button "Move Storage" moves the current DB to the specified path. Simply move, for example, you want to move to Dropbox, etc.
  • The second "Open Storage" opens the DB on the specified path. That is, in theory, you can have many databases and you just open what you need.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I understand it right.

"view": {
"label": "查看",
"sortBy": {
"label": "排序片段",
Copy link

Choose a reason for hiding this comment

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

建议改为“排序方法”

Copy link
Contributor

Choose a reason for hiding this comment

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

建议改为“排序方法”

“排序方式” 好些。可以参考下我的提交,在 window 桌面右键,你会发现。

Copy link

Choose a reason for hiding this comment

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

@sangyuxiaowu 我用ubuntu22.04,一般不开启windows ^_^

Copy link
Contributor

Choose a reason for hiding this comment

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

@sangyuxiaowu 我用ubuntu22.04,一般不开启windows ^_^

好吧,ubuntu22.04 的文件夹里叫 “排序”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我觉得排序方式和排序都好,排序方法确实不如排序方式。不过我当时就是按照排序这个词去加上snippet的(因为英文里有)

Copy link

Choose a reason for hiding this comment

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

都可以,按我的理解,程序员嘛,就是排序函数(方法),哈哈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

哈哈哈哈哈哈,我其实就是因为这样所以觉得用户层view不应该出现方法这个词哈哈哈

Copy link

@EGQM EGQM Jul 21, 2022

Choose a reason for hiding this comment

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

@AuroraTea 前端和后端的不同视角,哈哈

},
"newFolder": "新建文件夹",
"newSnippet": "新建代码片段",
"newFragment": "新建子片段",
Copy link

Choose a reason for hiding this comment

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

考虑是否把Snippet翻译为代码块,而Fragment范围为代码片段。昨晚我纠结了好久,这两个单词它们是近义词。话说,“子”字也体现了他们之间的大小和关系。实际上,我到现在也没搞懂,怎么使用Fragment

Copy link
Contributor

Choose a reason for hiding this comment

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

这个主要是为了显示css和html。在其他语言中,也可以作为类,和这个类的使用案例。当然也可以作为文件名字

Copy link

Choose a reason for hiding this comment

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

@sangyuxiaowu 悲催的是,我不是前端,一下子get不到用途。怎么在vs code使用某个Snippet下的某个Fragment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不能叫代码块哦,代码块专指{}这种,用来区分作用域的。

Copy link

Choose a reason for hiding this comment

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

恩。

Copy link
Contributor

Choose a reason for hiding this comment

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

我全栈还好,学的比较杂。前后端,嵌入式,AI 都有些许涉猎。

Copy link

Choose a reason for hiding this comment

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

@sangyuxiaowu 我有软件工程师证,但我没有从事这个行业。前端的知识基本上用不上 ^_^

@antonreshetov
Copy link
Member

@AuroraTea I would like to do a new release today. Can I expect the translation to be ready today so I can include it in the release?

@sangyuxiaowu
Copy link
Contributor

sangyuxiaowu commented Jul 21, 2022

@AuroraTea I would like to do a new release today. Can I expect the translation to be ready today so I can include it in the release?

I'm free now, maybe I can pull his branch and commit the changes?
It doesn't seem to have this feature.

@antonreshetov
Copy link
Member

@AuroraTea I would like to do a new release today. Can I expect the translation to be ready today so I can include it in the release?

I'm free now, maybe I can pull his branch and commit the changes? It doesn't seem to have this feature.

It doesn't make any difference to me. I just don't want to offend anyone.

@sangyuxiaowu
Copy link
Contributor

@AuroraTea I would like to do a new release today. Can I expect the translation to be ready today so I can include it in the release?

I'm free now, maybe I can pull his branch and commit the changes? It doesn't seem to have this feature.

It doesn't make any difference to me. I just don't want to offend anyone.

@AuroraTea I would like to do a new release today. Can I expect the translation to be ready today so I can include it in the release?

I'm free now, maybe I can pull his branch and commit the changes? It doesn't seem to have this feature.

It doesn't make any difference to me. I just don't want to offend anyone.

@AuroraTea He doesn't seem to be in front of the computer.
If you are in a hurry, you can merge this PR first, and then I will pull the main branch to modify the translation inappropriate places. It's about ten minutes.

@AuroraTea
Copy link
Contributor Author

@sangyuxiaowu @antonreshetov I'm already in front of the computer hahahahahaha, I've got everything else done, just still struggling with the space thing.

@sangyuxiaowu 主要是如果用空格的话,i18n的{{name}}两边也得空格,那如果name是中文的话就会导致中文和中文间也有空格,所以很纠结。别的已经按照讨论结果弄好了吼吼

@sangyuxiaowu
Copy link
Contributor

@sangyuxiaowu @antonreshetov I'm already in front of the computer hahahahahaha, I've got everything else done, just still struggling with the space thing.

@sangyuxiaowu 主要是如果用空格的话,i18n的{{name}}两边也得空格,那如果name是中文的话就会导致中文和中文间也有空格,所以很纠结。别的已经按照讨论结果弄好了吼吼

我也在等着使用新的版本,搞快点 😁

{
"deleteConfirm": "你是否确定要永久删除{{name}}?",
"deleteConfirmMultipleSnippets": "你是否确定要永久删除{{count}}个选中的代码片段?",
"noUndo": "你将无法恢复此次操作造成的结果。",
Copy link

Choose a reason for hiding this comment

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

建议翻译为“这个操作是不可撤销的。”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实!

"deleteConfirmMultipleSnippets": "你是否确定要永久删除{{count}}个选中的代码片段?",
"noUndo": "你将无法恢复此次操作造成的结果。",
"allSnippetsMoveToTrash": "本文件夹内的所有代码片段将被移动至回收站。",
"deleteTag": "这也将导致所有拥有该标签的代码片段的失去该标签。",
Copy link

Choose a reason for hiding this comment

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

我的翻译版本为"将会从所有片段中删除该标签。",不确定我这样翻译是否合适,供你参考。

"off": "关闭"
},
"tabSize": "Tab空格数",
"showInvisibles": "显示缩进参考线",
Copy link

Choose a reason for hiding this comment

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

这里不是很准确,这里应该是“显示编辑标记”,可以参考word,包括换行符、制表符等。
但我认为这里如果单纯的使用“编辑标记”可能是相对晦涩的,考虑到massCode里面tab会被替换为两个空格,所以这个开关仅控制是否“显示空格与换行符”。
供参考。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实!我才发现换行符也有,并且不是缩进的空格也有!你说得对!

@EGQM
Copy link

EGQM commented Jul 21, 2022

@AuroraTea @antonreshetov is the new release coming tonight?

@antonreshetov
Copy link
Member

@sangyuxiaowu @antonreshetov I'm already in front of the computer hahahahahaha, I've got everything else done, just still struggling with the space thing.

@sangyuxiaowu 主要是如果用空格的话,i18n的{{name}}两边也得空格,那如果name是中文的话就会导致中文和中文间也有空格,所以很纠结。别的已经按照讨论结果弄好了吼吼

Okay, so I can merge this?

@antonreshetov
Copy link
Member

@AuroraTea @antonreshetov is the new release coming tonight?

As soon as I merge this PR I will make a new release.

@AuroraTea
Copy link
Contributor Author

@antonreshetov Hold on a second right away right away, I haven't submitted the changes we discussed yet.

@antonreshetov
Copy link
Member

@antonreshetov Hold on a second right away right away, I haven't submitted the changes we discussed yet.

Sure.

@AuroraTea AuroraTea changed the title feat: add Simplified Chinese for i18n feat(i18n): add Simplified Chinese for i18n Jul 21, 2022
@AuroraTea
Copy link
Contributor Author

@antonreshetov I have done! You can merge this PR! Looking forward to the new version!

@antonreshetov
Copy link
Member

Thank you! I just merged the #159. In it I added the tooltips. It added 3 new locales. Please translate them also 🙏

@antonreshetov antonreshetov merged commit 843b91d into massCodeIO:master Jul 21, 2022
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.

None yet

6 participants