Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Translate the failures debug panel strings (#7500)

EthanHealy01526bb85e17e5
diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.toml
index 99d68c35de..70d3d03bf4 100644
--- a/frontend/editor/public/locales/en-US/translation.toml
+++ b/frontend/editor/public/locales/en-US/translation.toml
@@ -7372,6 +7372,14 @@ confirm = "Are you sure?"
dismiss = "Dismiss"
dismissSkipFile = "Skip this file"
+[portal.failures.debug]
+copyJson = "Copy JSON"
+dismissAll = "Dismiss all ({{total}})"
+dismissing = "Dismissing..."
+hideJson = "Hide raw JSON ({{total}})"
+refresh = "Refresh failures"
+showJson = "Show raw JSON ({{total}})"
+
[portal.failures.disabled]
closed = "This failure is already closed."
unavailable = "Not available for this failure."
diff --git a/frontend/editor/src/portal/components/failures/FileRunEventList.tsx b/frontend/editor/src/portal/components/failures/FileRunEventList.tsx
index 477af32e50..2330546655 100644
--- a/frontend/editor/src/portal/components/failures/FileRunEventList.tsx
+++ b/frontend/editor/src/portal/components/failures/FileRunEventList.tsx
@@ -69,7 +69,7 @@ export function FileRunEventList() {
const debugPanel = !import.meta.env.DEV ? null : (
<div className="portal-failures__debug">
<Button variant="secondary" size="sm" onClick={() => void refresh()}>
- Refresh failures
+ {t("portal.failures.debug.refresh", "Refresh failures")}
</Button>
<Button
variant="secondary"
@@ -77,14 +77,24 @@ export function FileRunEventList() {
disabled={clearing || (events?.length ?? 0) === 0}
onClick={() => void dismissAll()}
>
- {clearing ? "Dismissing..." : `Dismiss all (${events?.length ?? 0})`}
+ {clearing
+ ? t("portal.failures.debug.dismissing", "Dismissing...")
+ : t("portal.failures.debug.dismissAll", "Dismiss all ({{total}})", {
+ total: events?.length ?? 0,
+ })}
</Button>
<Button
variant="secondary"
size="sm"
onClick={() => setShowJson((shown) => !shown)}
>
- {showJson ? "Hide" : "Show"} raw JSON ({events?.length ?? 0})
+ {showJson
+ ? t("portal.failures.debug.hideJson", "Hide raw JSON ({{total}})", {
+ total: events?.length ?? 0,
+ })
+ : t("portal.failures.debug.showJson", "Show raw JSON ({{total}})", {
+ total: events?.length ?? 0,
+ })}
</Button>
<Button
variant="secondary"
@@ -95,7 +105,7 @@ export function FileRunEventList() {
)
}
>
- Copy JSON
+ {t("portal.failures.debug.copyJson", "Copy JSON")}
</Button>
{showJson && (
<pre className="portal-failures__debug-json">