mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge remote-tracking branch 'upstream/dev' into dl250cdf_master
This commit is contained in:
25
.github/workflows/issue_bot.yml
vendored
Normal file
25
.github/workflows/issue_bot.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Issue Bot
|
||||
on:
|
||||
schedule:
|
||||
- cron: "20 */12 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
close-issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/stale@v9.0.0
|
||||
with:
|
||||
any-of-labels: 'wait 4 close'
|
||||
exempt-issue-labels: 'hold'
|
||||
days-before-issue-stale: 5
|
||||
days-before-issue-close: 3
|
||||
stale-issue-label: 'stale'
|
||||
stale-issue-message: 'As this issue is marked as “wait 4 close” and there was no activity for 5 days, it is now marked as “stale.” It will be automatically closed in 3 more days.'
|
||||
close-issue-message: 'This issue was closed because it had been inactive for 3 days since being marked as "stale".'
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# debug-only: true
|
||||
13
.github/workflows/translation.yml
vendored
13
.github/workflows/translation.yml
vendored
@@ -1,12 +1,13 @@
|
||||
name: Run the po generator script
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
run_scripts:
|
||||
if: github.repository == 'wavelog/wavelog'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -29,9 +30,13 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name "github-actions"
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git add .
|
||||
git commit -m "po/mo updates"
|
||||
git push
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
git add .
|
||||
git commit -m "po/mo updates"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit."
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
@@ -51,8 +51,13 @@ Wavelog-support can be reached by creating an issue here at github. If you've an
|
||||
|
||||
## Contributing
|
||||
|
||||
Special thanks to our contributors, who are part of Wavelog by improving code!
|
||||
[F4ANS](https://github.com/abarrau), [DG0TM](https://github.com/dg0tm), [DG9VH](https://github.com/dg9vh), [DJ3CE](https://github.com/dj3ce), [R1BLH](https://github.com/r1blh), [BG2ELG](https://github.com/violarulan), [DF1ASH](https://github.com/derFogel), [DB4SCW](https://github.com/DB4SCW)
|
||||
Special thanks to our contributors, who are part of Wavelog by improving code!
|
||||
|
||||
[F4ANS](https://github.com/abarrau), [DG0TM](https://github.com/dg0tm), [DG9VH](https://github.com/dg9vh), [DJ3CE](https://github.com/dj3ce), [R1BLH](https://github.com/r1blh), [BG2ELG](https://github.com/violarulan), [DF1ASH](https://github.com/derFogel), [DB4SCW](https://github.com/DB4SCW), [VE2HEW](https://github.com/anthonydiiorio)
|
||||
|
||||
Translators:
|
||||
|
||||
[Ondřej Koloničný (OK1CDJ)](https://translate.wavelog.org/user/ok1cdj/), [Michael Skolsky (R1BLH)](https://translate.wavelog.org/user/R1BLH/), [Karuru (BG2ELG)](https://translate.wavelog.org/user/viola/), [Byt3](https://translate.wavelog.org/user/205er/), [BG6HJE](https://translate.wavelog.org/user/BG6HJE/), [Francisco (F4VSE)](https://translate.wavelog.org/user/kikosgc/), [Kim (DG9VH)](https://translate.wavelog.org/user/dg9vh/), [Casper van Lieburg (PA7DX)](https://translate.wavelog.org/user/pa7dx/), [Halil AYYILDIZ (TA2LG)](https://translate.wavelog.org/user/TA2LG/), [Michal Šiman](https://translate.wavelog.org/user/michalsiman/), [DN4BS](https://github.com/dn4bs)
|
||||
|
||||
If you would like to contribute in any way to Wavelog, it is most appreciated. This has been developed in free time, help coding new features or writing documentation is always useful.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
||||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 211;
|
||||
$config['migration_version'] = 212;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -37,5 +37,20 @@ $config['migration_version'] = 211;
|
||||
$config['migration_path'] = APPPATH . 'migrations/';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Lockfile
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Path to the migration lockfile.
|
||||
| This lockfile prevents migrations from running twice
|
||||
|
|
||||
*/
|
||||
$config['migration_lockfile'] = sys_get_temp_dir() . '/.migration_running';
|
||||
|
||||
// the maximum age of the lockfile in seconds
|
||||
$config['migration_lf_maxage'] = 300;
|
||||
|
||||
|
||||
/* End of file migration.php */
|
||||
/* Location: ./application/config/migration.php */
|
||||
|
||||
@@ -21,6 +21,16 @@ class Contesting extends CI_Controller {
|
||||
$this->load->model('contesting_model');
|
||||
$this->load->model('bands');
|
||||
|
||||
// Getting the live/post mode from GET command
|
||||
// 0 = live
|
||||
// 1 = post (manual)
|
||||
$get_manual_mode = $this->security->xss_clean($this->input->get('manual'));
|
||||
if ($get_manual_mode == '0' || $get_manual_mode == '1') {
|
||||
$data['manual_mode'] = $get_manual_mode;
|
||||
} else {
|
||||
show_404();
|
||||
}
|
||||
|
||||
$data['my_gridsquare'] = $this->stations->find_gridsquare();
|
||||
$data['radios'] = $this->cat->radios();
|
||||
$data['modes'] = $this->modes->active();
|
||||
|
||||
@@ -42,9 +42,11 @@ class Debug extends CI_Controller
|
||||
// get mig version from config file
|
||||
$this->load->config('migration');
|
||||
$data['migration_config'] = $this->config->item('migration_version');
|
||||
$data['migration_lockfile'] = $this->config->item('migration_lockfile');
|
||||
$data['miglock_lifetime'] = $this->config->item('migration_lf_maxage');
|
||||
|
||||
// compare mig versions
|
||||
if ($data['migration_version'] !== $data['migration_config'] && file_exists('application/cache/.migration_running')) {
|
||||
if ($data['migration_version'] != $data['migration_config'] && file_exists($data['migration_lockfile'])) {
|
||||
$data['migration_is_uptodate'] = false;
|
||||
} else {
|
||||
$data['migration_is_uptodate'] = true;
|
||||
|
||||
@@ -180,8 +180,8 @@ class Lookup extends CI_Controller {
|
||||
public function get_county() {
|
||||
$json = [];
|
||||
|
||||
if(!empty($this->input->get("query"))) {
|
||||
$county = $this->input->get("state");
|
||||
if(!empty($this->security->xss_clean($this->input->get("query")))) {
|
||||
$county = $this->security->xss_clean($this->input->get("state"));
|
||||
$cleanedcounty = explode('(', $county);
|
||||
$cleanedcounty = trim($cleanedcounty[0]);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ class Migrate extends CI_Controller {
|
||||
|
||||
public function index() {
|
||||
$this->load->library('Migration');
|
||||
$this->load->config('migration');
|
||||
|
||||
$result = array();
|
||||
$latest = $this->migration->latest();
|
||||
@@ -12,7 +13,7 @@ class Migrate extends CI_Controller {
|
||||
log_message('error', 'Migration failed');
|
||||
$result['status'] = 'error';
|
||||
} else {
|
||||
while (file_exists(APPPATH . 'cache/.migration_running')) {
|
||||
while (file_exists($this->config->item('migration_lockfile'))) {
|
||||
sleep(1);
|
||||
}
|
||||
$result['status'] = 'success';
|
||||
|
||||
@@ -18,6 +18,16 @@ class QSO extends CI_Controller {
|
||||
$this->load->model('bands');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
||||
// Getting the live/post mode from GET command
|
||||
// 0 = live
|
||||
// 1 = post (manual)
|
||||
$get_manual_mode = $this->security->xss_clean($this->input->get('manual'));
|
||||
if ($get_manual_mode == '0' || $get_manual_mode == '1') {
|
||||
$data['manual_mode'] = $get_manual_mode;
|
||||
} else {
|
||||
show_404();
|
||||
}
|
||||
|
||||
$data['active_station_profile'] = $this->stations->find_active();
|
||||
|
||||
$data['notice'] = false;
|
||||
@@ -439,7 +449,7 @@ class QSO extends CI_Controller {
|
||||
$this->load->library('sota');
|
||||
$json = [];
|
||||
|
||||
if (!empty($this->input->get("query"))) {
|
||||
if (!empty($this->security->xss_clean($this->input->get("query")))) {
|
||||
$query = $_GET['query'] ?? FALSE;
|
||||
$json = $this->sota->get($query);
|
||||
}
|
||||
@@ -451,7 +461,7 @@ class QSO extends CI_Controller {
|
||||
public function get_wwff() {
|
||||
$json = [];
|
||||
|
||||
if(!empty($this->input->get("query"))) {
|
||||
if (!empty($this->security->xss_clean($this->input->get("query")))) {
|
||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||
$wwff = strtoupper($query);
|
||||
|
||||
@@ -487,7 +497,7 @@ class QSO extends CI_Controller {
|
||||
public function get_pota() {
|
||||
$json = [];
|
||||
|
||||
if(!empty($this->input->get("query"))) {
|
||||
if (!empty($this->security->xss_clean($this->input->get("query")))) {
|
||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||
$pota = strtoupper($query);
|
||||
|
||||
@@ -526,7 +536,7 @@ class QSO extends CI_Controller {
|
||||
public function get_dok() {
|
||||
$json = [];
|
||||
|
||||
if(!empty($this->input->get("query"))) {
|
||||
if (!empty($this->security->xss_clean($this->input->get("query")))) {
|
||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||
$dok = strtoupper($query);
|
||||
|
||||
|
||||
@@ -140,7 +140,9 @@ class Qra {
|
||||
} else if ($unit == "N") {
|
||||
$dist *= 0.8684;
|
||||
}
|
||||
|
||||
if ((is_nan($dist)) || !(is_numeric($dist))) { // Special-Case, catch same grid and/or Errors
|
||||
$dist=0;
|
||||
}
|
||||
return round($dist, 1);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -35,8 +35,5 @@ class Migration_tag_1_7 extends CI_Migration {
|
||||
{
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '1.6.1'));
|
||||
|
||||
// Revert the DB adjustment
|
||||
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." MODIFY COLUMN `COL_QTH` VARCHAR(64) DEFAULT NULL;");
|
||||
}
|
||||
}
|
||||
|
||||
40
application/migrations/212_tag_1_8_1.php
Normal file
40
application/migrations/212_tag_1_8_1.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Tag Wavelog as Version 1.8.1
|
||||
*/
|
||||
|
||||
class Migration_tag_1_8_1 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
// Tag Wavelog New Version
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '1.8.1'));
|
||||
|
||||
// Trigger Version Info Dialog
|
||||
$this->db->where('option_type', 'version_dialog');
|
||||
$this->db->where('option_name', 'confirmed');
|
||||
$this->db->update('user_options', array('option_value' => 'false'));
|
||||
|
||||
// Also set Version Dialog to "both" if only custom text is applied
|
||||
$this->db->where('option_name', 'version_dialog');
|
||||
$this->db->where('option_value', 'custom_text');
|
||||
$this->db->update('options', array('option_value' => 'both'));
|
||||
|
||||
// small DB adjustment in this release to save mig versions
|
||||
// see: https://github.com/wavelog/wavelog/issues/698
|
||||
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." MODIFY COLUMN `COL_POTA_REF` VARCHAR(128) DEFAULT NULL;");
|
||||
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." MODIFY COLUMN `COL_MY_POTA_REF` VARCHAR(128) DEFAULT NULL;");
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '1.8'));
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class Eqslmethods_model extends CI_Model {
|
||||
|
||||
function uploadUser($userid, $username, $password) {
|
||||
$data['user_eqsl_name'] = $this->security->xss_clean($username);
|
||||
$data['user_eqsl_password'] = $this->security->xss_clean($password);
|
||||
$data['user_eqsl_password'] = html_entity_decode($this->security->xss_clean($password));
|
||||
$clean_userid = $this->security->xss_clean($userid);
|
||||
|
||||
$qslsnotsent = $this->eqsl_not_yet_sent($clean_userid);
|
||||
|
||||
@@ -305,11 +305,14 @@ class User_Model extends CI_Model {
|
||||
// Hash password
|
||||
if($fields['user_password'] != NULL)
|
||||
{
|
||||
if ($fields['user_password'] !== $pwd_placeholder) {
|
||||
$decoded_password = htmlspecialchars_decode($fields['user_password']);
|
||||
$data['user_password'] = $this->_hash($decoded_password);
|
||||
if($data['user_password'] == EPASSWORDINVALID) {
|
||||
return EPASSWORDINVALID;
|
||||
if (!file_exists('.demo') || (file_exists('.demo') && $this->session->userdata('user_type') == 99)) {
|
||||
|
||||
if ($fields['user_password'] !== $pwd_placeholder) {
|
||||
$decoded_password = htmlspecialchars_decode($fields['user_password']);
|
||||
$data['user_password'] = $this->_hash($decoded_password);
|
||||
if($data['user_password'] == EPASSWORDINVALID) {
|
||||
return EPASSWORDINVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="container qso_panel contesting">
|
||||
<button type="button" class="btn btn-sm btn-warning float-end" onclick="reset_contest_session()"><i class="fas fa-sync-alt"></i> <?= __("Start new Contest Session"); ?></button>
|
||||
<h2 style="display:inline"><?= __("Contest Logging"); ?> </h2> <?php echo ($_GET['manual'] == 0 ? " <span style='display:inline' class='align-text-top badge text-bg-success'>LIVE</span>" : " <span style='display:inline' class='align-text-top badge text-bg-danger'>POST</span>"); ?>
|
||||
<h2 style="display:inline"><?= __("Contest Logging"); ?> </h2> <?php echo ($manual_mode == 0 ? " <span style='display:inline' class='align-text-top badge text-bg-success'>LIVE</span>" : " <span style='display:inline' class='align-text-top badge text-bg-danger'>POST</span>"); ?>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 col-md-12">
|
||||
@@ -40,15 +40,15 @@
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-2">
|
||||
<label for="start_date"><?= __("Date"); ?></label>
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> >
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-1">
|
||||
<label for="start_time"><?= __("Time"); ?></label>
|
||||
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
|
||||
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $manual_mode == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> >
|
||||
</div>
|
||||
|
||||
<?php if ( $_GET['manual'] == 0 ) { ?>
|
||||
<?php if ( $manual_mode == 0 ) { ?>
|
||||
<input class="input_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i'); ?>" />
|
||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||
<?php } ?>
|
||||
|
||||
@@ -40,14 +40,15 @@
|
||||
<td><?php echo (isset($migration_version) ? $migration_version : "<span class='badge text-bg-danger'>". __("There is something wrong with your Migration in Database!") . "</span>"); ?></td>
|
||||
</tr>
|
||||
<?php if (!$migration_is_uptodate) { ?>
|
||||
</table>
|
||||
<div class="alert alert-danger mt-3 mb-3">
|
||||
<h5><?= __("Migration is outdated and locked!"); ?></h5>
|
||||
<p><?= sprintf(__("The current migration is not the version it is supposed to be. Reload this page. If this warning persists, your migration is probably locked due to a past failed process. Check the folder %s for a file called %s and remove this file to force the migration to run again."), "'application/cache/'", "'.migration_running'"); ?></p>
|
||||
<p><?= sprintf(__("Current migration is %s"), $migration_version); ?><br>
|
||||
<?= sprintf(__("Migration should be %s"), $migration_config); ?></p>
|
||||
</div>
|
||||
<table>
|
||||
</table>
|
||||
<div class="alert alert-danger mt-3 mb-3">
|
||||
<h5><?= __("Migration is outdated and locked!"); ?></h5>
|
||||
<p><?= sprintf(__("The current migration is not the version it is supposed to be. Reload this page after %s seconds. If this warning persists, your migration is likely locked due to a previously failed process. Delete the file %s to force the migration to run again."), $miglock_lifetime, $migration_lockfile); ?></p>
|
||||
<p><?= sprintf(__("Check this wiki article <u><a href='%s' target='_blank'>here</a></u> for more information."), "https://github.com/wavelog/wavelog/wiki/Migration-is-locked"); ?></p>
|
||||
<p><?= sprintf(__("Current migration is %s"), $migration_version); ?><br>
|
||||
<?= sprintf(__("Migration should be %s"), $migration_config); ?></p>
|
||||
</div>
|
||||
<table>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td><?= __("Environment"); ?></td>
|
||||
|
||||
@@ -389,17 +389,17 @@ $(function () {
|
||||
$('#btn-save').on('click', function() {
|
||||
var resultquery = $('#builder').queryBuilder('getRules');
|
||||
if (!$.isEmptyObject(resultquery)) {
|
||||
let message = 'Description: <input class="form-control input-group-sm getqueryname">'
|
||||
let message = '<?= __("Description:"); ?> <input class="form-control input-group-sm getqueryname">'
|
||||
|
||||
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("<?php echo site_url('search/save_query'); ?>", {
|
||||
@@ -408,16 +408,16 @@ $(function () {
|
||||
})
|
||||
.done(function(data) {
|
||||
$(".alert").remove();
|
||||
$(".card-body.main").append('<div class="alert alert-success">Your query has been saved!</div>');
|
||||
$(".card-body.main").append('<div class="alert alert-success"><?= __("Your query has been saved!"); ?></div>');
|
||||
if ($("#querydropdown option").length == 0) {
|
||||
var dropdowninfo = ' <button class="btn btn-sm btn-primary" onclick="edit_stored_query_dialog()" id="btn-edit">Edit queries</button></p>' +
|
||||
var dropdowninfo = ' <button class="btn btn-sm btn-primary" onclick="edit_stored_query_dialog()" id="btn-edit"><?= __("Edit queries"); ?></button></p>' +
|
||||
'<div class="mb-3 row querydropdownform">' +
|
||||
'<label class="col-md-2 control-label" for="querydropdown"> Stored queries:</label>' +
|
||||
'<label class="col-md-2 control-label" for="querydropdown"> <?= __("Stored queries:"); ?></label>' +
|
||||
'<div class="col-md-3">' +
|
||||
'<select id="querydropdown" name="querydropdown" class="form-select form-select-sm">' +
|
||||
'</select>' +
|
||||
'</div>' +
|
||||
'<button class="btn btn-sm btn-primary ld-ext-right runbutton" onclick="run_query()">Run Query<div class="ld ld-ring ld-spin"></div></button>' +
|
||||
'<button class="btn btn-sm btn-primary ld-ext-right runbutton" onclick="run_query()"><?= __("Run Query"); ?><div class="ld ld-ring ld-spin"></div></button>' +
|
||||
'</div>';
|
||||
$("#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('<button class="btn btn-sm btn-primary" onclick="export_stored_query(' + id + ')">Export to ADIF</button>');
|
||||
$('.exportbutton').html('<button class="btn btn-sm btn-primary" onclick="export_stored_query(' + id + ')"><?= __("Export to ADIF"); ?></button>');
|
||||
$('.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('<div class="alert alert-danger">The stored query has been deleted!</div>');
|
||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><?= __("The stored query has been deleted!"); ?></div>');
|
||||
$("#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('<div class="alert alert-danger">The stored query could not be deleted. Please try again!</div>');
|
||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><?= __("The stored query could not be deleted. Please try again!"); ?></div>');
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -527,12 +527,12 @@ $(function () {
|
||||
function edit_stored_query(id) {
|
||||
$('#description_' + id).attr('contenteditable', 'true');
|
||||
$('#description_' + id).focus();
|
||||
$('#edit_' + id).html('<a class="btn btn-primary btn-sm" href="javascript:save_edited_query(' + id + ');">Save</a>'); // Change to save button
|
||||
$('#edit_' + id).html('<a class="btn btn-primary btn-sm" href="javascript:save_edited_query(' + id + ');"><?= __("Save"); ?></a>'); // Change to save button
|
||||
}
|
||||
|
||||
function save_edited_query(id) {
|
||||
$('#description_' + id).attr('contenteditable', 'false');
|
||||
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');">Edit</a>');
|
||||
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');"><?= __("Edit"); ?></a>');
|
||||
$.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('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');">Edit</a>'); // Change to edit button
|
||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-success">The query description has been updated!</div>');
|
||||
$('#edit_' + id).html('<a class="btn btn-outline-primary btn-sm" href="javascript:edit_stored_query(' + id + ');"><?= __("Edit"); ?></a>'); // Change to edit button
|
||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-success"><?= __("The query description has been updated!"); ?></div>');
|
||||
$("#querydropdown option[value='" + id + "']").text($('#description_' + id).html()); // Change text in dropdown
|
||||
},
|
||||
error: function() {
|
||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger">Something went wrong with the save. Please try again!</div>');
|
||||
$(".bootstrap-dialog-message").prepend('<div class="alert alert-danger"><?= __("Something went wrong with the save. Please try again!"); ?></div>');
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -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('<button class="btn btn-sm btn-primary" onclick="export_search_result();">Export to ADIF</button>');
|
||||
$('.exportbutton').html('<button class="btn btn-sm btn-primary" onclick="export_search_result();"><?= __("Export to ADIF"); ?></button>');
|
||||
|
||||
$('.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) {
|
||||
@@ -681,6 +681,12 @@ $('#dxcc_id').ready(function() {
|
||||
|
||||
$('#dxcc_id').on('change', function() {
|
||||
printWarning();
|
||||
let dxccadif = $('#dxcc_id').val();
|
||||
let dxccinfo = dxccarray.filter(function(dxcc) {
|
||||
return dxcc.adif == dxccadif;
|
||||
});
|
||||
$("#stationCQZoneInput").val(dxccinfo[0].cq);
|
||||
// $("#stationITUZoneInput").val(dxccinfo[0].itu); // Commented out, since we do not have itu data.
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -975,7 +981,7 @@ $($('#callsign')).on('keypress',function(e) {
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var manual = <?php echo $_GET['manual']; ?>;
|
||||
var manual = <?php echo $manual_mode; ?>;
|
||||
|
||||
<?php if ($this->session->userdata('user_qso_end_times') == 1) { ?>
|
||||
$('#callsign').focusout(function() {
|
||||
@@ -1165,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('<div class="alert alert-danger radio_login_error" role="alert"><i class="fas fa-broadcast-tower"></i> You\'re not logged it. Please <a href="<?php echo base_url();?>">login</a></div>');
|
||||
$('.qso_panel').prepend('<div class="alert alert-danger radio_login_error" role="alert"><i class="fas fa-broadcast-tower"></i> <?= sprintf(__("You're not logged it. Please <a href='%s'>login</a>"), base_url()); ?></div>');
|
||||
}
|
||||
}
|
||||
// Put future Errorhandling here
|
||||
@@ -1444,7 +1450,7 @@ $(document).ready(function(){
|
||||
<?php if ($this->uri->segment(1) == "gridsquares" && $this->uri->segment(2) == "band") { ?>
|
||||
|
||||
var bands_available = <?php echo $bands_available; ?>;
|
||||
$('#gridsquare_bands').append('<option value="All">All</option>')
|
||||
$('#gridsquare_bands').append('<option value="All"><?= __("All"); ?></option>')
|
||||
$.each(bands_available, function(key, value) {
|
||||
$('#gridsquare_bands')
|
||||
.append($("<option></option>")
|
||||
@@ -1583,7 +1589,7 @@ $(document).ready(function(){
|
||||
<?php if ($this->uri->segment(1) == "activated_grids" && $this->uri->segment(2) == "band") { ?>
|
||||
|
||||
var bands_available = <?php echo $bands_available; ?>;
|
||||
$('#gridsquare_bands').append('<option value="All">All</option>')
|
||||
$('#gridsquare_bands').append('<option value="All"><?= __("All"); ?></option>')
|
||||
$.each(bands_available, function(key, value) {
|
||||
$('#gridsquare_bands')
|
||||
.append($("<option></option>")
|
||||
@@ -2107,9 +2113,9 @@ function viewQsl(picture, callsign) {
|
||||
textAndPic.append('<img class="img-fluid w-qsl" style="height:auto;width:auto;"src="'+base_url+webpath_qsl+'/'+picture+'" />');
|
||||
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({
|
||||
@@ -2128,8 +2134,8 @@ function viewQsl(picture, callsign) {
|
||||
<script>
|
||||
function deleteQsl(id) {
|
||||
BootstrapDialog.confirm({
|
||||
title: 'DANGER',
|
||||
message: 'Warning! Are you sure you want to delete this QSL card?' ,
|
||||
title: '<?= __("DANGER"); ?>',
|
||||
message: '<?= __("Warning! Are you sure you want to delete this QSL card?"); ?>' ,
|
||||
type: BootstrapDialog.TYPE_DANGER,
|
||||
closable: true,
|
||||
draggable: true,
|
||||
@@ -2169,9 +2175,9 @@ function viewEqsl(picture, callsign) {
|
||||
$textAndPic.append('<img class="img-fluid" style="height:auto;width:auto;"src="'+baseURL+webpath_eqsl+'/'+picture+'" />');
|
||||
var title = '';
|
||||
if (callsign == null) {
|
||||
title = 'eQSL Card';
|
||||
title = '<?= __("eQSL Card"); ?>';
|
||||
} else {
|
||||
title = 'eQSL Card for ' + callsign.replace('0', 'Ø');
|
||||
title = '<?= __("eQSL Card for "); ?>' + callsign.replace('0', 'Ø');
|
||||
}
|
||||
|
||||
BootstrapDialog.show({
|
||||
@@ -2332,8 +2338,8 @@ function viewEqsl(picture, callsign) {
|
||||
if (data.status.front.status == 'Success') {
|
||||
if ($('.qsltable').length > 0) {
|
||||
$('.qsltable tr:last').after('<tr><td style="text-align: center">'+data.status.front.filename+'</td>' +
|
||||
'<td id="'+data.status.front.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.front.insertid+');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.front.filename + '\')" class="btn btn-sm btn-success">View</button></td>'+
|
||||
'<td id="'+data.status.front.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.front.insertid+');" class="btn btn-sm btn-danger"><?= __("Delete"); ?></button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.front.filename + '\')" class="btn btn-sm btn-success"><?= __("View"); ?></button></td>'+
|
||||
'</tr>');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
|
||||
@@ -2344,14 +2350,14 @@ function viewEqsl(picture, callsign) {
|
||||
$("#qslupload").prepend('<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">'+
|
||||
'<thead>'+
|
||||
'<tr>'+
|
||||
'<th style="text-align: center">QSL image file</th>'+
|
||||
'<th style="text-align: center"><?= __("QSL image file"); ?></th>'+
|
||||
'<th style="text-align: center"></th>'+
|
||||
'<th style="text-align: center"></th>'+
|
||||
'</tr>'+
|
||||
'</thead><tbody>'+
|
||||
'<tr><td style="text-align: center">'+data.status.front.filename+'</td>' +
|
||||
'<td id="'+data.status.front.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.front.insertid+');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.front.filename + '\')" class="btn btn-sm btn-success">View</button></td>'+
|
||||
'<td id="'+data.status.front.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.front.insertid+');" class="btn btn-sm btn-danger"><?= __("Delete"); ?></button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.front.filename + '\')" class="btn btn-sm btn-success"><?= __("View"); ?></button></td>'+
|
||||
'</tr>'+
|
||||
'</tbody></table>');
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
@@ -2363,7 +2369,7 @@ function viewEqsl(picture, callsign) {
|
||||
}
|
||||
|
||||
} else if (data.status.front.status != '') {
|
||||
$("#qslupload").append('<div class="alert alert-danger">Front QSL Card:' +
|
||||
$("#qslupload").append('<div class="alert alert-danger"><?= __("Front QSL Card:"); ?> ' +
|
||||
data.status.front.error +
|
||||
'</div>');
|
||||
}
|
||||
@@ -2371,8 +2377,8 @@ function viewEqsl(picture, callsign) {
|
||||
var qsoid = $("#qsoid").text();
|
||||
if ($('.qsltable').length > 0) {
|
||||
$('.qsltable tr:last').after('<tr><td style="text-align: center">'+data.status.back.filename+'</td>' +
|
||||
'<td id="'+data.status.back.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.back.insertid+');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.back.filename + '\')" class="btn btn-sm btn-success">View</button></td>'+
|
||||
'<td id="'+data.status.back.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.back.insertid+');" class="btn btn-sm btn-danger"><?= __("Delete"); ?></button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.back.filename + '\')" class="btn btn-sm btn-success"><?= __("View"); ?></button></td>'+
|
||||
'</tr>');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="'+quantity+'"></li>');
|
||||
@@ -2383,14 +2389,14 @@ function viewEqsl(picture, callsign) {
|
||||
$("#qslupload").prepend('<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">'+
|
||||
'<thead>'+
|
||||
'<tr>'+
|
||||
'<th style="text-align: center">QSL image file</th>'+
|
||||
'<th style="text-align: center"><?= __("QSL image file"); ?></th>'+
|
||||
'<th style="text-align: center"></th>'+
|
||||
'<th style="text-align: center"></th>'+
|
||||
'</tr>'+
|
||||
'</thead><tbody>'+
|
||||
'<tr><td style="text-align: center">'+data.status.back.filename+'</td>' +
|
||||
'<td id="'+data.status.back.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.back.insertid+');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td><button onclick="viewQsl(\'' + data.status.back.filename + '\')" class="btn btn-sm btn-success">View</button></td>'+
|
||||
'<td id="'+data.status.back.insertid+'"style="text-align: center"><button onclick="deleteQsl('+data.status.back.insertid+');" class="btn btn-sm btn-danger"><?= __("Delete"); ?></button></td>' +
|
||||
'<td><button onclick="viewQsl(\'' + data.status.back.filename + '\')" class="btn btn-sm btn-success"><?= __("View"); ?></button></td>'+
|
||||
'</tr>'+
|
||||
'</tbody></table>');
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
@@ -2401,7 +2407,7 @@ function viewEqsl(picture, callsign) {
|
||||
$("#qslcardback").val(null);
|
||||
}
|
||||
} else if (data.status.back.status != '') {
|
||||
$("#qslupload").append('<div class="alert alert-danger">\nBack QSL Card: ' +
|
||||
$("#qslupload").append('<div class="alert alert-danger">\n<?= __("Back QSL Card:"); ?> ' +
|
||||
data.status.back.error +
|
||||
'</div>');
|
||||
}
|
||||
@@ -2412,7 +2418,7 @@ function viewEqsl(picture, callsign) {
|
||||
<script>
|
||||
|
||||
function addQsosToQsl(filename) {
|
||||
var title = 'Add additional QSOs to a QSL Card';
|
||||
var title = '<?= __("Add additional QSOs to a QSL Card"); ?>';
|
||||
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qsl/loadSearchForm',
|
||||
@@ -2437,7 +2443,7 @@ function viewEqsl(picture, callsign) {
|
||||
}
|
||||
|
||||
function addQsoToQsl(qsoid, filename, id) {
|
||||
var title = 'Add additional QSOs to a QSL Card';
|
||||
var title = '<?= __("Add additional QSOs to a QSL Card"); ?>';
|
||||
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qsl/addQsoToQsl',
|
||||
@@ -2448,7 +2454,7 @@ function viewEqsl(picture, callsign) {
|
||||
location.reload();
|
||||
} else {
|
||||
$(".alert").remove();
|
||||
$('#searchresult').prepend('<div class="alert alert-danger">Something went wrong. Please try again!</div>');
|
||||
$('#searchresult').prepend('<div class="alert alert-danger"><?= __("Something went wrong. Please try again!"); ?></div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -2468,7 +2474,7 @@ function viewEqsl(picture, callsign) {
|
||||
</script>
|
||||
<?php if ($this->uri->segment(1) == "contesting" && ($this->uri->segment(2) != "add" && $this->uri->segment(2) != "edit")) { ?>
|
||||
<script>
|
||||
var manual = <?php echo $_GET['manual']; ?>;
|
||||
var manual = <?php echo $manual_mode; ?>;
|
||||
</script>
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/contesting.js?v2"></script>
|
||||
<?php } ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="container qso_panel">
|
||||
<script language="javascript">
|
||||
var qso_manual = "<?php echo $_GET['manual']; ?>";
|
||||
var qso_manual = "<?php echo $manual_mode; ?>";
|
||||
var text_error_timeoff_less_timeon = "<?= __("TimeOff is less than TimeOn"); ?>";
|
||||
var lang_qso_title_previous_contacts = "<?= __("Previous Contacts"); ?>";
|
||||
var lang_qso_title_times_worked_before = "<?= __("times worked before"); ?>";
|
||||
@@ -12,12 +12,12 @@
|
||||
<div class="col-sm-5">
|
||||
<div class="card">
|
||||
|
||||
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $_GET['manual']; ?>" name="qsos" autocomplete="off" onReset="resetTimers(<?php echo $_GET['manual']; ?>);">
|
||||
<form id="qso_input" method="post" action="<?php echo site_url('qso') . "?manual=" . $manual_mode; ?>" name="qsos" autocomplete="off" onReset="resetTimers(<?php echo $manual_mode; ?>);">
|
||||
|
||||
<div class="card-header">
|
||||
<ul style="font-size: 15px;" class="nav nav-tabs card-header-tabs pull-right" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="qsp-tab" data-bs-toggle="tab" href="#qso" role="tab" aria-controls="qso" aria-selected="true"><?= __("QSO"); ?><?php if ($_GET['manual'] == 0) { echo " <span class=\"badge text-bg-success\">" . __("LIVE") . "</span>"; }; if ($_GET['manual'] == 1) { echo " <span class=\"badge text-bg-danger\">" . __("POST") . "</span>"; } ?></a>
|
||||
<a class="nav-link active" id="qsp-tab" data-bs-toggle="tab" href="#qso" role="tab" aria-controls="qso" aria-selected="true"><?= __("QSO"); ?><?php if ($manual_mode == 0) { echo " <span class=\"badge text-bg-success\">" . __("LIVE") . "</span>"; }; if ($manual_mode == 1) { echo " <span class=\"badge text-bg-danger\">" . __("POST") . "</span>"; } ?></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
@@ -62,14 +62,14 @@
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-3">
|
||||
<label for="start_date"><?= __("Date"); ?></label>
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-3][0-9]-[0-1][0-9]-[0-9]{4}">
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> required pattern="[0-3][0-9]-[0-1][0-9]-[0-9]{4}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-4">
|
||||
<label for="start_time"><?= __("Time on"); ?></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
|
||||
<?php if ($_GET['manual'] != 1) { ?>
|
||||
<input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $manual_mode == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
|
||||
<?php if ($manual_mode != 1) { ?>
|
||||
<span class="input-group-text btn-included-on-field"><i id="reset_time" data-bs-toggle="tooltip" title="Reset start time" class="fas fa-stopwatch"></i></span>
|
||||
<?php } else { ?>
|
||||
<span class="input-group-text btn-included-on-field"><i id="reset_start_time" data-bs-toggle="tooltip" title="Reset start time" class="fas fa-stopwatch"></i></span>
|
||||
@@ -80,14 +80,14 @@
|
||||
<div class="mb-3 col-md-4">
|
||||
<label for="end_time"><?= __("Time off"); ?></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm input_end_time" name="end_time" id="end_time" value="<?php if (($this->session->userdata('end_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('end_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
|
||||
<?php if ($_GET['manual'] == 1) { ?>
|
||||
<input type="text" class="form-control form-control-sm input_end_time" name="end_time" id="end_time" value="<?php if (($this->session->userdata('end_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('end_time'),0,5); } else { echo $manual_mode == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
|
||||
<?php if ($manual_mode == 1) { ?>
|
||||
<span class="input-group-text btn-included-on-field"><i id="reset_end_time" data-bs-toggle="tooltip" title="Reset end time" class="fas fa-stopwatch"></i></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( $_GET['manual'] == 0 ) { ?>
|
||||
<?php if ( $manual_mode == 0 ) { ?>
|
||||
<input class="input_start_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i:s'); ?>" />
|
||||
<input class="input_end_time" type="hidden" id="end_time" name="end_time"value="<?php echo date('H:i:s'); ?>" />
|
||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||
@@ -98,20 +98,20 @@
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-6">
|
||||
<label for="start_date"><?= __("Date"); ?></label>
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-3][0-9]-[0-1][0-9]-[0-9]{4}">
|
||||
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> required pattern="[0-3][0-9]-[0-1][0-9]-[0-9]{4}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-6">
|
||||
<label for="start_time"><?= __("Time"); ?></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $_GET['manual'] == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
|
||||
<?php if ($_GET['manual'] == 1) { ?>
|
||||
<input type="text" class="form-control form-control-sm input_start_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo substr($this->session->userdata('start_time'),0,5); } else { echo $manual_mode == 0 ? date('H:i:s') : date('H:i'); } ?>" size="7" <?php echo ($manual_mode == 0 ? "disabled" : ""); ?> required pattern="[0-2][0-9]:[0-5][0-9]">
|
||||
<?php if ($manual_mode == 1) { ?>
|
||||
<span class="input-group-text btn-included-on-field"><i id="reset_start_time" data-bs-toggle="tooltip" title="Reset start time" class="fas fa-stopwatch"></i></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( $_GET['manual'] == 0 ) { ?>
|
||||
<?php if ( $manual_mode == 0 ) { ?>
|
||||
<input class="input_start_time" type="hidden" id="start_time" name="start_time"value="<?php echo date('H:i:s'); ?>" />
|
||||
<input class="input_date" type="hidden" id="start_date" name="start_date" value="<?php echo date('d-m-Y'); ?>" />
|
||||
<?php } ?>
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
<script>
|
||||
var dxccarray = [];
|
||||
|
||||
<?php
|
||||
if ($dxcc_list->result() > 0) {
|
||||
foreach ($dxcc_list->result() as $dxcc) {
|
||||
?>
|
||||
var dxcc = {
|
||||
adif: <?php echo $dxcc->adif; ?>,
|
||||
name: "<?php echo $dxcc->name; ?>",
|
||||
cq: <?php echo $dxcc->cqz; ?>,
|
||||
itu: <?php echo $dxcc->ituz; ?>,
|
||||
};
|
||||
dxccarray.push(dxcc);
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</script>
|
||||
|
||||
<div class="container" id="create_station_profile">
|
||||
|
||||
@@ -201,18 +220,18 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="mb-3 col-sm-3">
|
||||
<label for="hrdlog_username"><?= __("HRDLog.net Username"); ?></label>
|
||||
<div class="mb-3 col-sm-3">
|
||||
<label for="hrdlog_username"><?= __("HRDLog.net Username"); ?></label>
|
||||
<input type="text" class="form-control" name="hrdlog_username" id="hrdlog_username" aria-describedby="hrdlog_usernameHelp">
|
||||
<small id="hrdlog_usernameHelp" class="form-text text-muted"><?= __("The username you are registered with at HRDlog.net (usually your callsign)."); ?></a></small>
|
||||
</div>
|
||||
<div class="mb-3 col-sm-3">
|
||||
<div class="mb-3 col-sm-3">
|
||||
<label for="hrdlog_code"><?= __("HRDLog.net API Key"); ?></label>
|
||||
<input type="text" class="form-control" name="hrdlog_code" id="hrdlog_code" aria-describedby="hrdlog_codeHelp">
|
||||
<small id="hrdlog_codeHelp" class="form-text text-muted"><?= sprintf(_pgettext("HRDLog.net Userprofile page", "Create your API Code on your %s"), "<a href='http://www.hrdlog.net/EditUser.aspx' target='_blank'>".__("HRDLog.net Userprofile page")."</a>"); ?></a></small>
|
||||
</div>
|
||||
<div class="mb-3 col-sm-3">
|
||||
<label for="hrdlogrealtime"><?= __("HRDLog.net Logbook Realtime Upload"); ?></label>
|
||||
<label for="hrdlogrealtime"><?= __("HRDLog.net Logbook Realtime Upload"); ?></label>
|
||||
<select class="form-select" id="hrdlogrealtime" name="hrdlogrealtime">
|
||||
<option value="1"><?= __("Yes"); ?></option>
|
||||
<option value="0" selected><?= __("No"); ?></option>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: translations@wavelog.org\n"
|
||||
"POT-Creation-Date: 2024-08-04 19:40+0000\n"
|
||||
"POT-Creation-Date: 2024-08-06 09:56+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
||||
Binary file not shown.
@@ -2,47 +2,49 @@
|
||||
# Copyright (c) 2024 Wavelog by DF2ET, DJ7NT, HB9HIL and LA8AJA.
|
||||
# This file is distributed under the MIT licence.
|
||||
#
|
||||
# Michal Šiman <michal.siman@gmail.com>, 2024.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: translations@wavelog.org\n"
|
||||
"POT-Creation-Date: 2024-07-30 10:38+0000\n"
|
||||
"PO-Revision-Date: 2024-06-05 15:15+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"PO-Revision-Date: 2024-08-06 09:50+0000\n"
|
||||
"Last-Translator: Michal Šiman <michal.siman@gmail.com>\n"
|
||||
"Language-Team: Czech <https://translate.wavelog.org/projects/wavelog/"
|
||||
"installer/cs/>\n"
|
||||
"Language: cs_CZ\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.4.4\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
|
||||
#: install/includes/core/database_class.php:59
|
||||
msgid "Connection Error: "
|
||||
msgstr ""
|
||||
msgstr "Chyba spojení: "
|
||||
|
||||
#: install/includes/core/database_class.php:63
|
||||
msgid "Unable to create database: "
|
||||
msgstr ""
|
||||
msgstr "Není možné vytvořit databázi: "
|
||||
|
||||
#: install/includes/core/database_class.php:68
|
||||
msgid "Unable to select database: "
|
||||
msgstr ""
|
||||
msgstr "Není možné zvolit databázi: "
|
||||
|
||||
#: install/includes/core/database_class.php:74
|
||||
msgid "Database is not empty."
|
||||
msgstr ""
|
||||
msgstr "Databáze není prázdná."
|
||||
|
||||
#: install/includes/install_config/install_lib.php:123
|
||||
msgid "not detected"
|
||||
msgstr ""
|
||||
msgstr "nedetekováno"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:49
|
||||
msgid "Bulgarian"
|
||||
msgstr ""
|
||||
msgstr "Bulharština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:50
|
||||
msgid "Chinese (Simplified)"
|
||||
msgstr ""
|
||||
msgstr "Čínština (zjednodušená)"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:51
|
||||
msgid "Czech"
|
||||
@@ -54,83 +56,83 @@ msgstr ""
|
||||
|
||||
#: install/includes/interface_assets/footer.php:53
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
msgstr "Angličtina"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:54
|
||||
msgid "Finnish"
|
||||
msgstr ""
|
||||
msgstr "Finština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:55
|
||||
msgid "French"
|
||||
msgstr ""
|
||||
msgstr "Francouzština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:56
|
||||
msgid "German"
|
||||
msgstr ""
|
||||
msgstr "Němčina"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:57
|
||||
msgid "Greek"
|
||||
msgstr ""
|
||||
msgstr "Řečtina"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:58
|
||||
msgid "Italian"
|
||||
msgstr ""
|
||||
msgstr "Italština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:59
|
||||
msgid "Portuguese"
|
||||
msgstr ""
|
||||
msgstr "Portugalština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:60
|
||||
msgid "Polish"
|
||||
msgstr ""
|
||||
msgstr "Polština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:61
|
||||
msgid "Russian"
|
||||
msgstr ""
|
||||
msgstr "Ruština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:62
|
||||
msgid "Spanish"
|
||||
msgstr ""
|
||||
msgstr "Španělština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:63
|
||||
msgid "Swedish"
|
||||
msgstr ""
|
||||
msgstr "Švédština"
|
||||
|
||||
#: install/includes/interface_assets/footer.php:64
|
||||
msgid "Turkish"
|
||||
msgstr ""
|
||||
msgstr "Turečtina"
|
||||
|
||||
#: install/includes/interface_assets/header.php:94
|
||||
msgid "Install | Wavelog"
|
||||
msgstr ""
|
||||
msgstr "Instalace | Wavelog"
|
||||
|
||||
#: install/index.php:30
|
||||
msgid "1. Welcome"
|
||||
msgstr ""
|
||||
msgstr "1. Vítejte"
|
||||
|
||||
#: install/index.php:33
|
||||
msgid "2. Pre Checks"
|
||||
msgstr ""
|
||||
msgstr "2. Předinstalační kontrola"
|
||||
|
||||
#: install/index.php:36
|
||||
msgid "3. Configuration"
|
||||
msgstr ""
|
||||
msgstr "3. Konfigurace"
|
||||
|
||||
#: install/index.php:39
|
||||
msgid "4. Database"
|
||||
msgstr ""
|
||||
msgstr "4. Databáze"
|
||||
|
||||
#: install/index.php:42
|
||||
msgid "5. First User"
|
||||
msgstr ""
|
||||
msgstr "5. První uživatel"
|
||||
|
||||
#: install/index.php:45
|
||||
msgid "6. Finish"
|
||||
msgstr ""
|
||||
msgstr "6. Dokončení"
|
||||
|
||||
#: install/index.php:62
|
||||
msgid "Welcome to the Wavelog Installer"
|
||||
msgstr ""
|
||||
msgstr "Vítá Vás Wavelog instalátor"
|
||||
|
||||
#: install/index.php:63
|
||||
msgid ""
|
||||
@@ -153,31 +155,31 @@ msgstr ""
|
||||
|
||||
#: install/index.php:64
|
||||
msgid "Wiki"
|
||||
msgstr ""
|
||||
msgstr "Wiki"
|
||||
|
||||
#: install/index.php:65
|
||||
msgid "Thank you for installing Wavelog!"
|
||||
msgstr ""
|
||||
msgstr "Děkujeme že jste si vybrali Wavelog!"
|
||||
|
||||
#: install/index.php:66 install/index.php:69 install/index.php:1037
|
||||
msgid "Language"
|
||||
msgstr ""
|
||||
msgstr "Jazyk"
|
||||
|
||||
#: install/index.php:79
|
||||
msgid "Select a language"
|
||||
msgstr ""
|
||||
msgstr "Vyběr jazyka"
|
||||
|
||||
#: install/index.php:91 install/index.php:421
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
msgstr "Zavřít"
|
||||
|
||||
#: install/index.php:101
|
||||
msgid "PHP Modules"
|
||||
msgstr ""
|
||||
msgstr "PHP moduly"
|
||||
|
||||
#: install/index.php:108
|
||||
msgid "Version"
|
||||
msgstr ""
|
||||
msgstr "Verze"
|
||||
|
||||
#: install/index.php:109
|
||||
#, php-format
|
||||
@@ -187,15 +189,15 @@ msgstr ""
|
||||
|
||||
#: install/index.php:136
|
||||
msgid "Installed"
|
||||
msgstr ""
|
||||
msgstr "Nainstalováno"
|
||||
|
||||
#: install/index.php:136
|
||||
msgid "Not Installed"
|
||||
msgstr ""
|
||||
msgstr "Nenainstalováno"
|
||||
|
||||
#: install/index.php:144
|
||||
msgid "PHP Settings"
|
||||
msgstr ""
|
||||
msgstr "PHP nastavení"
|
||||
|
||||
#: install/index.php:234
|
||||
msgid "Folder Write Permissions"
|
||||
|
||||
@@ -43,9 +43,12 @@ echo " "
|
||||
# Find all PHP files and create a list in a temporary file
|
||||
find $FOLDERS -name "*.php" > PHPFILESLIST
|
||||
|
||||
# Generate a new POT file to a temporary file
|
||||
TEMP_POT_FILE=$(mktemp)
|
||||
|
||||
# Run the xgettext command with various options. Do not change these options to keep the POT/PO files consistent in Wavelog
|
||||
xgettext -F \
|
||||
-o $POT_FILE \
|
||||
-o $TEMP_POT_FILE \
|
||||
--from-code=UTF-8 \
|
||||
--keyword=__ \
|
||||
--keyword=_ngettext:1,2 \
|
||||
@@ -57,19 +60,30 @@ xgettext -F \
|
||||
# After the xgettext command, we don't need the temporary file anymore
|
||||
rm PHPFILESLIST
|
||||
|
||||
# Let's edit the header of the POT file
|
||||
sed -i "1s/.*/# $POT_TITLE_TEXT/" "$POT_FILE"
|
||||
sed -i "2s/.*/# $POT_COPYRIGHT_TEXT/" $POT_FILE
|
||||
sed -i "3s/.*/# $POT_LICENCE_TEXT/" $POT_FILE
|
||||
sed -i '4d' $POT_FILE
|
||||
sed -i '8d' $POT_FILE
|
||||
# Let's edit the header of the TEMP_POT_FILE
|
||||
sed -i "1s/.*/# $POT_TITLE_TEXT/" "$TEMP_POT_FILE"
|
||||
sed -i "2s/.*/# $POT_COPYRIGHT_TEXT/" "$TEMP_POT_FILE"
|
||||
sed -i "3s/.*/# $POT_LICENCE_TEXT/" "$TEMP_POT_FILE"
|
||||
sed -i '4d' "$TEMP_POT_FILE"
|
||||
sed -i '8d' "$TEMP_POT_FILE"
|
||||
|
||||
# Compare the new POT file with the existing one (excluding the POT Creation Date)
|
||||
if ! diff -I 'POT-Creation-Date' "$TEMP_POT_FILE" "$POT_FILE" >/dev/null; then
|
||||
echo "Updating POT file with new translations."
|
||||
echo " "
|
||||
mv "$TEMP_POT_FILE" "$POT_FILE"
|
||||
else
|
||||
echo "No changes detected in translations. POT file remains unchanged."
|
||||
echo " "
|
||||
rm "$TEMP_POT_FILE"
|
||||
fi
|
||||
|
||||
# Extract the first three lines of the POT file to a temporary file
|
||||
head -n 3 "$POT_FILE" > POT_HEADER
|
||||
|
||||
# Now we can merge the POT file (PO template) into each found PO file
|
||||
for po in $(find $FOLDERS -name "*.po"); do
|
||||
msgmerge --update -vv --backup=none --no-fuzzy-matching "$po" $POT_FILE;
|
||||
msgmerge --update -vv --backup=none --no-fuzzy-matching "$po" "$POT_FILE";
|
||||
# Replace the first three lines of the PO file with the POT file header
|
||||
sed -i '1,3d' "$po"
|
||||
cat POT_HEADER "$po" > temp.po && mv temp.po "$po"
|
||||
|
||||
30
po_gen.sh
30
po_gen.sh
@@ -43,9 +43,12 @@ echo " "
|
||||
# Find all PHP files and create a list in a temporary file
|
||||
find $FOLDERS -name "*.php" > PHPFILESLIST
|
||||
|
||||
# Generate a new POT file to a temporary file
|
||||
TEMP_POT_FILE=$(mktemp)
|
||||
|
||||
# Run the xgettext command with various options. Do not change these options to keep the POT/PO files consistent in Wavelog
|
||||
xgettext -F \
|
||||
-o $POT_FILE \
|
||||
-o $TEMP_POT_FILE \
|
||||
--from-code=UTF-8 \
|
||||
--keyword=__ \
|
||||
--keyword=_ngettext:1,2 \
|
||||
@@ -57,19 +60,30 @@ xgettext -F \
|
||||
# After the xgettext command, we don't need the temporary file anymore
|
||||
rm PHPFILESLIST
|
||||
|
||||
# Let's edit the header of the POT file
|
||||
sed -i "1s/.*/# $POT_TITLE_TEXT/" "$POT_FILE"
|
||||
sed -i "2s/.*/# $POT_COPYRIGHT_TEXT/" $POT_FILE
|
||||
sed -i "3s/.*/# $POT_LICENCE_TEXT/" $POT_FILE
|
||||
sed -i '4d' $POT_FILE
|
||||
sed -i '8d' $POT_FILE
|
||||
# Let's edit the header of the TEMP_POT_FILE file
|
||||
sed -i "1s/.*/# $POT_TITLE_TEXT/" "$TEMP_POT_FILE"
|
||||
sed -i "2s/.*/# $POT_COPYRIGHT_TEXT/" "$TEMP_POT_FILE"
|
||||
sed -i "3s/.*/# $POT_LICENCE_TEXT/" "$TEMP_POT_FILE"
|
||||
sed -i '4d' "$TEMP_POT_FILE"
|
||||
sed -i '8d' "$TEMP_POT_FILE"
|
||||
|
||||
# Compare the new POT file with the existing one (excluding the POT Creation Date)
|
||||
if ! diff -I 'POT-Creation-Date' "$TEMP_POT_FILE" "$POT_FILE" >/dev/null; then
|
||||
echo "Updating POT file with new translations."
|
||||
echo " "
|
||||
mv "$TEMP_POT_FILE" "$POT_FILE"
|
||||
else
|
||||
echo "No changes detected in translations. POT file remains unchanged."
|
||||
echo " "
|
||||
rm "$TEMP_POT_FILE"
|
||||
fi
|
||||
|
||||
# Extract the first three lines of the POT file to a temporary file
|
||||
head -n 3 "$POT_FILE" > POT_HEADER
|
||||
|
||||
# Now we can merge the POT file (PO template) into each found PO file
|
||||
for po in $(find $FOLDERS -name "*.po"); do
|
||||
msgmerge --update -vv --backup=none --no-fuzzy-matching "$po" $POT_FILE;
|
||||
msgmerge --update -vv --backup=none --no-fuzzy-matching "$po" "$POT_FILE";
|
||||
# Replace the first three lines of the PO file with the POT file header
|
||||
sed -i '1,3d' "$po"
|
||||
cat POT_HEADER "$po" > temp.po && mv temp.po "$po"
|
||||
|
||||
@@ -91,7 +91,16 @@ class CI_Migration {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_migration_lockfile = APPPATH . 'cache/.migration_running';
|
||||
protected $_migration_lockfile = NULL;
|
||||
|
||||
/**
|
||||
* Max Age of the migration lockfile
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
|
||||
protected $_migration_lf_maxage = NULL;
|
||||
|
||||
|
||||
/**
|
||||
* Whether to automatically run migrations
|
||||
@@ -147,6 +156,12 @@ class CI_Migration {
|
||||
// Add trailing slash if not set
|
||||
$this->_migration_path = rtrim($this->_migration_path, '/').'/';
|
||||
|
||||
// If not set, set it
|
||||
$this->_migration_lockfile !== '' OR $this->_migration_lockfile = '/tmp/.migration_running';
|
||||
|
||||
// selockfile maxage if not set in config file. Fallback is 480 seconds.
|
||||
$this->_migration_lf_maxage !== '' OR $this->_migration_lf_maxage = 480;
|
||||
|
||||
// Load migration language
|
||||
$this->lang->load('migration');
|
||||
|
||||
@@ -341,7 +356,27 @@ class CI_Migration {
|
||||
}
|
||||
|
||||
} else {
|
||||
log_message('debug', 'Migration process is currently locked. Second migration attempt ignored.');
|
||||
|
||||
log_message('debug', 'There is a lockfile for migrations. Checking the age...');
|
||||
|
||||
// Get the file creation date
|
||||
$lockfile_ctime = filemtime($this->_migration_lockfile);
|
||||
|
||||
//compare to the current time
|
||||
$tdiff = time() - $lockfile_ctime;
|
||||
log_message('debug', 'Migration lockfile lifetime in seconds: '.$tdiff.'/'.$this->_migration_lf_maxage);
|
||||
|
||||
// if the file is older then the configured limit, delete it
|
||||
if ($tdiff > $this->_migration_lf_maxage) {
|
||||
|
||||
unlink($this->_migration_lockfile);
|
||||
log_message('debug', 'Deleted migration lockfile because it was older then maxage.');
|
||||
|
||||
} else {
|
||||
|
||||
log_message('debug', 'Migration process is currently locked. Second migration attempt ignored.');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $current_version;
|
||||
|
||||
0
update_wavelog.sh
Executable file → Normal file
0
update_wavelog.sh
Executable file → Normal file
Reference in New Issue
Block a user