File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -458,6 +458,14 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
458458 }
459459 } ) ;
460460
461+ if ( resource . options . fieldGroups ) {
462+ resource . options . fieldGroups . forEach ( ( group , i ) => {
463+ if ( group . groupName ) {
464+ translateRoutines [ `fieldGroup${ i } ` ] = tr ( group . groupName , `resource.${ resource . resourceId } .fieldGroup` ) ;
465+ }
466+ } ) ;
467+ }
468+
461469 const translated : Record < string , string > = { } ;
462470 await Promise . all (
463471 Object . entries ( translateRoutines ) . map ( async ( [ key , value ] ) => {
@@ -531,6 +539,10 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
531539 ) ,
532540 options : {
533541 ...resource . options ,
542+ fieldGroups : resource . options . fieldGroups ?. map ( ( group , i ) => ( {
543+ ...group ,
544+ groupName : translated [ `fieldGroup${ i } ` ] || group . groupName ,
545+ } ) ) ,
534546 bulkActions : allowedBulkActions . map (
535547 ( action , i ) => ( {
536548 ...action ,
You can’t perform that action at this time.
0 commit comments