I18n: Mark up phrases for translation on Folder page (#70754)

* I18n:Mark up phrases for translation on Folder page

* Updated the Trans tag to be inside the Button
This commit is contained in:
RoxanaAnamariaTurc 2023-06-27 16:23:57 +01:00 committed by GitHub
parent beb166f1d2
commit 12ddfbf2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 85 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import { locationService, reportInteraction } from '@grafana/runtime';
import { Button, Drawer, Dropdown, Icon, Menu, MenuItem } from '@grafana/ui';
import { Permissions } from 'app/core/components/AccessControl';
import { appEvents, contextSrv } from 'app/core/core';
import { Trans } from 'app/core/internationalization';
import { AccessControlAction, FolderDTO } from 'app/types';
import { ShowModalReactEvent } from 'app/types/events';
@ -101,7 +102,7 @@ export function FolderActionsButton({ folder }: Props) {
<>
<Dropdown overlay={menu} onVisibleChange={setIsOpen}>
<Button variant="secondary">
Folder actions
<Trans i18nKey="browse-dashboards.folder-actions-button.folder-actions">Folder actions</Trans>
<Icon name={isOpen ? 'angle-up' : 'angle-down'} />
</Button>
</Dropdown>

View File

@ -1,5 +1,6 @@
import { NavModel, NavModelItem } from '@grafana/data';
import { config } from '@grafana/runtime';
import { t } from 'app/core/internationalization';
import { contextSrv } from 'app/core/services/context_srv';
import { AccessControlAction, FolderDTO } from 'app/types';
@ -15,7 +16,7 @@ export function buildNavModel(folder: FolderDTO, parents = folder.parents): NavM
const model: NavModelItem = {
icon: 'folder',
id: FOLDER_ID,
subTitle: 'Manage folder dashboards and permissions',
subTitle: t('state.nav-models.manage-folder-subtitle', 'Manage folder dashboards and permissions'),
url: folder.url,
text: folder.title,
children: [
@ -23,7 +24,7 @@ export function buildNavModel(folder: FolderDTO, parents = folder.parents): NavM
active: false,
icon: 'apps',
id: getDashboardsTabID(folder.uid),
text: 'Dashboards',
text: t('state.nav-model.dashboards', 'Dashboards'),
url: folder.url,
},
],
@ -39,7 +40,7 @@ export function buildNavModel(folder: FolderDTO, parents = folder.parents): NavM
active: false,
icon: 'library-panel',
id: getLibraryPanelsTabID(folder.uid),
text: 'Panels',
text: t('state.nav-model.panels', 'Panels'),
url: `${folder.url}/library-panels`,
});
@ -48,7 +49,7 @@ export function buildNavModel(folder: FolderDTO, parents = folder.parents): NavM
active: false,
icon: 'bell',
id: getAlertingTabID(folder.uid),
text: 'Alert rules',
text: t('state.nav-models.alert-rules', 'Alert rules'),
url: `${folder.url}/alerting`,
});
}

View File

@ -9,6 +9,9 @@
"name-column": "",
"tags-column": ""
},
"folder-actions-button": {
"folder-actions": ""
},
"no-results": {
"clear": "",
"text": ""
@ -567,6 +570,16 @@
},
"title": "Einstellungen"
},
"state": {
"nav-model": {
"dashboards": "",
"panels": ""
},
"nav-models": {
"alert-rules": "",
"manage-folder-subtitle": ""
}
},
"tag-filter": {
"loading": "Wird geladen ...",
"no-tags": "Keine Tags gefunden",

View File

@ -9,6 +9,9 @@
"name-column": "Name",
"tags-column": "Tags"
},
"folder-actions-button": {
"folder-actions": "Folder actions"
},
"no-results": {
"clear": "Clear search and filters",
"text": "No results found for your query."
@ -567,6 +570,16 @@
},
"title": "Preferences"
},
"state": {
"nav-model": {
"dashboards": "Dashboards",
"panels": "Panels"
},
"nav-models": {
"alert-rules": "Alert rules",
"manage-folder-subtitle": "Manage folder dashboards and permissions"
}
},
"tag-filter": {
"loading": "Loading...",
"no-tags": "No tags found",

View File

@ -9,6 +9,9 @@
"name-column": "",
"tags-column": ""
},
"folder-actions-button": {
"folder-actions": ""
},
"no-results": {
"clear": "",
"text": ""
@ -567,6 +570,16 @@
},
"title": "Preferencias"
},
"state": {
"nav-model": {
"dashboards": "",
"panels": ""
},
"nav-models": {
"alert-rules": "",
"manage-folder-subtitle": ""
}
},
"tag-filter": {
"loading": "Cargando...",
"no-tags": "No se ha encontrado ninguna etiqueta",

View File

@ -9,6 +9,9 @@
"name-column": "",
"tags-column": ""
},
"folder-actions-button": {
"folder-actions": ""
},
"no-results": {
"clear": "",
"text": ""
@ -567,6 +570,16 @@
},
"title": "Préférences"
},
"state": {
"nav-model": {
"dashboards": "",
"panels": ""
},
"nav-models": {
"alert-rules": "",
"manage-folder-subtitle": ""
}
},
"tag-filter": {
"loading": "Chargement en cours...",
"no-tags": "Aucune étiquette trouvée",

View File

@ -9,6 +9,9 @@
"name-column": "Ńämę",
"tags-column": "Ŧäģş"
},
"folder-actions-button": {
"folder-actions": "Főľđęř äčŧįőʼnş"
},
"no-results": {
"clear": "Cľęäř şęäřčĥ äʼnđ ƒįľŧęřş",
"text": "Ńő řęşūľŧş ƒőūʼnđ ƒőř yőūř qūęřy."
@ -567,6 +570,16 @@
},
"title": "Přęƒęřęʼnčęş"
},
"state": {
"nav-model": {
"dashboards": "Đäşĥþőäřđş",
"panels": "Päʼnęľş"
},
"nav-models": {
"alert-rules": "Åľęřŧ řūľęş",
"manage-folder-subtitle": "Mäʼnäģę ƒőľđęř đäşĥþőäřđş äʼnđ pęřmįşşįőʼnş"
}
},
"tag-filter": {
"loading": "Ŀőäđįʼnģ...",
"no-tags": "Ńő ŧäģş ƒőūʼnđ",

View File

@ -9,6 +9,9 @@
"name-column": "",
"tags-column": ""
},
"folder-actions-button": {
"folder-actions": ""
},
"no-results": {
"clear": "",
"text": ""
@ -567,6 +570,16 @@
},
"title": "首选项"
},
"state": {
"nav-model": {
"dashboards": "",
"panels": ""
},
"nav-models": {
"alert-rules": "",
"manage-folder-subtitle": ""
}
},
"tag-filter": {
"loading": "加载中...",
"no-tags": "未找到标签",