Use browser Accept-Language for login and onboarding locale (#768)

* Use Accept-Language for unauthenticated locale

* Add per-user locale overrides

* Fix test

* Use more than the top `accept-language` entry

* Localization of string
This commit is contained in:
Juan José Mata
2026-01-24 22:00:41 +01:00
committed by GitHub
parent 959029fda6
commit c7ab25b866
21 changed files with 163 additions and 17 deletions

4
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2026_01_23_214127) do
ActiveRecord::Schema[7.2].define(version: 2026_01_24_180211) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -1402,9 +1402,11 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_23_214127) do
t.datetime "set_onboarding_goals_at"
t.string "default_account_order", default: "name_asc"
t.jsonb "preferences", default: {}, null: false
t.string "locale"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["family_id"], name: "index_users_on_family_id"
t.index ["last_viewed_chat_id"], name: "index_users_on_last_viewed_chat_id"
t.index ["locale"], name: "index_users_on_locale"
t.index ["otp_secret"], name: "index_users_on_otp_secret", unique: true, where: "(otp_secret IS NOT NULL)"
t.index ["preferences"], name: "index_users_on_preferences", using: :gin
end