[#2008] [WebUI] Fix translation marked text
* Remove labelSeparator and manually add ':' so text matches gtk translations. * Use consistent quotes around strings. This can affect gettext script picking up marked strings. * Added the equivalent deffered translation as gtkui for Filters and Progressbar
This commit is contained in:
parent
522815d266
commit
7af7ecd82a
|
@ -63,13 +63,15 @@ Deluge.AddConnectionWindow = Ext.extend(Ext.Window, {
|
||||||
baseCls: 'x-plain',
|
baseCls: 'x-plain',
|
||||||
labelWidth: 60,
|
labelWidth: 60,
|
||||||
items: [{
|
items: [{
|
||||||
fieldLabel: _('Host'),
|
fieldLabel: _('Host:'),
|
||||||
|
labelSeparator : '',
|
||||||
name: 'host',
|
name: 'host',
|
||||||
anchor: '75%',
|
anchor: '75%',
|
||||||
value: ''
|
value: ''
|
||||||
}, {
|
}, {
|
||||||
xtype: 'spinnerfield',
|
xtype: 'spinnerfield',
|
||||||
fieldLabel: _('Port'),
|
fieldLabel: _('Port:'),
|
||||||
|
labelSeparator : '',
|
||||||
name: 'port',
|
name: 'port',
|
||||||
strategy: {
|
strategy: {
|
||||||
xtype: 'number',
|
xtype: 'number',
|
||||||
|
@ -80,12 +82,14 @@ Deluge.AddConnectionWindow = Ext.extend(Ext.Window, {
|
||||||
value: '58846',
|
value: '58846',
|
||||||
anchor: '40%'
|
anchor: '40%'
|
||||||
}, {
|
}, {
|
||||||
fieldLabel: _('Username'),
|
fieldLabel: _('Username:'),
|
||||||
|
labelSeparator : '',
|
||||||
name: 'username',
|
name: 'username',
|
||||||
anchor: '75%',
|
anchor: '75%',
|
||||||
value: ''
|
value: ''
|
||||||
}, {
|
}, {
|
||||||
fieldLabel: _('Password'),
|
fieldLabel: _('Password:'),
|
||||||
|
labelSeparator : '',
|
||||||
anchor: '75%',
|
anchor: '75%',
|
||||||
name: 'password',
|
name: 'password',
|
||||||
inputType: 'password',
|
inputType: 'password',
|
||||||
|
@ -101,7 +105,7 @@ Deluge.AddConnectionWindow = Ext.extend(Ext.Window, {
|
||||||
if (!result[0]) {
|
if (!result[0]) {
|
||||||
Ext.MessageBox.show({
|
Ext.MessageBox.show({
|
||||||
title: _('Error'),
|
title: _('Error'),
|
||||||
msg: "Unable to add host: " + result[1],
|
msg: 'Unable to add host: ' + result[1],
|
||||||
buttons: Ext.MessageBox.OK,
|
buttons: Ext.MessageBox.OK,
|
||||||
modal: false,
|
modal: false,
|
||||||
icon: Ext.MessageBox.ERROR,
|
icon: Ext.MessageBox.ERROR,
|
||||||
|
|
|
@ -63,7 +63,8 @@ Deluge.AddTrackerWindow = Ext.extend(Ext.Window, {
|
||||||
baseCls: 'x-plain',
|
baseCls: 'x-plain',
|
||||||
labelWidth: 55,
|
labelWidth: 55,
|
||||||
items: [{
|
items: [{
|
||||||
fieldLabel: _('Trackers'),
|
fieldLabel: _('Trackers:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'trackers',
|
name: 'trackers',
|
||||||
anchor: '100%'
|
anchor: '100%'
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -63,7 +63,8 @@ Deluge.EditTrackerWindow = Ext.extend(Ext.Window, {
|
||||||
baseCls: 'x-plain',
|
baseCls: 'x-plain',
|
||||||
labelWidth: 55,
|
labelWidth: 55,
|
||||||
items: [{
|
items: [{
|
||||||
fieldLabel: _('Tracker'),
|
fieldLabel: _('Tracker:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'tracker',
|
name: 'tracker',
|
||||||
anchor: '100%'
|
anchor: '100%'
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -46,14 +46,24 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.FilterPanel.superclass.initComponent.call(this);
|
Deluge.FilterPanel.superclass.initComponent.call(this);
|
||||||
this.filterType = this.initialConfig.filter;
|
this.filterType = this.initialConfig.filter;
|
||||||
|
var title = '';
|
||||||
var title = this.filterType.replace('_', ' '),
|
if (this.filterType == 'state') {
|
||||||
|
title = _('States');
|
||||||
|
} else if (this.filterType == 'tracker_host') {
|
||||||
|
title = _('Trackers');
|
||||||
|
} else if (this.filterType == 'owner') {
|
||||||
|
title = _('Owner');
|
||||||
|
} else if (this.filterType == 'label') {
|
||||||
|
title = _('Labels');
|
||||||
|
} else {
|
||||||
|
title = this.filterType.replace('_', ' '),
|
||||||
parts = title.split(' '),
|
parts = title.split(' '),
|
||||||
title = '';
|
title = '';
|
||||||
Ext.each(parts, function(p) {
|
Ext.each(parts, function(p) {
|
||||||
fl = p.substring(0, 1).toUpperCase();
|
fl = p.substring(0, 1).toUpperCase();
|
||||||
title += fl + p.substring(1) + ' ';
|
title += fl + p.substring(1) + ' ';
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.setTitle(_(title));
|
this.setTitle(_(title));
|
||||||
|
|
||||||
if (Deluge.FilterPanel.templates[this.filterType]) {
|
if (Deluge.FilterPanel.templates[this.filterType]) {
|
||||||
|
@ -121,7 +131,7 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
|
||||||
if (!show_zero) {
|
if (!show_zero) {
|
||||||
var newStates = [];
|
var newStates = [];
|
||||||
Ext.each(states, function(state) {
|
Ext.each(states, function(state) {
|
||||||
if (state[1] > 0 || state[0] == _('All')) {
|
if (state[1] > 0 || state[0] == 'All') {
|
||||||
newStates.push(state);
|
newStates.push(state);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -141,7 +151,7 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
|
||||||
store.insert(i, record);
|
store.insert(i, record);
|
||||||
}
|
}
|
||||||
record.beginEdit();
|
record.beginEdit();
|
||||||
record.set('filter', s[0]);
|
record.set('filter', _(s[0]));
|
||||||
record.set('count', s[1]);
|
record.set('count', s[1]);
|
||||||
record.endEdit();
|
record.endEdit();
|
||||||
filters[s[0]] = true;
|
filters[s[0]] = true;
|
||||||
|
|
|
@ -67,7 +67,8 @@ Deluge.LoginWindow = Ext.extend(Ext.Window, {
|
||||||
|
|
||||||
this.passwordField = this.form.add({
|
this.passwordField = this.form.add({
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: _('Password'),
|
fieldLabel: _('Password:'),
|
||||||
|
labelSeparator : '',
|
||||||
grow: true,
|
grow: true,
|
||||||
growMin: '110',
|
growMin: '110',
|
||||||
growMax: '145',
|
growMax: '145',
|
||||||
|
|
|
@ -51,13 +51,13 @@ Deluge.Plugin = Ext.extend(Ext.util.Observable, {
|
||||||
* @event enabled
|
* @event enabled
|
||||||
* @param {Plugin} plugin the plugin instance
|
* @param {Plugin} plugin the plugin instance
|
||||||
*/
|
*/
|
||||||
"enabled": true,
|
'enabled': true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @event disabled
|
* @event disabled
|
||||||
* @param {Plugin} plugin the plugin instance
|
* @param {Plugin} plugin the plugin instance
|
||||||
*/
|
*/
|
||||||
"disabled": true
|
'disabled': true
|
||||||
});
|
});
|
||||||
Deluge.Plugin.superclass.constructor.call(this, config);
|
Deluge.Plugin.superclass.constructor.call(this, config);
|
||||||
},
|
},
|
||||||
|
@ -67,7 +67,7 @@ Deluge.Plugin = Ext.extend(Ext.util.Observable, {
|
||||||
* then executing the plugins clean up method onDisabled.
|
* then executing the plugins clean up method onDisabled.
|
||||||
*/
|
*/
|
||||||
disable: function() {
|
disable: function() {
|
||||||
this.fireEvent("disabled", this);
|
this.fireEvent('disabled', this);
|
||||||
if (this.onDisable) this.onDisable();
|
if (this.onDisable) this.onDisable();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Deluge.Plugin = Ext.extend(Ext.util.Observable, {
|
||||||
*/
|
*/
|
||||||
enable: function() {
|
enable: function() {
|
||||||
deluge.client.reloadMethods();
|
deluge.client.reloadMethods();
|
||||||
this.fireEvent("enable", this);
|
this.fireEvent('enable', this);
|
||||||
if (this.onEnable) this.onEnable();
|
if (this.onEnable) this.onEnable();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ Deluge.RemoveWindow = Ext.extend(Ext.Window, {
|
||||||
deluge.client.core.remove_torrents(this.torrentIds, removeData, {
|
deluge.client.core.remove_torrents(this.torrentIds, removeData, {
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
console.log("Error(s) occured when trying to delete torrent(s).");
|
console.log('Error(s) occured when trying to delete torrent(s).');
|
||||||
}
|
}
|
||||||
this.onRemoved(this.torrentIds);
|
this.onRemoved(this.torrentIds);
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,7 +67,7 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
|
||||||
// private
|
// private
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.Sidebar.superclass.initComponent.call(this);
|
Deluge.Sidebar.superclass.initComponent.call(this);
|
||||||
deluge.events.on("disconnect", this.onDisconnect, this);
|
deluge.events.on('disconnect', this.onDisconnect, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
createFilter: function(filter, states) {
|
createFilter: function(filter, states) {
|
||||||
|
|
|
@ -310,6 +310,6 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.items.get('statusbar-dht').setText(stats.dht_nodes);
|
this.items.get('statusbar-dht').setText(stats.dht_nodes);
|
||||||
this.items.get('statusbar-freespace').setText(stats.free_space >= 0 ? fsize(stats.free_space): _("Error"));
|
this.items.get('statusbar-freespace').setText(stats.free_space >= 0 ? fsize(stats.free_space): _('Error'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
function torrentProgressRenderer(value, p, r) {
|
function torrentProgressRenderer(value, p, r) {
|
||||||
value = new Number(value);
|
value = new Number(value);
|
||||||
var progress = value;
|
var progress = value;
|
||||||
var text = r.data['state'] + ' ' + value.toFixed(2) + '%';
|
var text = _(r.data['state']) + ' ' + value.toFixed(2) + '%';
|
||||||
if ( this.style ) {
|
if ( this.style ) {
|
||||||
var style = this.style
|
var style = this.style
|
||||||
} else {
|
} else {
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function dateOrNever(date) {
|
function dateOrNever(date) {
|
||||||
return date > 0.0 ? fdate(date) : "Never"
|
return date > 0.0 ? fdate(date) : _('Never')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,6 +30,30 @@
|
||||||
* statement from all source files in the program, then also delete it here.
|
* statement from all source files in the program, then also delete it here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Dummy translation arrays so Torrent and Tracker states are available for Translators.
|
||||||
|
*
|
||||||
|
* All entries in deluge.common.TORRENT_STATE should be added here.
|
||||||
|
*
|
||||||
|
* No need to import these, just simply use the `_()` function around a status variable.
|
||||||
|
*/
|
||||||
|
var TORRENT_STATE_TRANSLATION = [
|
||||||
|
_('All'),
|
||||||
|
_('Active'),
|
||||||
|
_('Allocating'),
|
||||||
|
_('Checking'),
|
||||||
|
_('Downloading'),
|
||||||
|
_('Seeding'),
|
||||||
|
_('Paused'),
|
||||||
|
_('Checking'),
|
||||||
|
_('Queued'),
|
||||||
|
_('Error')];
|
||||||
|
|
||||||
|
var TRACKER_STATUS_TRANSLATION = [
|
||||||
|
_('Error'),
|
||||||
|
_('Warning'),
|
||||||
|
_('Announce OK'),
|
||||||
|
_('Announce Sent')];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @static
|
* @static
|
||||||
* @class Deluge.UI
|
* @class Deluge.UI
|
||||||
|
@ -92,8 +116,8 @@ deluge.ui = {
|
||||||
items: [this.MainPanel]
|
items: [this.MainPanel]
|
||||||
});
|
});
|
||||||
|
|
||||||
deluge.events.on("connect", this.onConnect, this);
|
deluge.events.on('connect', this.onConnect, this);
|
||||||
deluge.events.on("disconnect", this.onDisconnect, this);
|
deluge.events.on('disconnect', this.onDisconnect, this);
|
||||||
deluge.events.on('PluginDisabledEvent', this.onPluginDisabled, this);
|
deluge.events.on('PluginDisabledEvent', this.onPluginDisabled, this);
|
||||||
deluge.events.on('PluginEnabledEvent', this.onPluginEnabled, this);
|
deluge.events.on('PluginEnabledEvent', this.onPluginEnabled, this);
|
||||||
deluge.client = new Ext.ux.util.RpcClient({
|
deluge.client = new Ext.ux.util.RpcClient({
|
||||||
|
|
|
@ -39,18 +39,19 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
queuedItems: {},
|
queuedItems: {},
|
||||||
|
|
||||||
|
|
||||||
oldData: {},
|
oldData: {},
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.details.DetailsTab.superclass.initComponent.call(this);
|
Deluge.details.DetailsTab.superclass.initComponent.call(this);
|
||||||
this.addItem('torrent_name', _('Name'));
|
this.addItem('torrent_name', _('Name:'));
|
||||||
this.addItem('hash', _('Hash'));
|
this.addItem('hash', _('Hash:'));
|
||||||
this.addItem('path', _('Download Folder'));
|
this.addItem('path', _('Download Folder:'));
|
||||||
this.addItem('size', _('Total Size'));
|
this.addItem('size', _('Total Size:'));
|
||||||
this.addItem('files', _('Total Files'));
|
this.addItem('files', _('Total Files:'));
|
||||||
this.addItem('comment', _('Comment'));
|
this.addItem('comment', _('Comment:'));
|
||||||
this.addItem('status', _('Status'));
|
this.addItem('status', _('Status:'));
|
||||||
this.addItem('tracker', _('Tracker'));
|
this.addItem('tracker', _('Tracker:'));
|
||||||
},
|
},
|
||||||
|
|
||||||
onRender: function(ct, position) {
|
onRender: function(ct, position) {
|
||||||
|
@ -73,7 +74,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
|
|
||||||
// private
|
// private
|
||||||
doAddItem: function(id, label) {
|
doAddItem: function(id, label) {
|
||||||
Ext.DomHelper.append(this.dl, {tag: 'dt', cls: id, html: label + ':'});
|
Ext.DomHelper.append(this.dl, {tag: 'dt', cls: id, html: label});
|
||||||
this.fields[id] = Ext.DomHelper.append(this.dl, {tag: 'dd', cls: id, html: ''}, true);
|
this.fields[id] = Ext.DomHelper.append(this.dl, {tag: 'dd', cls: id, html: ''}, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
*/
|
*/
|
||||||
this.fieldsets.bandwidth.add({
|
this.fieldsets.bandwidth.add({
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
text: _('Max Download Speed'),
|
text: _('Max Download Speed:'),
|
||||||
forId: 'max_download_speed',
|
forId: 'max_download_speed',
|
||||||
cls: 'x-deluge-options-label'
|
cls: 'x-deluge-options-label'
|
||||||
});
|
});
|
||||||
|
@ -120,7 +120,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
*/
|
*/
|
||||||
this.fieldsets.bandwidth.add({
|
this.fieldsets.bandwidth.add({
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
text: _('Max Upload Speed'),
|
text: _('Max Upload Speed:'),
|
||||||
forId: 'max_upload_speed',
|
forId: 'max_upload_speed',
|
||||||
cls: 'x-deluge-options-label'
|
cls: 'x-deluge-options-label'
|
||||||
});
|
});
|
||||||
|
@ -147,7 +147,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
*/
|
*/
|
||||||
this.fieldsets.bandwidth.add({
|
this.fieldsets.bandwidth.add({
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
text: _('Max Connections'),
|
text: _('Max Connections:'),
|
||||||
forId: 'max_connections',
|
forId: 'max_connections',
|
||||||
cls: 'x-deluge-options-label'
|
cls: 'x-deluge-options-label'
|
||||||
});
|
});
|
||||||
|
@ -170,7 +170,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
*/
|
*/
|
||||||
this.fieldsets.bandwidth.add({
|
this.fieldsets.bandwidth.add({
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
text: _('Max Upload Slots'),
|
text: _('Max Upload Slots:'),
|
||||||
forId: 'max_upload_slots',
|
forId: 'max_upload_slots',
|
||||||
cls: 'x-deluge-options-label'
|
cls: 'x-deluge-options-label'
|
||||||
});
|
});
|
||||||
|
@ -222,7 +222,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
id: 'stop_at_ratio',
|
id: 'stop_at_ratio',
|
||||||
width: 120,
|
width: 120,
|
||||||
boxLabel: _('Stop seed at ratio'),
|
boxLabel: _('Stop seed at ratio:'),
|
||||||
handler: this.onStopRatioChecked,
|
handler: this.onStopRatioChecked,
|
||||||
scope: this
|
scope: this
|
||||||
});
|
});
|
||||||
|
@ -259,7 +259,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
fieldLabel: '',
|
fieldLabel: '',
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
id: 'move_completed',
|
id: 'move_completed',
|
||||||
boxLabel: _('Move Completed'),
|
boxLabel: _('Move Completed:'),
|
||||||
colspan: 2,
|
colspan: 2,
|
||||||
handler: this.onMoveCompletedChecked,
|
handler: this.onMoveCompletedChecked,
|
||||||
scope: this
|
scope: this
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
var peer_ip = value.split(':');
|
var peer_ip = value.split(':');
|
||||||
if (peer_ip.length > 2) {
|
if (peer_ip.length > 2) {
|
||||||
var port = peer_ip.pop();
|
var port = peer_ip.pop();
|
||||||
var ip = peer_ip.join(":");
|
var ip = peer_ip.join(':');
|
||||||
value = "[" + ip + "]:" + port;
|
value = '[' + ip + ']:' + port;
|
||||||
}
|
}
|
||||||
return String.format('<div class="{0}">{1}</div>', seed, value);
|
return String.format('<div class="{0}">{1}</div>', seed, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,8 @@ Deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
|
||||||
});
|
});
|
||||||
om.bind('max_connections_global', fieldset.add({
|
om.bind('max_connections_global', fieldset.add({
|
||||||
name: 'max_connections_global',
|
name: 'max_connections_global',
|
||||||
fieldLabel: _('Maximum Connections'),
|
fieldLabel: _('Maximum Connections:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
|
@ -73,34 +74,39 @@ Deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
|
||||||
om.bind('max_upload_slots_global', fieldset.add({
|
om.bind('max_upload_slots_global', fieldset.add({
|
||||||
name: 'max_upload_slots_global',
|
name: 'max_upload_slots_global',
|
||||||
fieldLabel: _('Maximum Upload Slots'),
|
fieldLabel: _('Maximum Upload Slots'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
}));
|
}));
|
||||||
om.bind('max_download_speed', fieldset.add({
|
om.bind('max_download_speed', fieldset.add({
|
||||||
name: 'max_download_speed',
|
name: 'max_download_speed',
|
||||||
fieldLabel: _('Maximum Download Speed (KiB/s)'),
|
fieldLabel: _('Maximum Download Speed (KiB/s):'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1.0,
|
value: -1.0,
|
||||||
decimalPrecision: 1
|
decimalPrecision: 1
|
||||||
}));
|
}));
|
||||||
om.bind('max_upload_speed', fieldset.add({
|
om.bind('max_upload_speed', fieldset.add({
|
||||||
name: 'max_upload_speed',
|
name: 'max_upload_speed',
|
||||||
fieldLabel: _('Maximum Upload Speed (KiB/s)'),
|
fieldLabel: _('Maximum Upload Speed (KiB/s):'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1.0,
|
value: -1.0,
|
||||||
decimalPrecision: 1
|
decimalPrecision: 1
|
||||||
}));
|
}));
|
||||||
om.bind('max_half_open_connections', fieldset.add({
|
om.bind('max_half_open_connections', fieldset.add({
|
||||||
name: 'max_half_open_connections',
|
name: 'max_half_open_connections',
|
||||||
fieldLabel: _('Maximum Half-Open Connections'),
|
fieldLabel: _('Maximum Half-Open Connections:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
}));
|
}));
|
||||||
om.bind('max_connections_per_second', fieldset.add({
|
om.bind('max_connections_per_second', fieldset.add({
|
||||||
name: 'max_connections_per_second',
|
name: 'max_connections_per_second',
|
||||||
fieldLabel: _('Maximum Connection Attempts per Second'),
|
fieldLabel: _('Maximum Connection Attempts per Second:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
|
@ -144,28 +150,32 @@ Deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
|
||||||
});
|
});
|
||||||
om.bind('max_connections_per_torrent', fieldset.add({
|
om.bind('max_connections_per_torrent', fieldset.add({
|
||||||
name: 'max_connections_per_torrent',
|
name: 'max_connections_per_torrent',
|
||||||
fieldLabel: _('Maximum Connections'),
|
fieldLabel: _('Maximum Connections:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
}));
|
}));
|
||||||
om.bind('max_upload_slots_per_torrent', fieldset.add({
|
om.bind('max_upload_slots_per_torrent', fieldset.add({
|
||||||
name: 'max_upload_slots_per_torrent',
|
name: 'max_upload_slots_per_torrent',
|
||||||
fieldLabel: _('Maximum Upload Slots'),
|
fieldLabel: _('Maximum Upload Slots:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
}));
|
}));
|
||||||
om.bind('max_download_speed_per_torrent', fieldset.add({
|
om.bind('max_download_speed_per_torrent', fieldset.add({
|
||||||
name: 'max_download_speed_per_torrent',
|
name: 'max_download_speed_per_torrent',
|
||||||
fieldLabel: _('Maximum Download Speed (KiB/s)'),
|
fieldLabel: _('Maximum Download Speed (KiB/s):'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
}));
|
}));
|
||||||
om.bind('max_upload_speed_per_torrent', fieldset.add({
|
om.bind('max_upload_speed_per_torrent', fieldset.add({
|
||||||
name: 'max_upload_speed_per_torrent',
|
name: 'max_upload_speed_per_torrent',
|
||||||
fieldLabel: _('Maximum Upload Speed (KiB/s)'),
|
fieldLabel: _('Maximum Upload Speed (KiB/s):'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
value: -1,
|
value: -1,
|
||||||
decimalPrecision: 0
|
decimalPrecision: 0
|
||||||
|
|
|
@ -60,13 +60,15 @@ Deluge.preferences.Cache = Ext.extend(Ext.form.FormPanel, {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
om.bind('cache_size', fieldset.add({
|
om.bind('cache_size', fieldset.add({
|
||||||
fieldLabel: _('Cache Size (16 KiB Blocks)'),
|
fieldLabel: _('Cache Size (16 KiB Blocks):'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'cache_size',
|
name: 'cache_size',
|
||||||
width: 60,
|
width: 60,
|
||||||
value: 512
|
value: 512
|
||||||
}));
|
}));
|
||||||
om.bind('cache_expiry', fieldset.add({
|
om.bind('cache_expiry', fieldset.add({
|
||||||
fieldLabel: _('Cache Expiry (seconds)'),
|
fieldLabel: _('Cache Expiry (seconds):'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'cache_expiry',
|
name: 'cache_expiry',
|
||||||
width: 60,
|
width: 60,
|
||||||
value: 60
|
value: 60
|
||||||
|
|
|
@ -54,7 +54,8 @@ Deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
|
||||||
defaultType: 'spinnerfield'
|
defaultType: 'spinnerfield'
|
||||||
});
|
});
|
||||||
om.bind('daemon_port', fieldset.add({
|
om.bind('daemon_port', fieldset.add({
|
||||||
fieldLabel: _('Daemon port'),
|
fieldLabel: _('Daemon port:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'daemon_port',
|
name: 'daemon_port',
|
||||||
value: 58846,
|
value: 58846,
|
||||||
decimalPrecision: 0,
|
decimalPrecision: 0,
|
||||||
|
|
|
@ -66,13 +66,15 @@ Deluge.preferences.Downloads = Ext.extend(Ext.FormPanel, {
|
||||||
optMan.bind('download_location', fieldset.add({
|
optMan.bind('download_location', fieldset.add({
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
name: 'download_location',
|
name: 'download_location',
|
||||||
fieldLabel: _('Download to'),
|
fieldLabel: _('Download to:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 280
|
width: 280
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var field = fieldset.add({
|
var field = fieldset.add({
|
||||||
name: 'move_completed_path',
|
name: 'move_completed_path',
|
||||||
fieldLabel: _('Move completed to'),
|
fieldLabel: _('Move completed to:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 280
|
width: 280
|
||||||
});
|
});
|
||||||
optMan.bind('move_completed', field.toggle);
|
optMan.bind('move_completed', field.toggle);
|
||||||
|
@ -80,7 +82,8 @@ Deluge.preferences.Downloads = Ext.extend(Ext.FormPanel, {
|
||||||
|
|
||||||
field = fieldset.add({
|
field = fieldset.add({
|
||||||
name: 'torrentfiles_location',
|
name: 'torrentfiles_location',
|
||||||
fieldLabel: _('Copy of .torrent files to'),
|
fieldLabel: _('Copy of .torrent files to:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 280
|
width: 280
|
||||||
});
|
});
|
||||||
optMan.bind('copy_torrent_file', field.toggle);
|
optMan.bind('copy_torrent_file', field.toggle);
|
||||||
|
|
|
@ -94,15 +94,18 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
|
||||||
|
|
||||||
this.oldPassword = fieldset.add({
|
this.oldPassword = fieldset.add({
|
||||||
name: 'old_password',
|
name: 'old_password',
|
||||||
fieldLabel: _('Old Password')
|
fieldLabel: _('Old Password:'),
|
||||||
|
labelSeparator: '',
|
||||||
});
|
});
|
||||||
this.newPassword = fieldset.add({
|
this.newPassword = fieldset.add({
|
||||||
name: 'new_password',
|
name: 'new_password',
|
||||||
fieldLabel: _('New Password')
|
fieldLabel: _('New Password:'),
|
||||||
|
labelSeparator: '',
|
||||||
});
|
});
|
||||||
this.confirmPassword = fieldset.add({
|
this.confirmPassword = fieldset.add({
|
||||||
name: 'confirm_password',
|
name: 'confirm_password',
|
||||||
fieldLabel: _('Confirm Password')
|
fieldLabel: _('Confirm Password:'),
|
||||||
|
labelSeparator: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
var panel = fieldset.add({
|
var panel = fieldset.add({
|
||||||
|
@ -137,14 +140,16 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
|
||||||
});
|
});
|
||||||
om.bind('session_timeout', fieldset.add({
|
om.bind('session_timeout', fieldset.add({
|
||||||
name: 'session_timeout',
|
name: 'session_timeout',
|
||||||
fieldLabel: _('Session Timeout'),
|
fieldLabel: _('Session Timeout:'),
|
||||||
|
labelSeparator: '',
|
||||||
decimalPrecision: 0,
|
decimalPrecision: 0,
|
||||||
minValue: -1,
|
minValue: -1,
|
||||||
maxValue: 99999
|
maxValue: 99999
|
||||||
}));
|
}));
|
||||||
om.bind('port', fieldset.add({
|
om.bind('port', fieldset.add({
|
||||||
name: 'port',
|
name: 'port',
|
||||||
fieldLabel: _('Port'),
|
fieldLabel: _('Port:'),
|
||||||
|
labelSeparator: '',
|
||||||
decimalPrecision: 0,
|
decimalPrecision: 0,
|
||||||
minValue: -1,
|
minValue: -1,
|
||||||
maxValue: 99999
|
maxValue: 99999
|
||||||
|
@ -163,14 +168,16 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
name: 'pkey',
|
name: 'pkey',
|
||||||
width: 180,
|
width: 180,
|
||||||
fieldLabel: _('Private Key')
|
fieldLabel: _('Private Key:'),
|
||||||
|
labelSeparator: ''
|
||||||
}));
|
}));
|
||||||
this.certField = om.bind('cert', fieldset.add({
|
this.certField = om.bind('cert', fieldset.add({
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
name: 'cert',
|
name: 'cert',
|
||||||
width: 180,
|
width: 180,
|
||||||
fieldLabel: _('Certificate')
|
fieldLabel: _('Certificate:'),
|
||||||
|
labelSeparator: ''
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
|
||||||
style: 'margin-right: 10px;'
|
style: 'margin-right: 10px;'
|
||||||
},
|
},
|
||||||
items: [{
|
items: [{
|
||||||
fieldLabel: 'From:',
|
fieldLabel: _('From:'),
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
strategy: {
|
strategy: {
|
||||||
xtype: 'number',
|
xtype: 'number',
|
||||||
|
@ -114,7 +114,7 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
|
||||||
maxValue: 99999
|
maxValue: 99999
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
fieldLabel: 'To:',
|
fieldLabel: _('To:'),
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
strategy: {
|
strategy: {
|
||||||
xtype: 'number',
|
xtype: 'number',
|
||||||
|
@ -160,7 +160,7 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
|
||||||
style: 'margin-right: 10px;'
|
style: 'margin-right: 10px;'
|
||||||
},
|
},
|
||||||
items: [{
|
items: [{
|
||||||
fieldLabel: 'From:',
|
fieldLabel: _('From:'),
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
strategy: {
|
strategy: {
|
||||||
xtype: 'number',
|
xtype: 'number',
|
||||||
|
@ -169,7 +169,7 @@ Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, {
|
||||||
maxValue: 99999
|
maxValue: 99999
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
fieldLabel: 'To:',
|
fieldLabel: _('To:'),
|
||||||
labelSeparator: '',
|
labelSeparator: '',
|
||||||
strategy: {
|
strategy: {
|
||||||
xtype: 'number',
|
xtype: 'number',
|
||||||
|
|
|
@ -101,7 +101,8 @@ types. Absolutely no other information is sent.')
|
||||||
});
|
});
|
||||||
optMan.bind('geoip_db_location', fieldset.add({
|
optMan.bind('geoip_db_location', fieldset.add({
|
||||||
name: 'geoip_db_location',
|
name: 'geoip_db_location',
|
||||||
fieldLabel: _('Location'),
|
fieldLabel: _('Path:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 200
|
width: 200
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,11 @@ Deluge.preferences.Plugins = Ext.extend(Ext.Panel, {
|
||||||
|
|
||||||
pluginTemplate: new Ext.Template(
|
pluginTemplate: new Ext.Template(
|
||||||
'<dl class="singleline">' +
|
'<dl class="singleline">' +
|
||||||
'<dt>Author:</dt><dd>{author}</dd>' +
|
'<dt>' + _('Author:') + '</dt><dd>{author}</dd>' +
|
||||||
'<dt>Version:</dt><dd>{version}</dd>' +
|
'<dt>' + _('Version:') + '</dt><dd>{version}</dd>' +
|
||||||
'<dt>Author Email:</dt><dd>{email}</dd>' +
|
'<dt>' + _('Author Email:') + '</dt><dd>{email}</dd>' +
|
||||||
'<dt>Homepage:</dt><dd>{homepage}</dd>' +
|
'<dt>' + _('Homepage:') + '</dt><dd>{homepage}</dd>' +
|
||||||
'<dt>Details:</dt><dd>{details}</dd>' +
|
'<dt>' + _('Details:') + '</dt><dd>{details}</dd>' +
|
||||||
'</dl>'
|
'</dl>'
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,8 @@ Deluge.preferences.ProxyI2PField = Ext.extend(Ext.form.FieldSet, {
|
||||||
this.hostname = this.add({
|
this.hostname = this.add({
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
name: 'hostname',
|
name: 'hostname',
|
||||||
fieldLabel: _('Host'),
|
fieldLabel: _('Host:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 220
|
width: 220
|
||||||
});
|
});
|
||||||
this.hostname.on('change', this.onFieldChange, this);
|
this.hostname.on('change', this.onFieldChange, this);
|
||||||
|
@ -54,7 +55,8 @@ Deluge.preferences.ProxyI2PField = Ext.extend(Ext.form.FieldSet, {
|
||||||
this.port = this.add({
|
this.port = this.add({
|
||||||
xtype: 'spinnerfield',
|
xtype: 'spinnerfield',
|
||||||
name: 'port',
|
name: 'port',
|
||||||
fieldLabel: _('Port'),
|
fieldLabel: _('Port:'),
|
||||||
|
labelSeparator: '',
|
||||||
width: 80,
|
width: 80,
|
||||||
decimalPrecision: 0,
|
decimalPrecision: 0,
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
|
|
|
@ -73,7 +73,8 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
style: 'margin-bottom: 0px; padding-bottom: 0px;'
|
style: 'margin-bottom: 0px; padding-bottom: 0px;'
|
||||||
});
|
});
|
||||||
om.bind('max_active_limit', fieldset.add({
|
om.bind('max_active_limit', fieldset.add({
|
||||||
fieldLabel: _('Total Active'),
|
fieldLabel: _('Total Active:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'max_active_limit',
|
name: 'max_active_limit',
|
||||||
value: 8,
|
value: 8,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -82,7 +83,8 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
maxValue: 99999
|
maxValue: 99999
|
||||||
}));
|
}));
|
||||||
om.bind('max_active_downloading', fieldset.add({
|
om.bind('max_active_downloading', fieldset.add({
|
||||||
fieldLabel: _('Total Active Downloading'),
|
fieldLabel: _('Total Active Downloading:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'max_active_downloading',
|
name: 'max_active_downloading',
|
||||||
value: 3,
|
value: 3,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -91,7 +93,8 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
maxValue: 99999
|
maxValue: 99999
|
||||||
}));
|
}));
|
||||||
om.bind('max_active_seeding', fieldset.add({
|
om.bind('max_active_seeding', fieldset.add({
|
||||||
fieldLabel: _('Total Active Seeding'),
|
fieldLabel: _('Total Active Seeding:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'max_active_seeding',
|
name: 'max_active_seeding',
|
||||||
value: 5,
|
value: 5,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -124,7 +127,8 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
style: 'margin-bottom: 0px; padding-bottom: 0px; margin-top: 0; padding-top: 0;'
|
style: 'margin-bottom: 0px; padding-bottom: 0px; margin-top: 0; padding-top: 0;'
|
||||||
});
|
});
|
||||||
om.bind('share_ratio_limit', fieldset.add({
|
om.bind('share_ratio_limit', fieldset.add({
|
||||||
fieldLabel: _('Share Ratio Limit'),
|
fieldLabel: _('Share Ratio Limit:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'share_ratio_limit',
|
name: 'share_ratio_limit',
|
||||||
value: 8,
|
value: 8,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -135,7 +139,8 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
decimalPrecision: 2
|
decimalPrecision: 2
|
||||||
}));
|
}));
|
||||||
om.bind('seed_time_ratio_limit', fieldset.add({
|
om.bind('seed_time_ratio_limit', fieldset.add({
|
||||||
fieldLabel: _('Share Time Ratio'),
|
fieldLabel: _('Share Time Ratio:'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'seed_time_ratio_limit',
|
name: 'seed_time_ratio_limit',
|
||||||
value: 3,
|
value: 3,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -146,7 +151,8 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
|
||||||
decimalPrecision: 2
|
decimalPrecision: 2
|
||||||
}));
|
}));
|
||||||
om.bind('seed_time_limit', fieldset.add({
|
om.bind('seed_time_limit', fieldset.add({
|
||||||
fieldLabel: _('Seed Time (m)'),
|
fieldLabel: _('Seed Time (m):'),
|
||||||
|
labelSeparator: '',
|
||||||
name: 'seed_time_limit',
|
name: 'seed_time_limit',
|
||||||
value: 5,
|
value: 5,
|
||||||
width: 80,
|
width: 80,
|
||||||
|
|
Loading…
Reference in New Issue