From 5623b004c1722509363721d94da3a1ece347b7c3 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 5 Jan 2021 16:14:50 +0000 Subject: [PATCH] [Contesting][Translate] Converted Contest Interface to use Translate system with english words. Contesting now ready for translating into languages other than english --- application/controllers/Contesting.php | 10 ++- .../language/english/contesting_lang.php | 18 ++++++ .../language/english/general_words_lang.php | 10 +++ application/views/contesting/index.php | 64 +++++++++---------- 4 files changed, 69 insertions(+), 33 deletions(-) create mode 100644 application/language/english/contesting_lang.php diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index 02b26590..c466a08d 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -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; diff --git a/application/language/english/contesting_lang.php b/application/language/english/contesting_lang.php new file mode 100644 index 00000000..7877d54d --- /dev/null +++ b/application/language/english/contesting_lang.php @@ -0,0 +1,18 @@ + - -

+ +

lang->line('contesting_page_title'); ?>

@@ -8,21 +8,21 @@
- +
- +
- +
- +
- +
- + @@ -319,14 +319,14 @@
- +
- +
- +
- +
- +
- +
@@ -364,18 +364,18 @@
- +
- +
- - + +
@@ -384,26 +384,26 @@
-
Callsign Suggestions
+
lang->line('contesting_title_callsign_suggestions'); ?>
-
Contest Logbook (Only for this session)
+
lang->line('contesting_title_contest_logbook'); ?>
- - - - - - - - + + + + + + + +
Date/TimeCallBandModeRST (S)RST (R)Exch SExch Rlang->line('general_word_date'); ?>/lang->line('general_word_time'); ?>lang->line('gen_hamradio_call'); ?>lang->line('gen_hamradio_band'); ?>lang->line('gen_hamradio_mode'); ?>lang->line('gen_hamradio_rsts'); ?>lang->line('gen_hamradio_rstr'); ?>lang->line('gen_hamradio_exchange_sent_short'); ?>lang->line('gen_hamradio_exchange_recv_short'); ?>