mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
fix: translate leftover hardcoded ui text
This commit is contained in:
1 parent
1b342322dc
commit
20f19ff13b
26 files changed
+80
-41
No files matched your search
+3
-3
@@ -2874,7 +2874,7 @@ export function AppShell({
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-full w-12.5 border-y-0 border-border rounded-none text-muted-foreground hover:text-foreground"
|
||||
title="Reset width"
|
||||
title={t("nav.resetSidebarWidth")}
|
||||
onClick={() => setSidebarWidth(291)}
|
||||
>
|
||||
<RotateCcw className="size-3.5" />
|
||||
@@ -2913,7 +2913,7 @@ export function AppShell({
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-full w-12.5 rounded-none text-muted-foreground hover:text-foreground"
|
||||
title="Collapse sidebar"
|
||||
title={t("nav.collapseSidebar")}
|
||||
onClick={() => {
|
||||
setSettingsFullscreen(false);
|
||||
setSidebarOpen(false);
|
||||
@@ -3005,7 +3005,7 @@ export function AppShell({
|
||||
{!isMobile && !sidebarOpen && (
|
||||
<button
|
||||
onClick={() => setSidebarOpen(true)}
|
||||
title="Open Sidebar"
|
||||
title={t("nav.openSidebar")}
|
||||
className="absolute left-0 top-0 bottom-0 z-20 flex items-center justify-center w-6 bg-sidebar border-r border-border text-muted-foreground hover:text-accent-brand hover:bg-accent-brand/5 transition-colors"
|
||||
>
|
||||
<ChevronRight className="size-3.5" />
|
||||
|
||||
@@ -299,7 +299,7 @@ export function ElectronLoginForm({
|
||||
ref={iframeRef}
|
||||
src={serverUrl}
|
||||
className="w-full h-full border-0"
|
||||
title="Server Authentication"
|
||||
title={t("auth.serverAuthentication")}
|
||||
sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-storage-access-by-user-activation allow-top-navigation allow-top-navigation-by-user-activation allow-modals allow-downloads"
|
||||
allow="clipboard-read; clipboard-write; publickey-credentials-get; publickey-credentials-create"
|
||||
/>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import * as React from "react";
|
||||
import { Check, ChevronDown, Search } from "lucide-react";
|
||||
|
||||
@@ -95,6 +96,7 @@ function Select2({
|
||||
"aria-label": ariaLabel,
|
||||
...props
|
||||
}: Select2Props) {
|
||||
const { t } = useTranslation();
|
||||
const options = React.useMemo(() => getOptions(children), [children]);
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const [query, setQuery] = React.useState("");
|
||||
@@ -197,7 +199,7 @@ function Select2({
|
||||
>
|
||||
{filteredOptions.length === 0 ? (
|
||||
<div className="px-2 py-6 text-center text-sm text-muted-foreground">
|
||||
No results found
|
||||
{t("common.noResults")}
|
||||
</div>
|
||||
) : (
|
||||
filteredOptions.map((option, index) => {
|
||||
|
||||
@@ -657,6 +657,7 @@ function CardItem({
|
||||
statusLoading?: boolean;
|
||||
isVisible?: boolean;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const cardRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
const onResizeMouseDown = useCallback(
|
||||
@@ -760,7 +761,7 @@ function CardItem({
|
||||
<div
|
||||
onMouseDown={onResizeMouseDown}
|
||||
className="absolute bottom-0 left-0 right-0 h-2 z-20 flex items-center justify-center cursor-row-resize group/resize"
|
||||
title="Drag to resize"
|
||||
title={t("cardGrid.dragToResize")}
|
||||
>
|
||||
<div className="w-12 h-0.5 bg-border group-hover/resize:bg-accent-brand/60 transition-colors rounded-full" />
|
||||
</div>
|
||||
@@ -979,11 +980,12 @@ function ColumnDivider({
|
||||
}: {
|
||||
onMouseDown: (e: React.MouseEvent) => void;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div
|
||||
onMouseDown={onMouseDown}
|
||||
className="w-3 shrink-0 flex items-center justify-center cursor-col-resize group/divider self-stretch z-10"
|
||||
title="Drag to resize columns"
|
||||
title={t("dashboardTab.dragToResizeColumns")}
|
||||
>
|
||||
<div className="w-px h-full bg-border group-hover/divider:bg-accent-brand/50 transition-colors" />
|
||||
<div className="absolute size-4 flex items-center justify-center opacity-0 group-hover/divider:opacity-100 transition-opacity">
|
||||
|
||||
+10
-4
@@ -185,7 +185,8 @@
|
||||
"required": "Required",
|
||||
"remove": "Remove",
|
||||
"add": "Add",
|
||||
"update": "Update"
|
||||
"update": "Update",
|
||||
"noResults": "No results found"
|
||||
},
|
||||
"onboarding": {
|
||||
"stepCounter": "Step {{current}} of {{total}}",
|
||||
@@ -301,7 +302,10 @@
|
||||
"reconnectTerminalsFailed_one": "Could not start reconnecting {{count}} terminal",
|
||||
"reconnectTerminalsFailed_other": "Could not start reconnecting {{count}} terminals",
|
||||
"fullscreenUnsupported": "Fullscreen is not supported by this browser",
|
||||
"fullscreenFailed": "Could not toggle fullscreen"
|
||||
"fullscreenFailed": "Could not toggle fullscreen",
|
||||
"resetSidebarWidth": "Reset width",
|
||||
"collapseSidebar": "Collapse sidebar",
|
||||
"openSidebar": "Open sidebar"
|
||||
},
|
||||
"hosts": {
|
||||
"hosts": "Hosts",
|
||||
@@ -1048,7 +1052,8 @@
|
||||
"confirmResetDataWipe": "This account has not logged in since the encryption upgrade, so its stored data cannot be recovered without the old password. Resetting will permanently delete its hosts, credentials and snippets. Continue?",
|
||||
"password": "Password",
|
||||
"secondFactorUnavailable": "Your account uses a second factor that is not available right now. Contact an admin to reset it.",
|
||||
"secondFactorNoUI": "This second factor cannot be shown on this screen. Contact an admin."
|
||||
"secondFactorNoUI": "This second factor cannot be shown on this screen. Contact an admin.",
|
||||
"serverAuthentication": "Server sign-in"
|
||||
},
|
||||
"hostKey": {
|
||||
"verifyNewHost": "Verify SSH Host Key",
|
||||
@@ -1181,7 +1186,8 @@
|
||||
"editModeInstructions": "Drag cards to reorder · Drag the column divider to resize columns · Drag the bottom edge of a card to resize its height · Trash to remove",
|
||||
"empty": "Empty",
|
||||
"clear": "Clear",
|
||||
"viewServerDetails": "View server details"
|
||||
"viewServerDetails": "View server details",
|
||||
"dragToResizeColumns": "Drag to resize columns"
|
||||
},
|
||||
"admin": {
|
||||
"sectionGeneral": "General",
|
||||
|
||||
@@ -570,7 +570,7 @@ export function CommandPalette({
|
||||
<>
|
||||
<div className="w-px h-3.5 bg-border/60 mx-0.5 shrink-0" />
|
||||
<button
|
||||
title="Edit Host"
|
||||
title={t("hosts.editHost")}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
setIsOpen(false);
|
||||
|
||||
@@ -94,7 +94,7 @@ export function AdminCreateUserDialog({
|
||||
<div className="relative">
|
||||
<Input
|
||||
type={showNewPassword ? "text" : "password"}
|
||||
placeholder="Enter password"
|
||||
placeholder={t("placeholders.enterPassword")}
|
||||
value={newPassword}
|
||||
onChange={(e) => setNewPassword(e.target.value)}
|
||||
onKeyDown={(e) => e.key === "Enter" && handleCreateUser()}
|
||||
|
||||
@@ -17,7 +17,7 @@ describe("ElectronLoginForm", () => {
|
||||
);
|
||||
|
||||
const permissions = screen
|
||||
.getByTitle("Server Authentication")
|
||||
.getByTitle("auth.serverAuthentication")
|
||||
.getAttribute("allow");
|
||||
|
||||
expect(permissions).toContain("publickey-credentials-get");
|
||||
@@ -38,7 +38,7 @@ describe("ElectronLoginForm", () => {
|
||||
/>,
|
||||
);
|
||||
const frame = screen.getByTitle(
|
||||
"Server Authentication",
|
||||
"auth.serverAuthentication",
|
||||
) as HTMLIFrameElement;
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
|
||||
Reference in new issue
Block a user