sakura-editor / sakura

SAKURA Editor (Japanese text editor for MS Windows)
https://sakura-editor.github.io/
Other
1.23k stars 162 forks source link

中国語を追加したい #1369

Open EldersJavas opened 4 years ago

EldersJavas commented 4 years ago

中国語を追加したい issue

こんにちは、アドバイスしてください!


Sakura compatibility is great and very suitable for my current work. Therefore, my team and I hope to translate your software into Chinese.

Start: 14 Aug 2020

Target

CHS

Log

14 Aug 2020: Issue start #1369 22 Nov 2020: Install Files PR Open #1469 1 Feb 2021: #1469 Merge

connect

1469

m-tmatma commented 4 years ago

@EldersJavas feel free to ask questions.

berryzplus commented 4 years ago

@EldersJavas さん 好きなように翻訳してもらって構わないです。

言語(Language) Caption Note
英語(en-US) \&Copy to Clipboard this is common phrase(rephrased).
日本語(ja-JP) 情報をコピー(&C) this is original.
中国語(zh-CN) 复制到剪贴板(&C) this is an example.

たぶん、聞きたいことは (&C) って何? だと思うんですけど、説明しづらい概念なので訳例だけ載せてみます。

具体的に訊きたいことがあれば、気軽に書き込んでみてください。

EldersJavas commented 4 years ago

Thanks everybody.There are my questions and some uncertain answers.

1. Head File

The localization software I use will extract all quoted strings, so some header file codes are extracted.

Such as #define APSTUDIO_HIDDEN_SYMBOLS\r\n,#undef APSTUDIO_HIDDEN_SYMBOLS\r\n.

Obviously, we cannot translate it and should be locked immediately.

2. Some attributes

Such as button,msctls_updown32,SysListView32,SysListView32.

Also,we cannot translate.

3. Copyright Information

Such as Original Author: Take-san(竹パンダ) さん,

We must translate into "作者: Take-san(竹パンダ) さん",We cannot modify the words after the colon.

4. ”&“ notation

Thank you very much @berryzplus ,As you said,We should translate as Japanese instead English.

But my Japanese is not as good as English, so I temporarily use English as the source language, sry. I will definitely compare the source code and Japanese text in future translations.

5. Font and Fontstyle

This is a difficult problem.

English use Tahoma.

Japanese use MS Pゴシック.

Sorry,I don't know how to choose a suitable font.Please give me some advice about choosing.Maybe Tahoma can show Chinese,too.

My current compilation conditions cannot compile sakura correctly. So I can only wait for the translation to be completed before testing the effect.

If I have mistake, please point it out.I will change as fast as I can.

In the word,Thanks everybody.Please advise.

k-takata commented 4 years ago

Such as #define APSTUDIO_HIDDEN_SYMBOLS\r\n,#undef APSTUDIO_HIDDEN_SYMBOLS\r\n.

Right. The strings in TEXTINCLUDE part should not be translated.

Such as button,msctls_updown32,SysListView32,SysListView32.

Right. These strings don't depend on the locale. So, they should not be translated. Also SysTabControl32, msctls_trackbar32, msctls_hotkey32 and (some of) Static.

Copyright Information

Sakura Editor was originally written by Take-san, and now it is maintained by Sakura-Editor Project. That's why the string is "Original Author" instead of "Author". In Japanese, "Author" is translated as "作者", and "Original Author" is translated as "原作者". How about in Chinese?

”&“ notation

I think Chinese software also uses "&" notation in a similar way with Japanese software.

Font and Fontstyle

Maybe, "SimSun" or "NSimSun" is the default font for simplified Chinese? https://en.wikipedia.org/wiki/List_of_CJK_fonts

EldersJavas commented 4 years ago

Such as #define APSTUDIO_HIDDEN_SYMBOLS\r\n,#undef APSTUDIO_HIDDEN_SYMBOLS\r\n.

Right. The strings in TEXTINCLUDE part should not be translated.

Such as button,msctls_updown32,SysListView32,SysListView32.

Right. These strings don't depend on the locale. So, they should not be translated. Also SysTabControl32, msctls_trackbar32, msctls_hotkey32 and (some of) Static.

Copyright Information

Sakura Editor was originally written by Take-san, and now it is maintained by Sakura-Editor Project. That's why the string is "Original Author" instead of "Author". In Japanese, "Author" is translated as "作者", and "Original Author" is translated as "原作者". How about in Chinese?

”&“ notation

I think Chinese software also uses "&" notation in a similar way with Japanese software.

Font and Fontstyle

Maybe, "SimSun" or "NSimSun" is the default font for simplified Chinese? https://en.wikipedia.org/wiki/List_of_CJK_fonts

Thanks a lot.I originally thought that the current author is still Mr.Take-san.I will change it.

You are right, SimSun is the default font for Chinese,Should we pack it into software?

And,If we call the font,do we need to use SimSun or 宋体?

Thank you again.

m-tmatma commented 4 years ago

My current compilation conditions cannot compile sakura correctly.

What errors do you have? If you can share your rc file, we can give you advice. You can send a work-in-progress pull request or just share the branch name that you are working on.

This code also contains localization texts for the installer. https://github.com/sakura-editor/sakura/blob/d22a90ad92eb7c38c6e80e01e0930afa62d97aec/installer/sakura-common.iss#L48-L114

If you have done translation of sakura_lang_rc.rc, I think you should translate it too.

k-takata commented 4 years ago

Should we pack it into software?

Do you mean distributing SimSun with Sakura Editor? Then, don't do that. SimSun is not a free font, so you cannot distribute it. (And it is the default font on Chinese Windows, so you don't need to do that.)

And,If we call the font,do we need to use SimSun or 宋体?

Not sure. The best way is to create a dialog box with the resource editor on Visual Studio and check the font name.

EldersJavas commented 4 years ago

@m-tmatma thanks for your reminder.I must translate it.

@k-takata Thanks a lot.I asked my friends for help,He think that SimSun is OK.

I will try calling it on Microsoft Windows®.

And another questions,Can I Compile Sakura on msys2?My VS environment isn't working:(

k-takata commented 4 years ago

And another questions,Can I Compile Sakura on msys2?My VS environment isn't working:(

Yes, it is a known issue. It can compile on MinGW, but doesn't work.

m-tmatma commented 4 years ago

And another questions,Can I Compile Sakura on msys2?My VS environment isn't working:(

Our main build environment is MS VS. You should establish MS VS build environment.

To compile sakura, you need to install MS VS with additional components.

We have .vsconfig in the top folder. You can install the additional components using the .vsconfig.

This is the instructions (in Japanese) https://github.com/sakura-editor/sakura#vsconfig-%E3%81%AB%E9%96%A2%E3%81%97%E3%81%A6

vs_community__XXXXX.exe --config <path to .config>

where vs_community__XXXXX.exe is an installer for VS2017 or VS2019

If you are using VS2019, you can easily install additional components by opening a sln file and clicking the popup explained below . https://devblogs.microsoft.com/setup/configure-visual-studio-across-your-organization-with-vsconfig/

berryzplus commented 4 years ago

this is sample project for sakura lang dll for chinese. sakura_lang_zh_CH.zip a sample is based on sakura_lang_en_US, modified minimal to be able to use as a chinese resource dll.

here is requirements to build.

m-tmatma commented 4 years ago

@berryzplus

  • you should compile the resource script as a Japanese resource.(not a chinese resource!!)

D you mean that compiling it as Japanese resource' is setting Culture to 0x0411?

https://github.com/sakura-editor/sakura/blob/5f489bc9b60a987937e19a1ab627ee8f67783cdf/sakura_lang_en_US/sakura_lang_en_US.vcxproj#L82-L86

I tried to set Culture of sakura_lang_en_US.dll to 0x0409 (English US). But it seems that there is no problems.

Do you remember the reason why we set that to 0x0411?

EldersJavas commented 4 years ago

Thanks for everyone's support! I am so touched!

Today,We translated about 12% . 26% has been completed so far.

Our plan is to translate about 10% every day, and it is expected to be completed before August 25.

Maybe it's impossible , But We will fight on night and day.

I am communicating with several friends who are professional in C++, and they can help me set up a compilation environment.

sakura_lang_zh_CH.zip

@berryzplus Thanks for your package. I have forked Sakura and pull request some source. Here

Hope you can check sakura_lang_rc.rc,thanks a lot.

I will update the latest translated version everyday.

We have .vsconfig in the top folder. You can install the additional components using the .vsconfig.

@m-tmatma Thanks remind, I will definitely try to do it.




If you can help us translate, please join our translation project. Here

Thanks again.

berryzplus commented 4 years ago

D you mean that compiling it as Japanese resource' is setting Culture to 0x0411?

そうです。ビルド設定で日本語のみをビルドするように指定しているので、日本語リソースとして作成する必要があります。windowsのリソース文字列はunicode(UTF-16LE)で埋め込まれる仕様なので、自称「日本語リソース」に中国語が入っていても問題ありません。

サクラエディタが各国語リソースの作成に日本語(0x411)を要求すること自体については、おかしい、という見解を何度か出しています。単純には直せない設計的課題なので、当座は我慢してもらうしかないっす。

m-tmatma commented 4 years ago

@EldersJavas

And another questions,Can I Compile Sakura on msys2?My VS environment isn't working:(

I found a bug that compilation fails with VS2019 16.7.1 (#1373) and fixed it with #1374. Please get the latest upstream master if you're using VS2019.

F.Y.I https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork

m-tmatma commented 4 years ago

サクラエディタが各国語リソースの作成に日本語(0x411)を要求すること自体については、おかしい、という見解を何度か出しています。単純には直せない設計的課題なので、当座は我慢してもらうしかないっす。

これはどこかに ticket 化されてました?

m-tmatma commented 4 years ago

@EldersJavas

If you can help us translate, please join our translation project. Here

I don't have enough knowledge on translating Chinese. So I can't help translation itself.

@berryzplus

I checked https://docs.transifex.com/projects/open-source-project

Then we can use the service without any fee. We should create a repository on transifex and manage localization messages on it.

What do you think?

EldersJavas commented 4 years ago

A new question

My environment is VS2019 latest

In .vsconfig, it told me to install Windows 10 SDK 1809 (10.0.17763.0)

But when I compile, VS told me to install Windows 10 SDK 1903 (10.0.18362.1)

It's my questions? or .vsconfig is old?

(and,In VS2019,there aren't have microsoft.visualstudio.componentgroup.nativedesktop.win81)

EldersJavas commented 4 years ago

Sakura_lang_zh_CN.dll compile successfully!

check1

about

Thanks everyone,there still have some difficult questions, I'll bring them up in the morning.

Now , I need to sleep :)

berryzplus commented 4 years ago

サクラエディタが各国語リソースの作成に日本語(0x411)を要求すること自体については、おかしい、という見解を何度か出しています。単純には直せない設計的課題なので、当座は我慢してもらうしかないっす。

これはどこかに ticket 化されてました?

過去の英語リソース関連のissueを見ると、コメントで書いてあると思います。

解決の目途が立たないので個別issueは作ってなかったと思います。

berryzplus commented 4 years ago

What do you think?

いいんじゃないでしょうか。

世界の人口比率から見て、中国語のほかにはポルトガル語とかやりたいなぁと思っています。

システム的になんとかしたい、というのと翻訳は別なので、先行で進めてもよいかもしれないです。

berryzplus commented 4 years ago

In .vsconfig, it told me to install Windows 10 SDK 1809 (10.0.17763.0)

But when I compile, VS told me to install Windows 10 SDK 1903 (10.0.18362.1)

It's my questions? or .vsconfig is old?

(and,In VS2019,there aren't have microsoft.visualstudio.componentgroup.nativedesktop.win81)

in vs2019, Windows 10 SDK 1903 (10.0.18362.1) is required. this is default selected SDK.

.vsconfig is not correct.

.vsconfig を直したいと思っています。ごめんなさい。

windows 8.1 SDKは、不要です。

EldersJavas commented 4 years ago

2020-08-17 REPORT

Today's Project Progress

1.Translation progress reached 35%. 2.Fixed some problems with compiling the DLL file.(but when I edit in VS, It isn't compiled.)

Still question

1.Encoding.I regretted to use VS to save .rc files.Because VS save files as an unknown encoding.I try to find but there is no encoding that shows it correctly. Here 2.Because of encoding. I can't compile.I don't know why. error

Tomorrow's Plan

1.Finish 50% 2.slove today's questions.


in vs2019, Windows 10 SDK 1903 (10.0.18362.1) is required. this is default selected SDK. .vsconfig is not correct. .vsconfig を直したいと思っています。ごめんなさい。

@berryzplus OK , I know . Do we need to modify it ?

k-takata commented 4 years ago

1.Encoding.I regretted to use VS to save .rc files.Because VS save files as an unknown encoding.I try to find but there is no encoding that shows it correctly. Here

These two lines are wrong: https://github.com/AsdLocalization/sakura/blob/bb292b78ce91404312b40dcd725618485f656b08/sakura_lang_zh_Hans/sakura_lang_rc.rc#L26-L27 They should be

LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(65001)

and the file should be saved in UTF-8.

This line seems also wrong: https://github.com/AsdLocalization/sakura/blob/bb292b78ce91404312b40dcd725618485f656b08/sakura_lang_zh_Hans/sakura_lang_rc.rc#L3170 I think it should be

    STR_SELLANG_LANGID      "0x0804"

See https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables

k-takata commented 4 years ago

サクラエディタが各国語リソースの作成に日本語(0x411)を要求すること自体については、おかしい、という見解を何度か出しています。単純には直せない設計的課題なので、当座は我慢してもらうしかないっす。

バージョンリソースの部分で https://github.com/sakura-editor/sakura/blob/e59dad0385f8c34cf960a8e8b31a93e072546618/sakura_lang_en_US/sakura_lang_rc.rc#L2152https://github.com/sakura-editor/sakura/blob/e59dad0385f8c34cf960a8e8b31a93e072546618/sakura_lang_en_US/sakura_lang_rc.rc#L2168 で 411 になっているところがおかしい気がします。 英語ならば 409 になっているべきです。(これを直せば十分なのかは分かりませんが)

EldersJavas commented 4 years ago

2020-08-18 REPORT

Today's Project Progress

  1. Sorry everybody. sakura_lang_rc.rc has been corrupted by VS and cannot be restored.Because when VS saves a file, it only saves the file in system's encoding. So, sakura_lang_rc.rc is saved GB2312. But Sakura requires the file to be parsed in UTF-8. Then, VS forces all Chinese characters to be converted to "?" mark. I try editing as @k-takata said but It is not save back.これは血の教訓である。Now, I have to recover the original files. So, I lost about 9%.
  2. By 11 o 'clock, the progress was about 40%.

I'm sorry that I didn't finish today's task. I will stay up late to finish it tonight.

Also,I will never use VS to edit files again.

Still question

For various reasons, it is not compiled today. Therefore, there is no problem for the moment.

Tomorrow's Plan

  1. Finish 60%
  2. COMPILE SUCCESSFULLY

@k-takata Thank you all the time.

I have modified the file according to your way.

m-tmatma commented 4 years ago

@EldersJavas Take it easy. You don't need to hurry. You can do it in your pace.

But if you're doing this in your job, it may be an issue for you.

EldersJavas commented 4 years ago

August REPORT


ご協力ありがとうございました。

現在、進捗状況の90%を達成しています。作業環境でも使用できます。

来週も最初のバージョンを維持してリリースします。

私はいくつかの新しい質問を続けます。

Thank you all the time.

vshai commented 3 years ago

阁下好,翻译进度如何了很期待,需要帮助吗?

EldersJavas commented 3 years ago

Sorry.Due to some working conditions, the project has not been translated for a long time.

Sakura's software ontology translation has been unable to compile due to the problems.I'm trying to compile in the JIS coding environment.Currently, the last compiled file sakura_lang_zh_CN.dll is translated about 30%. You can download and test it. sakura_lang_zh_CN.zip

Now I pull sakura-common.iss .

1469

@vshai Thank a lot. You can see there

EldersJavas commented 3 years ago

Happy New Year! Thank you for your hard work and contributions.

EldersJavas commented 3 years ago

sakura-editor.github.io start translating, 国内源:https://gitee.com/EldersJavas/sakura-editor.github.io test page:http://eldersjavas.gitee.io/sakura-editor.github.io/index.zh_hans.html

berryzplus commented 3 years ago

これのステータスってどうなるんですかね?

「中国語を追加しました。」と言えるのに必要な作業は以下だと思います。

サクラエディタの多言語対応は、そもそも完了していません。 英語版リソースDLLが存在しているから「英語には対応してるんじゃね?」と思うかも知れませんが、全然ダメです。

で、それを踏まえて「どうすんじゃい!」って疑問に何らかの答えを出すことがこのissueの解決につながるように思います。

EldersJavas commented 3 years ago

Today is Chinese New Year.明けましておめでとうございます! Wish everyone good health and good luck!

In preparation for the New Year, I suspended the translation. This year, I will continue to work hard! がんばりましょう!

EldersJavas commented 3 years ago

I encountered this problem when trying to compile:

2>..\sakura_core\String_define.h(1): error RC2018: unknown character '0x40'
2>
2>..\sakura_core\version.h(1): error RC2018: unknown character '0x40'
2>
2>..\sakura_core\config/build_config.h(1): error RC2018: unknown character '0x40'
2>
2>D:\GitHub\sakura-zh\sakura\Win32\Release\RCa08316(4080): fatal error RC1116: RC terminating after preprocessor errors