[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

@@ -54,9 +54,9 @@ export const CurlModal: React.FC<CurlProps> = ({
<form>
<div className="form-group">
<label htmlFor="curl-box-1">
Use the following syntax to make the equivalent JSON-RPC
request using <a href="https://curl.se/">cURL</a> from a
commandline interface:
{translate('resources.dev-tools.websocket-api.curl.modal.desc.part1', 'Use the following syntax to make the equivalent JSON-RPC request using ')}
<a href="https://curl.se/">cURL</a>
{translate('resources.dev-tools.websocket-api.curl.modal.desc.part2',' from a commandline interface:')}
</label>
<textarea
id="curl-box-1"

View File

@@ -554,7 +554,6 @@
"name": "ledger_entry - AMM",
"description": "Returns a single Automated Market Maker object in its raw ledger format.",
"link": "/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry#get-amm-object",
"status": "not_enabled",
"body": {
"id": "example_get_amm",
"command": "ledger_entry",

View File

@@ -25,14 +25,22 @@ export const RightSideBar: React.FC<RightSideBarProps> = ({
<ul className="command-list" id="command_list">
{commandList.map((list, index) => (
<Fragment key={index}>
<li className="separator">{list.group}</li>
<li className="separator">
{
list.group.endsWith("Methods") ?
`${list.group.replace('Methods', '')}${translate('Methods')}` :
list.group.endsWith("Examples") ?
`${list.group.replace('Examples', '')}${translate('Examples')}` :
translate(list.group)
}
</li>
{list.methods.map((method) => (
<li
className={`method${method === currentMethod ? " active" : ""}`}
key={method.name}
>
<Link
to={`resources/dev-tools/websocket-api-tool#${slugify(method.name)}`}
to={`/resources/dev-tools/websocket-api-tool#${slugify(method.name)}`}
onClick={() => setCurrentMethod(method)}
>
{method.name}&nbsp;
@@ -49,7 +57,7 @@ export const RightSideBar: React.FC<RightSideBarProps> = ({
className="status clio_only"
title="This method is only available from the Clio server."
>
<i className=" fa fa-exclamation-circle"></i>
<i className="fa fa-exclamation-circle"></i>
</span>
)}
</Link>