From db82d123729c24b1a26ee14cd296fde4d8339e03 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Thu, 17 Mar 2022 10:03:52 -0400 Subject: [PATCH] layout: add Locale to Context This commit adds a system.Locale to the layout.Context, providing an easy means to plumb language information throughout an application. References: https://todo.sr.ht/~eliasnaur/gio/146 Signed-off-by: Chris Waldon --- layout/context.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layout/context.go b/layout/context.go index 5d314961..a279c2d9 100644 --- a/layout/context.go +++ b/layout/context.go @@ -27,6 +27,11 @@ type Context struct { // Now is the animation time. Now time.Time + // Locale provides information on the system's language preferences. + // BUG(whereswaldon): this field is not currently populated automatically. + // Interested users must look up and populate these values manually. + Locale system.Locale + *op.Ops }