I18n: Mark up strings on Navigation - Connections section (#70914)

This commit is contained in:
RoxanaAnamariaTurc 2023-06-30 11:27:19 +01:00 committed by GitHub
parent ea361f5db4
commit af9b071a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 163 additions and 3 deletions

View File

@ -118,6 +118,12 @@ export function getNavTitle(navId: string | undefined) {
return t('nav.sign-out.title', 'Sign out');
case 'search':
return t('nav.search-dashboards.title', 'Search dashboards');
case 'connections':
return t('nav.connections.title', 'Connections');
case 'connections-add-new-connection':
return t('nav.add-new-connections.title', 'Add new connection');
case 'connections-datasources':
return t('nav.data-sources.title', 'Data sources');
default:
return undefined;
}
@ -192,6 +198,10 @@ export function getNavSubTitle(navId: string | undefined) {
return t('nav.monitoring.subtitle', 'Monitoring and infrastructure apps');
case 'alerts-and-incidents':
return t('nav.alerts-and-incidents.subtitle', 'Alerting and incident management apps');
case 'connections-add-new-connection':
return t('nav.connections.subtitle', 'Browse and create new connections');
case 'connections-datasources':
return t('nav.data-sources.subtitle', 'View and manage your connected data source connections');
default:
return undefined;
}

View File

@ -4,6 +4,7 @@ import React, { useMemo, useState } from 'react';
import { PluginType } from '@grafana/data';
import { useStyles2, LoadingPlaceholder } from '@grafana/ui';
import { contextSrv } from 'app/core/core';
import { t } from 'app/core/internationalization';
import { useGetAll } from 'app/features/plugins/admin/state/hooks';
import { AccessControlAction } from 'app/types';
@ -75,6 +76,7 @@ export function AddNewConnection() {
};
const showNoResults = useMemo(() => !isLoading && !error && plugins.length < 1, [isLoading, error, plugins]);
const categoryHeaderLabel = t('connections.connect-data.category-header-label', 'Data sources');
return (
<>
@ -82,7 +84,7 @@ export function AddNewConnection() {
<Search onChange={handleSearchChange} />
{/* We need this extra spacing when there are no filters */}
<div className={styles.spacer} />
<CategoryHeader iconName="database" label="Data sources" />
<CategoryHeader iconName="database" label={categoryHeaderLabel} />
{isLoading ? (
<LoadingPlaceholder text="Loading..." />
) : !!error ? (

View File

@ -3,6 +3,7 @@ import React, { FC } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Icon, Input, useStyles2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
const getStyles = (theme: GrafanaTheme2) => ({
searchContainer: css`
@ -19,12 +20,14 @@ const getStyles = (theme: GrafanaTheme2) => ({
`,
});
const placeholder = t('connections.search.placeholder', 'Search all');
export const Search: FC<{ onChange: (e: React.FormEvent<HTMLInputElement>) => void }> = ({ onChange }) => {
const styles = useStyles2(getStyles);
return (
<div className={styles.searchContainer}>
<Input onChange={onChange} prefix={<Icon name="search" />} placeholder="Search all" aria-label="Search all" />
<Input onChange={onChange} prefix={<Icon name="search" />} placeholder={placeholder} aria-label="Search all" />
</div>
);
};

View File

@ -3,6 +3,7 @@ import React from 'react';
import { config } from '@grafana/runtime';
import { LinkButton } from '@grafana/ui';
import { contextSrv } from 'app/core/core';
import { Trans } from 'app/core/internationalization';
import { AccessControlAction } from 'app/types';
import { useDataSourcesRoutes } from '../state';
@ -13,7 +14,7 @@ export function DataSourceAddButton(): JSX.Element | null {
return canCreateDataSource ? (
<LinkButton icon="plus" href={config.appSubUrl + dataSourcesRoutes.New}>
Add new data source
<Trans i18nKey="data-sources.datasource-add-button.label">Add new data source</Trans>
</LinkButton>
) : null;
}

View File

@ -72,6 +72,14 @@
},
"save": "Speichern"
},
"connections": {
"connect-data": {
"category-header-label": ""
},
"search": {
"placeholder": ""
}
},
"dashboard": {
"add-menu": {
"import": "Aus Bibliothek importieren",
@ -157,6 +165,11 @@
"unmark-favorite": "Markierung als Favorit entfernen"
}
},
"data-sources": {
"datasource-add-button": {
"label": ""
}
},
"folder-picker": {
"loading": "Ordner werden geladen …"
},
@ -198,6 +211,9 @@
}
},
"nav": {
"add-new-connections": {
"title": ""
},
"admin": {
"subtitle": "Serverweite Einstellungen und Zugriff auf Ressourcen wie Organisationen, Benutzer und Lizenzen verwalten",
"title": "Server-Administrator"
@ -253,6 +269,10 @@
"config": {
"title": "Verwaltung"
},
"connections": {
"subtitle": "",
"title": ""
},
"correlations": {
"subtitle": "Füge Korrelationen hinzu und konfiguriere sie",
"title": "Korrelationen"
@ -276,6 +296,10 @@
"subtitle": "Erstelle und verwalte Dashboards, um deine Daten zu visualisieren",
"title": "Dashboards"
},
"data-sources": {
"subtitle": "",
"title": ""
},
"datasources": {
"subtitle": "Füge Datenquellen hinzu und konfiguriere sie",
"title": "Datenquellen"

View File

@ -72,6 +72,14 @@
},
"save": "Save"
},
"connections": {
"connect-data": {
"category-header-label": "Data sources"
},
"search": {
"placeholder": "Search all"
}
},
"dashboard": {
"add-menu": {
"import": "Import from library",
@ -157,6 +165,11 @@
"unmark-favorite": "Unmark as favorite"
}
},
"data-sources": {
"datasource-add-button": {
"label": "Add new data source"
}
},
"folder-picker": {
"loading": "Loading folders..."
},
@ -198,6 +211,9 @@
}
},
"nav": {
"add-new-connections": {
"title": "Add new connection"
},
"admin": {
"subtitle": "Manage server-wide settings and access to resources such as organizations, users, and licenses",
"title": "Server admin"
@ -253,6 +269,10 @@
"config": {
"title": "Administration"
},
"connections": {
"subtitle": "Browse and create new connections",
"title": "Connections"
},
"correlations": {
"subtitle": "Add and configure correlations",
"title": "Correlations"
@ -276,6 +296,10 @@
"subtitle": "Create and manage dashboards to visualize your data",
"title": "Dashboards"
},
"data-sources": {
"subtitle": "View and manage your connected data source connections",
"title": "Data sources"
},
"datasources": {
"subtitle": "Add and configure data sources",
"title": "Data sources"

View File

@ -72,6 +72,14 @@
},
"save": "Guardar"
},
"connections": {
"connect-data": {
"category-header-label": ""
},
"search": {
"placeholder": ""
}
},
"dashboard": {
"add-menu": {
"import": "Importar de la biblioteca",
@ -157,6 +165,11 @@
"unmark-favorite": "Deshacer marca como favorito"
}
},
"data-sources": {
"datasource-add-button": {
"label": ""
}
},
"folder-picker": {
"loading": "Cargando carpetas..."
},
@ -198,6 +211,9 @@
}
},
"nav": {
"add-new-connections": {
"title": ""
},
"admin": {
"subtitle": "Administrar la configuración de todo el servidor y el acceso a recursos como organizaciones, usuarios y licencias",
"title": "Administrador del servidor"
@ -253,6 +269,10 @@
"config": {
"title": "Administración"
},
"connections": {
"subtitle": "",
"title": ""
},
"correlations": {
"subtitle": "Añadir y configurar correlaciones",
"title": "Correlaciones"
@ -276,6 +296,10 @@
"subtitle": "Cree y administre paneles de control para visualizar sus datos",
"title": "Paneles de control"
},
"data-sources": {
"subtitle": "",
"title": ""
},
"datasources": {
"subtitle": "Añadir y configurar orígenes de datos",
"title": "Orígenes de datos"

View File

@ -72,6 +72,14 @@
},
"save": "Enregistrer"
},
"connections": {
"connect-data": {
"category-header-label": ""
},
"search": {
"placeholder": ""
}
},
"dashboard": {
"add-menu": {
"import": "Importer depuis la bibliothèque",
@ -157,6 +165,11 @@
"unmark-favorite": "Supprimer des favoris"
}
},
"data-sources": {
"datasource-add-button": {
"label": ""
}
},
"folder-picker": {
"loading": "Chargement des dossiers..."
},
@ -198,6 +211,9 @@
}
},
"nav": {
"add-new-connections": {
"title": ""
},
"admin": {
"subtitle": "Gérer les paramètres à l'échelle du serveur et l'accès aux ressources telles que les organisations, les utilisateurs et les licences",
"title": "Administrateur de serveur"
@ -253,6 +269,10 @@
"config": {
"title": "Administration"
},
"connections": {
"subtitle": "",
"title": ""
},
"correlations": {
"subtitle": "Ajouter et configurer des corrélations",
"title": "Corrélations"
@ -276,6 +296,10 @@
"subtitle": "Créer et gérer des tableaux de bord pour visualiser vos données",
"title": "Tableaux de bord"
},
"data-sources": {
"subtitle": "",
"title": ""
},
"datasources": {
"subtitle": "Ajouter et configurer des sources de données",
"title": "Sources de données"

View File

@ -72,6 +72,14 @@
},
"save": "Ŝävę"
},
"connections": {
"connect-data": {
"category-header-label": "Đäŧä şőūřčęş"
},
"search": {
"placeholder": "Ŝęäřčĥ äľľ"
}
},
"dashboard": {
"add-menu": {
"import": "Ĩmpőřŧ ƒřőm ľįþřäřy",
@ -157,6 +165,11 @@
"unmark-favorite": "Ůʼnmäřĸ äş ƒävőřįŧę"
}
},
"data-sources": {
"datasource-add-button": {
"label": "Åđđ ʼnęŵ đäŧä şőūřčę"
}
},
"folder-picker": {
"loading": "Ŀőäđįʼnģ ƒőľđęřş..."
},
@ -198,6 +211,9 @@
}
},
"nav": {
"add-new-connections": {
"title": "Åđđ ʼnęŵ čőʼnʼnęčŧįőʼn"
},
"admin": {
"subtitle": "Mäʼnäģę şęřvęř-ŵįđę şęŧŧįʼnģş äʼnđ äččęşş ŧő řęşőūřčęş şūčĥ äş őřģäʼnįžäŧįőʼnş, ūşęřş, äʼnđ ľįčęʼnşęş",
"title": "Ŝęřvęř äđmįʼn"
@ -253,6 +269,10 @@
"config": {
"title": "Åđmįʼnįşŧřäŧįőʼn"
},
"connections": {
"subtitle": "ßřőŵşę äʼnđ čřęäŧę ʼnęŵ čőʼnʼnęčŧįőʼnş",
"title": "Cőʼnʼnęčŧįőʼnş"
},
"correlations": {
"subtitle": "Åđđ äʼnđ čőʼnƒįģūřę čőřřęľäŧįőʼnş",
"title": "Cőřřęľäŧįőʼnş"
@ -276,6 +296,10 @@
"subtitle": "Cřęäŧę äʼnđ mäʼnäģę đäşĥþőäřđş ŧő vįşūäľįžę yőūř đäŧä",
"title": "Đäşĥþőäřđş"
},
"data-sources": {
"subtitle": "Vįęŵ äʼnđ mäʼnäģę yőūř čőʼnʼnęčŧęđ đäŧä şőūřčę čőʼnʼnęčŧįőʼnş",
"title": "Đäŧä şőūřčęş"
},
"datasources": {
"subtitle": "Åđđ äʼnđ čőʼnƒįģūřę đäŧä şőūřčęş",
"title": "Đäŧä şőūřčęş"

View File

@ -72,6 +72,14 @@
},
"save": "保存"
},
"connections": {
"connect-data": {
"category-header-label": ""
},
"search": {
"placeholder": ""
}
},
"dashboard": {
"add-menu": {
"import": "从库导入",
@ -157,6 +165,11 @@
"unmark-favorite": "取消标记为收藏"
}
},
"data-sources": {
"datasource-add-button": {
"label": ""
}
},
"folder-picker": {
"loading": "正在加载文件夹..."
},
@ -198,6 +211,9 @@
}
},
"nav": {
"add-new-connections": {
"title": ""
},
"admin": {
"subtitle": "管理整个服务器范围的设置,以及对组织、用户和许可证等资源的访问权限",
"title": "服务器管理员"
@ -253,6 +269,10 @@
"config": {
"title": "管理"
},
"connections": {
"subtitle": "",
"title": ""
},
"correlations": {
"subtitle": "添加并配置相关性",
"title": "相关性"
@ -276,6 +296,10 @@
"subtitle": "创建并管理仪表板,以将您的数据可视化",
"title": "仪表板"
},
"data-sources": {
"subtitle": "",
"title": ""
},
"datasources": {
"subtitle": "添加并配置数据源",
"title": "数据源"