From d0f173665fea2c48db35997f52bf2d263f658092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Fern=C3=A1ndez?= Date: Tue, 8 Nov 2022 16:30:03 +0100 Subject: [PATCH] Internationalization: Translate TimePickerContent component (#58316) --- .../TimeRangePicker/TimePickerContent.tsx | 36 ++++++++++--------- public/locales/de-DE/grafana.json | 4 +++ public/locales/en-US/grafana.json | 4 +++ public/locales/es-ES/grafana.json | 4 +++ public/locales/fr-FR/grafana.json | 4 +++ public/locales/pseudo-LOCALE/grafana.json | 4 +++ public/locales/zh-Hans/grafana.json | 4 +++ 7 files changed, 43 insertions(+), 17 deletions(-) diff --git a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx index 549d90fe6d2..519af17d1d9 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerContent.tsx @@ -86,7 +86,7 @@ export const TimePickerContentWithScreenSize: React.FC = (p autoFocus={true} value={searchTerm} onChange={setSearchQuery} - placeholder={'Search quick ranges'} + placeholder={t('time-picker.content.filter-placeholder', 'Search quick ranges')} /> @@ -220,22 +220,24 @@ const EmptyRecentList = memo(() => { return (
-
- - It looks like you haven't used this time picker before. As soon as you enter some time intervals, - recently used intervals will appear here. - -
-
- - Read the documentation - - to find out more about how to enter custom time ranges. -
+ +
+ + It looks like you haven't used this time picker before. As soon as you enter some time intervals, + recently used intervals will appear here. + +
+
+ + Read the documentation + + to find out more about how to enter custom time ranges. +
+
); }); diff --git a/public/locales/de-DE/grafana.json b/public/locales/de-DE/grafana.json index 541076ad8c5..c7c01648628 100644 --- a/public/locales/de-DE/grafana.json +++ b/public/locales/de-DE/grafana.json @@ -417,6 +417,10 @@ "cancel-button": "", "select-time": "" }, + "content": { + "empty-recent-list": "", + "filter-placeholder": "" + }, "footer": { "change-settings-button": "", "fiscal-year-option": "", diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index bf7d1a02a9b..69022fa928c 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -417,6 +417,10 @@ "cancel-button": "Cancel", "select-time": "Select a time range" }, + "content": { + "empty-recent-list": "<0><0>It looks like you haven't used this time picker before. As soon as you enter some time intervals, recently used intervals will appear here.<1><0>Read the documentation<1> to find out more about how to enter custom time ranges.", + "filter-placeholder": "Search quick ranges" + }, "footer": { "change-settings-button": "Change time settings", "fiscal-year-option": "Fiscal year", diff --git a/public/locales/es-ES/grafana.json b/public/locales/es-ES/grafana.json index 666588f6399..0d7176e03b5 100644 --- a/public/locales/es-ES/grafana.json +++ b/public/locales/es-ES/grafana.json @@ -417,6 +417,10 @@ "cancel-button": "", "select-time": "" }, + "content": { + "empty-recent-list": "", + "filter-placeholder": "" + }, "footer": { "change-settings-button": "", "fiscal-year-option": "", diff --git a/public/locales/fr-FR/grafana.json b/public/locales/fr-FR/grafana.json index a9798396279..5220b829313 100644 --- a/public/locales/fr-FR/grafana.json +++ b/public/locales/fr-FR/grafana.json @@ -417,6 +417,10 @@ "cancel-button": "", "select-time": "" }, + "content": { + "empty-recent-list": "", + "filter-placeholder": "" + }, "footer": { "change-settings-button": "", "fiscal-year-option": "", diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index 358aca4534b..daa26c5dd46 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -417,6 +417,10 @@ "cancel-button": "Cäʼnčęľ", "select-time": "Ŝęľęčŧ ä ŧįmę řäʼnģę" }, + "content": { + "empty-recent-list": "<0><0>Ĩŧ ľőőĸş ľįĸę yőū ĥävęʼn&äpőş;ŧ ūşęđ ŧĥįş ŧįmę pįčĸęř þęƒőřę. Åş şőőʼn äş yőū ęʼnŧęř şőmę ŧįmę įʼnŧęřväľş, řęčęʼnŧľy ūşęđ įʼnŧęřväľş ŵįľľ äppęäř ĥęřę.<1><0>Ŗęäđ ŧĥę đőčūmęʼnŧäŧįőʼn<1> ŧő ƒįʼnđ őūŧ mőřę äþőūŧ ĥőŵ ŧő ęʼnŧęř čūşŧőm ŧįmę řäʼnģęş.", + "filter-placeholder": "Ŝęäřčĥ qūįčĸ řäʼnģęş" + }, "footer": { "change-settings-button": "Cĥäʼnģę ŧįmę şęŧŧįʼnģş", "fiscal-year-option": "Fįşčäľ yęäř", diff --git a/public/locales/zh-Hans/grafana.json b/public/locales/zh-Hans/grafana.json index 50a36505735..ca10f87bfed 100644 --- a/public/locales/zh-Hans/grafana.json +++ b/public/locales/zh-Hans/grafana.json @@ -417,6 +417,10 @@ "cancel-button": "", "select-time": "" }, + "content": { + "empty-recent-list": "", + "filter-placeholder": "" + }, "footer": { "change-settings-button": "", "fiscal-year-option": "",