{"action":"created","issue":{"url":"https://api.github.com/repos/sakura-editor/sakura/issues/620","repository_url":"https://api.github.com/repos/sakura-editor/sakura","labels_url":"https://api.github.com/repos/sakura-editor/sakura/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/sakura-editor/sakura/issues/620/comments","events_url":"https://api.github.com/repos/sakura-editor/sakura/issues/620/events","html_url":"https://github.com/sakura-editor/sakura/pull/620","id":381864287,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzI4NjIy","number":620,"title":"設定データ読み込み処理において言語設定切り替え後にMRUエントリが無い場合は新規インストール後とみなし false を返すように変更","user":{"login":"beru","id":1131125,"node_id":"MDQ6VXNlcjExMzExMjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1131125?v=4","gravatar_id":"","url":"https://api.github.com/users/beru","html_url":"https://github.com/beru","followers_url":"https://api.github.com/users/beru/followers","following_url":"https://api.github.com/users/beru/following{/other_user}","gists_url":"https://api.github.com/users/beru/gists{/gist_id}","starred_url":"https://api.github.com/users/beru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beru/subscriptions","organizations_url":"https://api.github.com/users/beru/orgs","repos_url":"https://api.github.com/users/beru/repos","events_url":"https://api.github.com/users/beru/events{/privacy}","received_events_url":"https://api.github.com/users/beru/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/sakura-editor/sakura/milestones/1","html_url":"https://github.com/sakura-editor/sakura/milestone/1","labels_url":"https://api.github.com/repos/sakura-editor/sakura/milestones/1/labels","id":3390252,"node_id":"MDk6TWlsZXN0b25lMzM5MDI1Mg==","number":1,"title":"next release","description":"バージョン番号が確定したらマイルストーン名を変えます","creator":{"login":"kobake","id":2929454,"node_id":"MDQ6VXNlcjI5Mjk0NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2929454?v=4","gravatar_id":"","url":"https://api.github.com/users/kobake","html_url":"https://github.com/kobake","followers_url":"https://api.github.com/users/kobake/followers","following_url":"https://api.github.com/users/kobake/following{/other_user}","gists_url":"https://api.github.com/users/kobake/gists{/gist_id}","starred_url":"https://api.github.com/users/kobake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobake/subscriptions","organizations_url":"https://api.github.com/users/kobake/orgs","repos_url":"https://api.github.com/users/kobake/repos","events_url":"https://api.github.com/users/kobake/events{/privacy}","received_events_url":"https://api.github.com/users/kobake/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":474,"state":"open","created_at":"2018-05-31T12:48:23Z","updated_at":"2019-01-03T22:14:59Z","due_on":null,"closed_at":null},"comments":34,"created_at":"2018-11-17T13:42:01Z","updated_at":"2019-01-04T00:53:54Z","closed_at":"2018-11-23T02:46:27Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/sakura-editor/sakura/pulls/620","html_url":"https://github.com/sakura-editor/sakura/pull/620","diff_url":"https://github.com/sakura-editor/sakura/pull/620.diff","patch_url":"https://github.com/sakura-editor/sakura/pull/620.patch"},"body":"このPRの変更の目的は、#616 で報告した問題に対処する為です。\r\n\r\n`%APPDATA%/sakura.ini` ファイルの内容が新規インストール後のものかどうかの判断は、\r\n`[MRU]`  セクションの `_MRU_Counts` エントリが存在しないかどうかで判定しています。\r\nちょっとこの判定方法だと単純すぎて危ないかも知れませんが…。。\r\n\r\n新規インストールと判断した場合は `return false;` で処理を中断する事で後続する各設定読み込み処理を実行しないようにしました。ほぼ空な設定ファイルから設定情報を呼んでしまうとおかしな事になってしまうので。\r\n\r\nそれに加えて下記の変更も加えました。\r\n\r\n- 管理プロセスから呼び出ししている設定データ読み込み処理（CShareData_IO::LoadShareData）の戻り値を使うように変更\r\n  - 従来の処理では設定ファイル名を呼び出し側でも作ってそのファイルが存在するかどうかで判定していますが、設定データ読み込み処理内でも同じようにして設定ファイル名を作っているので、戻り値を有効活用出来るのではないかと判断しました。\r\n\r\n- 後続する設定データ保存処理（CShareData_IO::SaveShareData）の呼び出しは設定ファイルが存在しないという判断ではなくて、設定データ読み込みに処理に失敗したらという判断に変更\r\n  - 前述した内容にも関係しますが、新規インストール後はここで設定データ保存をさせる事で有効な初期設定ファイルに切り替えています。別にここで保存せずともプロセス終了時に設定保存が入るかもしれませんが…。\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sakura-editor/sakura/issues/comments/451325609","html_url":"https://github.com/sakura-editor/sakura/pull/620#issuecomment-451325609","issue_url":"https://api.github.com/repos/sakura-editor/sakura/issues/620","id":451325609,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTMyNTYwOQ==","user":{"login":"beru","id":1131125,"node_id":"MDQ6VXNlcjExMzExMjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1131125?v=4","gravatar_id":"","url":"https://api.github.com/users/beru","html_url":"https://github.com/beru","followers_url":"https://api.github.com/users/beru/followers","following_url":"https://api.github.com/users/beru/following{/other_user}","gists_url":"https://api.github.com/users/beru/gists{/gist_id}","starred_url":"https://api.github.com/users/beru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beru/subscriptions","organizations_url":"https://api.github.com/users/beru/orgs","repos_url":"https://api.github.com/users/beru/repos","events_url":"https://api.github.com/users/beru/events{/privacy}","received_events_url":"https://api.github.com/users/beru/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T00:53:54Z","updated_at":"2019-01-04T00:53:54Z","author_association":"CONTRIBUTOR","body":"[InnoSetupのソースコード](https://github.com/jrsoftware/issrc/blob/master/Projects/CmnFunc2.pas#L1253) を調べてみたところ、WindowsAPI の [`GetUserDefaultUILanguage`](https://docs.microsoft.com/en-us/windows/desktop/api/winnls/nf-winnls-getuserdefaultuilanguage) を使って表示UI言語を取得していました。\r\n\r\nという事で起動時に設定ファイルが無くて、`GetUserDefaultUILanguage` の戻り値を調べて日本語じゃなかったら、言語DLLを `sakura_lang_en_US.dll` にするのが良いかなと思います。\r\n\r\n言語識別子の一覧は下記のURLに載っていました。\r\nhttps://docs.microsoft.com/ja-jp/windows/desktop/Intl/language-identifier-constants-and-strings\r\n"}}
{"actor":{"display_login":"beru"}}