@@ -140,12 +140,12 @@ export const createClientBlocks = ({
140
140
141
141
if ( block . labels . singular ) {
142
142
if ( typeof block . labels . singular === 'function' ) {
143
- clientBlock . labels . singular = block . labels . singular ( { t : i18n . t } )
143
+ clientBlock . labels . singular = block . labels . singular ( { i18n , t : i18n . t } )
144
144
} else {
145
145
clientBlock . labels . singular = block . labels . singular
146
146
}
147
147
if ( typeof block . labels . plural === 'function' ) {
148
- clientBlock . labels . plural = block . labels . plural ( { t : i18n . t } )
148
+ clientBlock . labels . plural = block . labels . plural ( { i18n , t : i18n . t } )
149
149
} else {
150
150
clientBlock . labels . plural = block . labels . plural
151
151
}
@@ -224,7 +224,7 @@ export const createClientField = ({
224
224
//@ts -expect-error - would need to type narrow
225
225
if ( typeof incomingField . label === 'function' ) {
226
226
//@ts -expect-error - would need to type narrow
227
- clientField . label = incomingField . label ( { t : i18n . t } )
227
+ clientField . label = incomingField . label ( { i18n , t : i18n . t } )
228
228
} else {
229
229
//@ts -expect-error - would need to type narrow
230
230
clientField . label = incomingField . label
@@ -246,12 +246,12 @@ export const createClientField = ({
246
246
247
247
if ( incomingField . labels . singular ) {
248
248
if ( typeof incomingField . labels . singular === 'function' ) {
249
- field . labels . singular = incomingField . labels . singular ( { t : i18n . t } )
249
+ field . labels . singular = incomingField . labels . singular ( { i18n , t : i18n . t } )
250
250
} else {
251
251
field . labels . singular = incomingField . labels . singular
252
252
}
253
253
if ( typeof incomingField . labels . plural === 'function' ) {
254
- field . labels . plural = incomingField . labels . plural ( { t : i18n . t } )
254
+ field . labels . plural = incomingField . labels . plural ( { i18n , t : i18n . t } )
255
255
} else {
256
256
field . labels . plural = incomingField . labels . plural
257
257
}
@@ -287,12 +287,12 @@ export const createClientField = ({
287
287
288
288
if ( incomingField . labels . singular ) {
289
289
if ( typeof incomingField . labels . singular === 'function' ) {
290
- field . labels . singular = incomingField . labels . singular ( { t : i18n . t } )
290
+ field . labels . singular = incomingField . labels . singular ( { i18n , t : i18n . t } )
291
291
} else {
292
292
field . labels . singular = incomingField . labels . singular
293
293
}
294
294
if ( typeof incomingField . labels . plural === 'function' ) {
295
- field . labels . plural = incomingField . labels . plural ( { t : i18n . t } )
295
+ field . labels . plural = incomingField . labels . plural ( { i18n , t : i18n . t } )
296
296
} else {
297
297
field . labels . plural = incomingField . labels . plural
298
298
}
@@ -345,7 +345,7 @@ export const createClientField = ({
345
345
}
346
346
347
347
field . options [ i ] = {
348
- label : option . label ( { t : i18n . t } ) ,
348
+ label : option . label ( { i18n , t : i18n . t } ) ,
349
349
value : option . value ,
350
350
}
351
351
}
@@ -409,7 +409,7 @@ export const createClientField = ({
409
409
case 'description' :
410
410
if ( 'description' in tab . admin ) {
411
411
if ( typeof tab . admin ?. description === 'function' ) {
412
- clientTab . admin . description = tab . admin . description ( { t : i18n . t } )
412
+ clientTab . admin . description = tab . admin . description ( { i18n , t : i18n . t } )
413
413
} else {
414
414
clientTab . admin . description = tab . admin . description
415
415
}
0 commit comments