From 0fc4f53fab995affd3d1b07c4c57bb444233001d Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 7 Apr 2025 09:48:03 +0100 Subject: [PATCH] Internationalisation: More markup for translations (#103392) * some more translations * more markup * more translations * fix tests --- .betterer.results | 176 +----------------- e2e/various-suite/bookmarks.spec.ts | 4 +- .../Table/TableNG/Cells/TableCellNG.tsx | 2 +- .../Table/TableNG/Filter/FilterPopup.tsx | 8 +- .../src/components/Table/TableNG/TableNG.tsx | 4 +- .../AccessControl/AddPermission.tsx | 11 +- .../AccessControl/PermissionListItem.tsx | 16 +- .../AppChrome/MegaMenu/MegaMenu.test.tsx | 6 +- .../AppChrome/MegaMenu/MegaMenuItem.tsx | 11 +- .../components/AppChrome/News/NewsDrawer.tsx | 4 +- .../components/AppChrome/News/NewsWrapper.tsx | 9 +- .../OrganizationSelect.tsx | 4 +- .../AppChrome/QuickAdd/QuickAdd.tsx | 3 +- .../AppChrome/TopBar/ProfileButton.tsx | 2 +- .../AppChrome/TopBar/SingleTopBar.tsx | 4 +- .../components/Breadcrumbs/Breadcrumbs.tsx | 4 +- .../components/CloseButton/CloseButton.tsx | 4 +- .../components/FolderFilter/FolderFilter.tsx | 15 +- .../ForgottenPassword/ChangePassword.tsx | 22 ++- .../ForgottenPassword/ForgottenPassword.tsx | 11 +- .../core/components/FormPrompt/FormPrompt.tsx | 4 +- .../Layers/LayerDragDropList.test.tsx | 4 +- .../components/Layers/LayerDragDropList.tsx | 12 +- .../app/core/components/Layers/LayerName.tsx | 4 +- .../Login/PasswordlessConfirmationForm.tsx | 9 +- .../app/core/components/OptionsUI/color.tsx | 8 +- .../core/components/OptionsUI/fieldColor.tsx | 4 +- .../app/core/components/OptionsUI/units.tsx | 8 +- .../core/components/Page/EditableTitle.tsx | 9 +- .../PanelTypeFilter/PanelTypeFilter.tsx | 21 +-- .../core/components/PluginHelp/PluginHelp.tsx | 4 +- .../QueryOperationRowHeader.tsx | 2 +- .../RolePicker/RoleMenuGroupOption.tsx | 9 +- .../components/RolePicker/RoleMenuOption.tsx | 9 +- .../components/RolePicker/RolePickerMenu.tsx | 4 +- .../RolePicker/RolePickerSubMenu.tsx | 4 +- .../RolePickerDrawer/RolePickerBadges.tsx | 9 +- .../components/Select/OldFolderPicker.tsx | 2 +- .../app/core/components/Select/OrgPicker.tsx | 4 +- .../Select/ServiceAccountPicker.tsx | 6 +- .../app/core/components/Select/SortPicker.tsx | 4 +- .../app/core/components/Select/TeamPicker.tsx | 6 +- .../app/core/components/Select/UserPicker.tsx | 6 +- .../app/core/components/Signup/SignupPage.tsx | 33 ++-- .../core/components/Signup/VerifyEmail.tsx | 10 +- .../core/components/TagFilter/TagFilter.tsx | 7 +- .../core/components/TagFilter/TagOption.tsx | 8 +- .../app/core/navigation/GrafanaRouteError.tsx | 10 +- .../admin/AdminFeatureTogglesTable.tsx | 12 +- .../features/admin/Users/OrgUsersTable.tsx | 4 +- .../app/features/admin/Users/UsersTable.tsx | 4 +- public/locales/en-US/grafana.json | 132 ++++++++++++- 52 files changed, 391 insertions(+), 301 deletions(-) diff --git a/.betterer.results b/.betterer.results index 6c9f4fa1bd8..8a212543f0e 100644 --- a/.betterer.results +++ b/.betterer.results @@ -654,19 +654,15 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"] ], - "packages/grafana-ui/src/components/Table/TableNG/Cells/TableCellNG.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "packages/grafana-ui/src/components/Table/TableNG/Filter/Filter.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "packages/grafana-ui/src/components/Table/TableNG/Filter/FilterPopup.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "packages/grafana-ui/src/components/Table/TableNG/Filter/utils.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -685,8 +681,7 @@ exports[`better eslint`] = { "packages/grafana-ui/src/components/Table/TableNG/TableNG.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "Do not use any type assertions.", "2"] ], "packages/grafana-ui/src/components/Table/TableNG/utils.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -850,68 +845,12 @@ exports[`better eslint`] = { [0, 0, 0, "Do not re-export imported variable (\`updateConfigurationSubtitle\`)", "2"], [0, 0, 0, "Do not re-export imported variable (\`updateNavIndex\`)", "3"] ], - "public/app/core/components/AccessControl/AddPermission.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/core/components/AccessControl/PermissionListItem.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "public/app/core/components/AccessControl/index.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"] ], - "public/app/core/components/AppChrome/MegaMenu/MegaMenuItem.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/AppChrome/News/NewsDrawer.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/AppChrome/News/NewsWrapper.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/AppChrome/OrganizationSwitcher/OrganizationSelect.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/AppChrome/QuickAdd/QuickAdd.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/AppChrome/TopBar/ProfileButton.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/AppChrome/TopBar/SingleTopBar.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/core/components/Breadcrumbs/Breadcrumbs.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/CloseButton/CloseButton.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "public/app/core/components/DynamicImports/SafeDynamicImport.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/core/components/FolderFilter/FolderFilter.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], - "public/app/core/components/ForgottenPassword/ChangePassword.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], - "public/app/core/components/ForgottenPassword/ForgottenPassword.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], - "public/app/core/components/FormPrompt/FormPrompt.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "public/app/core/components/GraphNG/GraphNG.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -920,103 +859,11 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], - "public/app/core/components/Layers/LayerDragDropList.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] - ], - "public/app/core/components/Layers/LayerName.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], "public/app/core/components/LocalStorageValueProvider/index.tsx:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./LocalStorageValueProvider\`)", "0"] ], - "public/app/core/components/Login/PasswordlessConfirmationForm.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/core/components/OptionsUI/color.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/OptionsUI/fieldColor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/OptionsUI/units.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/Page/EditableTitle.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/core/components/PluginHelp/PluginHelp.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/QueryOperationRow/QueryOperationRowHeader.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/RolePicker/RoleMenuGroupOption.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/RolePicker/RoleMenuOption.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/RolePicker/RolePickerMenu.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/RolePicker/RolePickerSubMenu.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/RolePickerDrawer/RolePickerBadges.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/Select/OldFolderPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/Select/OrgPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/Select/ServiceAccountPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/core/components/Select/SortPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/core/components/Select/TeamPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/core/components/Select/UserPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], - "public/app/core/components/Signup/SignupPage.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "8"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "9"] - ], - "public/app/core/components/Signup/VerifyEmail.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] - ], "public/app/core/components/TagFilter/TagFilter.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"] - ], - "public/app/core/components/TagFilter/TagOption.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/core/components/TimeSeries/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -1037,10 +884,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not re-export imported variable (\`profiler\`)", "6"], [0, 0, 0, "Do not re-export imported variable (\`updateLegendValues\`)", "7"] ], - "public/app/core/navigation/GrafanaRouteError.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "public/app/core/navigation/types.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -1136,10 +979,6 @@ exports[`better eslint`] = { "public/app/features/actions/ParamsEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/admin/AdminFeatureTogglesTable.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], "public/app/features/admin/UpgradePage.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -1148,13 +987,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] ], - "public/app/features/admin/Users/OrgUsersTable.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] - ], - "public/app/features/admin/Users/UsersTable.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] - ], "public/app/features/alerting/routes.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], diff --git a/e2e/various-suite/bookmarks.spec.ts b/e2e/various-suite/bookmarks.spec.ts index 6b607c414c4..4bd8746a8f7 100644 --- a/e2e/various-suite/bookmarks.spec.ts +++ b/e2e/various-suite/bookmarks.spec.ts @@ -27,7 +27,7 @@ describe('Pin nav items', () => { bookmarkPinIcon.click({ force: true }); // Check if the Administration menu item is visible in the Bookmarks section - cy.get('[aria-label="Expand section Bookmarks"]').click(); + cy.get('[aria-label="Expand section: Bookmarks"]').click(); const bookmarks = cy.get('[href="/bookmarks"]').parentsUntil('li').siblings('ul'); bookmarks.within(() => { cy.get('a').should('contain.text', 'Administration'); @@ -46,7 +46,7 @@ describe('Pin nav items', () => { // Check if the Bookmark section is visible and open it cy.get('[href="/bookmarks"]').should('be.visible'); - cy.get('[aria-label="Expand section Bookmarks"]').click(); + cy.get('[aria-label="Expand section: Bookmarks"]').click(); // Check if the Administration menu item is visible in the Bookmarks section const bookmarks = cy.get('[href="/bookmarks"]').parentsUntil('li').siblings('ul').children(); diff --git a/packages/grafana-ui/src/components/Table/TableNG/Cells/TableCellNG.tsx b/packages/grafana-ui/src/components/Table/TableNG/Cells/TableCellNG.tsx index dc76802de21..2fdc61d85bf 100644 --- a/packages/grafana-ui/src/components/Table/TableNG/Cells/TableCellNG.tsx +++ b/packages/grafana-ui/src/components/Table/TableNG/Cells/TableCellNG.tsx @@ -186,7 +186,7 @@ export function TableCellNG(props: TableCellNGProps) { {cellInspect && ( { setContextMenuProps({ value: String(value ?? ''), diff --git a/packages/grafana-ui/src/components/Table/TableNG/Filter/FilterPopup.tsx b/packages/grafana-ui/src/components/Table/TableNG/Filter/FilterPopup.tsx index 73bc3253d5c..316ddc6889e 100644 --- a/packages/grafana-ui/src/components/Table/TableNG/Filter/FilterPopup.tsx +++ b/packages/grafana-ui/src/components/Table/TableNG/Filter/FilterPopup.tsx @@ -5,7 +5,7 @@ import { Field, GrafanaTheme2, SelectableValue } from '@grafana/data'; import { Button, ButtonSelect, ClickOutsideWrapper, FilterInput, Label, Stack } from '../../..'; import { useStyles2, useTheme2 } from '../../../../themes'; -import { Trans } from '../../../../utils/i18n'; +import { t, Trans } from '../../../../utils/i18n'; import { FilterType } from '../types'; import { FilterList } from './FilterList'; @@ -118,7 +118,11 @@ export const FilterPopup = ({
- + )} - } aria-label="Tag filter" /> + } + aria-label={t('tag-filter.select-aria-label', 'Tag filter')} + />
); }; diff --git a/public/app/core/components/TagFilter/TagOption.tsx b/public/app/core/components/TagFilter/TagOption.tsx index 57abca0f942..a305d033a7c 100644 --- a/public/app/core/components/TagFilter/TagOption.tsx +++ b/public/app/core/components/TagFilter/TagOption.tsx @@ -4,6 +4,8 @@ import { OptionProps } from 'react-select'; import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; +import { t } from '../../internationalization'; + import { TagBadge } from './TagBadge'; export interface TagSelectOption { @@ -16,7 +18,11 @@ export const TagOption = ({ data, className, label, isFocused, innerProps }: Opt const styles = useStyles2(getStyles); return ( -
+
{typeof label === 'string' ? : label}
diff --git a/public/app/core/navigation/GrafanaRouteError.tsx b/public/app/core/navigation/GrafanaRouteError.tsx index bc45925cd0b..f730576c675 100644 --- a/public/app/core/navigation/GrafanaRouteError.tsx +++ b/public/app/core/navigation/GrafanaRouteError.tsx @@ -6,7 +6,7 @@ import { GrafanaTheme2, locationUtil, PageLayoutType } from '@grafana/data'; import { Button, ErrorWithStack, useStyles2 } from '@grafana/ui'; import { Page } from '../components/Page/Page'; -import { Trans } from '../internationalization'; +import { t, Trans } from '../internationalization'; interface Props { error: Error | null; @@ -45,11 +45,15 @@ export function GrafanaRouteError({ error, errorInfo }: Props) { - +
)} {!isChunkLoadingError && ( - + )}
diff --git a/public/app/features/admin/AdminFeatureTogglesTable.tsx b/public/app/features/admin/AdminFeatureTogglesTable.tsx index 46c85c140de..7370b4bab52 100644 --- a/public/app/features/admin/AdminFeatureTogglesTable.tsx +++ b/public/app/features/admin/AdminFeatureTogglesTable.tsx @@ -166,10 +166,16 @@ export function AdminFeatureTogglesTable({ featureToggles, allowEditing, onUpdat body={

- Some features are stable (GA) and enabled by default, whereas some are currently in their preliminary - Beta phase, available for early adoption. + + Some features are stable (GA) and enabled by default, whereas some are currently in their + preliminary Beta phase, available for early adoption. + +

+

+ + We advise understanding the implications of each feature change before making modifications. +

-

We advise understanding the implications of each feature change before making modifications.

} confirmText="Save changes" diff --git a/public/app/features/admin/Users/OrgUsersTable.tsx b/public/app/features/admin/Users/OrgUsersTable.tsx index 9e27806a05c..a80bd3161cb 100644 --- a/public/app/features/admin/Users/OrgUsersTable.tsx +++ b/public/app/features/admin/Users/OrgUsersTable.tsx @@ -241,7 +241,9 @@ export const OrgUsersTable = ({ setUserToRemove(original); }} icon="times" - aria-label={`Delete user ${original.name}`} + aria-label={t('admin.org-users-table.delete-aria-label', 'Delete user: {{name}}', { + name: original.name, + })} /> ) ); diff --git a/public/app/features/admin/Users/UsersTable.tsx b/public/app/features/admin/Users/UsersTable.tsx index 405186e229b..57f7fefc26e 100644 --- a/public/app/features/admin/Users/UsersTable.tsx +++ b/public/app/features/admin/Users/UsersTable.tsx @@ -174,8 +174,8 @@ export const UsersTable = ({ size="sm" icon="pen" href={`admin/users/edit/${original.uid}`} - aria-label={`Edit user ${original.name}`} - tooltip={'Edit user'} + aria-label={t('admin.users-table.edit-aria-label', 'Edit user: {{name}}', { name: original.name })} + tooltip={t('admin.users-table.edit-tooltip', 'Edit user')} /> ); }, diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 8027092af74..7ea8d472380 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -2,7 +2,11 @@ "_comment": "The code is the source of truth for English phrases. They should be updated in the components directly, and additional plurals specified in this file.", "access-control": { "add-permission": { + "built-in-aria-label": "Built-in role picker", + "level-aria-label": "Permission level", + "permissions-aria-label": "Permissions slider", "role-label": "Role", + "role-select-aria-label": "Role to add new permission to", "serviceaccount-label": "Service Account", "team-label": "Team", "title": "Add permission for", @@ -15,7 +19,9 @@ "permission": "Permission" }, "permission-list-item": { - "inherited": "Inherited from folder" + "inherited": "Inherited from folder", + "locked-aria-label": "Locked permission indicator", + "remove-aria-label": "Remove permission for {{identifier}}" }, "permissions": { "add-label": "Add a permission", @@ -60,6 +66,8 @@ } }, "admin-feature-toggles-table": { + "confirm-modal-body-1": "Some features are stable (GA) and enabled by default, whereas some are currently in their preliminary Beta phase, available for early adoption.", + "confirm-modal-body-2": "We advise understanding the implications of each feature change before making modifications.", "get-stage-cell": { "beta": "Beta", "deprecated": "Deprecated", @@ -167,6 +175,7 @@ "columns": { "aria-label-role": "Role" }, + "delete-aria-label": "Delete user: {{name}}", "title-delete": "Delete" }, "orgs": { @@ -267,6 +276,8 @@ "columns": { "title-edit-user": "Edit user" }, + "edit-aria-label": "Edit user: {{name}}", + "edit-tooltip": "Edit user", "last-seen-never": "Never", "no-licensed-roles": "Not assigned" } @@ -2257,6 +2268,9 @@ "success": "Copied" } }, + "close-button": { + "tooltip": "Close" + }, "combobox": { "async": { "error": "An error occurred while loading options." @@ -4295,10 +4309,13 @@ } }, "folder-filter": { - "clear-folder-button": "Clear folders" + "clear-folder-button": "Clear folders", + "select-aria-label": "Folder filter", + "select-placeholder": "Filter by folder" }, "folder-picker": { "create-instructions": "Press enter to create the new folder.", + "input-placeholder": "Press enter to confirm new folder", "loading": "Loading folders..." }, "folder-repo": { @@ -4307,18 +4324,25 @@ "forgot-password": { "back-button": "Back to login", "change-password": { + "confirm-label": "Confirm new password", + "default-password-alert": "Continuing to use the default password exposes you to security risks.", + "new-password-label": "New password", "skip-button": "Skip", "submit-button": "Submit" }, "contact-admin": "Did you forget your username or email? Contact your Grafana administrator.", "email-sent": "An email with a reset link has been sent to the email address. You should receive it shortly.", "reset-password-header": "Reset password", - "send-email-button": "Send reset email" + "send-email-button": "Send reset email", + "user-field-description": "Enter your information to get a reset link sent to you", + "user-field-label": "User", + "user-field-placeholder": "Email or username" }, "form-prompt": { "continue-button": "Continue editing", "description": "Changes that you made may not be saved.", - "discard-button": "Discard unsaved changes" + "discard-button": "Discard unsaved changes", + "title": "Leave page?" }, "frontendtests": { "test-key": "test-key not found" @@ -4588,6 +4612,7 @@ "cell-filter-on": "Filter for value", "cell-filter-out": "Filter out value", "cell-inspect": "Inspect value", + "cell-inspect-tooltip": "Inspect value", "copy": "Copy to Clipboard", "count": "Count", "csv-counts": "Rows:{{rows}}, Columns:{{columns}} <5>", @@ -4597,8 +4622,10 @@ "filter-popup-cancel": "Cancel", "filter-popup-clear": "Clear filter", "filter-popup-heading": "Filter by values:", + "filter-popup-input-placeholder": "Filter values", "filter-popup-match-case": "Match case", "inspect-drawer-title": "Inspect value", + "inspect-menu-label": "Inspect value", "no-values-label": "No values", "pagination-summary": "{{itemsRangeStart}} - {{displayedEnd}} of {{numRows}} rows" }, @@ -4741,6 +4768,16 @@ "sign-up": "Sign up" } }, + "layers": { + "layer-drag-drop-list": { + "draggable-aria-label": "Drag and drop to reorder", + "duplicate-tooltip": "Duplicate", + "remove-tooltip": "Remove" + }, + "layer-name": { + "edit-layer-title": "Edit layer name" + } + }, "ldap-drawer": { "attributes-section": { "description": "Specify the LDAP attributes that map to the user's given name, surname, and email address, ensuring the application correctly retrieves and displays user information.", @@ -4999,10 +5036,10 @@ "email-placeholder": "email", "email-required": "Email is required", "name-label": "Name", - "name-placeholder": "name", "password-label": "Password", "password-placeholder": "password", "password-required": "Password is required", + "passwordless-username-label": "Username", "submit-label": "Log in", "submit-loading-label": "Logging in...", "username-label": "Email or username", @@ -5740,6 +5777,12 @@ } }, "navigation": { + "breadcrumbs": { + "aria-label": "Breadcrumbs" + }, + "help": { + "aria-label": "Help" + }, "invite-user": { "invite-button": "Invite", "invite-tooltip": "Invite new member" @@ -5749,6 +5792,7 @@ "remove-bookmark": "Remove from Bookmarks" }, "kiosk": { + "tooltip": "Enable kiosk mode", "tv-alert": "Press ESC to exit kiosk mode" }, "megamenu": { @@ -5758,12 +5802,26 @@ "open": "Open menu", "undock": "Undock menu" }, + "megamenu-item": { + "collapse-aria-label": "Collapse section: {{sectionName}}", + "expand-aria-label": "Expand section: {{sectionName}}" + }, + "org-switcher": { + "aria-label": "Change organization" + }, + "profile": { + "aria-label": "Profile" + }, + "quick-add": { + "aria-label": "New" + }, "rss-button": "Latest from the blog" }, "news": { "drawer": { - "close": "Close Drawer" + "close": "Close drawer" }, + "link-title": "Go to Grafana labs blog", "title": "Latest from the blog" }, "notifications": { @@ -5788,6 +5846,17 @@ "error": "Login provider denied login request" } }, + "options-ui": { + "color": { + "clear-tooltip": "Clear settings" + }, + "field-color": { + "color-by-label": "Color series by" + }, + "units": { + "clear-tooltip": "Clear unit selection" + } + }, "org": { "new-org-page": { "create": "Create", @@ -5809,6 +5878,14 @@ "submit": "Submit" } }, + "org-picker": { + "select-placeholder": "Select organization" + }, + "page": { + "editable-title": { + "edit-tooltip": "Edit title" + } + }, "panel": { "header-menu": { "copy": "Copy", @@ -5856,7 +5933,10 @@ "unsupported-layout": "Unsupported layout" }, "panel-type-filter": { - "clear-button": "Clear types" + "clear-button": "Clear types", + "select-aria-label": "Panel type filter", + "select-no-options": "No panel types found", + "select-placeholder": "Filter by type" }, "playlist": { "start-modal": { @@ -6065,6 +6145,7 @@ }, "plugin-help": { "error": "An error occurred when loading help.", + "loading": "Loading help...", "not-found": "No query help could be found." }, "plugin-installed-badge": { @@ -6822,9 +6903,13 @@ "clear-button": "Clear all", "tooltip": "You can now select the \"No basic role\" option and add permissions to your custom needs. You can find more information in <1>our documentation." }, + "menu-aria-label": "Role picker menu", + "menu-group-option-aria-label": "Role picker option", + "menu-option-aria-label": "Role picker option", "sub-menu": { "clear-button": "Clear" }, + "sub-menu-aria-label": "Role picker submenu", "title": { "description": "Assign roles to users to ensure granular control over access to Grafana‘s features and resources. Find out more in our <2>documentation." } @@ -6832,10 +6917,13 @@ "role-picker-drawer": { "basic-roles": { "label": "Basic Roles" - } + }, + "user-count": "+{{numUsers}}" }, "route-error": { "description": "Grafana has likely been updated. Please try reloading the page.", + "error-title": "Error details", + "error-unexpected-title": "An unexpected error happened", "reload-button": "Reload", "title": "Unable to find application file" }, @@ -6952,6 +7040,10 @@ "label": "Role" } }, + "service-account-picker": { + "select-aria-label": "Service account picker", + "select-placeholder": "Start typing to search for service accounts" + }, "service-accounts": { "empty-state": { "button-title": "Add service account", @@ -7220,10 +7312,19 @@ }, "sign-up": { "back-button": "Back to login", + "confirm-password-label": "Confirm password", + "email-label": "Email", + "org-name-label": "Org. name", + "password-label": "Password", "submit-button": "Submit", + "user-name-label": "Your name", + "user-name-placeholder": "(optional)", + "verification-code-label": "Email verification code (sent to your email)", "verify": { "back-button": "Back to login", "complete-button": "Complete signup", + "email-description": "Enter your email address to get a verification link sent to you", + "email-label": "Email", "header": "Verify email", "info": "An email with a verification link has been sent to the email address. You should receive it shortly.", "send-button": "Send verification email" @@ -7281,6 +7382,9 @@ "url-column-header": "Snapshot url", "view-button": "View" }, + "sort-picker": { + "select-aria-label": "Sort" + }, "support-bundles": { "new-bundle-button": { "new-support-bundle": "New support bundle" @@ -7308,7 +7412,13 @@ "clear-button": "Clear tags", "loading": "Loading...", "no-tags": "No tags found", - "placeholder": "Filter by tag" + "placeholder": "Filter by tag", + "select-aria-label": "Tag filter", + "tag-option-label": "Tag option" + }, + "team-picker": { + "select-aria-label": "Team picker", + "select-placeholder": "Select a team" }, "teams": { "create-team": { @@ -7763,6 +7873,10 @@ "select-org-button": "Select organisation", "title": "Organizations" }, + "user-picker": { + "select-aria-label": "User picker", + "select-placeholder": "Start typing to search for user" + }, "user-profile": { "fields": { "email-error": "Email is required",