Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
OSの言語設定に基づいてデフォルトのソース言語を動的に設定するように変更しました。
変更内容
変更前の動作
en-US)に固定変更後の動作
ja-JP)に設定en-US)に設定(従来の動作)実装の詳細
WindowTranslator.Abstractions/LanguageOptions.csに以下の変更を実施:GetDefaultSourceLanguage()静的メソッドを追加CultureInfo.CurrentUICulture.Nameを使用してOSの言語を取得StartsWith("en", StringComparison.OrdinalIgnoreCase)で英語かどうかを判定"ja-JP"、それ以外は"en-US"を返却Sourceプロパティのデフォルト値をGetDefaultSourceLanguage()の戻り値に変更使用例
英語OS(例:Windows 英語版)
日本語のウィンドウを英語に翻訳する際に最適な設定になります。
日本語OS(例:Windows 日本語版)
英語のウィンドウを日本語に翻訳する際に最適な設定になります(従来通り)。
その他の言語OS(例:ドイツ語、韓国語など)
英語から各言語への翻訳が基本となります(従来通り)。
テスト
Fixes #<issue_number>
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.