I18n: Add locale to user preference (#49425)

* Add __debug_bin file to gitignore

* Add locale user preference

* undo defaulting to existing JSONData in preferences save
This commit is contained in:
Josh Hunt
2022-06-14 12:53:51 +01:00
committed by GitHub
parent b4c8b6d672
commit 3cebd87bbb
5 changed files with 23 additions and 2 deletions
+3
View File
@@ -80,6 +80,7 @@ func (hs *HTTPServer) getPreferencesFor(ctx context.Context, orgID, userID, team
}
if preference.JSONData != nil {
dto.Locale = preference.JSONData.Locale
dto.Navbar = preference.JSONData.Navbar
dto.QueryHistory = preference.JSONData.QueryHistory
}
@@ -117,6 +118,7 @@ func (hs *HTTPServer) updatePreferencesFor(ctx context.Context, orgID, userID, t
OrgID: orgID,
TeamID: teamId,
Theme: dtoCmd.Theme,
Locale: dtoCmd.Locale,
Timezone: dtoCmd.Timezone,
WeekStart: dtoCmd.WeekStart,
HomeDashboardID: dtoCmd.HomeDashboardID,
@@ -165,6 +167,7 @@ func (hs *HTTPServer) patchPreferencesFor(ctx context.Context, orgID, userID, te
Timezone: dtoCmd.Timezone,
WeekStart: dtoCmd.WeekStart,
HomeDashboardID: dtoCmd.HomeDashboardID,
Locale: dtoCmd.Locale,
Navbar: dtoCmd.Navbar,
QueryHistory: dtoCmd.QueryHistory,
}