add translation of vue types when added

pull/946/head
CamilleLegeron 2 months ago
parent 5fad8a2baa
commit cfd0fd8333

@ -3,15 +3,18 @@ import {ViewSectionRec} from "app/client/models/entities/ViewSectionRec";
import {IPageWidget} from "app/client/ui/PageWidgetPicker";
import {IconName} from "app/client/ui2018/IconList";
import {IWidgetType} from "app/common/widgetTypes";
import {makeT} from "../lib/localization";
const t = makeT('WidgetTypesMap');
export const widgetTypesMap = new Map<IWidgetType, IWidgetTypeInfo>([
['record', {label: 'Table', icon: 'TypeTable'}],
['single', {label: 'Card', icon: 'TypeCard'}],
['detail', {label: 'Card List', icon: 'TypeCardList'}],
['chart', {label: 'Chart', icon: 'TypeChart'}],
['form', {label: 'Form', icon: 'Board'}],
['custom', {label: 'Custom', icon: 'TypeCustom'}],
['custom.calendar', {label: 'Calendar', icon: 'TypeCalendar'}],
['record', {label: t('Table'), icon: 'TypeTable'}],
['single', {label: t('Card'), icon: 'TypeCard'}],
['detail', {label: t('Card List'), icon: 'TypeCardList'}],
['chart', {label: t('Chart'), icon: 'TypeChart'}],
['form', {label: t('Form'), icon: 'Board'}],
['custom', {label: t('Custom'), icon: 'TypeCustom'}],
['custom.calendar', {label: t('Calendar'), icon: 'TypeCalendar'}],
]);
// Widget type info.

@ -1499,5 +1499,14 @@
"Checkbox": "Checkbox",
"Field Format": "Field Format",
"Switch": "Switch"
},
"widgetTypesMap": {
"Calendar": "Calendar",
"Card": "Card",
"Card List": "Card List",
"Chart": "Chart",
"Custom": "Custom",
"Form": "Form",
"Table": "Table"
}
}

Loading…
Cancel
Save