[Bug] Every first-time user on earth starts OciDeck in Dutch #572
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#572
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the pre-publication review, confirmed live against the web build.
Evidence:
lib/state/settings_provider.dart:149—prefs.getString('languageCode') ?? 'nl', andlib/models/settings.dart:750—this.languageCode = 'nl'. The l10n layer agrees (lib/l10n/app_localizations.dart:250,:258). There are zero uses ofPlatformDispatcher.instance.localeanywhere inlib/, so the system locale is never consulted;lib/app.dart:48pinslocale:to the stored setting, soMaterialAppnever gets to negotiate either.What this means in practice: the very first screen is the consent wall — title
'Welkom bij OciDeck'(consent_dialog.dart:83) plus the fullPrivacyStatementContent(328 lines, 25 localised calls) — and it renders in Dutch. There is a language picker in the top right, but the user has to find it after being asked to tick a box agreeing to a privacy statement they cannot read.Why this must be fixed before publication:
README.md:42sells "the interface runs in 32 languages" as a headline feature. Every reviewer who opens the demo gets Dutch, and the obvious write-up is "it is Dutch-only, the 32-language claim is marketing". Separately, consent obtained through a wall in a language the user does not read is exactly the practice this project would criticise in others. The app already has all 32 languages ready; only the initial value points at the Netherlands.Proposal: one line —
prefs.getString('languageCode') ?? _systemLanguageOrEn(), where the helper walksPlatformDispatcher.instance.localesand returns the first code present inAppLocalizations.languageNames, falling back toen(a better guess thannlfor an unknown locale). Only the default changes; an explicit user choice still wins. Two tests: unknown system locale yieldsen,de-DEyieldsde.Opgelost in `
b043d5f` (PR #652).settings_provider.dartvraagt nu de systeemtaal op viaPlatformDispatcheren valt terug op Engels — niet op Nederlands — voor een taal die niet inlanguageNamesstaat. Alleen de startwaarde; een opgeslagen keuze wint altijd. De resolutie staat alsAppLocalizations.preferredLanguageCodebij de talenlijst waar ze hoort.Bijvangst die het waard is om te noemen: de wijziging brak 97 widgettests, want die zoeken Nederlandse knopteksten. Dat is opgelost met
test/flutter_test_config.dart, dat de starttaal één keer voor de hele suite vastzet. Op een Nederlandse machine was dat nooit opgevallen — de suite hing af van de landinstelling van wie hem draaide.