i18n: Add translation for json editor settings (#75549)

* add translation for json editor settings

* add different translations

* update translation

* update pseudo locale

* update locales

* Use Trans and new i118n key

* add psuedo locale translations

* Update public/locales/pseudo-LOCALE/grafana.json

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Update public/locales/en-US/grafana.json

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Update public/app/features/dashboard/components/DashboardSettings/JsonEditorSettings.tsx

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
This commit is contained in:
otilor
2023-09-28 15:24:50 +01:00
committed by GitHub
co-authored by Isabel
parent 169c5262a5
commit 6ff767a6bb
7 changed files with 42 additions and 3 deletions
@@ -4,6 +4,7 @@ import React, { useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Button, CodeEditor, useStyles2 } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { t, Trans } from 'app/core/internationalization';
import { dashboardWatcher } from 'app/features/live/dashboard/dashboardWatcher';
import { getDashboardSrv } from '../../services/DashboardSrv';
@@ -19,8 +20,10 @@ export function JsonEditorSettings({ dashboard, sectionNav }: SettingsPageProps)
};
const styles = useStyles2(getStyles);
const subTitle =
'The JSON model below is the data structure that defines the dashboard. This includes dashboard settings, panel settings, layout, queries, and so on';
const subTitle = t(
'dashboard-settings.json-editor.subtitle',
'The JSON model below is the data structure that defines the dashboard. This includes dashboard settings, panel settings, layout, queries, and so on.'
);
return (
<Page navModel={sectionNav} subTitle={subTitle}>
@@ -36,7 +39,7 @@ export function JsonEditorSettings({ dashboard, sectionNav }: SettingsPageProps)
{dashboard.meta.canSave && (
<div>
<Button type="submit" onClick={onClick}>
Save changes
<Trans i18nKey="dashboard-settings.json-editor.save-button">Save changes</Trans>
</Button>
</div>
)}
+6
View File
@@ -215,6 +215,12 @@
"unmark-favorite": "Markierung als Favorit entfernen"
}
},
"dashboard-settings": {
"json-editor": {
"save-button": "",
"subtitle": ""
}
},
"data-source-picker": {
"open-advanced-button": ""
},
+6
View File
@@ -215,6 +215,12 @@
"unmark-favorite": "Unmark as favorite"
}
},
"dashboard-settings": {
"json-editor": {
"save-button": "Save changes",
"subtitle": "The JSON model below is the data structure that defines the dashboard. This includes dashboard settings, panel settings, layout, queries, and so on."
}
},
"data-source-picker": {
"open-advanced-button": "Open advanced data source picker"
},
+6
View File
@@ -220,6 +220,12 @@
"unmark-favorite": "Deshacer marca como favorito"
}
},
"dashboard-settings": {
"json-editor": {
"save-button": "",
"subtitle": ""
}
},
"data-source-picker": {
"open-advanced-button": ""
},
+6
View File
@@ -220,6 +220,12 @@
"unmark-favorite": "Supprimer des favoris"
}
},
"dashboard-settings": {
"json-editor": {
"save-button": "",
"subtitle": ""
}
},
"data-source-picker": {
"open-advanced-button": ""
},
@@ -215,6 +215,12 @@
"unmark-favorite": "Ůʼnmäřĸ äş ƒävőřįŧę"
}
},
"dashboard-settings": {
"json-editor": {
"save-button": "Ŝävę čĥäʼnģęş",
"subtitle": "Ŧĥę ĴŜØŃ mőđęľ þęľőŵ įş ŧĥę đäŧä şŧřūčŧūřę ŧĥäŧ đęƒįʼnęş ŧĥę đäşĥþőäřđ. Ŧĥįş įʼnčľūđęş đäşĥþőäřđ şęŧŧįʼnģş, päʼnęľ şęŧŧįʼnģş, ľäyőūŧ, qūęřįęş, äʼnđ şő őʼn."
}
},
"data-source-picker": {
"open-advanced-button": "Øpęʼn äđväʼnčęđ đäŧä şőūřčę pįčĸęř"
},
+6
View File
@@ -210,6 +210,12 @@
"unmark-favorite": "取消标记为收藏"
}
},
"dashboard-settings": {
"json-editor": {
"save-button": "",
"subtitle": ""
}
},
"data-source-picker": {
"open-advanced-button": ""
},