Replaced reoccurring strings with string formatting to aid dynamic translations
This commit is contained in:
parent
8fc7178d82
commit
4dab2abf4e
File diff suppressed because it is too large
Load Diff
|
@ -25,7 +25,7 @@ $(document).ready(function(){
|
|||
data: {format:"json"}
|
||||
});
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "remind_never",
|
||||
|
@ -41,12 +41,12 @@ $(document).ready(function(){
|
|||
}
|
||||
},
|
||||
{
|
||||
id: "help_airtime",
|
||||
text: $.i18n._("Yes, help Airtime"),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
$("#register-form").submit();
|
||||
}
|
||||
id: "help_airtime",
|
||||
text: sprintf($.i18n._("Yes, help %s"), PRODUCT_NAME),
|
||||
"class": "btn",
|
||||
click: function() {
|
||||
$("#register-form").submit();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
@ -97,12 +97,12 @@ $(document).ready(function(){
|
|||
}
|
||||
|
||||
$("#Privacy").live('click', function(){
|
||||
var support = $("#SupportFeedback");
|
||||
var button = $("#help_airtime");
|
||||
var support = $("#SupportFeedback");
|
||||
var button = $("#help_airtime");
|
||||
if($(this).is(':checked') && support.is(':checked')){
|
||||
button.removeAttr('disabled').removeClass('ui-state-disabled');
|
||||
button.removeAttr('disabled').removeClass('ui-state-disabled');
|
||||
}else{
|
||||
button.attr('disabled', 'disabled' ).addClass('ui-state-disabled');
|
||||
button.attr('disabled', 'disabled' ).addClass('ui-state-disabled');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -118,36 +118,36 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
$("#Logo").live('change', function(ev){
|
||||
var content, res, logoEl;
|
||||
|
||||
content = $(this).val();
|
||||
res = content.match(/(jpg|jpeg|png|gif)$/gi);
|
||||
logoEl = $("#Logo-element");
|
||||
|
||||
//not an accepted image extension.
|
||||
if (!res) {
|
||||
var ul, li;
|
||||
|
||||
ul = logoEl.find('.errors');
|
||||
li = $("<li/>").append($.i18n._("Image must be one of jpg, jpeg, png, or gif"));
|
||||
|
||||
//errors ul has already been created.
|
||||
if (ul.length > 0) {
|
||||
ul.empty()
|
||||
.append(li);
|
||||
}
|
||||
else {
|
||||
logoEl
|
||||
.append('<ul class="errors"></ul>')
|
||||
.find(".errors")
|
||||
.append(li);
|
||||
}
|
||||
|
||||
$(this).val("");
|
||||
}
|
||||
else {
|
||||
logoEl.find(".errors").remove();
|
||||
}
|
||||
var content, res, logoEl;
|
||||
|
||||
content = $(this).val();
|
||||
res = content.match(/(jpg|jpeg|png|gif)$/gi);
|
||||
logoEl = $("#Logo-element");
|
||||
|
||||
//not an accepted image extension.
|
||||
if (!res) {
|
||||
var ul, li;
|
||||
|
||||
ul = logoEl.find('.errors');
|
||||
li = $("<li/>").append($.i18n._("Image must be one of jpg, jpeg, png, or gif"));
|
||||
|
||||
//errors ul has already been created.
|
||||
if (ul.length > 0) {
|
||||
ul.empty()
|
||||
.append(li);
|
||||
}
|
||||
else {
|
||||
logoEl
|
||||
.append('<ul class="errors"></ul>')
|
||||
.find(".errors")
|
||||
.append(li);
|
||||
}
|
||||
|
||||
$(this).val("");
|
||||
}
|
||||
else {
|
||||
logoEl.find(".errors").remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ function setupUI() {
|
|||
|
||||
$(".repeat_tracks_help_icon").qtip({
|
||||
content: {
|
||||
text: $.i18n._("The desired block length will not be reached if Airtime cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block.")
|
||||
text: sprintf($.i18n._("The desired block length will not be reached if %s cannot find enough unique tracks to match your criteria. Enable this option if you wish to allow tracks to be added multiple times to the smart block."), PRODUCT_NAME)
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
|
|
@ -43,7 +43,7 @@ function setWatchedDirEvents() {
|
|||
$('#storageFolder-ok').click(function(){
|
||||
var url, chosen;
|
||||
|
||||
if(confirm($.i18n._("Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!"))){
|
||||
if(confirm(sprintf($.i18n._("Are you sure you want to change the storage folder?\nThis will remove the files from your %s library!"), PRODUCT_NAME))){
|
||||
url = baseUrl+"Preference/change-stor-directory";
|
||||
chosen = $('#storageFolder').val();
|
||||
|
||||
|
|
|
@ -250,12 +250,14 @@ function setupEventListeners() {
|
|||
showErrorSections();
|
||||
checkLiquidsoapStatus();
|
||||
|
||||
var userManualAnchorOpen = "<a target='_blank' href='" + USER_MANUAL_URL + "'>";
|
||||
|
||||
// qtip for help text
|
||||
$(".override_help_icon").qtip({
|
||||
content: {
|
||||
text: $.i18n._("If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151.")+" "+
|
||||
text: sprintf($.i18n._("If %s is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. The allowed range is between 1024 and 49151."), PRODUCT_NAME)+" "+
|
||||
sprintf($.i18n._(
|
||||
"For more details, please read the %sAirtime Manual%s"), "<a target='_blank' href='http://www.sourcefabric.org/en/airtime/manuals/'>", "</a>")
|
||||
"For more details, please read the %s%s Manual%s"), userManualAnchorOpen, PRODUCT_NAME, "</a>")
|
||||
},
|
||||
hide: {
|
||||
delay: 500,
|
||||
|
@ -465,7 +467,7 @@ $(document).ready(function() {
|
|||
getAdminPasswordStatus();
|
||||
|
||||
$('#stream_save').live('click', function(){
|
||||
var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted.");
|
||||
var confirm_pypo_restart_text = sprintf($.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If %s is recording, and if the change causes a playout engine restart, the recording will be interrupted."), PRODUCT_NAME);
|
||||
if (confirm(confirm_pypo_restart_text)) {
|
||||
var data = $('#stream_form').serialize();
|
||||
var url = baseUrl+'Preference/stream-setting';
|
||||
|
|
Loading…
Reference in New Issue