Translates the UI strings on the metrics pages

This commit is contained in:
Alex Corey 2021-09-07 10:59:58 -04:00
parent 6cdaacdda3
commit 47970d3455
9 changed files with 24 additions and 2 deletions

View File

@ -395,6 +395,8 @@ msgstr "Alert modal"
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr "All"
@ -4873,6 +4875,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr "Leave this field blank to make the execution environment globally available."
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr "Legend"

View File

@ -388,6 +388,8 @@ msgstr "Modal de alerta"
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr "Todos"
@ -4773,6 +4775,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr "Deje este campo en blanco para que el entorno de ejecución esté disponible globalmente."
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr "Leyenda"

View File

@ -388,6 +388,8 @@ msgstr "Modal d'alerte"
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr "Tous"
@ -4770,6 +4772,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr "Laissez ce champ vide pour rendre l'environnement d'exécution globalement disponible."
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr "Légende"

View File

@ -388,6 +388,8 @@ msgstr "アラートモーダル"
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr "すべて"
@ -4764,6 +4766,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr "実行環境を世界中で利用できるようにするには、このフィールドを空白のままにします。"
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr "凡例"

View File

@ -388,6 +388,8 @@ msgstr "Waarschuwingsmodus"
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr "Alle"
@ -4770,6 +4772,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr "Laat dit veld leeg om de uitvoeringsomgeving globaal beschikbaar te maken."
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr "Legenda"

View File

@ -388,6 +388,8 @@ msgstr "警报模式"
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr "所有"
@ -4764,6 +4766,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr "将此字段留空以使执行环境全局可用。"
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr "图例"

View File

@ -388,6 +388,8 @@ msgstr ""
#: components/LaunchButton/ReLaunchDropDown.js:48
#: components/PromptDetail/PromptDetail.js:120
#: screens/Metrics/Metrics.js:75
#: screens/Metrics/Metrics.js:75
#: screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/NodeTypeStep.js:257
msgid "All"
msgstr ""
@ -4764,6 +4766,7 @@ msgid "Leave this field blank to make the execution environment globally availab
msgstr ""
#: components/Workflow/WorkflowLegend.js:86
#: screens/Metrics/LineChart.js:120
msgid "Legend"
msgstr ""

View File

@ -1,4 +1,5 @@
import React, { useEffect, useCallback } from 'react';
import { t } from '@lingui/macro';
import * as d3 from 'd3';
function LineChart({ data, helpText }) {
@ -116,7 +117,7 @@ function LineChart({ data, helpText }) {
.attr('class', 'legend-title')
.attr('x', '100')
.attr('y', '50')
.text('Legend');
.text(t`Legend`);
legendContainer.data(data, (d, i) => {
if (d?.name) {

View File

@ -72,7 +72,7 @@ function Metrics() {
const metricOptions = Object.keys(mets);
return {
instances: [...results.map((result) => result.hostname), 'All'],
instances: [...results.map((result) => result.hostname), t`All`],
metrics: metricOptions,
};
}, []),