Skip to content

Commit

Permalink
Added Russian Translation
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Dec 7, 2024
1 parent 0b63d33 commit 7335830
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions admin/class-bmltenabled-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ 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',
'Meeting List',
$cap,
$slug,
'',
//'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiB3aWR0aD0iNTAuMDAwMDAwcHQiIGhlaWdodD0iNTAuMDAwMDAwcHQiIHZpZXdCb3g9IjAgMCA1MC4wMDAwMDAgNTAuMDAwMDAwIg0KIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPg0KDQo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCw1MC4wMDAwMDApIHNjYWxlKDAuMTAwMDAwLC0wLjEwMDAwMCkiDQpmaWxsPSIjMDAwMDAwIiBzdHJva2U9Im5vbmUiPg0KPHBhdGggZD0iTTI4MCAzNjEgYzAgLTc0IC0zIC05MSAtMTUgLTkxIC0xMiAwIC0xNSAxNSAtMTUgNzEgMCA2NyAtMSA3MCAtMjINCjY3IC0yMSAtMyAtMjMgLTEwIC0yOCAtNzIgbC01IC02OSAtMzQgNzEgYy0zNCA3MCAtMzUgNzEgLTU0IDU0IC01NSAtNDggLTcyDQotMTU1IC0zNiAtMjI5IDE4IC0zNiAyNSAtNDMgNTEgLTQzIGwyOSAwIC0yMSAzMCBjLTMzIDQ3IC00MyA5MyAtMjkgMTQyIGwxMQ0KNDMgNjkgLTEzNSA2OCAtMTM1IDAgODMgYzEgNjIgNCA4MyAxNCA4MCA3IC0zIDEzIC0yNiAxNSAtNTYgMyAtNDQgNiAtNTIgMjMNCi01MiAxNiAwIDE5IDcgMTkgNTUgbDAgNTUgNDAgMCBjNDkgMCA1MiAtMTcgMTUgLTczIGwtMjYgLTM3IDMxIDAgYzI3IDAgMzQgNg0KNTAgNDMgMjcgNTggMjUgMTI0IC0zIDE3OCAtMjMgNDMgLTgwIDkxIC0xMjQgMTA0IC0yMyA2IC0yMyA1IC0yMyAtODR6IG04OQ0KLTE2IGMxNyAtMjAgMzEgLTQ1IDMxIC01NSAwIC0xNyAtNyAtMjAgLTQwIC0yMCBsLTQwIDAgMCA1NSBjMCAzMCA0IDU1IDkgNTUNCjUgMCAyMyAtMTYgNDAgLTM1eiIvPg0KPHBhdGggZD0iTTY5IDQyMyBjLTEzIC0xNiAtMTIgLTE3IDQgLTQgOSA3IDE3IDE1IDE3IDE3IDAgOCAtOCAzIC0yMSAtMTN6Ii8+DQo8cGF0aCBkPSJNNDEwIDQzNiBjMCAtMiA4IC0xMCAxOCAtMTcgMTUgLTEzIDE2IC0xMiAzIDQgLTEzIDE2IC0yMSAyMSAtMjEgMTN6Ii8+DQo8cGF0aCBkPSJNNDE5IDczIGMtMTMgLTE2IC0xMiAtMTcgNCAtNCAxNiAxMyAyMSAyMSAxMyAyMSAtMiAwIC0xMCAtOCAtMTcNCi0xN3oiLz4NCjxwYXRoIGQ9Ik00NTUgNTAgYy00IC02IC0zIC0xNiAzIC0yMiA2IC02IDEyIC02IDE3IDIgNCA2IDMgMTYgLTMgMjIgLTYgNg0KLTEyIDYgLTE3IC0yeiIvPg0KPC9nPg0KPC9zdmc+',
'dashicons-location-alt',
$icon,
null
);
do_action('BmltEnabled_Submenu', $slug);
Expand Down
6 changes: 6 additions & 0 deletions admin/js/bread-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ jQuery(document).ready(function($){
}, ['<option value="" selected>All Meetings</option>']);
$('#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) => {
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions admin/partials/_bread_wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,16 @@
<p>Choose a language (only applies to names of days and format code descriptions):</p>
<select id="wizard_language" name="wizard_language">
</select><br/>
<p>Where should virtual meetings be included:
<div id="wizard-virtual-meeting-section">
Where should virtual meetings be included:
<fieldset id="wizard_virtual_meetings">
<input type="radio" value="1" name="wizard_virtual_meetings" id="wizard_additional_list" checked>
<label for="wizard_additional_list">Place virtual meetings in a separate list, with specialized format.</label><br/>
<input type="radio" value="0" name="wizard_virtual_meetings" id="wizard_no_additional_list">
<label for="wizard_no_additional_list">Include virtual meetings in main meeting list.</label><br/>
<input type="radio" value="-1" name="wizard_virtual_meetings" id="wizard_no_virtual_meetings">
<label for="wizard_no_virtual_meetings">Don't include virtual meetings at all.</label><br/>
</fieldset></p>
</fieldset></div>
<p>Organize the meetings by:
<select name="wizard_meeting_sort">
<option value="day">Day</option>
Expand Down
8 changes: 5 additions & 3 deletions admin/partials/bread-admin-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ private function select_service_body_options(int $i)
<option <?php echo $selected; ?> value="<?php echo $area ?>"><?php echo $descr ?></option><?php
}
}
/**
* Adds settings/options page
*/
/**
* Main function for the admin page.
*
* @return void
*/
function admin_options_page()
{
$this->bread->getConfigurationForSettingId($this->bread->getRequestedSetting());
Expand Down
9 changes: 9 additions & 0 deletions includes/lang/translate_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "Russian",
"LOCALE" => "ru-RU",
"WEEKDAYS" => array( 'ERROR', "Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота" ),
"WKDYS" => array( 'ERR', 'ВСК', 'ПНД', 'ВТР', 'СРД', 'ЧТВ', 'ПТН', 'СБТ' ),
"PAGE" => "Страница",
"CONT" => "продолжать"
);

0 comments on commit 7335830

Please sign in to comment.