@@ -6,6 +6,7 @@ import codeSamplesTemplate from './code-samples-template.js';
66import callbackTemplate from './callback-template.js' ;
77import { pathSecurityTemplate } from './security-scheme-template.js' ;
88import { getCurrentElement , pathIsInSearch , replaceState , toMarkdown } from '../utils/common-utils.js' ;
9+ import { getI18nText } from '../languages/index.js' ;
910
1011function 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 } </ 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 > `
0 commit comments