mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
I18n: Mark up phrases for translation on NewFolder drawer (#70888)
* I18n:Mark up phrases for translation on NewFolder drawer * Updated variable name from field-label to name-label
This commit is contained in:
parent
af9b071a78
commit
e2dd1e9055
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { Button, Input, Form, Field, HorizontalGroup } from '@grafana/ui';
|
||||
import { Trans, t } from 'app/core/internationalization';
|
||||
|
||||
import { validationSrv } from '../../manage-dashboards/services/ValidationSrv';
|
||||
|
||||
@ -29,12 +30,14 @@ export function NewFolderForm({ onCancel, onConfirm }: Props) {
|
||||
}
|
||||
};
|
||||
|
||||
const fieldNameLabel = t('browse-dashboards.new-folder-form.name-label', 'Folder name');
|
||||
|
||||
return (
|
||||
<Form defaultValues={initialFormModel} onSubmit={(form: FormModel) => onConfirm(form.folderName)}>
|
||||
{({ register, errors }) => (
|
||||
<>
|
||||
<Field
|
||||
label="Folder name"
|
||||
label={fieldNameLabel}
|
||||
invalid={!!errors.folderName}
|
||||
error={errors.folderName && errors.folderName.message}
|
||||
>
|
||||
@ -48,9 +51,11 @@ export function NewFolderForm({ onCancel, onConfirm }: Props) {
|
||||
</Field>
|
||||
<HorizontalGroup>
|
||||
<Button variant="secondary" fill="outline" onClick={onCancel}>
|
||||
Cancel
|
||||
<Trans i18nKey="browse-dashboards.new-folder-form.cancel-label">Cancel</Trans>
|
||||
</Button>
|
||||
<Button type="submit">
|
||||
<Trans i18nKey="browse-dashboards.new-folder-form.create-label">Create</Trans>
|
||||
</Button>
|
||||
<Button type="submit">Create</Button>
|
||||
</HorizontalGroup>
|
||||
</>
|
||||
)}
|
||||
|
@ -38,6 +38,11 @@
|
||||
"manage-permissions": "",
|
||||
"move": ""
|
||||
},
|
||||
"new-folder-form": {
|
||||
"cancel-label": "",
|
||||
"create-label": "",
|
||||
"name-label": ""
|
||||
},
|
||||
"no-results": {
|
||||
"clear": "",
|
||||
"text": ""
|
||||
|
@ -38,6 +38,11 @@
|
||||
"manage-permissions": "Manage permissions",
|
||||
"move": "Move"
|
||||
},
|
||||
"new-folder-form": {
|
||||
"cancel-label": "Cancel",
|
||||
"create-label": "Create",
|
||||
"name-label": "Folder name"
|
||||
},
|
||||
"no-results": {
|
||||
"clear": "Clear search and filters",
|
||||
"text": "No results found for your query."
|
||||
|
@ -38,6 +38,11 @@
|
||||
"manage-permissions": "",
|
||||
"move": ""
|
||||
},
|
||||
"new-folder-form": {
|
||||
"cancel-label": "",
|
||||
"create-label": "",
|
||||
"name-label": ""
|
||||
},
|
||||
"no-results": {
|
||||
"clear": "",
|
||||
"text": ""
|
||||
|
@ -38,6 +38,11 @@
|
||||
"manage-permissions": "",
|
||||
"move": ""
|
||||
},
|
||||
"new-folder-form": {
|
||||
"cancel-label": "",
|
||||
"create-label": "",
|
||||
"name-label": ""
|
||||
},
|
||||
"no-results": {
|
||||
"clear": "",
|
||||
"text": ""
|
||||
|
@ -38,6 +38,11 @@
|
||||
"manage-permissions": "Mäʼnäģę pęřmįşşįőʼnş",
|
||||
"move": "Mővę"
|
||||
},
|
||||
"new-folder-form": {
|
||||
"cancel-label": "Cäʼnčęľ",
|
||||
"create-label": "Cřęäŧę",
|
||||
"name-label": "Főľđęř ʼnämę"
|
||||
},
|
||||
"no-results": {
|
||||
"clear": "Cľęäř şęäřčĥ äʼnđ ƒįľŧęřş",
|
||||
"text": "Ńő řęşūľŧş ƒőūʼnđ ƒőř yőūř qūęřy."
|
||||
|
@ -38,6 +38,11 @@
|
||||
"manage-permissions": "",
|
||||
"move": ""
|
||||
},
|
||||
"new-folder-form": {
|
||||
"cancel-label": "",
|
||||
"create-label": "",
|
||||
"name-label": ""
|
||||
},
|
||||
"no-results": {
|
||||
"clear": "",
|
||||
"text": ""
|
||||
|
Loading…
Reference in New Issue
Block a user