prepare bzr.config.js for localization

This commit is contained in:
Sebastian Sdorra
2011-03-24 09:20:59 +01:00
parent ee102123e0
commit 095ee8b74e

View File

@@ -30,29 +30,63 @@
*/
Ext.ns("Sonia.bzr");
registerConfigPanel({
xtype : 'simpleConfigForm',
title : 'Bazaar Settings',
Sonia.bzr.ConfigPanel = Ext.extend(Sonia.config.SimpleConfigForm, {
// labels
titleText: 'Bazaar Settings',
bzrBinaryText: 'Bzr Binary',
pythonBinary: 'Python Binary',
pythonPath: 'Python Path',
repositoryDirectoryText: 'Repository directory',
// helpTexts
bzrBinaryHelpText: 'The location of the Bzr binary.',
pythonBinaryHelpText: 'The location of the Python binary.',
pythonPathHelpText: 'The Python path.',
repositoryDirectoryHelpText: 'The location of the Bazaar repositories.',
initComponent: function(){
var config = {
title : this.titleText,
configUrl: restUrl + 'config/repositories/bzr.json',
items : [{
xtype : 'textfield',
fieldLabel : 'Bzr Binary',
fieldLabel : this.bzrBinaryText,
name : 'bzrBinary',
allowBlank : false
allowBlank : false,
helpText: this.bzrBinaryHelpText
},{
xtype : 'textfield',
fieldLabel : 'Python Binary',
fieldLabel : this.pythonBinary,
name : 'pythonBinary',
allowBlank : false
allowBlank : false,
helpText: this.pythonBinaryHelpText
},{
xtype : 'textfield',
fieldLabel : 'Python Path',
name : 'pythonPath'
fieldLabel : this.pythonPath,
name : 'pythonPath',
helpText: this.pythonPathHelpText
},{
xtype: 'textfield',
name: 'repositoryDirectory',
fieldLabel: 'Repository directory',
allowBlank : false
fieldLabel: this.repositoryDirectoryText,
allowBlank : false,
helpText: this.repositoryDirectoryHelpText
}]
}
Ext.apply(this, Ext.apply(this.initialConfig, config));
Sonia.bzr.ConfigPanel.superclass.initComponent.apply(this, arguments);
}
});
Ext.reg("bzrConfigPanel", Sonia.bzr.ConfigPanel);
registerConfigPanel({
xtype : 'bzrConfigPanel'
});