refactor(docker): reuse shared translations
This commit is contained in:
1 parent
65b725e1bb
commit
8d4bf04452
2 files changed
+5
-8
No files matched your search
@@ -54,6 +54,7 @@ type ServiceHealth = RouterOutputs["docker"]["getServiceHealth"]["services"][num
|
|||||||
|
|
||||||
export const DockerReconciliation = ({ defaultServerOrigin }: { defaultServerOrigin: string }) => {
|
export const DockerReconciliation = ({ defaultServerOrigin }: { defaultServerOrigin: string }) => {
|
||||||
const t = useScopedI18n("docker.reconciliation");
|
const t = useScopedI18n("docker.reconciliation");
|
||||||
|
const tGlobal = useI18n();
|
||||||
const utils = clientApi.useUtils();
|
const utils = clientApi.useUtils();
|
||||||
const panelId = useId();
|
const panelId = useId();
|
||||||
const [isOpen, setIsOpen] = useLocalStorage({
|
const [isOpen, setIsOpen] = useLocalStorage({
|
||||||
@@ -97,7 +98,7 @@ export const DockerReconciliation = ({ defaultServerOrigin }: { defaultServerOri
|
|||||||
<Stack gap="sm">
|
<Stack gap="sm">
|
||||||
<Text size="sm">{t("loadError.message")}</Text>
|
<Text size="sm">{t("loadError.message")}</Text>
|
||||||
<Button variant="light" color="red" size="xs" w="fit-content" onClick={() => void reconciliation.refetch()}>
|
<Button variant="light" color="red" size="xs" w="fit-content" onClick={() => void reconciliation.refetch()}>
|
||||||
{t("action.retry")}
|
{tGlobal("common.action.tryAgain")}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Alert>
|
</Alert>
|
||||||
@@ -113,7 +114,7 @@ export const DockerReconciliation = ({ defaultServerOrigin }: { defaultServerOri
|
|||||||
["newRecognized", "newApp", "moved"].includes(state) && !dismissedCandidateKeys.includes(candidateKey),
|
["newRecognized", "newApp", "moved"].includes(state) && !dismissedCandidateKeys.includes(candidateKey),
|
||||||
).length;
|
).length;
|
||||||
const isRefreshing = refreshInventory.isPending || reconciliation.isFetching || health.isFetching;
|
const isRefreshing = refreshInventory.isPending || reconciliation.isFetching || health.isFetching;
|
||||||
const toggleLabel = isOpen ? t("action.hide") : t("action.review");
|
const toggleLabel = isOpen ? tGlobal("common.action.hide") : t("action.review");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Paper withBorder p="sm">
|
<Paper withBorder p="sm">
|
||||||
@@ -183,7 +184,7 @@ export const DockerReconciliation = ({ defaultServerOrigin }: { defaultServerOri
|
|||||||
leftSection={<IconRefresh size={14} />}
|
leftSection={<IconRefresh size={14} />}
|
||||||
onClick={() => refreshInventory.mutate()}
|
onClick={() => refreshInventory.mutate()}
|
||||||
>
|
>
|
||||||
{t("action.refresh")}
|
{tGlobal("docker.action.refresh.label")}
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -293,7 +294,7 @@ const DockerReconciliationCandidate = ({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t("action.createApp")}
|
{tGlobal("integration.field.createApp.label")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{target.kind === "setupIntegration" && (
|
{target.kind === "setupIntegration" && (
|
||||||
|
|||||||
@@ -7123,13 +7123,9 @@
|
|||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"review": "Review",
|
"review": "Review",
|
||||||
"hide": "Hide",
|
|
||||||
"refresh": "Refresh",
|
|
||||||
"retry": "Try again",
|
|
||||||
"dismiss": "Dismiss",
|
"dismiss": "Dismiss",
|
||||||
"restoreDismissed": "Restore dismissed ({count})",
|
"restoreDismissed": "Restore dismissed ({count})",
|
||||||
"setupIntegration": "Set up integration",
|
"setupIntegration": "Set up integration",
|
||||||
"createApp": "Create app",
|
|
||||||
"reviewIntegration": "Review integration",
|
"reviewIntegration": "Review integration",
|
||||||
"viewRepresentation": "View setup"
|
"viewRepresentation": "View setup"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user