From 38d3d1c02b7d468722106bb55de15ed2db254320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 24 Jan 2023 09:32:49 +0100 Subject: [PATCH] Profile: Rename profile page from preferences to profile (#61777) * Rename preferences to Profile * Fixed tests and ran i18 extract --- pkg/services/navtree/navtreeimpl/navtree.go | 2 +- public/app/core/components/NavBar/navBarItem-translations.ts | 2 +- public/app/features/profile/UserProfileEditForm.tsx | 2 +- public/app/features/profile/UserProfileEditPage.test.tsx | 1 - public/locales/de-DE/grafana.json | 3 +-- public/locales/en-US/grafana.json | 5 ++--- public/locales/es-ES/grafana.json | 3 +-- public/locales/fr-FR/grafana.json | 3 +-- public/locales/pseudo-LOCALE/grafana.json | 5 ++--- public/locales/zh-Hans/grafana.json | 3 +-- 10 files changed, 11 insertions(+), 18 deletions(-) diff --git a/pkg/services/navtree/navtreeimpl/navtree.go b/pkg/services/navtree/navtreeimpl/navtree.go index 5e7a3d024dd..2b4285679ad 100644 --- a/pkg/services/navtree/navtreeimpl/navtree.go +++ b/pkg/services/navtree/navtreeimpl/navtree.go @@ -279,7 +279,7 @@ func (s *ServiceImpl) getProfileNode(c *models.ReqContext) *navtree.NavLink { children := []*navtree.NavLink{ { - Text: "Preferences", Id: "profile/settings", Url: s.cfg.AppSubURL + "/profile", Icon: "sliders-v-alt", + Text: "Profile", Id: "profile/settings", Url: s.cfg.AppSubURL + "/profile", Icon: "sliders-v-alt", }, } diff --git a/public/app/core/components/NavBar/navBarItem-translations.ts b/public/app/core/components/NavBar/navBarItem-translations.ts index cf58d991c7c..f47058741eb 100644 --- a/public/app/core/components/NavBar/navBarItem-translations.ts +++ b/public/app/core/components/NavBar/navBarItem-translations.ts @@ -126,7 +126,7 @@ export function getNavTitle(navId: string | undefined) { case 'help': return t('nav.help.title', 'Help'); case 'profile/settings': - return t('nav.profile/settings.title', 'Preferences'); + return t('nav.profile/settings.title', 'Profile'); case 'profile/notifications': return t('nav.profile/notifications.title', 'Notification history'); case 'profile/password': diff --git a/public/app/features/profile/UserProfileEditForm.tsx b/public/app/features/profile/UserProfileEditForm.tsx index 530121c5c9d..1a2f76935c5 100644 --- a/public/app/features/profile/UserProfileEditForm.tsx +++ b/public/app/features/profile/UserProfileEditForm.tsx @@ -31,7 +31,7 @@ export const UserProfileEditForm: FC = ({ user, isSavingUser, updateProfi
{({ register, errors }) => { return ( -
Profile}> +
{ await getTestContext(); const { name, email, username, saveProfile } = getSelectors(); - expect(screen.getByText(/profile/i)).toBeInTheDocument(); expect(name()).toBeInTheDocument(); expect(name()).toHaveValue('Test User'); expect(email()).toBeInTheDocument(); diff --git a/public/locales/de-DE/grafana.json b/public/locales/de-DE/grafana.json index 1ea23009464..dd79858a00e 100644 --- a/public/locales/de-DE/grafana.json +++ b/public/locales/de-DE/grafana.json @@ -555,8 +555,7 @@ "name-error": "Name ist erforderlich", "name-label": "Name", "username-label": "Benutzername" - }, - "title": "Profil" + } }, "user-session": { "browser-column": "Browser & Betriebssystem", diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 328381a74be..c2bb24742a0 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -285,7 +285,7 @@ "title": "Change password" }, "profile/settings": { - "title": "Preferences" + "title": "Profile" }, "profile/switch-org": "Switch organization", "scenes": { @@ -555,8 +555,7 @@ "name-error": "Name is required", "name-label": "Name", "username-label": "Username" - }, - "title": "Profile" + } }, "user-session": { "browser-column": "Browser & OS", diff --git a/public/locales/es-ES/grafana.json b/public/locales/es-ES/grafana.json index 3f8c566d9ba..24d17509b06 100644 --- a/public/locales/es-ES/grafana.json +++ b/public/locales/es-ES/grafana.json @@ -555,8 +555,7 @@ "name-error": "El nombre es obligatorio", "name-label": "Nombre", "username-label": "Nombre de usuario" - }, - "title": "Perfil" + } }, "user-session": { "browser-column": "Navegador y sistema operativo", diff --git a/public/locales/fr-FR/grafana.json b/public/locales/fr-FR/grafana.json index b01904456ba..76f0cf8e44c 100644 --- a/public/locales/fr-FR/grafana.json +++ b/public/locales/fr-FR/grafana.json @@ -555,8 +555,7 @@ "name-error": "Un nom est obligatoire", "name-label": "Nom", "username-label": "Nom d’utilisateur" - }, - "title": "Profil" + } }, "user-session": { "browser-column": "Navigateur et système d'exploitation", diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index 78c9ecf18bb..b480c15e316 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -285,7 +285,7 @@ "title": "Cĥäʼnģę päşşŵőřđ" }, "profile/settings": { - "title": "Přęƒęřęʼnčęş" + "title": "Přőƒįľę" }, "profile/switch-org": "Ŝŵįŧčĥ őřģäʼnįžäŧįőʼn", "scenes": { @@ -555,8 +555,7 @@ "name-error": "Ńämę įş řęqūįřęđ", "name-label": "Ńämę", "username-label": "Ůşęřʼnämę" - }, - "title": "Přőƒįľę" + } }, "user-session": { "browser-column": "ßřőŵşęř & ØŜ", diff --git a/public/locales/zh-Hans/grafana.json b/public/locales/zh-Hans/grafana.json index de1caaa8f02..756b9b2c3b5 100644 --- a/public/locales/zh-Hans/grafana.json +++ b/public/locales/zh-Hans/grafana.json @@ -555,8 +555,7 @@ "name-error": "姓名是必填项", "name-label": "姓名", "username-label": "用户名" - }, - "title": "用户资料" + } }, "user-session": { "browser-column": "浏览器和操作系统",