本文整理汇总了TypeScript中app/core/i18n.t函数的典型用法代码示例。如果您正苦于以下问题:TypeScript t函数的具体用法?TypeScript t怎么用?TypeScript t使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了t函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getMenu
getMenu() {
let menu = [];
menu.push({text: i18n.t('View'), click: 'ctrl.viewPanel(); dismiss();'});
menu.push({text: i18n.t('Edit'), click: 'ctrl.editPanel(); dismiss();', role: 'Editor'});
if (!this.fullscreen) { // duplication is not supported in fullscreen mode
menu.push({ text: i18n.t('Duplicate'), click: 'ctrl.duplicate()', role: 'Editor' });
}
// menu.push({text: 'Share', click: 'ctrl.sharePanel(); dismiss();'});
return menu;
}
示例2: removePanel
removePanel() {
this.publishAppEvent('confirm-modal', {
title: i18n.t('Remove Panel'),
text: i18n.t('Are you sure you want to remove this panel?'),
icon: 'fa-trash',
yesText: i18n.t('Remove'),
onConfirm: () => {
this.row.panels = _.without(this.row.panels, this.panel);
}
});
}
示例3:
dashboards.forEach(function (ds) {
ds.title = ds.type === 'dash-json' ? i18n.t(ds.title) : ds.title;
var m = {
id: ds.id,
text: ds.title,
url: '/dashboard/' + ds.uri,
icon: ds.icon
};
if (ds.type === 'dash-json') {
defaultMenus.push(m);
} else {
customMenus.push(m);
}
});
示例4: onInitMetricsPanelEditMode
private onInitMetricsPanelEditMode() {
this.addEditorTab(i18n.t('Metrics'), 'public/app/partials/metrics.html');
this.addEditorTab(i18n.t('Time range'), 'public/app/features/panel/partials/panelTime.html');
}
示例5: initEditMode
initEditMode() {
this.editorTabs = [];
this.addEditorTab(i18n.t('General'), 'public/app/partials/panelgeneral.html');
this.editModeInitiated = true;
this.events.emit('init-edit-mode', null);
}