]> git.ipfire.org Git - ipfire.org.git/commitdiff
donate: Attempt to guess people's locale
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jan 2022 10:34:55 +0000 (10:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Jan 2022 10:35:51 +0000 (10:35 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/donate.py

index 319dac9664aa22409b4123ab2450f074eb1aee9c..37bb2c1c03c4f29521cb7b308b50800e159fdbed 100644 (file)
@@ -51,6 +51,7 @@ class DonateHandler(auth.CacheMixin, base.BaseHandler):
                frequency = self.get_argument("frequency")
 
                organization = None
+               locale = self.get_browser_locale()
 
                # Get organization information
                if type == "organization":
@@ -65,6 +66,7 @@ class DonateHandler(auth.CacheMixin, base.BaseHandler):
                        "title"        : self.get_argument("title"),
                        "first_name"   : self.get_argument("first_name"),
                        "last_name"    : self.get_argument("last_name"),
+                       "locale"       : locale.code,
                }
 
                # Collect address information