From ddffa609446145f848886b4c3935c4d25bff7548 Mon Sep 17 00:00:00 2001 From: int2001 Date: Tue, 23 Jul 2024 10:26:51 +0000 Subject: [PATCH 1/2] Added WAJA to accumulated Stats --- application/models/Accumulate_model.php | 106 ++++++++++++++++++++ application/views/accumulate/index.php | 7 ++ assets/js/sections/accumulatedstatistics.js | 4 + 3 files changed, 117 insertions(+) diff --git a/application/models/Accumulate_model.php b/application/models/Accumulate_model.php index fe528bab3..46a3102dd 100644 --- a/application/models/Accumulate_model.php +++ b/application/models/Accumulate_model.php @@ -30,6 +30,9 @@ class Accumulate_model extends CI_Model case 'vucc': $result = $this->get_accumulated_vucc($band, $mode, $period, $location_list); break; + case 'waja': + $result = $this->get_accumulated_waja($band, $mode, $period, $location_list); + break; } return $result; @@ -147,6 +150,109 @@ class Accumulate_model extends CI_Model return $array; } + function get_accumulated_waja($band, $mode, $period, $location_list) { + if ($period == "year") { + $sql = "select year(thcv.col_time_on) year"; + } else if ($period == "month") { + $sql = "select date_format(col_time_on, '%Y-%m') year"; + } + + $sql .= ", coalesce(y.tot, 0) tot + from " . $this->config->item('table_name') . " thcv + left outer join ( + select count(col_state) as tot, year + from (select distinct "; + + if ($period == "year") { + $sql .= "year(col_time_on)"; + } else if ($period == "month") { + $sql .= "date_format(col_time_on, '%Y-%m')"; + } + + $sql .= " year, col_state + from " . $this->config->item('table_name') . + " where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + $sql .= " and COL_DXCC in ('339') and trim(coalesce(col_state,'')) != ''"; + + $sql .= " order by year + ) x + where not exists (select 1 from " . $this->config->item('table_name') . " where"; + + if ($period == "year") { + $sql .= " year(col_time_on) < year";; + } else if ($period == "month") { + $sql .= " date_format(col_time_on, '%Y-%m') < year";; + } + + $sql .= " and col_state = x.col_state"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + $sql .= " and COL_DXCC in ('339')"; + + $sql .= " and station_id in (" . $location_list . ")) + group by year + order by year"; + + if ($period == "year") { + $sql .= " ) y on year(thcv.col_time_on) = y.year"; + } else if ($period == "month") { + $sql .= " ) y on date_format(col_time_on, '%Y-%m') = y.year"; + } + + $sql .= " where station_id in (" . $location_list . ")"; + + if ($band != 'All') { + if ($band == 'SAT') { + $sql .= " and col_prop_mode ='" . $band . "'"; + } else { + $sql .= " and col_prop_mode !='SAT'"; + $sql .= " and col_band ='" . $band . "'"; + } + } + + if ($mode != 'All') { + $sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')"; + } + + if ($period == "year") { + $sql .= " group by year(thcv.col_time_on), y.tot + order by year(thcv.col_time_on)"; + } else if ($period == "month") { + $sql .= " group by date_format(col_time_on, '%Y-%m'), y.tot + order by date_format(col_time_on, '%Y-%m')"; + } + + $query = $this->db->query($sql); + + return $this->count_and_add_accumulated_total($query->result()); + } + function get_accumulated_was($band, $mode, $period, $location_list) { if ($period == "year") { diff --git a/application/views/accumulate/index.php b/application/views/accumulate/index.php index a7653307c..2298da3e6 100644 --- a/application/views/accumulate/index.php +++ b/application/views/accumulate/index.php @@ -4,6 +4,7 @@ var lang_statistics_accumulated_worked_iota = ''; var lang_statistics_accumulated_worked_cqzone = ''; var lang_statistics_accumulated_worked_vucc = ''; + var lang_statistics_accumulated_worked_waja = ''; var lang_general_word_year = ''; var lang_general_word_yearly = ''; var lang_general_word_month = ''; @@ -78,6 +79,12 @@ +
+ + +
diff --git a/assets/js/sections/accumulatedstatistics.js b/assets/js/sections/accumulatedstatistics.js index 55dbeeeb9..5470ec9f9 100644 --- a/assets/js/sections/accumulatedstatistics.js +++ b/assets/js/sections/accumulatedstatistics.js @@ -46,6 +46,10 @@ function accumulatePlot(form) { var awardtext = lang_statistics_accumulated_worked_vucc; break; + case "waja": + var awardtext = + lang_statistics_accumulated_worked_waja; + break; } var periodtext = lang_general_word_year; From 681954ae72f01a352e880d3f0bd39d726892ad15 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 23 Jul 2024 10:31:45 +0000 Subject: [PATCH 2/2] po/mo updates --- .../locale/bg_BG/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/cs_CZ/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/de_DE/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/el_GR/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/es_ES/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/fi_FI/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/fr_FR/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/it_IT/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/nl_NL/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/pl_PL/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/pt_PT/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/ru_RU/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/sv_SE/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/tr_TR/LC_MESSAGES/messages.po | 51 ++++++++++--------- .../locale/zh_CN/LC_MESSAGES/messages.po | 51 ++++++++++--------- assets/lang_src/messages.pot | 51 ++++++++++--------- .../includes/gettext/lang_src/installer.pot | 2 +- 17 files changed, 449 insertions(+), 369 deletions(-) diff --git a/application/locale/bg_BG/LC_MESSAGES/messages.po b/application/locale/bg_BG/LC_MESSAGES/messages.po index 8063e1621..f6f6cf5a4 100644 --- a/application/locale/bg_BG/LC_MESSAGES/messages.po +++ b/application/locale/bg_BG/LC_MESSAGES/messages.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-23 08:43+0000\n" +"POT-Creation-Date: 2024-07-23 10:31+0000\n" "PO-Revision-Date: 2024-07-09 13:25+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Bulgarian \n" "Language-Team: Czech \n" "Language-Team: German \n" "Language-Team: Greek \n" "Language-Team: Spanish \n" "Language-Team: Finnish \n" "Language-Team: French \n" "Language-Team: Italian \n" "Language-Team: Dutch \n" "Language-Team: Polish \n" "Language-Team: Portuguese (Portugal) \n" "Language-Team: Russian \n" "Language-Team: Swedish \n" "Language-Team: Turkish \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: LANGUAGE \n" @@ -328,7 +328,7 @@ msgid "CQ Magazine WAZ" msgstr "" #: application/controllers/Awards.php:652 -#: application/views/accumulate/index.php:60 +#: application/views/accumulate/index.php:61 #: application/views/timeline/index.php:45 msgid "Worked All States (WAS)" msgstr "" @@ -888,7 +888,7 @@ msgid "Clublog" msgstr "" #: application/controllers/Logbook.php:1273 -#: application/views/accumulate/index.php:30 +#: application/views/accumulate/index.php:31 #: application/views/activated_gridmap/index.php:39 #: application/views/adif/dcl_success.php:33 #: application/views/awards/cq/index.php:86 @@ -1155,7 +1155,7 @@ msgid "Distance" msgstr "" #: application/controllers/Logbook.php:1284 -#: application/views/accumulate/index.php:20 +#: application/views/accumulate/index.php:21 #: application/views/activated_gridmap/index.php:8 #: application/views/activators/index.php:7 #: application/views/adif/dcl_success.php:32 @@ -2086,6 +2086,10 @@ msgid "Accumulated number of VUCC Grids worked" msgstr "" #: application/views/accumulate/index.php:7 +msgid "Accumulated number of WAJA worked" +msgstr "" + +#: application/views/accumulate/index.php:8 #: application/views/dashboard/index.php:222 #: application/views/dayswithqso/index.php:16 #: application/views/statistics/index.php:18 @@ -2093,28 +2097,28 @@ msgstr "" msgid "Year" msgstr "" -#: application/views/accumulate/index.php:8 -#: application/views/accumulate/index.php:88 +#: application/views/accumulate/index.php:9 +#: application/views/accumulate/index.php:95 msgid "Yearly" msgstr "" -#: application/views/accumulate/index.php:9 +#: application/views/accumulate/index.php:10 #: application/views/dashboard/index.php:227 #: application/views/visitor/index.php:251 msgid "Month" msgstr "" -#: application/views/accumulate/index.php:10 -#: application/views/accumulate/index.php:94 +#: application/views/accumulate/index.php:11 +#: application/views/accumulate/index.php:101 msgid "Monthly" msgstr "" -#: application/views/accumulate/index.php:11 +#: application/views/accumulate/index.php:12 msgid "Difference" msgstr "" -#: application/views/accumulate/index.php:23 -#: application/views/accumulate/index.php:33 +#: application/views/accumulate/index.php:24 +#: application/views/accumulate/index.php:34 #: application/views/activated_gridmap/index.php:10 #: application/views/activated_gridmap/index.php:22 #: application/views/activated_gridmap/index.php:32 @@ -2196,35 +2200,40 @@ msgstr "" msgid "All" msgstr "" -#: application/views/accumulate/index.php:49 +#: application/views/accumulate/index.php:50 #: application/views/timeline/index.php:41 msgid "Award" msgstr "" -#: application/views/accumulate/index.php:54 +#: application/views/accumulate/index.php:55 #: application/views/timeline/index.php:44 msgid "DX Century Club (DXCC)" msgstr "" -#: application/views/accumulate/index.php:66 +#: application/views/accumulate/index.php:67 #: application/views/timeline/index.php:46 msgid "Islands On The Air (IOTA)" msgstr "" -#: application/views/accumulate/index.php:72 +#: application/views/accumulate/index.php:73 #: application/views/timeline/index.php:47 msgid "Worked All Zones (WAZ)" msgstr "" -#: application/views/accumulate/index.php:78 +#: application/views/accumulate/index.php:79 msgid "VHF/UHF Century Club (VUCC)" msgstr "" -#: application/views/accumulate/index.php:83 +#: application/views/accumulate/index.php:85 +#: application/views/timeline/index.php:49 +msgid "Worked All Japan (WAJA)" +msgstr "" + +#: application/views/accumulate/index.php:90 msgid "Period" msgstr "" -#: application/views/accumulate/index.php:104 +#: application/views/accumulate/index.php:111 #: application/views/activators/index.php:50 #: application/views/awards/cq/index.php:111 #: application/views/awards/dok/index.php:127 @@ -9424,10 +9433,6 @@ msgstr "" msgid "VHF / UHF Century Club (VUCC)" msgstr "" -#: application/views/timeline/index.php:49 -msgid "Worked All Japan (WAJA)" -msgstr "" - #: application/views/timeplotter/index.php:2 msgid "contacts were plotted" msgstr "" diff --git a/install/includes/gettext/lang_src/installer.pot b/install/includes/gettext/lang_src/installer.pot index cda4b9b1c..1bc0b75f0 100644 --- a/install/includes/gettext/lang_src/installer.pot +++ b/install/includes/gettext/lang_src/installer.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: translations@wavelog.org\n" -"POT-Creation-Date: 2024-07-23 08:43+0000\n" +"POT-Creation-Date: 2024-07-23 10:31+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"