mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 21:30:36 -05:00
[PR #2585] [CLOSED] fix: persist user locale preference in database across sessions #9826
Reference in New Issue
Block a user
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?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2585
Author: @Fizza-Mukhtar
Created: 3/2/2026
Status: ❌ Closed
Base:
main← Head:fix/persist-user-locale-1547📝 Commits (2)
fe92913fix: persist user locale preference in database860136bfix: add locale field to myDevice response📊 Changes
12 files changed (+132 additions, -9 deletions)
View changed files
📝
server/db/pg/schema/schema.ts(+1 -0)📝
server/db/sqlite/schema/schema.ts(+1 -0)📝
server/routers/external.ts(+1 -0)📝
server/routers/user/getUser.ts(+2 -1)📝
server/routers/user/index.ts(+1 -0)📝
server/routers/user/myDevice.ts(+2 -1)➕
server/routers/user/updateUserLocale.ts(+59 -0)📝
server/setup/migrationsPg.ts(+3 -1)📝
server/setup/migrationsSqlite.ts(+3 -1)➕
server/setup/scriptsPg/1.16.1.ts(+24 -0)➕
server/setup/scriptsSqlite/1.16.1.ts(+25 -0)📝
src/services/locale.ts(+10 -5)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Fixes #1547
Problem
Language preference was stored in a cookie which expires after ~1 day, causing the dashboard to forget the selected language.
Fix
localefield to user schema (SQLite + PostgreSQL)1.16.1for both databasesPOST /user/localeendpoint to save locale to DBgetUserendpoint now returns user's saved locale🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.