From 73358302d7893edbdadcefd7a52aa8afe5b1384c Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Sun, 8 Dec 2024 00:33:09 +0100 Subject: [PATCH] Added Russian Translation --- admin/class-bmltenabled-admin.php | 4 ++-- admin/js/bread-wizard.js | 6 ++++++ admin/partials/_bread_wizard.php | 5 +++-- admin/partials/bread-admin-display.php | 8 +++++--- includes/lang/translate_ru.php | 9 +++++++++ 5 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 includes/lang/translate_ru.php diff --git a/admin/class-bmltenabled-admin.php b/admin/class-bmltenabled-admin.php index 8eca1ba..a9cf37e 100644 --- a/admin/class-bmltenabled-admin.php +++ b/admin/class-bmltenabled-admin.php @@ -34,6 +34,7 @@ function admin_menu_link() $cap = 'manage_bread'; } $slugs = apply_filters('BmltEnabled_Slugs', []); + $icon = apply_filters("BmltEnabled_IconSVG", 'dashicons-locations-alt'); $slug = $slugs[0]; add_menu_page( 'Meeting List', @@ -41,8 +42,7 @@ function admin_menu_link() $cap, $slug, '', - //'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiB3aWR0aD0iNTAuMDAwMDAwcHQiIGhlaWdodD0iNTAuMDAwMDAwcHQiIHZpZXdCb3g9IjAgMCA1MC4wMDAwMDAgNTAuMDAwMDAwIg0KIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPg0KDQo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCw1MC4wMDAwMDApIHNjYWxlKDAuMTAwMDAwLC0wLjEwMDAwMCkiDQpmaWxsPSIjMDAwMDAwIiBzdHJva2U9Im5vbmUiPg0KPHBhdGggZD0iTTI4MCAzNjEgYzAgLTc0IC0zIC05MSAtMTUgLTkxIC0xMiAwIC0xNSAxNSAtMTUgNzEgMCA2NyAtMSA3MCAtMjINC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DMgMTYgLTMgMjIgLTYgNg0KLTEyIDYgLTE3IC0yeiIvPg0KPC9nPg0KPC9zdmc+', - 'dashicons-location-alt', + $icon, null ); do_action('BmltEnabled_Submenu', $slug); diff --git a/admin/js/bread-wizard.js b/admin/js/bread-wizard.js index 880c580..3afaffb 100644 --- a/admin/js/bread-wizard.js +++ b/admin/js/bread-wizard.js @@ -127,8 +127,10 @@ jQuery(document).ready(function($){ }, ['']); $('#wizard_format_filter').html(options.join('')); } + var hasVirtualMeetings = false; layout_options = function(meetings) { const meeting_count = meetings.length; + hasVirtualMeetings = meetings.some((m) => m.formats.split(',').some(format => ['VM','HY'].includes(format))); $('#wizard_meeting_count').html(meeting_count); const layouts = breadLayouts.find((layouts) => meeting_count <= Number(layouts.maxSize)); const options = breadLayouts.reduce((carry,group) => { @@ -162,6 +164,10 @@ jQuery(document).ready(function($){ return carry; }, []); $('#wizard_language').html(options.join('')); + if (!hasVirtualMeetings) { + $('#wizard_no_virtual_meetings').prop("checked", true); + $('#wizard-virtual-meeting-section').hide(); + } } handle_error = function(error) { console.log(error); diff --git a/admin/partials/_bread_wizard.php b/admin/partials/_bread_wizard.php index 16e94cf..34fe838 100644 --- a/admin/partials/_bread_wizard.php +++ b/admin/partials/_bread_wizard.php @@ -101,7 +101,8 @@

Choose a language (only applies to names of days and format code descriptions):


-

Where should virtual meetings be included: +

+ Where should virtual meetings be included:

@@ -109,7 +110,7 @@

-

+

Organize the meetings by: