From 34e70f12ed0b9b95a54a72f98308eca4c542435a Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 28 Sep 2023 13:56:05 -0300 Subject: [PATCH] Use `chrome.i18n.getMessage` within `ErrorRenderer` --- src/_locales/en/messages.json | 3 +++ src/js/components/ErrorRenderer.tsx | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 78f6ed8..3782abc 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -22,5 +22,8 @@ }, "no": { "message": "No" + }, + "error": { + "message": "Error" } } diff --git a/src/js/components/ErrorRenderer.tsx b/src/js/components/ErrorRenderer.tsx index d2746d2..7d974e3 100644 --- a/src/js/components/ErrorRenderer.tsx +++ b/src/js/components/ErrorRenderer.tsx @@ -1,9 +1,10 @@ import React from "react"; export function ErrorRenderer({ error }: {error: Error}) { + const t = chrome.i18n.getMessage; return (
- Error: + {t("error")}:  {error.message}
);