From 56b6db8a8d3bd1a1d666958ab990598bd1561430 Mon Sep 17 00:00:00 2001 From: Virgil Date: Thu, 2 Apr 2026 13:25:47 +0000 Subject: [PATCH] refactor(i18n): align default state snapshot shape Co-Authored-By: Virgil --- state.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/state.go b/state.go index c68c23b..45c815a 100644 --- a/state.go +++ b/state.go @@ -5,6 +5,8 @@ import ( ) func defaultServiceStateSnapshot() ServiceState { + // Keep the nil/default snapshot aligned with Service.State() so callers get + // the same shape regardless of whether a Service has been initialised. return ServiceState{ Language: "en", RequestedLanguage: "", @@ -13,6 +15,7 @@ func defaultServiceStateSnapshot() ServiceState { Mode: ModeNormal, Fallback: "en", Formality: FormalityNeutral, + Location: "", Direction: DirLTR, IsRTL: false, Debug: false,