mirror of
https://github.com/directus/directus.git
synced 2026-02-16 18:46:00 -05:00
Fix translations not working on displays, modules... (#4734)
* generalyze extensions * replace vue-i18n tranlslations * replace vue-i18n tranlslations * add missing commas * replace translations recursive * restructure translate * remove unused i18n * remove unused i18n * remove unused i18n * Remove i18n context in define * Rename translate util file * Fix type errors Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -27,17 +27,17 @@ const choices = Object.entries(choicesMap).map(([key, value]) => ({
|
||||
value: key,
|
||||
}));
|
||||
|
||||
export default defineInterface(({ i18n }) => ({
|
||||
export default defineInterface({
|
||||
id: 'code',
|
||||
name: i18n.t('interfaces.code.code'),
|
||||
description: i18n.t('interfaces.code.description'),
|
||||
name: '$t:interfaces.code.code',
|
||||
description: '$t:interfaces.code.description',
|
||||
icon: 'code',
|
||||
component: InterfaceCode,
|
||||
types: ['string', 'json', 'text'],
|
||||
options: [
|
||||
{
|
||||
field: 'language',
|
||||
name: i18n.t('language'),
|
||||
name: '$t:language',
|
||||
type: 'string',
|
||||
meta: {
|
||||
width: 'half',
|
||||
@@ -47,7 +47,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
},
|
||||
{
|
||||
field: 'lineNumber',
|
||||
name: i18n.t('interfaces.code.line_number'),
|
||||
name: '$t:interfaces.code.line_number',
|
||||
type: 'boolean',
|
||||
meta: {
|
||||
width: 'half',
|
||||
@@ -59,13 +59,13 @@ export default defineInterface(({ i18n }) => ({
|
||||
},
|
||||
{
|
||||
field: 'template',
|
||||
name: i18n.t('template'),
|
||||
name: '$t:template',
|
||||
type: 'text',
|
||||
meta: {
|
||||
width: 'full',
|
||||
interface: 'code',
|
||||
options: {
|
||||
placeholder: i18n.t('interfaces.code.placeholder'),
|
||||
placeholder: '$t:interfaces.code.placeholder',
|
||||
},
|
||||
},
|
||||
schema: {
|
||||
@@ -73,4 +73,4 @@ export default defineInterface(({ i18n }) => ({
|
||||
},
|
||||
},
|
||||
],
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user