diff --git a/application/config/autoload.php b/application/config/autoload.php index 3b47ec9d..137ca8f3 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -106,6 +106,7 @@ $autoload['language'] = array( 'notes', 'qslcard', 'qso', + 'gridsquares' ); /* diff --git a/application/controllers/Gridmap.php b/application/controllers/Gridmap.php index 038626c4..d4e32e6a 100644 --- a/application/controllers/Gridmap.php +++ b/application/controllers/Gridmap.php @@ -7,7 +7,7 @@ class Gridmap extends CI_Controller { } public function index() { - $data['page_title'] = "Gridsquare Map"; + $data['page_title'] = lang('gridsquares_gridsquare_map'); $this->load->model('bands'); $this->load->model('gridmap_model'); @@ -20,6 +20,11 @@ class Gridmap extends CI_Controller { $data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright'); + $data['gridsquares_gridsquares'] = lang('gridsquares_gridsquares'); + $data['gridsquares_gridsquares_confirmed'] = lang('gridsquares_gridsquares_confirmed'); + $data['gridsquares_gridsquares_not_confirmed'] = lang('gridsquares_gridsquares_not_confirmed'); + $data['gridsquares_gridsquares_total_worked'] = lang('gridsquares_gridsquares_total_worked'); + $footerData = []; $footerData['scripts'] = [ 'assets/js/leaflet/L.MaidenheadColouredGridMap.js', diff --git a/application/language/english/gridsquares_lang.php b/application/language/english/gridsquares_lang.php index 8600088b..ac6c15c3 100644 --- a/application/language/english/gridsquares_lang.php +++ b/application/language/english/gridsquares_lang.php @@ -2,8 +2,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - - $lang['gridsquares_gridsquare_map'] = 'Gridsquare map'; $lang['gridsquares_confirmed_is_green'] = 'Confirmed is Green'; @@ -14,3 +12,15 @@ $lang['gridsquares_this_map_does_not_include_satellite_internet_or_repeater_qsos $lang['gridsquares_grid_squares'] = 'grid square'; $lang['gridsquares_total_count'] = 'Total count'; + +$lang['gridsquares_band'] = 'Band'; +$lang['gridsquares_mode'] = 'Mode'; +$lang['gridsquares_sat'] = 'Satellite'; +$lang['gridsquares_confirmation'] = 'Confirmation'; + +$lang['gridsquares_button_plot'] = 'Plot'; + +$lang['gridsquares_gridsquares'] = 'Gridsquares'; +$lang['gridsquares_gridsquares_confirmed'] = 'Gridsquares confirmed'; +$lang['gridsquares_gridsquares_not_confirmed'] = 'Gridsquares not confirmed'; +$lang['gridsquares_gridsquares_total_worked'] = 'Total gridsquares worked'; \ No newline at end of file diff --git a/application/views/gridmap/index.php b/application/views/gridmap/index.php index 29014f2b..93a2cdeb 100644 --- a/application/views/gridmap/index.php +++ b/application/views/gridmap/index.php @@ -35,7 +35,7 @@

- + - + - + - +
@@ -80,7 +80,7 @@
- +
session->flashdata('message')) { ?> @@ -98,5 +98,10 @@ \ No newline at end of file diff --git a/assets/js/sections/gridmap.js b/assets/js/sections/gridmap.js index 91c2b3ea..cec89f61 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -79,10 +79,10 @@ function gridPlot(form) { legend.onAdd = function(map) { var div = L.DomUtil.create("div", "legend"); - div.innerHTML += "

Gridsquares

"; - div.innerHTML += 'Gridsquares confirmed ('+grid_four_confirmed.length+')
'; - div.innerHTML += 'Gridsquares not confirmed ('+(grid_four.length - grid_four_confirmed.length)+')
'; - div.innerHTML += 'Total gridsquares worked ('+grid_four.length+')
'; + div.innerHTML += "

" + gridsquares_gridsquares + "

"; + div.innerHTML += '' + gridsquares_gridsquares_confirmed + ' ('+grid_four_confirmed.length+')
'; + div.innerHTML += '' + gridsquares_gridsquares_not_confirmed + ' ('+(grid_four.length - grid_four_confirmed.length)+')
'; + div.innerHTML += '' + gridsquares_gridsquares_total_worked + ' ('+grid_four.length+')
'; return div; }; @@ -128,6 +128,10 @@ function spawnGridsquareModal(loc_4char) { 'csv' ] }); + // change color of csv-button if dark mode is chosen + if (isDarkModeTheme()) { + $(".buttons-csv").css("color", "white"); + } }, buttons: [{ label: 'Close',