Skip to content

Commit f977c3a

Browse files
committed
one more I18n
1 parent 2c546f7 commit f977c3a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/templates/endpoint-template.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import codeSamplesTemplate from './code-samples-template.js';
66
import callbackTemplate from './callback-template.js';
77
import { pathSecurityTemplate } from './security-scheme-template.js';
88
import { getCurrentElement, pathIsInSearch, replaceState, toMarkdown } from '../utils/common-utils.js';
9+
import { getI18nText } from '../languages/index.js';
910

1011
function toggleExpand(path) {
1112
if (path.expanded) {
@@ -49,7 +50,7 @@ function endpointHeadTemplate(path) {
4950
? html`<div class="path">${path.path.split('/').filter(t => t.trim()).map(t => html`<span>/${t}</span>`)}</div>`
5051
: html`<div class="">${path.summary || path.shortSummary}</div>`
5152
}
52-
${path.isWebhook ? html`<span style="color:var(--primary-color)"> (Webhook) </span>` : ''}
53+
${path.isWebhook ? html`<span style="color:var(--primary-color)"> (${getI18nText('operations.webhook')}) </span>` : ''}
5354
</div>
5455
</summary>
5556
`;
@@ -67,7 +68,7 @@ function endpointBodyTemplate(path) {
6768
? path.summary ? html`<div class="title" role="heading" aria-level="1">${path.summary}<div>` : path.shortSummary !== path.description ? html`<div class="title" role="heading" aria-level="1">${path.shortSummary}</div>` : ''
6869
: html`
6970
<div class='title mono-font regular-font-size' part="section-operation-url" style='display: flex; flex-wrap: wrap; color:var(--fg3)'>
70-
${path.isWebhook ? html`<span style="color:var(--primary-color)"> WEBHOOK </span>` : ''}
71+
${path.isWebhook ? html`<span style="color:var(--primary-color)">${getI18nText('operations.webhook')}</span>` : ''}
7172
<span part="label-operation-method" class='regular-font upper method-fg bold-text ${path.method}'>${path.method}&nbsp;</span>
7273
<span style="display: flex; flex-wrap: wrap;" part="label-operation-path">${path.path.split('/').filter(t => t.trim()).map(t => html`<span>/${t}</span>`)}</span>
7374
</div>`

src/templates/expanded-endpoint-template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function expandedTagTemplate(tagId, subsectionFullId) {
121121
</div>`
122122
: p.summary || p.shortSummary
123123
}
124-
${p.isWebhook ? '(Webhook)' : ''}
124+
${p.isWebhook ? `(${getI18nText('operations.webhook')})` : ''}
125125
</span>
126126
</div>`)}
127127
</div>

0 commit comments

Comments
 (0)