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

英語windowsでメッセージがおかしい件に対処する #534

Merged

Conversation

berryzplus
Copy link
Contributor

@berryzplus berryzplus commented Oct 8, 2018

表示言語が日本語以外になっているwindowsで、
サクラエディタを日本語表示しているときのメッセージがおかしい件に対処します。
(メッセージの下に出るボタン類が日本語でなくなってしまう。)

変更前 変更後

対応内容は、言語リソース構造体の初期化漏れ対策です。
日本語の言語リソースについても言語IDを設定するように修正します。

@berryzplus berryzplus added 🐛bug🦋 ■バグ修正(Something isn't working) 🌏Internationalization 🇯🇵 🇺🇸 🇨🇳 🇹🇼 国際化対応 labels Oct 8, 2018
@berryzplus
Copy link
Contributor Author

なんか変な変更入ってる・・・

@berryzplus berryzplus force-pushed the feature/set_default_langid branch from a2658e1 to 9e45592 Compare October 8, 2018 06:27
・日本語リソースの言語IDを設定するように変更。
@berryzplus
Copy link
Contributor Author

上げ直しました。

win8.1のIE11で見ると画像おかしくなってたので画像も修正しました。
https://dackdive.hateblo.jp/entry/2015/05/08/110029

// 言語IDを取得
TCHAR szBuf[7]; // "0x" + 4桁 + 番兵
nCount = ::LoadString( GetModuleHandle(NULL), STR_SELLANG_LANGID, szBuf, _countof(szBuf));
assert(nCount == _countof(szBuf) - 1);
Copy link
Member

Choose a reason for hiding this comment

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

この assert はサイズぴったりというのを確認したいのですか?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

107行目のコメントが STR_SELLANG_LANGID に入れる文字列の仕様です。

日本語 = 0x0411MAKELANGID(LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN)
英語 = 0x0409MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)

sakura_rc.rcを変更して違うものを入れたら起動時に落ちます。
(たとえば 0x411 にするとか。)

ユーザが勝手に変えられる内容ではないので問題ないと考えています。

Copy link
Contributor

@beru beru left a comment

Choose a reason for hiding this comment

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

問題ありません。

地域と言語の設定で English (United States) の言語パックをインストール後に Windows の表示言語をそれに切り替えてからサインインし直して確認しました。

現時点の master (7bf177d) では問題の現象が起きる事と、この PR の branch (c8ce3ab) では問題が解消される事を確認しました。

@berryzplus berryzplus merged commit e1595ce into sakura-editor:master Oct 9, 2018
@berryzplus berryzplus deleted the feature/set_default_langid branch October 9, 2018 15:53
@m-tmatma m-tmatma added this to the next release milestone Oct 21, 2018
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this pull request Jun 11, 2019
…ult_langid

マージします。何かあれば別PRで対応していきましょう。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug🦋 ■バグ修正(Something isn't working) 🌏Internationalization 🇯🇵 🇺🇸 🇨🇳 🇹🇼 国際化対応
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants