[JA] translate websocket-api-tool page and related component

This commit is contained in:
tequ
2024-07-08 12:51:41 +09:00
parent 2283609785
commit d528533d39
5 changed files with 42 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
import { useEffect, useState, useRef } from 'react';
import { useLocation } from "react-router-dom";
import { useThemeHooks } from '@redocly/theme/core/hooks';
import { Link } from "@redocly/theme/components/Link/Link";
import {
JsonParam,
StringParam,
@@ -213,12 +214,12 @@ export function WebsocketApiTool() {
/>
)}
{currentMethod.link && (
<a
<Link
className="btn btn-outline-secondary api-readmore"
href={currentMethod.link}
to={currentMethod.link}
>
{translate("Read more")}
</a>
</Link>
)}
</div>
@@ -259,8 +260,8 @@ export function WebsocketApiTool() {
data-target="#wstool-1-connection-settings"
>
{`${selectedConnection.shortname}${
connected ? " (Connected)" : " (Not Connected)"
}${connectionError ? " (Failed to Connect)" : ""}`}
connected ? ` (${translate('Connected')})` : ` (${translate('Not Connected')})`
}${connectionError ? ` (${translate('Failed to Connect')})` : ""}`}
</button>
{isConnectionModalVisible && (
<ConnectionModal