Internationalization: Change locale preference to language (#58359)

* backend locale -> language

* frontend locale -> language

* sample.ini and tests

* fix few last locale -> language

* fix few last locale -> language
This commit is contained in:
Josh Hunt
2022-11-22 12:18:34 +00:00
committed by GitHub
parent 9926931d40
commit 460be70261
20 changed files with 85 additions and 77 deletions
+1
View File
@@ -44,6 +44,7 @@ type CurrentUser struct {
Timezone string `json:"timezone"`
WeekStart string `json:"weekStart"`
Locale string `json:"locale"`
Language string `json:"language"`
HelpFlags1 user.HelpFlags1 `json:"helpFlags1"`
HasEditPermissionInFolders bool `json:"hasEditPermissionInFolders"`
Permissions UserPermissionsMap `json:"permissions,omitempty"`
+3 -3
View File
@@ -10,7 +10,7 @@ type Prefs struct {
HomeDashboardUID string `json:"homeDashboardUID,omitempty"`
Timezone string `json:"timezone"`
WeekStart string `json:"weekStart"`
Locale string `json:"locale"`
Language string `json:"language"`
Navbar pref.NavbarPreference `json:"navbar,omitempty"`
QueryHistory pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
}
@@ -28,7 +28,7 @@ type UpdatePrefsCmd struct {
WeekStart string `json:"weekStart"`
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
Locale string `json:"locale"`
Language string `json:"language"`
}
// swagger:model
@@ -41,7 +41,7 @@ type PatchPrefsCmd struct {
// Enum: utc,browser
Timezone *string `json:"timezone,omitempty"`
WeekStart *string `json:"weekStart,omitempty"`
Locale *string `json:"locale,omitempty"`
Language *string `json:"language,omitempty"`
Navbar *pref.NavbarPreference `json:"navbar,omitempty"`
QueryHistory *pref.QueryHistoryPreference `json:"queryHistory,omitempty"`
HomeDashboardUID *string `json:"homeDashboardUID,omitempty"`