[Bug]: PortableFirstStart import-confirmation test compares English text while the dialog follows the system language
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
tests/Filee.App.Tests/PortableFirstStartTests.cs の46行目と57行目付近から始めてください。ここではアサーションが portable.import_next の en カタログエントリを読み込んでいます。次に src/Filee.App/Services/LocalizationService.cs の LocalizationService.EarlyText(175~183行)と、CurrentUICulture に従う96行目の Resolve("auto") の経路を読みます。英語以外のシステムカルチャでテストが通れば完了です。テスト内で早期の言語を強制するか、現在の UI カルチャの文字列と照合するかのどちらでも構いません。
索引モデルが issue の本文から書いたものです。
説明
What happened?
On a Chinese-language Windows this test fails stably (3/3 reruns):
Assert.Contains() Failure: Filter not matched in collection
at Filee.App.Tests.PortableFirstStartTests.Import_confirmation_shows_the_profile_and_portable_destination()
in tests\Filee.App.Tests\PortableFirstStartTests.cs:line 57
What did you expect?
Either the dialog shows the string the test looks up, or the test follows the language the dialog actually uses.
Steps to reproduce
- Chinese (zh-CN) Windows,
Get-UICulture=zh-CN dotnet test tests/Filee.App.Tests -c Release --filter "FullyQualifiedName~Import_confirmation_shows_the_profile_and_portable_destination"
Why it fails
The test compares the rendered text with catalog["portable.import_next"] loaded explicitly from en (PortableFirstStartTests.cs:46,57). The bubble's text, however, comes from PortableFirstStart.cs:132 → LocalizationService.EarlyText("portable.import_next"), and EarlyText (src/Filee.App/Services/LocalizationService.cs:175-183) resolves the language with Resolve("auto") → UserLanguage = CultureInfo.CurrentUICulture.Name (LocalizationService.cs:96) — i.e. the system language, ignoring TestServices.EnsureInitialized("en").
On this machine that renders the zh-CN string (复制后使用所选数据继续。…) instead of the English one, so the assertion can never match. On an English CI runner it passes.
Suggestion: let the test force the early language (an injectable OS-language provider, or a test override in EarlyText), or assert against the string for the current UI culture.
Filee version
v2.4.0-137-g5b91b379 (main @ 5b91b379)
Operating system
Windows 11 10.0.26300 (zh-CN), i9-14900HX, 32 GB
Engines page status
Not relevant: no engine is used; engines/ present (ffmpeg 9.0.2, 7zip 26.05).
- 主要言語
- C#
- スター
- 3.6k
- フォーク
- 192
- 平均マージ
- 14時間 23分
- マージ済み PR(30日)
- 458
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
KnifeLemon/Filee のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
KnifeLemon/Filee#1886 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
KnifeLemon/Filee#1855 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
KnifeLemon/Filee#1817 ·
メンテナーはふだん 1 日以内に返信
-
documentation question
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
KnifeLemon/Filee#1778 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
KnifeLemon/Filee#1893 ·
メンテナーはふだん 1 日以内に返信
KnifeLemon/Filee の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SixLabors/ImageSharp.Drawing#438 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
NetSparkleUpdater/NetSparkle#762 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
bug effort:S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nightscout/nocturne#4563 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Tyrrrz/YoutubeDownloader#925 ·