Add translation support

Add translation support by adding the language dir
with bare PO files.
All translations are changed to use their plugin domain.
This commit is contained in:
Jelle van der Waa
2016-06-09 11:13:23 +02:00
parent ecaa6e3a35
commit ec102f9c03
9 changed files with 312 additions and 33 deletions

View File

@ -21,7 +21,7 @@ Zarafa.plugins.mdm.settings.MDMSettingsCategory = Ext.extend(Zarafa.settings.ui.
config = config || {};
Ext.applyIf(config, {
title : _('MDM'),
title : _('MDM', 'plugin_mdm'),
iconCls : 'icon_mdm_settings',
items : [{
xtype : 'Zarafa.plugins.mdm.mdmsettingswidget'

View File

@ -16,74 +16,74 @@ Zarafa.plugins.mdm.settings.MDMSettingsWidget = Ext.extend(Zarafa.settings.ui.Se
var store = new Zarafa.plugins.mdm.data.MDMDeviceStore();
Ext.applyIf(config, {
title : _('Mobile Devices'),
title : _('Mobile Devices', 'plugin_mdm'),
items : [{
xtype : 'container',
layout : 'column',
items : [{
xtype : 'grid',
name : _('Devices'),
name : _('Devices', 'plugin_mdm'),
ref : '../deviceGrid',
height : 400,
store : store,
viewConfig : {
forceFit : true,
deferEmptyText: false,
emptyText: '<div class="emptytext">' + _('No devices connected to your account') + '</div>'
emptyText: '<div class="emptytext">' + _('No devices connected to your account', 'plugin_mdm') + '</div>'
},
columns : [{
dataIndex : 'devicetype',
header : _('Device'),
header : _('Device', 'plugin_mdm'),
renderer : Ext.util.Format.htmlEncode
},{
dataIndex : 'useragent',
header : _('User Agent'),
header : _('User Agent', 'plugin_mdm'),
renderer : Ext.util.Format.htmlEncode
},{
dataIndex : 'wipestatus',
header : _('Provisioning Status'),
header : _('Provisioning Status', 'plugin_mdm'),
renderer : Zarafa.plugins.mdm.ui.Renderers.provisioningStatus
},{
dataIndex : 'lastupdatetime',
header : _('Last Update'),
header : _('Last Update', 'plugin_mdm'),
renderer : Ext.util.Format.htmlEncode
},{
dataIndex : 'entryid',
header : _('Device ID'),
header : _('Device ID', 'plugin_mdm'),
renderer : Ext.util.Format.htmlEncode
},{
dataIndex : 'deviceos',
header : _('Device OS'),
header : _('Device OS', 'plugin_mdm'),
hidden : true,
renderer : Ext.util.Format.htmlEncode
},{
dataIndex : 'devicefriendlyname',
header : _('Device Info'),
header : _('Device Info', 'plugin_mdm'),
hidden : true,
renderer : Ext.util.Format.htmlEncode
},{
dataIndex : 'firstsynctime',
header : _('First Sync time'),
header : _('First Sync time', 'plugin_mdm'),
hidden : true,
renderer : Ext.util.Format.htmlEncode
}],
buttons : [{
text : _('Wipe Device'),
text : _('Wipe Device', 'plugin_mdm'),
ref : '../../../wipeBtn',
handler : this.onWipeBtn,
scope : this
},{
text : _('Full resync'),
text : _('Full resync', 'plugin_mdm'),
ref : '../../../resyncBtn',
handler : this.onFullResync,
scope : this
},{
text : _('Remove device'),
text : _('Remove device', 'plugin_mdm'),
ref : '../../../removeBtn',
handler : this.onRemoveDevice,
scope : this
},{
text : _('Refresh'),
text : _('Refresh', 'plugin_mdm'),
ref : '../../../refresh',
handler : this.onRefresh,
scope : this
@ -102,8 +102,8 @@ Zarafa.plugins.mdm.settings.MDMSettingsWidget = Ext.extend(Zarafa.settings.ui.Se
onWipeBtn : function()
{
var msgbox = Ext.MessageBox.show({
title: _('Kopano WebApp'),
msg: _('Do you really want to wipe your device?\n Enter your password to confirm.'),
title: _('Kopano WebApp', 'plugin_mdm'),
msg: _('Do you really want to wipe your device?\n Enter your password to confirm.', 'plugin_mdm'),
inputType :'password',
icon: Ext.MessageBox.WARNING,
buttons: Ext.MessageBox.YESNO,