[Contesting][Translate] Converted Contest Interface to use Translate system with english words.

Contesting now ready for translating into languages other than english
这个提交包含在:
Peter Goodhall 2021-01-05 16:14:50 +00:00
父节点 6a42641f9d
当前提交 5623b004c1
共有 4 个文件被更改,包括 69 次插入33 次删除

查看文件

@ -9,6 +9,15 @@ if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Contesting extends CI_Controller {
function __construct()
{
parent::__construct();
$this->lang->load('contesting');
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
public function index()
{
@ -17,7 +26,6 @@ class Contesting extends CI_Controller {
$this->load->model('logbook_model');
$this->load->model('user_model');
$this->load->model('modes');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$data['active_station_profile'] = $this->stations->find_active();
$data['notice'] = false;

查看文件

@ -0,0 +1,18 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$lang['contesting_page_title'] = 'Contest Logging';
$lang['contesting_button_reset_contest_session'] = 'Reset Contest Session';
$lang['contesting_exchange_type'] = 'Exchange Type';
$lang['contesting_exchange_type_serial'] = 'Serial';
$lang['contesting_exchange_type_other'] = 'Other';
$lang['contesting_contest_name'] = 'Contest Name';
$lang['contesting_btn_reset_qso'] = 'Reset QSO';
$lang['contesting_btn_save_qso'] = 'Save QSO';
$lang['contesting_title_callsign_suggestions'] = 'Callsign Suggestions';
$lang['contesting_title_contest_logbook'] = 'Contest Logbook';

查看文件

@ -10,6 +10,9 @@ $lang['general_word_important'] = 'Important';
$lang['general_word_date'] = 'Date';
$lang['general_word_time'] = 'Time';
$lang['general_word_none'] = 'None';
$lang['general_word_name'] = 'Name';
$lang['general_word_comment'] = 'Comment';
$lang['general_word_total'] = 'Total';
$lang['general_word_year'] = 'Year';
@ -24,6 +27,7 @@ $lang['general_word_received'] = 'Received';
$lang['general_word_requested'] = 'Requested';
$lang['general_word_qslcards'] = 'QSL Cards';
// ham radio terms
$lang['gen_hamradio_call'] = 'Call';
$lang['gen_hamradio_callsign'] = 'Callsign';
@ -31,6 +35,12 @@ $lang['gen_hamradio_mode'] = 'Mode';
$lang['gen_hamradio_rst_sent'] = 'Sent';
$lang['gen_hamradio_rst_recv'] = 'Recv\'d';
$lang['gen_hamradio_band'] = 'Band';
$lang['gen_hamradio_frequency'] = 'Frequency';
$lang['gen_hamradio_radio'] = 'Radio';
$lang['gen_hamradio_rsts'] = 'RST (S)';
$lang['gen_hamradio_rstr'] = 'RST (R)';
$lang['gen_hamradio_exchange_sent_short'] = 'Exch (S)';
$lang['gen_hamradio_exchange_recv_short'] = 'Exch (R)';
// Dashboard Words
$lang['dashboard_you_have_had'] = 'You have had';

查看文件

@ -1,6 +1,6 @@
<div class="container qso_panel contesting">
<button type="button" class="btn btn-sm btn-warning float-right" onclick="reset_contest_session()"><i class="fas fa-sync-alt"></i> Reset Contest Session</button>
<h2><?php echo $page_title; ?></h2>
<button type="button" class="btn btn-sm btn-warning float-right" onclick="reset_contest_session()"><i class="fas fa-sync-alt"></i> <?php echo $this->lang->line('contesting_button_reset_contest_session'); ?></button>
<h2><?php echo $this->lang->line('contesting_page_title'); ?></h2>
<div class="row">
<div class="col-sm-12 col-md-12">
@ -8,21 +8,21 @@
<div class="card-body">
<form id="qso_input" name="qsos">
<div class="form-group row">
<label class="col-auto control-label" for="radio">Exchange Type</label>
<label class="col-auto control-label" for="radio"><?php echo $this->lang->line('contesting_exchange_type'); ?></label>
<div class="col-auto">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="exchangeradio" id="serial" value="serial" checked>
<label class="form-check-label" for="serial">Serial</label>
<label class="form-check-label" for="serial"><?php echo $this->lang->line('contesting_exchange_type_serial'); ?></label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="exchangeradio" id="other" value="other">
<label class="form-check-label" for="other">Other</label>
<label class="form-check-label" for="other"><?php echo $this->lang->line('contesting_exchange_type_other'); ?></label>
</div>
</div>
<label class="col-auto control-label" for="contestname">Contest Name</label>
<label class="col-auto control-label" for="contestname"><?php echo $this->lang->line('contesting_contest_name'); ?></label>
<div class="col-auto">
<select class="form-control-sm" id="contestname" name="contestname">
@ -259,17 +259,17 @@
<div class="form-row">
<div class="form-group col-md-2">
<label for="start_date">Date</label>
<label for="start_date"><?php echo $this->lang->line('general_word_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');}?>">
</div>
<div class="form-group col-md-1">
<label for="start_time">Time</label>
<label for="start_time"><?php echo $this->lang->line('general_word_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 $this->session->userdata('start_time'); } else {echo date('H:i'); } ?>" size="7">
</div>
<div class="form-group col-md-2">
<label for="mode">Mode</label>
<label for="mode"><?php echo $this->lang->line('gen_hamradio_mode'); ?></label>
<select id="mode" class="form-control mode form-control-sm" name="mode">
<?php foreach($modes->result() as $mode) {
if ($mode->submode == null) {
@ -282,7 +282,7 @@
</div>
<div class="form-group col-md-2">
<label for="band">Band</label>
<label for="band"><?php echo $this->lang->line('gen_hamradio_band'); ?></label>
<select id="band" class="form-control form-control-sm" name="band">
<optgroup label="HF">
@ -319,14 +319,14 @@
</div>
<div class="form-group col-md-2">
<label for="frequency">Frequency</label>
<label for="frequency"><?php echo $this->lang->line('gen_hamradio_frequency'); ?></label>
<input type="text" class="form-control form-control-sm" id="frequency" name="freq_display" value="<?php echo $this->session->userdata('freq'); ?>" />
</div>
<div class="form-group col-md-2">
<label for="inputRadio">Radio</label>
<label for="inputRadio"><?php echo $this->lang->line('gen_hamradio_radio'); ?></label>
<select class="form-control form-control-sm radios" id="radio" name="radio">
<option value="0" selected="selected">None</option>
<option value="0" selected="selected"><?php echo $this->lang->line('general_word_none'); ?></option>
<?php foreach ($radios->result() as $row) { ?>
<option value="<?php echo $row->id; ?>" <?php if($this->session->userdata('radio') == $row->id) { echo "selected=\"selected\""; } ?>><?php echo $row->radio; ?></option>
<?php } ?>
@ -336,27 +336,27 @@
<div class="form-row">
<div class="form-group col-md-3">
<label for="callsign">Callsign</label>
<label for="callsign"><?php echo $this->lang->line('gen_hamradio_callsign'); ?></label>
<input type="text" class="form-control form-control-sm" id="callsign" name="callsign" required>
</div>
<div class="form-group col-md-1">
<label for="rst_sent">RST (S)</label>
<label for="rst_sent"><?php echo $this->lang->line('gen_hamradio_rsts'); ?></label>
<input type="text" class="form-control form-control-sm" name="rst_sent" id="rst_sent" value="59">
</div>
<div class="form-group col-md-1">
<label for="exch_sent">Exch (S)</label>
<label for="exch_sent"><?php echo $this->lang->line('gen_hamradio_exchange_sent_short'); ?></label>
<input type="text" class="form-control form-control-sm" name="exch_sent" id="exch_sent" value="">
</div>
<div class="form-group col-md-1">
<label for="rst_recv">RST (R)</label>
<label for="rst_recv"><?php echo $this->lang->line('gen_hamradio_rstr'); ?></label>
<input type="text" class="form-control form-control-sm" name="rst_recv" id="rst_recv" value="59">
</div>
<div class="form-group col-md-1">
<label for="exch_recv">Exch (R)</label>
<label for="exch_recv"><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></label>
<input type="text" class="form-control form-control-sm" name="exch_recv" id="exch_recv" value="">
</div>
@ -364,18 +364,18 @@
<div class="form-row">
<div class="form-group col-md-5">
<label for="name">Name</label>
<label for="name"><?php echo $this->lang->line('general_word_name'); ?></label>
<input type="text" class="form-control form-control-sm" name="name" id="name" value="">
</div>
<div class="form-group col-md-5">
<label for="comment">Comment</label>
<label for="comment"><?php echo $this->lang->line('general_word_comment'); ?></label>
<input type="text" class="form-control form-control-sm" name="comment" id="comment" value="">
</div>
</div>
<button type="button" class="btn btn-sm btn-light" onclick="reset_log_fields()"><i class="fas fa-sync-alt"></i> Reset QSO</button>
<button type="button" class="btn btn-sm btn-primary" onclick="logQso();"><i class="fas fa-save"></i> Save QSO</button>
<button type="button" class="btn btn-sm btn-light" onclick="reset_log_fields()"><i class="fas fa-sync-alt"></i> <?php echo $this->lang->line('contesting_btn_reset_qso'); ?></button>
<button type="button" class="btn btn-sm btn-primary" onclick="logQso();"><i class="fas fa-save"></i> <?php echo $this->lang->line('contesting_btn_save_qso'); ?></button>
</form>
</div>
</div>
@ -384,26 +384,26 @@
<!-- Callsign SCP Box -->
<div class="card callsign-suggest">
<div class="card-header"><h5 class="card-title">Callsign Suggestions</h5></div>
<div class="card-header"><h5 class="card-title"><?php echo $this->lang->line('contesting_title_callsign_suggestions'); ?></h5></div>
<div class="card-body callsign-suggestions"></div>
</div>
<!-- Past QSO Box -->
<div class="card log">
<div class="card-header"><h5 class="card-title">Contest Logbook (Only for this session)</h5></div>
<div class="card-header"><h5 class="card-title"><?php echo $this->lang->line('contesting_title_contest_logbook'); ?></h5></div>
<table style="width:100%" class="table-sm table qsotable table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr class="log_title titles">
<th>Date/Time</th>
<th>Call</th>
<th>Band</th>
<th>Mode</th>
<th>RST (S)</th>
<th>RST (R)</th>
<th>Exch S</th>
<th>Exch R</th>
<th><?php echo $this->lang->line('general_word_date'); ?>/<?php echo $this->lang->line('general_word_time'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_call'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_band'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_mode'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_rsts'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_rstr'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_exchange_sent_short'); ?></th>
<th><?php echo $this->lang->line('gen_hamradio_exchange_recv_short'); ?></th>
</tr>
</thead>