Replace remaining IPA.messages with text.get calls
https://fedorahosted.org/freeipa/ticket/3235
This commit is contained in:
1 parent
8ee752c284
commit
d5c0945890
20 files changed
+165
-165
No files matched your search
@@ -498,7 +498,7 @@ IPA.attributes_widget = function(spec) {
|
||||
})
|
||||
})).append($('<th/>', {
|
||||
'class': 'aci-attribute-column',
|
||||
html: IPA.messages.objects.aci.attribute
|
||||
html: text.get('@i18n:objects.aci.attribute')
|
||||
}));
|
||||
|
||||
if (that.undo) {
|
||||
|
||||
@@ -111,7 +111,7 @@ IPA.entity_adder_dialog = function(spec) {
|
||||
};
|
||||
|
||||
that.get_success_message = function(data) {
|
||||
var message = IPA.messages.dialogs.add_confirmation;
|
||||
var message = text.get('@i18n:dialogs.add_confirmation');
|
||||
return message.replace('${entity}', that.subject);
|
||||
};
|
||||
|
||||
@@ -191,7 +191,7 @@ IPA.entity_adder_dialog = function(spec) {
|
||||
div.append(' ');
|
||||
|
||||
$('<span/>', {
|
||||
text: IPA.messages.widget.validation.required
|
||||
text: text.get('@i18n:widget.validation.required')
|
||||
}).appendTo(div);
|
||||
};
|
||||
|
||||
|
||||
@@ -619,7 +619,7 @@ IPA.association_table_widget = function (spec) {
|
||||
var selected_values = that.get_selected_values();
|
||||
|
||||
if (!selected_values.length) {
|
||||
var message = IPA.messages.dialogs.remove_empty;
|
||||
var message = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(message);
|
||||
return;
|
||||
}
|
||||
@@ -910,7 +910,7 @@ IPA.association_facet = function (spec, no_init) {
|
||||
'class': 'right-aligned-facet-controls'
|
||||
}).appendTo(that.controls);
|
||||
|
||||
div.append(IPA.messages.association.show_results);
|
||||
div.append(text.get('@i18n:association.show_results'));
|
||||
div.append(' ');
|
||||
|
||||
var name = that.entity.name+'-'+that.attribute_member+'-'+that.other_entity.name+'-type-radio';
|
||||
@@ -929,7 +929,7 @@ IPA.association_facet = function (spec, no_init) {
|
||||
}).appendTo(div);
|
||||
|
||||
$('<label/>', {
|
||||
text: IPA.messages.association.direct_membership,
|
||||
text: text.get('@i18n:association.direct_membership'),
|
||||
'for': direct_id
|
||||
}).appendTo(div);
|
||||
|
||||
@@ -950,7 +950,7 @@ IPA.association_facet = function (spec, no_init) {
|
||||
}).appendTo(div);
|
||||
|
||||
$('<label/>', {
|
||||
text: IPA.messages.association.indirect_membership,
|
||||
text: text.get('@i18n:association.indirect_membership'),
|
||||
'for': indirect_id
|
||||
}).appendTo(div);
|
||||
}
|
||||
@@ -1031,7 +1031,7 @@ IPA.association_facet = function (spec, no_init) {
|
||||
var values = that.table.get_selected_values();
|
||||
|
||||
if (!values.length) {
|
||||
var message = IPA.messages.dialogs.remove_empty;
|
||||
var message = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(message);
|
||||
return;
|
||||
}
|
||||
@@ -1284,7 +1284,7 @@ IPA.attribute_facet = function(spec, no_init) {
|
||||
var selected_values = that.get_selected_values();
|
||||
|
||||
if (!selected_values.length) {
|
||||
var message = IPA.messages.dialogs.remove_empty;
|
||||
var message = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(message);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -679,9 +679,9 @@ IPA.automember.default_group_widget = function(spec) {
|
||||
|
||||
that.get_title = function() {
|
||||
if (that.group_type === 'group') {
|
||||
return IPA.messages.objects.automember.default_user_group;
|
||||
return text.get('@i18n:objects.automember.default_user_group');
|
||||
} else {
|
||||
return IPA.messages.objects.automember.default_host_group;
|
||||
return text.get('@i18n:objects.automember.default_host_group');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -225,15 +225,15 @@ IPA.cert.revoke_dialog = function(spec) {
|
||||
var tr = $('<tr/>').appendTo(table);
|
||||
|
||||
var td = $('<td/>').appendTo(tr);
|
||||
td.append(IPA.messages.objects.cert.note+':');
|
||||
td.append(text.get('@i18n:objects.cert.note')+':');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append(IPA.messages.objects.cert.revoke_confirmation);
|
||||
td.append(text.get('@i18n:objects.cert.revoke_confirmation'));
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append(IPA.messages.objects.cert.reason+':');
|
||||
td.append(text.get('@i18n:objects.cert.reason')+':');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
|
||||
@@ -243,7 +243,7 @@ IPA.cert.revoke_dialog = function(spec) {
|
||||
if (!reason) continue;
|
||||
$('<option/>', {
|
||||
'value': i,
|
||||
'html': IPA.messages.objects.cert[reason]
|
||||
'html': text.get('@i18n:objects.cert.'+reason)
|
||||
}).appendTo(that.select);
|
||||
}
|
||||
};
|
||||
@@ -284,35 +284,35 @@ IPA.cert.view_dialog = function(spec) {
|
||||
var tr = $('<tr/>').appendTo(table);
|
||||
$('<td/>', {
|
||||
'colspan': 2,
|
||||
'html': '<h3>'+IPA.messages.objects.cert.issued_to+'</h3>'
|
||||
'html': '<h3>'+text.get('@i18n:objects.cert.issued_to')+'</h3>'
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.common_name+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.common_name')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.subject.cn
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.organization+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.organization')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.subject.o
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.organizational_unit+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.organizational_unit')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.subject.ou
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.serial_number+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.serial_number')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.serial_number
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.serial_number_hex+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.serial_number_hex')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.serial_number_hex
|
||||
}).appendTo(tr);
|
||||
@@ -320,23 +320,23 @@ IPA.cert.view_dialog = function(spec) {
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td/>', {
|
||||
'colspan': 2,
|
||||
'html': '<h3>'+IPA.messages.objects.cert.issued_by+'</h3>'
|
||||
'html': '<h3>'+text.get('@i18n:objects.cert.issued_by')+'</h3>'
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.common_name+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.common_name')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.issuer.cn
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.organization+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.organization')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.issuer.o
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.organizational_unit+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.organizational_unit')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.issuer.ou
|
||||
}).appendTo(tr);
|
||||
@@ -344,17 +344,17 @@ IPA.cert.view_dialog = function(spec) {
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td/>', {
|
||||
'colspan': 2,
|
||||
'html': '<h3>'+IPA.messages.objects.cert.validity+'</h3>'
|
||||
'html': '<h3>'+text.get('@i18n:objects.cert.validity')+'</h3>'
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.issued_on+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.issued_on')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.issued_on
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.expires_on+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.expires_on')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.expires_on
|
||||
}).appendTo(tr);
|
||||
@@ -362,17 +362,17 @@ IPA.cert.view_dialog = function(spec) {
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td/>', {
|
||||
'colspan': 2,
|
||||
'html': '<h3>'+IPA.messages.objects.cert.fingerprints+'</h3>'
|
||||
'html': '<h3>'+text.get('@i18n:objects.cert.fingerprints')+'</h3>'
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.sha1_fingerprint+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.sha1_fingerprint')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.sha1_fingerprint
|
||||
}).appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
$('<td>'+IPA.messages.objects.cert.md5_fingerprint+':</td>').appendTo(tr);
|
||||
$('<td>'+text.get('@i18n:objects.cert.md5_fingerprint')+':</td>').appendTo(tr);
|
||||
$('<td/>', {
|
||||
text: that.md5_fingerprint
|
||||
}).appendTo(tr);
|
||||
@@ -552,7 +552,7 @@ IPA.cert.view_action = function(spec) {
|
||||
var entity_label = that.entity_label || facet.entity.metadata.label_singular;
|
||||
var entity_name = certificate.entity_info.name;
|
||||
|
||||
var title = IPA.messages.objects.cert.view_certificate;
|
||||
var title = text.get('@i18n:objects.cert.view_certificate');
|
||||
title = title.replace('${entity}', entity_label);
|
||||
title = title.replace('${primary_key}', entity_name);
|
||||
|
||||
@@ -585,7 +585,7 @@ IPA.cert.get_action = function(spec) {
|
||||
var entity_label = that.entity_label || facet.entity.metadata.label_singular;
|
||||
var entity_name = certificate.entity_info.name;
|
||||
|
||||
var title = IPA.messages.objects.cert.view_certificate;
|
||||
var title = text.get('@i18n:objects.cert.view_certificate');
|
||||
title = title.replace('${entity}', entity_label);
|
||||
title = title.replace('${primary_key}', entity_name);
|
||||
|
||||
@@ -620,11 +620,11 @@ IPA.cert.request_action = function(spec) {
|
||||
var entity_name = certificate.entity_info.name;
|
||||
var hostname = certificate.entity_info.hostname;
|
||||
|
||||
var title = IPA.messages.objects.cert.issue_certificate;
|
||||
var title = text.get('@i18n:objects.cert.issue_certificate');
|
||||
title = title.replace('${entity}', entity_label);
|
||||
title = title.replace('${primary_key}', entity_name);
|
||||
|
||||
var request_message = IPA.messages.objects.cert.request_message;
|
||||
var request_message = text.get('@i18n:objects.cert.request_message');
|
||||
request_message = request_message.replace(/\$\{hostname\}/g, hostname);
|
||||
request_message = request_message.replace(/\$\{realm\}/g, IPA.env.realm);
|
||||
|
||||
@@ -677,9 +677,9 @@ IPA.cert.revoke_action = function(spec) {
|
||||
var entity_label = that.entity_label || facet.entity.metadata.label_singular;
|
||||
var entity_name = certificate.entity_info.name;
|
||||
|
||||
var title = IPA.messages.objects.cert.revoke_certificate_simple;
|
||||
var title = text.get('@i18n:objects.cert.revoke_certificate_simple');
|
||||
if (entity_name && entity_label) {
|
||||
title = IPA.messages.objects.cert.revoke_certificate;
|
||||
title = text.get('@i18n:objects.cert.revoke_certificate');
|
||||
title = title.replace('${entity}', entity_label);
|
||||
title = title.replace('${primary_key}', entity_name);
|
||||
}
|
||||
@@ -734,9 +734,9 @@ IPA.cert.restore_action = function(spec) {
|
||||
var entity_label = that.entity_label || facet.entity.metadata.label_singular;
|
||||
var entity_name = certificate.entity_info.name;
|
||||
|
||||
var title = IPA.messages.objects.cert.restore_certificate_simple;
|
||||
var title = text.get('@i18n:objects.cert.restore_certificate_simple');
|
||||
if (entity_name && entity_label) {
|
||||
title = IPA.messages.objects.cert.restore_certificate;
|
||||
title = text.get('@i18n:objects.cert.restore_certificate');
|
||||
title = title.replace('${entity}', entity_label);
|
||||
title = title.replace('${primary_key}', entity_name);
|
||||
}
|
||||
@@ -828,7 +828,7 @@ IPA.cert.status_widget = function(spec) {
|
||||
style: 'float: left;'
|
||||
}).appendTo(that.status_valid);
|
||||
|
||||
content_div.append('<b>'+IPA.messages.objects.cert.valid+'</b>');
|
||||
content_div.append('<b>'+text.get('@i18n:objects.cert.valid')+'</b>');
|
||||
|
||||
that.status_revoked = $('<div/>', {
|
||||
name: 'certificate-revoked',
|
||||
@@ -845,7 +845,7 @@ IPA.cert.status_widget = function(spec) {
|
||||
style: 'float: left;'
|
||||
}).appendTo(that.status_revoked);
|
||||
|
||||
content_div.append('<b>'+IPA.messages.objects.cert.revoked+'</b>');
|
||||
content_div.append('<b>'+text.get('@i18n:objects.cert.revoked')+'</b>');
|
||||
content_div.append(' ');
|
||||
that.revocation_reason = $('<span/>', {
|
||||
'name': 'revocation_reason'
|
||||
@@ -866,7 +866,7 @@ IPA.cert.status_widget = function(spec) {
|
||||
style: 'float: left;'
|
||||
}).appendTo(that.status_missing);
|
||||
|
||||
content_div.append('<b>'+IPA.messages.objects.cert.missing+'</b>');
|
||||
content_div.append('<b>'+text.get('@i18n:objects.cert.missing')+'</b>');
|
||||
};
|
||||
|
||||
that.update = function(certificate) {
|
||||
@@ -900,7 +900,7 @@ IPA.cert.status_widget = function(spec) {
|
||||
that.status_revoked.css('display', status === IPA.cert.CERTIFICATE_STATUS_REVOKED ? '' : 'none');
|
||||
|
||||
var reason = IPA.cert.CRL_REASON[revocation_reason];
|
||||
that.revocation_reason.html(revocation_reason === undefined || reason === null ? '' : IPA.messages.objects.cert[reason]);
|
||||
that.revocation_reason.html(revocation_reason === undefined || reason === null ? '' : text.get('@i18n:objects.cert.'+reason));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -985,8 +985,8 @@ IPA.cert.entity = function(spec) {
|
||||
var cmd = IPA.metadata.commands['cert_find'];
|
||||
var entity = lang.clone(cmd);
|
||||
entity.attribute_members = {};
|
||||
entity.label = IPA.messages.objects.cert.certificates;
|
||||
entity.label_singular = IPA.messages.objects.cert.certificate;
|
||||
entity.label = text.get('@i18n:objects.cert.certificates');
|
||||
entity.label_singular = text.get('@i18n:objects.cert.certificate');
|
||||
entity.methods = [
|
||||
'find',
|
||||
'remove-hold',
|
||||
@@ -1007,36 +1007,36 @@ IPA.cert.entity = function(spec) {
|
||||
get_param(entity.takes_params, 'subject').flags = ['no_update'];
|
||||
var reason = get_param(entity.takes_params, 'revocation_reason');
|
||||
reason.flags = ['no_update'];
|
||||
reason.label = IPA.messages.objects.cert.revocation_reason;
|
||||
reason.label = text.get('@i18n:objects.cert.revocation_reason');
|
||||
|
||||
add_param('serial_number',
|
||||
IPA.messages.objects.cert.serial_number,
|
||||
IPA.messages.objects.cert.serial_number,
|
||||
text.get('@i18n:objects.cert.serial_number'),
|
||||
text.get('@i18n:objects.cert.serial_number'),
|
||||
true);
|
||||
add_param('serial_number_hex',
|
||||
IPA.messages.objects.cert.serial_number_hex,
|
||||
IPA.messages.objects.cert.serial_number_hex);
|
||||
text.get('@i18n:objects.cert.serial_number_hex'),
|
||||
text.get('@i18n:objects.cert.serial_number_hex'));
|
||||
add_param('issuer',
|
||||
IPA.messages.objects.cert.issued_by,
|
||||
IPA.messages.objects.cert.issued_by);
|
||||
text.get('@i18n:objects.cert.issued_by'),
|
||||
text.get('@i18n:objects.cert.issued_by'));
|
||||
add_param('status',
|
||||
IPA.messages.objects.cert.status,
|
||||
IPA.messages.objects.cert.status);
|
||||
text.get('@i18n:objects.cert.status'),
|
||||
text.get('@i18n:objects.cert.status'));
|
||||
add_param('valid_not_before',
|
||||
IPA.messages.objects.cert.issued_on,
|
||||
IPA.messages.objects.cert.issued_on);
|
||||
text.get('@i18n:objects.cert.issued_on'),
|
||||
text.get('@i18n:objects.cert.issued_on'));
|
||||
add_param('valid_not_after',
|
||||
IPA.messages.objects.cert.expires_on,
|
||||
IPA.messages.objects.cert.expires_on);
|
||||
text.get('@i18n:objects.cert.expires_on'),
|
||||
text.get('@i18n:objects.cert.expires_on'));
|
||||
add_param('md5_fingerprint',
|
||||
IPA.messages.objects.cert.md5_fingerprint,
|
||||
IPA.messages.objects.cert.md5_fingerprint);
|
||||
text.get('@i18n:objects.cert.md5_fingerprint'),
|
||||
text.get('@i18n:objects.cert.md5_fingerprint'));
|
||||
add_param('sha1_fingerprint',
|
||||
IPA.messages.objects.cert.sha1_fingerprint,
|
||||
IPA.messages.objects.cert.sha1_fingerprint);
|
||||
text.get('@i18n:objects.cert.sha1_fingerprint'),
|
||||
text.get('@i18n:objects.cert.sha1_fingerprint'));
|
||||
add_param('certificate',
|
||||
IPA.messages.objects.cert.certificate,
|
||||
IPA.messages.objects.cert.certificate);
|
||||
text.get('@i18n:objects.cert.certificate'),
|
||||
text.get('@i18n:objects.cert.certificate'));
|
||||
|
||||
|
||||
IPA.metadata.objects.cert = entity;
|
||||
|
||||
@@ -124,7 +124,7 @@ IPA.section_builder = function(spec) {
|
||||
section_spec.facet = that.container;
|
||||
|
||||
if (!section_spec.label && section_spec.name && that.container.entity) {
|
||||
var obj_messages = IPA.messages.objects[that.container.entity.name];
|
||||
var obj_messages = text.get('@i18n:objects.'+that.container.entity.name);
|
||||
section_spec.label = obj_messages[section_spec.name];
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ IPA.details_facet = function(spec, no_init) {
|
||||
};
|
||||
|
||||
that.nofify_update_success = function() {
|
||||
var msg = IPA.messages.details.updated;
|
||||
var msg = text.get('@i18n:details.updated');
|
||||
var key = that.get_pkey();
|
||||
msg = msg.replace('${entity}', that.entity.metadata.label_singular);
|
||||
msg = msg.replace('${primary_key}', key);
|
||||
@@ -1183,7 +1183,7 @@ IPA.enabled_summary_cond = function() {
|
||||
return {
|
||||
pos: ['enabled'],
|
||||
neg: [],
|
||||
description: IPA.messages.status.enabled,
|
||||
description: text.get('@i18n:status.enabled'),
|
||||
state: ['enabled']
|
||||
};
|
||||
};
|
||||
@@ -1192,7 +1192,7 @@ IPA.disabled_summary_cond = function() {
|
||||
return {
|
||||
pos: [],
|
||||
neg: ['enabled'],
|
||||
description: IPA.messages.status.disabled,
|
||||
description: text.get('@i18n:status.disabled'),
|
||||
state: ['disabled']
|
||||
};
|
||||
};
|
||||
|
||||
@@ -467,7 +467,7 @@ IPA.adder_dialog = function(spec) {
|
||||
}).appendTo(left_panel);
|
||||
|
||||
$('<div/>', {
|
||||
html: IPA.messages.dialogs.available,
|
||||
html: text.get('@i18n:dialogs.available'),
|
||||
'class': 'adder-dialog-header ui-widget-header'
|
||||
}).appendTo(available_panel);
|
||||
|
||||
@@ -488,7 +488,7 @@ IPA.adder_dialog = function(spec) {
|
||||
}).appendTo(right_panel);
|
||||
|
||||
$('<div/>', {
|
||||
html: IPA.messages.dialogs.prospective,
|
||||
html: text.get('@i18n:dialogs.prospective'),
|
||||
'class': 'adder-dialog-header ui-widget-header'
|
||||
}).appendTo(selected_panel);
|
||||
|
||||
@@ -537,7 +537,7 @@ IPA.adder_dialog = function(spec) {
|
||||
}).appendTo(left_panel);
|
||||
|
||||
$('<div/>', {
|
||||
html: IPA.messages.objects.sudorule.external,
|
||||
html: text.get('@i18n:objects.sudorule.external'),
|
||||
'class': 'adder-dialog-header ui-widget-header'
|
||||
}).appendTo(external_panel);
|
||||
|
||||
|
||||
@@ -1273,10 +1273,10 @@ IPA.dnsrecord_redirection_dialog = function(spec) {
|
||||
|
||||
that.create = function() {
|
||||
$('<p/>', {
|
||||
'text': IPA.messages.objects.dnsrecord.deleted_no_data
|
||||
'text': text.get('@i18n:objects.dnsrecord.deleted_no_data')
|
||||
}).appendTo(that.container);
|
||||
$('<p/>', {
|
||||
'text': IPA.messages.objects.dnsrecord.redirection_dnszone
|
||||
'text': text.get('@i18n:objects.dnsrecord.redirection_dnszone')
|
||||
}).appendTo(that.container);
|
||||
};
|
||||
|
||||
@@ -1807,7 +1807,7 @@ IPA.dns.record_type_table_widget = function(spec) {
|
||||
var selected_values = that.get_selected_values();
|
||||
|
||||
if (!selected_values.length) {
|
||||
var message = IPA.messages.dialogs.remove_empty;
|
||||
var message = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(message);
|
||||
return;
|
||||
}
|
||||
@@ -1856,7 +1856,7 @@ IPA.dns.record_type_table_widget = function(spec) {
|
||||
|
||||
that.create_add_dialog = function() {
|
||||
|
||||
var title = IPA.messages.dialogs.add_title;
|
||||
var title = text.get('@i18n:dialogs.add_title');
|
||||
var label = that.entity.metadata.label_singular;
|
||||
|
||||
var dialog_spec = {
|
||||
@@ -1882,7 +1882,7 @@ IPA.dns.record_type_table_widget = function(spec) {
|
||||
|
||||
dialog.get_add_message = function() {
|
||||
var label = that.entity.metadata.label_singular;
|
||||
var message = IPA.messages.dialogs.add_confirmation;
|
||||
var message = text.get('@i18n:dialogs.add_confirmation');
|
||||
message = message.replace('${entity}', label);
|
||||
return message;
|
||||
};
|
||||
@@ -1953,7 +1953,7 @@ IPA.dns.record_type_table_widget = function(spec) {
|
||||
|
||||
that.create_mod_dialog = function() {
|
||||
|
||||
var title = IPA.messages.dialogs.edit_title;
|
||||
var title = text.get('@i18n:dialogs.edit_title');
|
||||
var label = that.entity.metadata.label_singular;
|
||||
|
||||
var dialog_spec = {
|
||||
@@ -2238,7 +2238,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
that.create_add_record_button = function() {
|
||||
|
||||
$('<a />', {
|
||||
text: IPA.messages.objects.dnsrecord.ptr_redir_create,
|
||||
text: text.get('@i18n:objects.dnsrecord.ptr_redir_create'),
|
||||
href: '#create_record',
|
||||
click: function() {
|
||||
that.create_record();
|
||||
@@ -2264,7 +2264,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
that.start_redirect = function() {
|
||||
|
||||
if (!that.address.valid) {
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_address_err);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_address_err'));
|
||||
} else {
|
||||
that.reverse_address = that.address.get_reverse().toLowerCase()+'.';
|
||||
that.get_zones();
|
||||
@@ -2274,7 +2274,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
//1st step: get all zones
|
||||
that.get_zones = function() {
|
||||
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_zones);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_zones'));
|
||||
|
||||
var command = IPA.command({
|
||||
entity: 'dnszone',
|
||||
@@ -2284,7 +2284,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
},
|
||||
on_success: that.find_zone,
|
||||
on_error: function() {
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_zones_err);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_zones_err'));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2300,7 +2300,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
|
||||
var zone_name = zones[i].idnsname[0];
|
||||
if (that.reverse_address.indexOf(zone_name) > -1) {
|
||||
var msg = IPA.messages.objects.dnsrecord.ptr_redir_zone;
|
||||
var msg = text.get('@i18n:objects.dnsrecord.ptr_redir_zone');
|
||||
msg = msg.replace('${zone}', zone_name);
|
||||
that.append_status(msg);
|
||||
|
||||
@@ -2318,14 +2318,14 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
that.zone = target_zone;
|
||||
that.check_record();
|
||||
} else {
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_zone_err);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_zone_err'));
|
||||
}
|
||||
};
|
||||
|
||||
//3rd step: check record existance
|
||||
that.check_record = function(zone) {
|
||||
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_record);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_record'));
|
||||
|
||||
var i1 = that.reverse_address.indexOf(that.zone);
|
||||
var record_name = that.reverse_address.substring(0,i1 - 1);
|
||||
@@ -2339,7 +2339,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
that.redirect();
|
||||
},
|
||||
on_error: function() {
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_record_err);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_record_err'));
|
||||
if (that.dns_record) {
|
||||
that.create_add_record_button();
|
||||
}
|
||||
@@ -2364,7 +2364,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
//4th-b optional step: create PTR record
|
||||
that.create_record = function() {
|
||||
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_creating);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_creating'));
|
||||
|
||||
var ptr = that.dns_record.name +'.' + that.dns_record.zone;
|
||||
|
||||
@@ -2379,7 +2379,7 @@ IPA.dns.ptr_redirection_dialog = function(spec) {
|
||||
that.redirect();
|
||||
},
|
||||
on_error: function() {
|
||||
that.append_status(IPA.messages.objects.dnsrecord.ptr_redir_creating_err);
|
||||
that.append_status(text.get('@i18n:objects.dnsrecord.ptr_redir_creating_err'));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2463,7 +2463,7 @@ IPA.dnsforwarder_validator = function(spec) {
|
||||
var port = parts[2];
|
||||
|
||||
if (!port.match(/^[1-9]\d*$|^0$/) || port < 0 || port > 65535) {
|
||||
var message = IPA.messages.widget.validation.port;
|
||||
var message = text.get('@i18n:widget.validation.port');
|
||||
message = message.replace('${port}', port);
|
||||
return that.false_result(message);
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ IPA.entitle.details_facet = function(spec) {
|
||||
that.refresh = function() {
|
||||
|
||||
var summary = $('span[name=summary]', that.container).empty();
|
||||
summary.append(IPA.messages.objects.entitle.loading);
|
||||
summary.append(text.get('@i18n:objects.entitle.loading'));
|
||||
|
||||
function on_success(data, text_status, xhr) {
|
||||
if (that.entity.status == IPA.entitle.unregistered) {
|
||||
@@ -498,7 +498,7 @@ IPA.entitle.certificate_column = function(spec) {
|
||||
|
||||
$('<a/>', {
|
||||
href: '#download',
|
||||
html: IPA.messages.objects.entitle.download,
|
||||
html: text.get('@i18n:objects.entitle.download'),
|
||||
click: function() {
|
||||
var dialog = IPA.cert.download_dialog({
|
||||
title: '@i18n:objects.entitle.download_certificate',
|
||||
@@ -700,13 +700,13 @@ IPA.entitle.download_widget = function(spec) {
|
||||
that.create = function(container) {
|
||||
that.link = $('<a/>', {
|
||||
'href': '#download',
|
||||
'html': IPA.messages.objects.entitle.download,
|
||||
'html': text.get('@i18n:objects.entitle.download'),
|
||||
'click': function() {
|
||||
that.entity.get_accounts(
|
||||
function(data, text_status, xhr) {
|
||||
var userpkcs12 = data.result.result[0].userpkcs12;
|
||||
if (!userpkcs12) {
|
||||
alert(IPA.messages.objects.entitle.no_certificate);
|
||||
alert(text.get('@i18n:objects.entitle.no_certificate'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ IPA.entity_builder = function() {
|
||||
}
|
||||
|
||||
if (facet_group.label == undefined) {
|
||||
facet_group.label = IPA.messages.facet_groups[facet_group.name];
|
||||
facet_group.label = text.get('@i18n:facet_groups.'+facet_group.name);
|
||||
}
|
||||
|
||||
entity.add_facet_group(facet_group);
|
||||
@@ -398,7 +398,7 @@ IPA.entity_builder = function() {
|
||||
spec.name = spec.name || 'add';
|
||||
|
||||
if (!spec.title) {
|
||||
var title = IPA.messages.dialogs.add_title;
|
||||
var title = text.get('@i18n:dialogs.add_title');
|
||||
var label = entity.metadata.label_singular;
|
||||
spec.title = title.replace('${entity}', label);
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ IPA.facet = function(spec, no_init) {
|
||||
}).appendTo(li);
|
||||
};
|
||||
|
||||
var title = IPA.messages.error_report.title;
|
||||
var title = text.get('@i18n:error_report.title');
|
||||
title = title.replace('${error}', error_thrown.name);
|
||||
|
||||
that.error_container.empty();
|
||||
@@ -556,14 +556,14 @@ IPA.facet = function(spec, no_init) {
|
||||
details.append('<p>'+error_thrown.message+'</p>');
|
||||
|
||||
$('<div/>', {
|
||||
text: IPA.messages.error_report.options
|
||||
text: text.get('@i18n:error_report.options')
|
||||
}).appendTo(that.error_container);
|
||||
|
||||
var options_list = $('<ul/>').appendTo(that.error_container);
|
||||
|
||||
add_option(
|
||||
options_list,
|
||||
IPA.messages.error_report.refresh,
|
||||
text.get('@i18n:error_report.refresh'),
|
||||
function() {
|
||||
that.refresh();
|
||||
}
|
||||
@@ -571,7 +571,7 @@ IPA.facet = function(spec, no_init) {
|
||||
|
||||
add_option(
|
||||
options_list,
|
||||
IPA.messages.error_report.main_page,
|
||||
text.get('@i18n:error_report.main_page'),
|
||||
function() {
|
||||
navigation.show_default();
|
||||
}
|
||||
@@ -579,13 +579,13 @@ IPA.facet = function(spec, no_init) {
|
||||
|
||||
add_option(
|
||||
options_list,
|
||||
IPA.messages.error_report.reload,
|
||||
text.get('@i18n:error_report.reload'),
|
||||
function() {
|
||||
window.location.reload(false);
|
||||
}
|
||||
);
|
||||
|
||||
that.error_container.append('<p>'+IPA.messages.error_report.problem_persists+'</p>');
|
||||
that.error_container.append('<p>'+text.get('@i18n:error_report.problem_persists')+'</p>');
|
||||
|
||||
that.show_error();
|
||||
};
|
||||
@@ -1168,7 +1168,7 @@ IPA.table_facet = function(spec, no_init) {
|
||||
that.load_records(records);
|
||||
|
||||
if (data.result.truncated) {
|
||||
var message = IPA.messages.search.truncated;
|
||||
var message = text.get('@i18n:search.truncated');
|
||||
message = message.replace('${counter}', data.result.count);
|
||||
that.table.summary.text(message);
|
||||
} else {
|
||||
@@ -1214,7 +1214,7 @@ IPA.table_facet = function(spec, no_init) {
|
||||
that.table.current_page = page;
|
||||
|
||||
if (!total) {
|
||||
that.table.summary.text(IPA.messages.association.no_entries);
|
||||
that.table.summary.text(text.get('@i18n:association.no_entries'));
|
||||
that.load_records([]);
|
||||
return;
|
||||
}
|
||||
@@ -1224,7 +1224,7 @@ IPA.table_facet = function(spec, no_init) {
|
||||
var end = that.table.current_page * that.table.page_length;
|
||||
end = end > total ? total : end;
|
||||
|
||||
var summary = IPA.messages.association.paging;
|
||||
var summary = text.get('@i18n:association.paging');
|
||||
summary = summary.replace('${start}', start);
|
||||
summary = summary.replace('${end}', end);
|
||||
summary = summary.replace('${total}', total);
|
||||
|
||||
@@ -455,25 +455,25 @@ IPA.metadata_validator = function(spec) {
|
||||
if (metadata.type === 'int') {
|
||||
number = true;
|
||||
if (!value.match(/^-?\d+$/)) {
|
||||
return that.false_result(IPA.messages.widget.validation.integer);
|
||||
return that.false_result(text.get('@i18n:widget.validation.integer'));
|
||||
}
|
||||
} else if (metadata.type === 'Decimal') {
|
||||
number = true;
|
||||
if (!value.match(/^-?\d+(\.\d+)?$/)) {
|
||||
return that.false_result(IPA.messages.widget.validation.decimal);
|
||||
return that.false_result(text.get('@i18n:widget.validation.decimal'));
|
||||
}
|
||||
}
|
||||
|
||||
if (number) {
|
||||
|
||||
if (IPA.defined(metadata.minvalue, true) && Number(value) < Number(metadata.minvalue)) {
|
||||
message = IPA.messages.widget.validation.min_value;
|
||||
message = text.get('@i18n:widget.validation.min_value');
|
||||
message = message.replace('${value}', metadata.minvalue);
|
||||
return that.false_result(message);
|
||||
}
|
||||
|
||||
if (IPA.defined(metadata.maxvalue, true) && Number(value) > Number(metadata.maxvalue)) {
|
||||
message = IPA.messages.widget.validation.max_value;
|
||||
message = text.get('@i18n:widget.validation.max_value');
|
||||
message = message.replace('${value}', metadata.maxvalue);
|
||||
return that.false_result(message);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ IPA.hbac.test_select_facet = function(spec) {
|
||||
}
|
||||
}).appendTo(td);
|
||||
|
||||
var message = IPA.messages.objects.hbactest.specify_external;
|
||||
var message = text.get('@i18n:objects.hbactest.specify_external');
|
||||
message = message.replace('${entity}', that.managed_entity.metadata.label_singular);
|
||||
|
||||
$('<label/>', {
|
||||
@@ -434,7 +434,7 @@ IPA.hbac.test_rules_facet = function(spec) {
|
||||
|
||||
$('<label/>', {
|
||||
'for': 'hbactest-rules-include-enabled',
|
||||
text: IPA.messages.objects.hbactest.include_enabled
|
||||
text: text.get('@i18n:objects.hbactest.include_enabled')
|
||||
}).appendTo(header);
|
||||
|
||||
that.disabled = $('<input/>', {
|
||||
@@ -445,7 +445,7 @@ IPA.hbac.test_rules_facet = function(spec) {
|
||||
|
||||
$('<label/>', {
|
||||
'for': 'hbactest-rules-include-disabled',
|
||||
text: IPA.messages.objects.hbactest.include_disabled
|
||||
text: text.get('@i18n:objects.hbactest.include_disabled')
|
||||
}).appendTo(header);
|
||||
|
||||
var content = $('<div/>', {
|
||||
@@ -534,7 +534,7 @@ IPA.hbac.test_run_facet = function(spec) {
|
||||
}).appendTo(result_panel);
|
||||
|
||||
var title = $('<span/>', {
|
||||
text: IPA.messages.objects.hbactest.rules,
|
||||
text: text.get('@i18n:objects.hbactest.rules'),
|
||||
'class': 'hbac-test-title'
|
||||
}).appendTo(header);
|
||||
|
||||
@@ -553,7 +553,7 @@ IPA.hbac.test_run_facet = function(spec) {
|
||||
|
||||
$('<label/>', {
|
||||
'for': 'hbactest-rules-matched',
|
||||
text: IPA.messages.objects.hbactest.matched
|
||||
text: text.get('@i18n:objects.hbactest.matched')
|
||||
}).appendTo(header);
|
||||
|
||||
that.unmatched_checkbox = $('<input/>', {
|
||||
@@ -569,7 +569,7 @@ IPA.hbac.test_run_facet = function(spec) {
|
||||
|
||||
$('<label/>', {
|
||||
'for': 'hbactest-rules-unmatched',
|
||||
text: IPA.messages.objects.hbactest.unmatched
|
||||
text: text.get('@i18n:objects.hbactest.unmatched')
|
||||
}).appendTo(header);
|
||||
|
||||
var content = $('<div/>', {
|
||||
@@ -644,8 +644,8 @@ IPA.hbac.test_run_facet = function(spec) {
|
||||
that.refresh = function() {
|
||||
if (that.data) {
|
||||
var message = that.data.result.value ?
|
||||
IPA.messages.objects.hbactest.access_granted :
|
||||
IPA.messages.objects.hbactest.access_denied;
|
||||
text.get('@i18n:objects.hbactest.access_granted') :
|
||||
text.get('@i18n:objects.hbactest.access_denied');
|
||||
that.test_result.text(message);
|
||||
|
||||
} else {
|
||||
@@ -770,7 +770,7 @@ IPA.hbac.validation_dialog = function(spec) {
|
||||
|
||||
if (invalid_facets.length > 0) {
|
||||
var div = $('<div/>',{
|
||||
text: IPA.messages.objects.hbactest.missing_values
|
||||
text: text.get('@i18n:objects.hbactest.missing_values')
|
||||
}).appendTo(that.container);
|
||||
ul = $('<ul/>').appendTo(that.container);
|
||||
}
|
||||
|
||||
@@ -370,12 +370,12 @@ IPA.host_fqdn_field = function(spec) {
|
||||
var valid = true;
|
||||
|
||||
if(!hostname.length || hostname[0] === '') {
|
||||
that.hostname_widget.show_error(IPA.messages.widget.validation.required);
|
||||
that.hostname_widget.show_error(text.get('@i18n:widget.validation.required'));
|
||||
that.valid = valid = false;
|
||||
}
|
||||
|
||||
if(!dnszone.length || dnszone[0] === '') {
|
||||
that.dns_zone_widget.show_error(IPA.messages.widget.validation.required);
|
||||
that.dns_zone_widget.show_error(text.get('@i18n:widget.validation.required'));
|
||||
that.valid = valid = false;
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ IPA.host_keytab_widget = function(spec) {
|
||||
|
||||
that.missing_span.append(' ');
|
||||
|
||||
that.missing_span.append(IPA.messages.objects.host.keytab_missing);
|
||||
that.missing_span.append(text.get('@i18n:objects.host.keytab_missing'));
|
||||
|
||||
that.present_span = $('<span/>', {
|
||||
name: 'present',
|
||||
@@ -599,7 +599,7 @@ IPA.host_keytab_widget = function(spec) {
|
||||
|
||||
that.present_span.append(' ');
|
||||
|
||||
that.present_span.append(IPA.messages.objects.host.keytab_present);
|
||||
that.present_span.append(text.get('@i18n:objects.host.keytab_present'));
|
||||
};
|
||||
|
||||
that.update = function(values) {
|
||||
@@ -631,7 +631,7 @@ IPA.host_unprovision_dialog = function(spec) {
|
||||
that.title = that.title.replace('${entity}', that.entity.metadata.label_singular);
|
||||
|
||||
that.create = function() {
|
||||
that.container.append(IPA.messages.objects.host.unprovision_confirmation);
|
||||
that.container.append(text.get('@i18n:objects.host.unprovision_confirmation'));
|
||||
};
|
||||
|
||||
that.create_buttons = function() {
|
||||
@@ -746,7 +746,7 @@ IPA.host_password_widget = function(spec) {
|
||||
|
||||
that.missing_span.append(' ');
|
||||
|
||||
that.missing_span.append(IPA.messages.objects.host.password_missing);
|
||||
that.missing_span.append(text.get('@i18n:objects.host.password_missing'));
|
||||
|
||||
that.present_span = $('<span/>', {
|
||||
name: 'present',
|
||||
@@ -760,7 +760,7 @@ IPA.host_password_widget = function(spec) {
|
||||
|
||||
that.present_span.append(' ');
|
||||
|
||||
that.present_span.append(IPA.messages.objects.host.password_present);
|
||||
that.present_span.append(text.get('@i18n:objects.host.password_present'));
|
||||
};
|
||||
|
||||
that.update = function(values) {
|
||||
@@ -828,11 +828,11 @@ IPA.host.set_otp_dialog = function(spec) {
|
||||
var button = that.get_button('set_password');
|
||||
|
||||
if (status == 'missing') {
|
||||
that.title = IPA.messages.objects.host.password_set_title;
|
||||
button.label = IPA.messages.objects.host.password_set_button;
|
||||
that.title = text.get('@i18n:objects.host.password_set_title');
|
||||
button.label = text.get('@i18n:objects.host.password_set_button');
|
||||
} else {
|
||||
that.title = IPA.messages.objects.host.password_reset_title;
|
||||
button.label = IPA.messages.objects.host.password_reset_button;
|
||||
that.title = text.get('@i18n:objects.host.password_reset_title');
|
||||
button.label = text.get('@i18n:objects.host.password_reset_button');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ IPA.update_password_expiration = function() {
|
||||
diff = Math.floor(diff / 86400000);
|
||||
|
||||
if (diff <= notify_days) {
|
||||
message = IPA.messages.password.expires_in;
|
||||
message = text.get('@i18n:password.expires_in');
|
||||
message = message.replace('${days}', diff);
|
||||
container.append(message + ' ');
|
||||
$('<a/>', {
|
||||
@@ -527,8 +527,8 @@ IPA.update_password_expiration = function() {
|
||||
IPA.password_selfservice();
|
||||
return false;
|
||||
},
|
||||
text: IPA.messages.password.reset_password_sentence,
|
||||
title: IPA.messages.password.reset_password
|
||||
text: text.get('@i18n:password.reset_password_sentence'),
|
||||
title: text.get('@i18n:password.reset_password')
|
||||
}).appendTo(container);
|
||||
}
|
||||
}
|
||||
@@ -546,7 +546,7 @@ IPA.password_selfservice = function() {
|
||||
};
|
||||
command.execute();
|
||||
|
||||
alert(IPA.messages.password.password_change_complete);
|
||||
alert(text.get('@i18n:password.password_change_complete'));
|
||||
reset_dialog.close();
|
||||
}
|
||||
});
|
||||
@@ -1421,14 +1421,14 @@ IPA.error_dialog = function(spec) {
|
||||
|
||||
var show_details = $('<a />', {
|
||||
href: '#',
|
||||
title: IPA.messages.dialogs.show_details,
|
||||
text: IPA.messages.dialogs.show_details
|
||||
title: text.get('@i18n:dialogs.show_details'),
|
||||
text: text.get('@i18n:dialogs.show_details')
|
||||
}).appendTo(errors_title_div);
|
||||
|
||||
var hide_details = $('<a />', {
|
||||
href: '#',
|
||||
title: IPA.messages.dialogs.hide_details,
|
||||
text: IPA.messages.dialogs.hide_details,
|
||||
title: text.get('@i18n:dialogs.hide_details'),
|
||||
text: text.get('@i18n:dialogs.hide_details'),
|
||||
style : 'display: none'
|
||||
}).appendTo(errors_title_div);
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ IPA.search_facet = function(spec, no_init) {
|
||||
|
||||
var title;
|
||||
if (!values.length) {
|
||||
title = IPA.messages.dialogs.remove_empty;
|
||||
title = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(title);
|
||||
return null;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ IPA.search_facet = function(spec, no_init) {
|
||||
dialog.facet = that;
|
||||
dialog.pkey_prefix = that.managed_entity_pkey_prefix();
|
||||
|
||||
title = IPA.messages.dialogs.remove_title;
|
||||
title = text.get('@i18n:dialogs.remove_title');
|
||||
var label = that.managed_entity.metadata.label;
|
||||
dialog.title = title.replace('${entity}', label);
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ IPA.service_provisioning_status_widget = function (spec) {
|
||||
style: 'float: left;'
|
||||
}).appendTo(that.status_valid);
|
||||
|
||||
content_div.append('<b>'+IPA.messages.objects.service.valid+'</b>');
|
||||
content_div.append('<b>'+text.get('@i18n:objects.service.valid')+'</b>');
|
||||
|
||||
that.status_missing = $('<div/>', {
|
||||
name: 'kerberos-key-missing',
|
||||
@@ -353,7 +353,7 @@ IPA.service_provisioning_status_widget = function (spec) {
|
||||
style: 'float: left;'
|
||||
}).appendTo(that.status_missing);
|
||||
|
||||
content_div.append('<b>'+IPA.messages.objects.service.missing+'</b>');
|
||||
content_div.append('<b>'+text.get('@i18n:objects.service.missing')+'</b>');
|
||||
};
|
||||
|
||||
that.update = function(values) {
|
||||
@@ -390,7 +390,7 @@ IPA.service.unprovision_dialog = function(spec) {
|
||||
that.title = that.title.replace('${entity}', entity_singular);
|
||||
|
||||
that.create = function() {
|
||||
that.container.append(IPA.messages.objects.service.unprovision_confirmation);
|
||||
that.container.append(text.get('@i18n:objects.service.unprovision_confirmation'));
|
||||
};
|
||||
|
||||
that.create_buttons = function() {
|
||||
|
||||
@@ -782,7 +782,7 @@ IPA.sudo.options_section = function(spec) {
|
||||
|
||||
var label = IPA.get_command_option('sudorule_add_option', 'ipasudoopt').label;
|
||||
|
||||
var title = IPA.messages.dialogs.add_title;
|
||||
var title = text.get('@i18n:dialogs.add_title');
|
||||
title = title.replace('${entity}', label);
|
||||
|
||||
var dialog = IPA.dialog({
|
||||
@@ -848,14 +848,14 @@ IPA.sudo.options_section = function(spec) {
|
||||
var values = that.table.get_selected_values();
|
||||
|
||||
if (!values.length) {
|
||||
var message = IPA.messages.dialogs.remove_empty;
|
||||
var message = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(message);
|
||||
return;
|
||||
}
|
||||
|
||||
var pkey = that.facet.get_pkey();
|
||||
|
||||
var title = IPA.messages.dialogs.remove_title;
|
||||
var title = text.get('@i18n:dialogs.remove_title');
|
||||
title = title.replace('${entity}', label);
|
||||
|
||||
var dialog = IPA.deleter_dialog({
|
||||
|
||||
@@ -417,7 +417,7 @@ IPA.user_adder_dialog = function(spec) {
|
||||
var password2 = field2.save()[0];
|
||||
|
||||
if (password1 !== password2) {
|
||||
field2.show_error(IPA.messages.password.password_must_match);
|
||||
field2.show_error(text.get('@i18n:password.password_must_match'));
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ IPA.input_widget = function(spec) {
|
||||
name: 'undo',
|
||||
style: 'display: none;',
|
||||
'class': 'ui-state-highlight ui-corner-all undo',
|
||||
html: IPA.messages.widget.undo
|
||||
html: text.get('@i18n:widget.undo')
|
||||
}).appendTo(container);
|
||||
|
||||
if(on_undo === undefined) {
|
||||
@@ -483,8 +483,8 @@ IPA.multivalued_widget = function(spec) {
|
||||
row.remove_link = $('<a/>', {
|
||||
name: 'remove',
|
||||
href: 'jslink',
|
||||
title: IPA.messages.buttons.remove,
|
||||
html: IPA.messages.buttons.remove,
|
||||
title: text.get('@i18n:buttons.remove'),
|
||||
html: text.get('@i18n:buttons.remove'),
|
||||
click: function () {
|
||||
that.remove_row(row);
|
||||
that.value_changed.notify([], that);
|
||||
@@ -512,8 +512,8 @@ IPA.multivalued_widget = function(spec) {
|
||||
that.add_link = $('<a/>', {
|
||||
name: 'add',
|
||||
href: 'jslink',
|
||||
title: IPA.messages.buttons.add,
|
||||
html: IPA.messages.buttons.add,
|
||||
title: text.get('@i18n:buttons.add'),
|
||||
html: text.get('@i18n:buttons.add'),
|
||||
click: function() {
|
||||
that.add_row('');
|
||||
that.focus_last();
|
||||
@@ -528,7 +528,7 @@ IPA.multivalued_widget = function(spec) {
|
||||
name: 'undo_all',
|
||||
style: 'display: none;',
|
||||
'class': 'ui-state-highlight ui-corner-all undo',
|
||||
html: IPA.messages.widget.undo_all,
|
||||
html: text.get('@i18n:widget.undo_all'),
|
||||
click: function() {
|
||||
that.undo_clicked.notify([], that);
|
||||
}
|
||||
@@ -1528,7 +1528,7 @@ IPA.table_widget = function (spec) {
|
||||
var select_all_checkbox = $('<input/>', {
|
||||
type: 'checkbox',
|
||||
name: that.name,
|
||||
title: IPA.messages.search.select_all
|
||||
title: text.get('@i18n:search.select_all')
|
||||
}).appendTo(th);
|
||||
|
||||
select_all_checkbox.change(function() {
|
||||
@@ -1688,7 +1688,7 @@ IPA.table_widget = function (spec) {
|
||||
if (that.pagination) {
|
||||
|
||||
$('<a/>', {
|
||||
text: IPA.messages.widget.prev,
|
||||
text: text.get('@i18n:widget.prev'),
|
||||
name: 'prev_page',
|
||||
click: function() {
|
||||
that.prev_page();
|
||||
@@ -1699,7 +1699,7 @@ IPA.table_widget = function (spec) {
|
||||
that.pagination_control.append(' ');
|
||||
|
||||
$('<a/>', {
|
||||
text: IPA.messages.widget.next,
|
||||
text: text.get('@i18n:widget.next'),
|
||||
name: 'next_page',
|
||||
click: function() {
|
||||
that.next_page();
|
||||
@@ -1708,7 +1708,7 @@ IPA.table_widget = function (spec) {
|
||||
}).appendTo(that.pagination_control);
|
||||
|
||||
that.pagination_control.append(' ');
|
||||
that.pagination_control.append(IPA.messages.widget.page);
|
||||
that.pagination_control.append(text.get('@i18n:widget.page'));
|
||||
that.pagination_control.append(': ');
|
||||
|
||||
that.current_page_input = $('<input/>', {
|
||||
@@ -1760,14 +1760,14 @@ IPA.table_widget = function (spec) {
|
||||
|
||||
that.select_all = function() {
|
||||
$('input[name="'+that.name+'"]', that.thead).prop('checked', true).
|
||||
attr('title', IPA.messages.search.unselect_all);
|
||||
attr('title', text.get('@i18n:search.unselect_all'));
|
||||
$('input[name="'+that.name+'"]', that.tbody).prop('checked', true);
|
||||
that.select_changed();
|
||||
};
|
||||
|
||||
that.unselect_all = function() {
|
||||
$('input[name="'+that.name+'"]', that.thead).prop('checked', false).
|
||||
attr('title', IPA.messages.search.select_all);
|
||||
attr('title', text.get('@i18n:search.select_all'));
|
||||
$('input[name="'+that.name+'"]', that.tbody).prop('checked', false);
|
||||
that.select_changed();
|
||||
};
|
||||
@@ -2129,7 +2129,7 @@ IPA.attribute_table_widget = function(spec) {
|
||||
var selected_values = that.get_selected_values();
|
||||
|
||||
if (!selected_values.length) {
|
||||
var message = IPA.messages.dialogs.remove_empty;
|
||||
var message = text.get('@i18n:dialogs.remove_empty');
|
||||
alert(message);
|
||||
return null;
|
||||
}
|
||||
@@ -2244,7 +2244,7 @@ IPA.attribute_table_widget = function(spec) {
|
||||
dialog.add(
|
||||
function(data, text_status, xhr) {
|
||||
var label = that.entity.metadata.label_singular;
|
||||
var message = IPA.messages.dialogs.add_confirmation;
|
||||
var message = text.get('@i18n:dialogs.add_confirmation');
|
||||
message = message.replace('${entity}', label);
|
||||
dialog.show_message(message);
|
||||
|
||||
@@ -3138,7 +3138,7 @@ IPA.table_layout = function(spec) {
|
||||
that.get_measurement_unit_text = function(widget) {
|
||||
|
||||
if (widget.measurement_unit) {
|
||||
var unit = IPA.messages.measurement_units[widget.measurement_unit];
|
||||
var unit = text.get('@i18n:measurement_units.'+widget.measurement_unit);
|
||||
return ' (' + unit + ')';
|
||||
}
|
||||
return '';
|
||||
@@ -3636,7 +3636,7 @@ IPA.sshkey_widget = function(spec) {
|
||||
name: that.name,
|
||||
href: '#show-certificate',
|
||||
title: that.tooltip,
|
||||
text: IPA.messages.objects.sshkeystore.show_set_key,
|
||||
text: text.get('@i18n:objects.sshkeystore.show_set_key'),
|
||||
click: function() {
|
||||
that.open_edit_dialog();
|
||||
return false;
|
||||
@@ -3696,9 +3696,9 @@ IPA.sshkey_widget = function(spec) {
|
||||
|
||||
if (value !== that.original_key) {
|
||||
if (value === '') {
|
||||
text = IPA.messages.objects.sshkeystore.status_mod_ns;
|
||||
text = text.get('@i18n:objects.sshkeystore.status_mod_ns');
|
||||
} else {
|
||||
text = IPA.messages.objects.sshkeystore.status_mod_s;
|
||||
text = text.get('@i18n:objects.sshkeystore.status_mod_s');
|
||||
}
|
||||
} else {
|
||||
text = that.key.fingerprint;
|
||||
@@ -3707,9 +3707,9 @@ IPA.sshkey_widget = function(spec) {
|
||||
} else {
|
||||
|
||||
if (!value || value === '') {
|
||||
text = IPA.messages.objects.sshkeystore.status_new_ns;
|
||||
text = text.get('@i18n:objects.sshkeystore.status_new_ns');
|
||||
} else {
|
||||
text = IPA.messages.objects.sshkeystore.status_new_s;
|
||||
text = text.get('@i18n:objects.sshkeystore.status_new_s');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3742,7 +3742,7 @@ IPA.sshkey_widget = function(spec) {
|
||||
height: 380
|
||||
});
|
||||
|
||||
dialog.message = IPA.messages.objects.sshkeystore.set_dialog_help;
|
||||
dialog.message = text.get('@i18n:objects.sshkeystore.set_dialog_help');
|
||||
|
||||
dialog.create_button({
|
||||
name: 'update',
|
||||
|
||||
Reference in new issue
Block a user