Some existing extensions use the $t:-placeholders for field properties like name, description, text (see defineInterface → options).
When I import / activate my extension in the data studio, with the translation strings matching the $t:-keys, the labels in the interface form are shown as keys and not as the translated values (see the name and placeholder label values in the image at the bottom of the post).
defineInterface({
// ...
type: 'interface',
component: InterfaceComponent,
types: ['json'],
options: [
{
field: 'text',
→ name: '$t:interfaces.tmhbuttonlink.fields.text.name',
type: 'string',
meta: {
interface: 'input',
width: 'full',
options: {
→ placeholder: '$t:interfaces.tmhbuttonlink.fields.text.placeholder',
},
},
},
]
})
The closest workaround to this problem can be found here. Here the options are translated in the external file and then imported as ComponentOptions back to the interface definition (see options: RepeaterOptions as ComponentOptions).
I understand that the extensions-sdk might provide a smaller range of possibilities in comparison to the internal features. Yet I'm in doubt if it's an error from my side.
Is it at a supported feature for custom interfaces (extensions)?
What is the idiomatic approach for directus extensions developers to translate admin "labels" with defined $t: placeholders in the defineInterface options?
Directus version: 11.3.2
Directus SDK version: 12.1.4
