mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
fixed some localizations in debug view
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
<script>
|
||||
var lang_cache_clean_confirm = "<?= __("Are you sure you want to clear the cache?"); ?>";
|
||||
var lang_cache_clear_failure = "<?= __("Failed to clear cache!"); ?>";
|
||||
var lang_git_last_version_check = "<?= __("Last version check: %s"); ?>";
|
||||
var lang_git_is_uptodate = "<?= __("Wavelog is up to date!"); ?>";
|
||||
var lang_git_new_update_available = "<?= __("There is a newer version available: %s"); ?>";
|
||||
var lang_git_remote_doesnt_know_branch = "<?= __("The Remote Repository doesn't know your branch."); ?>";
|
||||
</script>
|
||||
|
||||
<div class="container debug_main mb-4">
|
||||
<br>
|
||||
<?php if ($this->session->flashdata('success')) { ?>
|
||||
|
||||
@@ -87,24 +87,24 @@ function update_version_check(local_branch) {
|
||||
if (is_latest_version !== null && last_repo_commit != '') {
|
||||
if (is_latest_version) {
|
||||
$('#version_check_result').addClass('alert alert-success');
|
||||
$('#version_check_result').text("Wavelog is up to date!");
|
||||
$('#version_check_result').html(lang_git_is_uptodate);
|
||||
} else {
|
||||
$('#version_check_result').addClass('alert alert-warning');
|
||||
$('#version_check_result').text("There is a newer version available: " + last_repo_commit);
|
||||
$('#version_check_result').html(lang_git_new_update_available.replace("%s", last_repo_commit));
|
||||
$('#version_update_button').show();
|
||||
}
|
||||
} else {
|
||||
$('#version_check_result').addClass('alert alert-warning');
|
||||
$('#version_check_result').text("The Remote Repository doesn't know your branch.");
|
||||
$('#version_check_result').html(lang_git_remote_doesnt_know_branch);
|
||||
}
|
||||
|
||||
$('#last_version_check').text("Last version check: " + new Date(timestamp).toUTCString());
|
||||
$('#last_version_check').html(lang_git_last_version_check.replace("%s", new Date(timestamp).toUTCString()));
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#clear_cache_button').on('click', function () {
|
||||
if (!confirm('Cache wirklich löschen?')) {
|
||||
if (!confirm(decodeHtml(lang_cache_clean_confirm))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,11 +115,11 @@ $(document).ready(function () {
|
||||
if (resu && resu.status) {
|
||||
location.reload();
|
||||
} else {
|
||||
alert('Cache konnte nicht geleert werden.');
|
||||
alert(decodeHtml(lang_cache_clear_failure));
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('Cache konnte nicht geleert werden.');
|
||||
alert(decodeHtml(lang_cache_clear_failure));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user