[Bug]: PortableFirstStart import-confirmation test compares English text while the dialog follows the system language

Abierto Apto para principiantes
#1,887 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

Empieza con tests/Filee.App.Tests/PortableFirstStartTests.cs alrededor de las líneas 46 y 57, donde la aserción carga la entrada del catálogo en para portable.import_next. Luego lee LocalizationService.EarlyText en src/Filee.App/Services/LocalizationService.cs (líneas 175-183) y su ruta Resolve("auto") en la línea 96, que sigue a CurrentUICulture. Está terminado cuando la prueba pasa con una cultura del sistema que no sea inglés, ya sea forzando el idioma temprano en la prueba o comparando con la cadena de la cultura de UI actual.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
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
  1. Chinese (zh-CN) Windows, Get-UICulture = zh-CN
  2. 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).

Lenguaje dominante
C#
Estrellas
3.6k
Forks
192
Merge medio
14 h 23 min
PR fusionados (30 d)
458

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de KnifeLemon/Filee

Todos los issues de KnifeLemon/Filee

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.