Apply i18n
This commit is contained in:
@@ -258,7 +258,7 @@ export default function RunEditor({
|
||||
<div className="w-96 h-72">
|
||||
<div className="flex items-center">
|
||||
<h4 className="font-bold">{messages.progress}</h4>
|
||||
<Tooltip content="Refresh">
|
||||
<Tooltip content={messages.refresh}>
|
||||
<Button
|
||||
isIconOnly
|
||||
size="sm"
|
||||
@@ -270,7 +270,10 @@ export default function RunEditor({
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<RunProgressChart statusCounts={runStatusCounts} />
|
||||
<RunProgressChart
|
||||
statusCounts={runStatusCounts}
|
||||
messages={messages}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-grow">
|
||||
|
||||
@@ -2,14 +2,15 @@ import React from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
import { testRunCaseStatus } from "@/config/selection";
|
||||
import { RunStatusCountType } from "@/types/run";
|
||||
import { RunStatusCountType, RunMessages } from "@/types/run";
|
||||
const Chart = dynamic(() => import("react-apexcharts"), { ssr: false });
|
||||
|
||||
type Props = {
|
||||
statusCounts: RunStatusCountType[];
|
||||
messages: RunMessages;
|
||||
};
|
||||
|
||||
export default function RunProgressDounut({ statusCounts }: Props) {
|
||||
export default function RunProgressDounut({ statusCounts, messages }: Props) {
|
||||
const [chartData, setChartData] = useState({
|
||||
series: [],
|
||||
options: {
|
||||
@@ -26,7 +27,7 @@ export default function RunProgressDounut({ statusCounts }: Props) {
|
||||
return found ? found.count : 0;
|
||||
});
|
||||
|
||||
const labels = testRunCaseStatus.map((entry) => entry.name);
|
||||
const labels = testRunCaseStatus.map((entry) => messages[entry.uid]);
|
||||
const colors = testRunCaseStatus.map((entry) => entry.chartColor);
|
||||
|
||||
setChartData({
|
||||
|
||||
@@ -12,6 +12,7 @@ export default function Page({
|
||||
updating: t("updating"),
|
||||
update: t("update"),
|
||||
progress: t("progress"),
|
||||
refresh: t("refresh"),
|
||||
id: t("id"),
|
||||
title: t("title"),
|
||||
pleaseEnter: t("please_enter"),
|
||||
|
||||
Reference in New Issue
Block a user