@@ -19,7 +19,6 @@ type NormalizedRestServerConfig = {
1919 enableUi : boolean ;
2020 enableBatch : boolean ;
2121 enableDiscovery : boolean ;
22- enableI18n : boolean ;
2322 documentation : RestApiConfig [ 'documentation' ] ;
2423 responseFormat : RestApiConfig [ 'responseFormat' ] ;
2524 } ;
@@ -127,7 +126,6 @@ export class RestServer {
127126 enableUi : api . enableUi ?? true ,
128127 enableBatch : api . enableBatch ?? true ,
129128 enableDiscovery : api . enableDiscovery ?? true ,
130- enableI18n : api . enableI18n ?? true ,
131129 documentation : api . documentation ,
132130 responseFormat : api . responseFormat ,
133131 } ,
@@ -212,11 +210,6 @@ export class RestServer {
212210 if ( this . config . api . enableBatch ) {
213211 this . registerBatchEndpoints ( basePath ) ;
214212 }
215-
216- // i18n endpoints
217- if ( this . config . api . enableI18n ) {
218- this . registerI18nEndpoints ( basePath ) ;
219- }
220213 }
221214
222215 /**
@@ -679,56 +672,6 @@ export class RestServer {
679672 }
680673 }
681674
682- /**
683- * Register i18n endpoints for locale and translation operations
684- */
685- private registerI18nEndpoints ( basePath : string ) : void {
686- const i18nPath = `${ basePath } /i18n` ;
687-
688- // GET /i18n/locales - List available locales
689- this . routeManager . register ( {
690- method : 'GET' ,
691- path : `${ i18nPath } /locales` ,
692- handler : async ( _req : any , res : any ) => {
693- try {
694- if ( this . protocol . getLocales ) {
695- const locales = await this . protocol . getLocales ( { } ) ;
696- res . json ( locales ) ;
697- } else {
698- res . status ( 501 ) . json ( { error : 'i18n service not available in protocol' } ) ;
699- }
700- } catch ( error : any ) {
701- res . status ( 500 ) . json ( { error : error . message } ) ;
702- }
703- } ,
704- metadata : {
705- summary : 'Get available locales' ,
706- tags : [ 'i18n' ] ,
707- } ,
708- } ) ;
709-
710- // GET /i18n/translations/:locale - Get translations for a locale
711- this . routeManager . register ( {
712- method : 'GET' ,
713- path : `${ i18nPath } /translations/:locale` ,
714- handler : async ( req : any , res : any ) => {
715- try {
716- if ( this . protocol . getTranslations ) {
717- const translations = await this . protocol . getTranslations ( { locale : req . params . locale } ) ;
718- res . json ( translations ) ;
719- } else {
720- res . status ( 501 ) . json ( { error : 'i18n service not available in protocol' } ) ;
721- }
722- } catch ( error : any ) {
723- res . status ( 500 ) . json ( { error : error . message } ) ;
724- }
725- } ,
726- metadata : {
727- summary : 'Get translations for a locale' ,
728- tags : [ 'i18n' ] ,
729- } ,
730- } ) ;
731- }
732675
733676 /**
734677 * Get the route manager
0 commit comments