Skip to content

Commit d9cd351

Browse files
Stop the wizard asking for a language it cannot apply
Picking English in the installer produced a German program, which reads like a bug and is not one: the [Languages] choice localises the wizard, while MateFan reads CurrentUICulture at every start and follows the Windows display language. ShowLanguageDialog defaults to yes, so the question was always asked. Turned off, the wizard falls back to LanguageDetectionMethod=uilanguage — the same signal the program uses — and the two now always agree. Nobody is asked something whose answer expires with the last wizard page. The readme gains a Language section, because "which language will I get" is a user question and it was only answered under Development notes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0154ydCSH6y6ha5Dp3GUQHKA
1 parent 7278fd9 commit d9cd351

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ attached to every release:
6464
> Get-FileHash .\MateFan-Setup-1.0.0.exe -Algorithm SHA256
6565
> ```
6666
67+
### Language
68+
69+
MateFan is English and German, and it follows your **Windows display language** — decided fresh at
70+
every start, not fixed at install time. Change the display language and MateFan follows on the next
71+
start. Any display language other than German gets the English interface.
72+
6773
### Administrator rights
6874
6975
MateFan always runs elevated, because the firmware interface it uses requires it. That is also why

installer/matefan.iss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ SetupIconFile=..\src\MateFan.App\assets\matefan.ico
4141
UninstallDisplayIcon={app}\{#AppName}.exe
4242
LicenseFile=..\LICENSE
4343

44+
; Do not ask. The wizard's language would only ever apply to the wizard: MateFan reads
45+
; CurrentUICulture at every start, so the installed program follows the Windows display language
46+
; whatever was picked here. Asking a question whose answer expires with the last wizard page is
47+
; how a user ends up choosing English and getting a German program.
48+
;
49+
; With the dialog off, LanguageDetectionMethod defaults to uilanguage — the same signal MateFan
50+
; uses — so the wizard and the program now always agree.
51+
ShowLanguageDialog=no
52+
4453
[Languages]
4554
Name: "english"; MessagesFile: "compiler:Default.isl"
4655
Name: "german"; MessagesFile: "compiler:Languages\German.isl"

tests/MateFan.Tests/InstallerScriptTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ public void The_post_install_launch_keeps_setups_elevated_credentials()
2626
Assert.Contains("runascurrentuser", run);
2727
}
2828

29+
/// <summary>
30+
/// The wizard must not offer a language choice. It would apply to the wizard alone — MateFan
31+
/// reads CurrentUICulture at every start — so a user could pick English and watch a German
32+
/// program start on the next page. Off, the wizard detects the same UI language the app does.
33+
/// </summary>
34+
[Fact]
35+
public void The_wizard_does_not_offer_a_language_choice_it_cannot_honour()
36+
{
37+
Assert.Matches(@"(?m)^\s*ShowLanguageDialog\s*=\s*no\s*$", Script);
38+
}
39+
2940
/// <summary>The installer only notices a running MateFan if both names agree exactly.</summary>
3041
[Fact]
3142
public void The_installer_watches_the_mutex_the_application_holds()

0 commit comments

Comments
 (0)