From 000f55494d357bcdbd2fde797bc7eabd52f95816 Mon Sep 17 00:00:00 2001
From: HB9HIL
Date: Tue, 6 Aug 2024 18:24:06 +0200
Subject: [PATCH] stringify
---
application/views/interface_assets/footer.php | 96 +++++++++----------
1 file changed, 48 insertions(+), 48 deletions(-)
diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php
index 7fc521bb3..749708f0a 100644
--- a/application/views/interface_assets/footer.php
+++ b/application/views/interface_assets/footer.php
@@ -389,17 +389,17 @@ $(function () {
$('#btn-save').on('click', function() {
var resultquery = $('#builder').queryBuilder('getRules');
if (!$.isEmptyObject(resultquery)) {
- let message = 'Description: '
+ let message = '= __("Description:"); ?> '
BootstrapDialog.confirm({
- title: 'Query description',
+ title: '= __("Query description"); ?>',
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'description-dialog',
closable: true,
nl2br: false,
message: message,
- btnCancelLabel: 'Cancel',
- btnOKLabel: 'Save',
+ btnCancelLabel: lang_general_word_cancel,
+ btnOKLabel: lang_admin_save,
callback: function(result) {
if (result) {
$.post("", {
@@ -408,16 +408,16 @@ $(function () {
})
.done(function(data) {
$(".alert").remove();
- $(".card-body.main").append('Your query has been saved!
');
+ $(".card-body.main").append('= __("Your query has been saved!"); ?>
');
if ($("#querydropdown option").length == 0) {
- var dropdowninfo = '
' +
+ var dropdowninfo = ' ' +
'';
$("#btn-save").after(dropdowninfo);
}
@@ -429,12 +429,12 @@ $(function () {
} else {
BootstrapDialog.show({
- title: 'Stored Queries',
+ title: '= __("Stored Queries"); ?>',
type: BootstrapDialog.TYPE_WARNING,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'queries-dialog',
nl2br: false,
- message: 'You need to make a query before you search!',
+ message: '= __("You need to make a query before you search!"); ?>',
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
@@ -455,7 +455,7 @@ $(function () {
})
.done(function(data) {
- $('.exportbutton').html('');
+ $('.exportbutton').html('');
$('.card-body.result').empty();
$(".search-results-box").show();
@@ -492,8 +492,8 @@ $(function () {
function delete_stored_query(id) {
BootstrapDialog.confirm({
- title: 'DANGER',
- message: 'Warning! Are you sure you want delete this stored query?',
+ title: '= __("DANGER"); ?>',
+ message: '= __("Warning! Are you sure you want delete this stored query?"); ?>',
type: BootstrapDialog.TYPE_DANGER,
closable: true,
draggable: true,
@@ -507,7 +507,7 @@ $(function () {
'id': id
},
success: function(data) {
- $(".bootstrap-dialog-message").prepend('The stored query has been deleted!
');
+ $(".bootstrap-dialog-message").prepend('= __("The stored query has been deleted!"); ?>
');
$("#query_" + id).remove(); // removes query from table in dialog
$("#querydropdown option[value='" + id + "']").remove(); // removes query from dropdown
if ($("#querydropdown option").length == 0) {
@@ -516,7 +516,7 @@ $(function () {
};
},
error: function() {
- $(".bootstrap-dialog-message").prepend('The stored query could not be deleted. Please try again!
');
+ $(".bootstrap-dialog-message").prepend('= __("The stored query could not be deleted. Please try again!"); ?>
');
},
});
}
@@ -527,12 +527,12 @@ $(function () {
function edit_stored_query(id) {
$('#description_' + id).attr('contenteditable', 'true');
$('#description_' + id).focus();
- $('#edit_' + id).html('Save'); // Change to save button
+ $('#edit_' + id).html('= __("Save"); ?>'); // Change to save button
}
function save_edited_query(id) {
$('#description_' + id).attr('contenteditable', 'false');
- $('#edit_' + id).html('Edit');
+ $('#edit_' + id).html('= __("Edit"); ?>');
$.ajax({
url: base_url + 'index.php/search/save_edited_query',
type: 'post',
@@ -541,12 +541,12 @@ $(function () {
description: $('#description_' + id).html(),
},
success: function(html) {
- $('#edit_' + id).html('Edit'); // Change to edit button
- $(".bootstrap-dialog-message").prepend('The query description has been updated!
');
+ $('#edit_' + id).html('= __("Edit"); ?>'); // Change to edit button
+ $(".bootstrap-dialog-message").prepend('= __("The query description has been updated!"); ?>
');
$("#querydropdown option[value='" + id + "']").text($('#description_' + id).html()); // Change text in dropdown
},
error: function() {
- $(".bootstrap-dialog-message").prepend('Something went wrong with the save. Please try again!
');
+ $(".bootstrap-dialog-message").prepend('= __("Something went wrong with the save. Please try again!"); ?>
');
},
});
}
@@ -558,7 +558,7 @@ $(function () {
type: 'post',
success: function(html) {
BootstrapDialog.show({
- title: 'Stored Queries',
+ title: '= __("Stored Queries"); ?>',
size: BootstrapDialog.SIZE_WIDE,
cssClass: 'queries-dialog',
nl2br: false,
@@ -586,7 +586,7 @@ $(function () {
temp: "testvar"
})
.done(function(data) {
- $('.exportbutton').html('');
+ $('.exportbutton').html('');
$('.card-body.result').empty();
$(".search-results-box").show();
@@ -622,12 +622,12 @@ $(function () {
});
} else {
BootstrapDialog.show({
- title: 'Stored Queries',
+ title: '= __("Stored Queries"); ?>',
type: BootstrapDialog.TYPE_WARNING,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: 'queries-dialog',
nl2br: false,
- message: 'You need to make a query before you search!',
+ message: '= __("You need to make a query before you search!"); ?>',
buttons: [{
label: lang_admin_close,
action: function(dialogItself) {
@@ -1171,7 +1171,7 @@ $($('#callsign')).on('keypress',function(e) {
if (data.error == 'not_logged_in') {
$(".radio_cat_state" ).remove();
if($('.radio_login_error').length == 0) {
- $('.qso_panel').prepend(' You\'re not logged it. Please
login ');
+ $('.qso_panel').prepend(' = sprintf(__("You're not logged it. Please
login"), base_url()); ?>
');
}
}
// Put future Errorhandling here
@@ -1450,7 +1450,7 @@ $(document).ready(function(){
uri->segment(1) == "gridsquares" && $this->uri->segment(2) == "band") { ?>
var bands_available = ;
- $('#gridsquare_bands').append('')
+ $('#gridsquare_bands').append('')
$.each(bands_available, function(key, value) {
$('#gridsquare_bands')
.append($("")
@@ -1589,7 +1589,7 @@ $(document).ready(function(){
uri->segment(1) == "activated_grids" && $this->uri->segment(2) == "band") { ?>
var bands_available = ;
- $('#gridsquare_bands').append('')
+ $('#gridsquare_bands').append('')
$.each(bands_available, function(key, value) {
$('#gridsquare_bands')
.append($("")
@@ -2113,9 +2113,9 @@ function viewQsl(picture, callsign) {
textAndPic.append('
');
var title = '';
if (callsign == null) {
- title = 'QSL Card';
+ title = '= __("QSL Card"); ?>';
} else {
- title = 'QSL Card for ' + callsign.replace('0', 'Ø');
+ title = '= __("QSL Card for "); ?>' + callsign.replace('0', 'Ø');
}
BootstrapDialog.show({
@@ -2134,8 +2134,8 @@ function viewQsl(picture, callsign) {