-
Notifications
You must be signed in to change notification settings - Fork 163
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
Installer file update (ChineseTranslation) #1469
Conversation
❌ Build sakura 1.0.3263 failed (commit 1764f8cca4 by @EldersJavas) |
❌ Build sakura 1.0.3264 failed (commit 1aacc095a5 by @EldersJavas) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not remove UTF-8 byte order mark, it is required by inno setup.
Have we encountered any difficulties? I have been compiling files in Inno Setup. I think the BOM header was removed when I copied it to GitHub and was forced to convert to UTF-8 encoding by GitHub. |
❌ Build sakura 1.0.3278 failed (commit ff4a70ae15 by @EldersJavas) |
no, thisi pull request has very simple issue.
no. GitHub can treat UTF-8 with BOM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check
OK,Thanks. |
❌ Build sakura 1.0.3280 failed (commit 306ce9db3c by @EldersJavas) |
❌ Build sakura 1.0.3281 failed (commit 3dd3c853bd by @EldersJavas) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that AzurePipelines build failed.
According to the log, ChineseSimplified.isl
file is missing from Inno Setup directory.
2020-12-06T03:16:36.2171645Z running "C:\ProgramData\Chocolatey\bin\ISCC.exe" installer\sakura-Win32.iss
2020-12-06T03:16:36.5770672Z Error on line 51 in D:\a\1\s\installer\sakura-common.iss: Couldn't open include file "c:\program files (x86)\inno setup 6\Languages\ChineseSimplified.isl": The system cannot find the file specified.
2020-12-06T03:16:36.5772540Z Compile aborted.
It looks like Chinese language files aren't included with Inno Setup's default installer as they are not still official translations.
https://jrsoftware.org/files/istrans/
I'm not really sure how to address this problem.
Do you have any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #1469 (review)
CI builds failed to make an installer.
we need to have a successful build with at least one CI.
supported CI is appveyor, azule pipelines(DevOps) and GitHubActions.
I was under the impression of that the PR is in need of an update on our side to install Chinese locales in the CI environment.
I actually have no idea who is in charge of maintaining our CI infrastructure. Can anyone chime in? |
翻訳するのがややめんどうな話題なので日本語で書きます。 解決すべき課題インストーラー生成スクリプトに中国語を含めるとビルドが失敗する。 インストーラーが生成されない原因inno setupが現状で中国語をサポートしていない。 課題に対するおいらの見解課題解決の目途が立つまではマージを保留せざるを得ないと思います。 この課題を誰が解決すべきか?中国語版インストーラーを実現したい人がやるべきだと思います。 自分が中国語版インストーラーを実現したい立場なら、inno setupの開発チームに働きかけると思います。 |
jrsoftware/issrc#346 is related. |
installer/sakura-common.iss
Outdated
@@ -48,70 +48,164 @@ MinVersion=6.1 | |||
[Languages] | |||
Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl" | |||
Name: "en"; MessagesFile: "compiler:Default.isl"; InfoBeforeFile: "instmaterials\info_us.txt" | |||
Name: "zh_hans"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"; InfoBeforeFile: "instmaterials\info_zh_hans.txt" | |||
Name: "zh_hant"; MessagesFile: "compiler:Languages\ChineseTraditional.isl"; InfoBeforeFile: "instmaterials\info_zh_hant.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change these lines as specified below.
Name: "zh_hans"; MessagesFile: "Languages\ChineseSimplified.isl"; InfoBeforeFile: "instmaterials\info_zh_hans.txt"
Name: "zh_hant"; MessagesFile: "Languages\ChineseTraditional.isl"; InfoBeforeFile: "instmaterials\info_zh_hant.txt"
You need to add ChineseSimplified.isl
file and ChineseTraditional.isl
file into your git repository's installer/Languages
folder because they don't exist inside C:\Program Files (x86)\Inno Setup 6\Languages
folder (as a workaround).
Additionally, you also need to add info_zh_hans.txt
file and info_zh_hant.txt
file into your git repository. I think you simply forgot to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not replying to you for so long.
I have uploaded the file, please check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EldersJavas Thank you for uploading the files.
However, you would still need to rectify installer/sakura-common.iss
file. Please read the comment carefully. I intentionally removed compiler:
from MessageFile:
value. If there's a compiler:
keyword, the installer would search the specified file from InnoSetup installed directory, and otherwise the file inside the Source Directory will be archived in the installer and will be used. I guess I should have explained this behaviour as it is not very straight forward to understand.
Here's an excerpt from Inno Setup Help.
MessagesFile (Required)
Specifies the name(s) of the .isl file(s) to read the default messages from. The file(s) must be located in your installation's source directory when running the compiler, unless a fully qualified pathname is specified or the pathname is prefixed by
"compiler:"
, in which case it looks for the file in the compiler directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/sakura-editor/sakura/pull/1469/files#r538538926 suggested below.
Name: "zh_hant"; MessagesFile: "compiler:Languages\ChineseTraditional.isl"; InfoBeforeFile: "instmaterials\info_zh_hant.txt" | |
Name: "zh_hant"; MessagesFile: "Languages\ChineseTraditional.isl"; InfoBeforeFile: "instmaterials\info_zh_hant.txt" |
this should also be applied to non-traditional version.
I've kind of got this going on AppVeyor by following the approach @beru suggested. One problem in this approach: Apparently our two CIs employ different versions of Inno Setup. AppVeyor is on version 5 (we are using Visual Studio 2017 image), and Azure Pipelines is on 6. It seems between them their unofficial Chinese translation files changed encoding from MBCS to UTF-8, and I specifically added Inno Setup 5 version of translation files into the repository, it is likely to cause breaks on Azure Pipelines builds. Possible solutions I came up with:
AppVeyor のビルドイメージを Visual Studio 2019 に変更するのがこのPRについて言えば真っ当な対応策だと思いますが、どういう課題があるか伺いたいです。 |
✅ Build sakura 1.0.3402 completed (commit 4341aa7b7b by @EldersJavas) |
✅ Build sakura 1.0.3403 completed (commit 826d6ffcc2 by @EldersJavas) |
✅ Build sakura 1.0.3404 completed (commit 23c0aba911 by @EldersJavas) |
All the problems have been solved, except for the old files. I'm very sorry, my school network is down and I cannot access GitHub. It has been resolved today. |
✅ Build sakura 1.0.3407 completed (commit 9be47527b1 by @EldersJavas) |
@@ -0,0 +1,3 @@ | |||
该软件被定义为“文本编辑器(共同开发版本)”。 | |||
您可以免费用于商业和非商业用途,但源代码的版权由各部分所有者保留。 | |||
无法保证该软件在分发时的完整性。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EldersJavas Can you please check if this file is valid or not.
These lines are used in "Information" wizard page.
If I select Traditional Chinese on the installer, I see garbled characters.
On the other hand, If I select Simplified Chinese on the installer, I can see human-readable texts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed a problem.
When compiling locally, if I use UTF-8, select Simplified Chinese on the installer, it is still garbled.
So, I had to change its encoding to GBK.This is no way.让我再尝试下别的编码.
Moreover, it is very funny that Simplified Chinese is garbled on GitHub, but it can be displayed normally.Traditional Chinese is not garbled on GitHub, but it is garbled in it . Joke:)
OK,solved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EldersJavas Thank you for the fix. I've confirmed that the garbled Traditional Chinese texts are fixed now.
test info_zh_hant.txt with BIG5
Kudos, SonarCloud Quality Gate passed! |
✅ Build sakura 1.0.3408 completed (commit 4702662369 by @EldersJavas) |
このPRについて可否判断の基準は以下だと思います。
インストーラの翻訳が合っているかどうかとかサクラエディタ本体が対応しているかとかは別の話だと思っています。 |
一人で判断することではないでしょうから皆さんに伺いますが、Inno Setup 5 と 6 の両対応は残さなければいけないものでしょうか? 今のところ、このPRがマージされれば AppVeyor と Azure Pipelines の両方で Inno Setup 6 を使うようになります。Inno Setup 5 互換のために CI で使わない古い翻訳ファイルを別に入れている状態です。6だけに対応することにできれば古いファイルを入れる必要はなくなります。 |
個人的には Inno Setup 6 の対応だけで良いと思います。 の説明の記載を更新する必要がありますね。 |
我的看法是:
缺点:我们需要更新一些 所以,我认为舍弃 My opinion is:
Cons: We need to update some Markdown files :) I'm very glad to update files. Therefore, I think abandoning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ビルドが通っているしもう merge して良いと思います。
下記の Inno Setup 5 向けのファイルの削除とか build.md
ファイルの更新とかは別のPRで対応でも問題ないと思います。
- installer/Languages/ChineseSimplified(old).isl
- installer/Languages/ChineseTraditional(old).isl
いつもありがとうございます!今後ともよろしくお願いいたします。 |
appveyor.ymlの履歴を確認して気が付いたんですが、このPRで変更される前のコミットが #1403 に含まれるコミットになっています。 このPRの差分("Files changed"タブで見れるもの)は「2行追加」と表示されていますが、 #1403 とこのPRのマージコミット間で取った差分は「5行追加・31行削除」となり一致しません。 幸い差分からBuildChmジョブの廃止を行っていることがわかり、履歴から消えたのは #1509 だと特定することができました。 一応ご報告しておきます。 |
自動マージにより欠落したコミットがありそうだ、と言ってますかね? |
たぶん……初めて見たので理由はわからないです。 5cbc57c がappveyor.ymlの履歴に入っていません。 |
このPRのコミットの積み方がグチャグチャなのが原因っぽく見えます。 「コミットの積み方が酷いので積み直してください」って指摘は、 消えてる可能性のあるマージ済みPRの全量はこんだけのはずです。 |
確認してみましたが、マージコミットは全部入ってそうです。 |
EldersJavas/sakura:master のコミットログを確認しましたが、僕には派生元が c70ce54 ( #1374 のマージコミット)であるように見えました。 |
確認すべき対象コミットが3日とか2週間じゃなくて、約2か月分だってことですよね。 やってしまったものは仕方ないので、 消えたコミットを復活させようとすると難易度高いような・・・(笑 |
結局、復元すべき差分はなさそうです。 今後は、既存ファイルをDeleteしてAddするPRブランチを見かけたら、 |
PR の目的
カテゴリ
Simplified Chinese and Traditional Chinese installer file translate
sakura-common.iss and more
PR の背景
Sakura Chinese Translation Project
PR のデメリット (トレードオフとかあれば)
可能无法在非GBK系统上正常编译。可能会出现乱码情况。(sloved)必须在(sloved)Inno Setup 6\Languages
文件夹中添加语言文件。语言文件下载地址: 简体中文 繁体中文
旧版本可以在这里下载:https://jrsoftware.org/files/istrans/
It may not compile properly on non GBK systems.(sloved)There may be garbled code.(sloved)You must add a language file to the(sloved)/inno setup 6/languages
folder.Language file download: simplified Chinese traditional Chinese
Old versions can be downloaded here: https://jrsoftware.org/files/istrans/
テスト内容
可以在GBK编码的系统上正常编译。使用
Inno Setup 6
.32位系统和64位系统均可以正常编译。
It can be compiled normally on GBK coded system. Use
inno setup 6
.Both 32-bit system and 64 bit system can compile normally.
関連 issue, PR
#1369