Преглед изворни кода

Fix #4828 showing incorrect certicificate value

Jamie Curnow пре 1 месец
родитељ
комит
a3a0614948
1 измењених фајлова са 10 додато и 1 уклоњено
  1. 10 1
      frontend/src/components/Table/Formatter/CertificateFormatter.tsx

+ 10 - 1
frontend/src/components/Table/Formatter/CertificateFormatter.tsx

@@ -5,5 +5,14 @@ interface Props {
 	certificate?: Certificate;
 }
 export function CertificateFormatter({ certificate }: Props) {
-	return <T id={certificate ? "lets-encrypt" : "http-only"} />;
+	let translation = "http-only";
+	if (certificate) {
+		translation = certificate.provider;
+		if (translation === "letsencrypt") {
+			translation = "lets-encrypt";
+		} else if (translation === "other") {
+			translation = "certificates.custom";
+		}
+	}
+	return <T id={translation} />;
 }