Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French Language #167

Open
wants to merge 9 commits into
base: alpha
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\F:\\Royal Multi Gamers\\Github\\levels-ranks-web-french",
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/levels-ranks-web-french/v17/.wsuo
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
Установка:
-----

- Скачать stable ( Рекомендуется ) или dev релиз Levels Ranks WEB.
- Скачать stable (Рекомендуется) или dev релиз Levels Ranks WEB.
- Извлечь файлы из архива и переместить их в любой каталог на вашем домене или субдомене.
- Перейти на ваш сайт с извлеченной Levels Ranks WEB и пройти процесс установки.
- Profit!
Expand Down Expand Up @@ -312,7 +312,7 @@ location / {

</details>

<details><summary>Если модулю необходимо подключение к другому "моду" ( SB / MA пример )</summary>
<details><summary>Если модулю необходимо подключение к другому "моду" (SB / MA пример)</summary>

Используйте шаблон подключения из описания модуля.
Пример. Интерация SourceBans или Material Admin:
Expand Down
28 changes: 0 additions & 28 deletions app/ext/Translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,33 +91,7 @@ public function create_translator_cache() {

/**
* Получить перевод определенной фразы из общего кэша.
*
* @since 0.2.28
*
* @author stwx.#0239
*
* @param string $module_id ID модуля.
* @param string $phrase Слово для перевода.
* @param array $values Заменяет перменные в тексте
*
* @return string Выводит слово в переводе.
*/
public function translate($module_id, $phrase, $values = [])
{
$translations = $this->arr_translations[$module_id];
$word = isset($translations[$phrase][$_SESSION['language']]) ? $translations[$phrase][$_SESSION['language']] : $translations[$phrase]['EN'] ?? 'No Translation';

foreach ($values as $key => $value) {
$key = "{" . $key . "}";
$word = str_replace($key, $value, $word);
}

return $word;
}

/**
* Получить перевод определенной фразы из общего кэша.
*
* @since 0.2
*
* @param string $phrase Слово для перевода.
Expand All @@ -144,8 +118,6 @@ public function get_translate_phrase( $phrase, $group = '' ) {
/**
* Получить перевод определенной фразы из кэша модуля.
*
* @deprecated
*
* @since 0.2
*
* @param string $module_id ID модуля.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
<div class="col-md-4 col-fixed">
<div class="card-block-sb-big">
<h3><?php echo number_format( $data['module_block_main_sb_stats']['count_admins'], 0, '.', ' ' ) ?></h3>
<div class="info"><?php echo $Translate->translate( 'module_block_main_sb_stats', '_Count_admins' ) ?></div>
<div class="info"><?php echo $Translate->get_translate_module_phrase( 'module_block_main_sb_stats', '_Count_admins' ) ?></div>
<div class="figure"></div>
<div class="figure_2"></div>
</div>
</div>
<div class="col-md-4 col-fixed">
<div class="card-block-sb-big">
<h3><?php echo number_format( $data['module_block_main_sb_stats']['count_bans'], 0, '.', ' ' ) ?></h3>
<div class="info"><?php echo $Translate->translate( 'module_block_main_sb_stats', '_Count_bans' ) ?></div>
<div class="info"><?php echo $Translate->get_translate_module_phrase( 'module_block_main_sb_stats', '_Count_bans' ) ?></div>
<div class="figure"></div>
<div class="figure_2"></div>
</div>
</div>
<div class="col-md-4 col-fixed">
<div class="card-block-sb-big">
<h3><?php echo number_format( $data['module_block_main_sb_stats']['count_comms'], 0, '.', ' ' ) ?></h3>
<div class="info"><?php echo $Translate->translate( 'module_block_main_sb_stats', '_Count_comms' ) ?></div>
<div class="info"><?php echo $Translate->get_translate_module_phrase( 'module_block_main_sb_stats', '_Count_comms' ) ?></div>
</div>
</div>
</div>
Expand Down
30 changes: 15 additions & 15 deletions app/modules/disabled/module_block_main_sb_stats/translation.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"_Count_admins": {
"EN": "Total Admins",
"EN": "Total Admins",
"BR": "Total de Admins",
"RU": "Всего админ-ов.",
"UA": "Всього адмін-ов.",
"LT": "Iš viso administratorių.",
"RU": "Всего админ-ов.",
"UA": "Всього адмін-ов.",
"LT": "Iš viso administratorių.",
"CH": "管理员总数",
"CRO": "Ukupno Admina",
"RS": "Ukupno Admina",
"RS": "Ukupno Admina",
"BA": "Ukupno Admina"
},
"_Count_bans": {
"EN": "Total Bans",
"EN": "Total Bans",
"BR": "Total de Bans",
"RU": "Всего банов",
"UA": "Всього банів",
"LT": "Viso blokavimų",
"RU": "Всего банов",
"UA": "Всього банів",
"LT": "Viso blokavimų",
"CH": "封禁总数",
"CRO": "Ukupno Banova",
"RS": "Ukupno Banova",
"RS": "Ukupno Banova",
"BA": "Ukupno Banova"
},
"_Count_comms": {
"EN": "Total Comms",
"EN": "Total Comms",
"BR": "Total de Comms",
"RU": "Всего мутов/гагов",
"UA": "Всього мутов/гагов",
"LT": "Viso tildymų (GAG/MUTE)",
"RU": "Всего мутов/гагов",
"UA": "Всього мутов/гагов",
"LT": "Viso tildymų (GAG/MUTE)",
"CH": "语音封禁总数",
"CRO": "Ukupno Mutova",
"RS": "Ukupno Mutova",
"RS": "Ukupno Mutova",
"BA": "Ukupno Mutova"
}
}
9 changes: 5 additions & 4 deletions app/modules/disabled/module_page_admins/description.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"page": "admins",
"version": "0.1",
"required": {
"core":"0.2","php":"5.4"
"core":"0.2",
"php":"5.4"
},
"setting": {
"status": 1,
Expand All @@ -16,8 +17,7 @@
"data": 1,
"data_always": 1
},
"sidebar":
{
"sidebar": {
"0": {
"href": "?page=admins",
"open_new_tab": "0",
Expand All @@ -26,5 +26,6 @@
"icon": "accounts-list",
"name": "_Admins_sb",
"sidebar_directory": "_Sidebar_blocks"
}}
}
}
}
8 changes: 4 additions & 4 deletions app/modules/disabled/module_page_admins/forward/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<thead>
<tr class="pointer">
<?php if( $General->arr_general['avatars'] != 0 ) {?><th class="text-right tb-avatar"></th><?php }?>
<th class="text-left"><?php echo $Translate->get_translate_phrase('_Admin') ?></th>
<th class="text-center">Группа</th>
<th class="text-center">Количество банов</th>
<th class="text-center">Количество мутов / гагов</th>
<th class="text-left"><?php echo $Translate->get_translate_phrase('_Nickname') ?></th>
<th class="text-center"><?php echo $Translate->get_translate_phrase('_Privilege_Group') ?></th>
<th class="text-center"><?php echo $Translate->get_translate_phrase('_Number_Bans') ?></th>
<th class="text-center"><?php echo $Translate->get_translate_phrase('_Number_Mutes_Gags') ?></th>
</tr>
</thead>
<tbody>
Expand Down
4 changes: 2 additions & 2 deletions app/modules/disabled/module_page_bans/description.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "LR WEB - Bans - Мониторинг банов",
"info": "Интеграция SourceBans. Добавляет страницу со списком банов игроков.",
"title": "LR WEB | Bans - Ban Monitoring",
"info": "SourceBans Integration. Adds a page with a list of player bans",
"author": "M0st1ce",
"page": "bans",
"version": "0.1",
Expand Down
2 changes: 1 addition & 1 deletion app/modules/disabled/module_page_bans/forward/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$page_num = (int) intval ( get_section( 'num', '1' ) );

// Типа банов.
$ban_type = [0 => '<div class="color-red">' . $Translate->get_translate_phrase('_Forever') . '</div>',1 => '<div class="color-blue">' . $Translate->get_translate_phrase('_Unban') . '</div>',2 => '<strike>Сессия</strike>'];
$ban_type = [0 => '<div class="color-red">' . $Translate->get_translate_phrase('_Forever') . '</div>',1 => '<div class="color-blue">' . $Translate->get_translate_phrase('_Unban') . '</div>',2 => '<strike>' . $Translate->get_translate_phrase('_Bans_Session') . '</strike>'];

// CSGO || CSS
$mod = $Db->db_data['SourceBans'][0]['mod'];
Expand Down
4 changes: 2 additions & 2 deletions app/modules/disabled/module_page_comms/description.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "LR WEB - Comms - Список мутов/гагов",
"info": "Интеграция SourceBans. Добавляет страницу со списком мутов и гагов игроков.",
"title": "LR WEB | Comms - List Mutes/Gags",
"info": "SourceBans Integration. Adds a page with a list of mutes and gags of players",
"author": "M0st1ce",
"page": "comms",
"version": "0.1",
Expand Down
2 changes: 1 addition & 1 deletion app/modules/disabled/module_page_comms/forward/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$page_num = (int) intval ( get_section( 'num', '1' ) );

// Типа мутов.
$comms_type = [0 => '<div class="color-red">' . $Translate->get_translate_phrase('_Forever') . '</div>',1 => '<div class="color-blue">' . $Translate->get_translate_phrase('_Uncomm') . '</div>',2 => '<strike>Сессия</strike>'];
$comms_type = [0 => '<div class="color-red">' . $Translate->get_translate_phrase('_Forever') . '</div>',1 => '<div class="color-blue">' . $Translate->get_translate_phrase('_Uncomm') . '</div>',2 => '<strike>' . $Translate->get_translate_phrase('_Comms_Session') . '</strike>'];

// CSGO || CSS
$mod = $Db->db_data['SourceBans'][0]['mod'];
Expand Down
4 changes: 2 additions & 2 deletions app/modules/disabled/module_page_lk_impulse/forward/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
$LK->LkBalancePlayer();

// Задаём заголовок страницы.
$Modules->set_page_title( $General->arr_general['short_name'] . ' :: ' . $Translate->translate('module_page_lk_impulse','_LK'));
$Modules->set_page_title( $General->arr_general['short_name'] . ' :: ' . $Translate->get_translate_module_phrase('module_page_lk_impulse','_LK'));

// Задаём описание страницы.
$Modules->set_page_description( $General->arr_general['short_name'] . ' :: ' . $Translate->translate('module_page_lk_impulse','_LK') . ' :: ' . $Translate->translate('module_page_lk_impulse','_DescPageLK'));
$Modules->set_page_description( $General->arr_general['short_name'] . ' :: ' . $Translate->get_translate_module_phrase('module_page_lk_impulse','_LK') . ' :: ' . $Translate->get_translate_module_phrase('module_page_lk_impulse','_DescPageLK'));
24 changes: 12 additions & 12 deletions app/modules/disabled/module_page_lk_impulse/forward/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
<div class="user-sidebar-right-block">
<div class="info">
<div class="details">
<div class="admin_type"><?php echo $Translate->translate( 'module_page_adminpanel','_Chief_admin')?></div>
<div class="admin_rights"><?php echo $Translate->translate( 'module_page_adminpanel','_All_access_rights')?></div>
<div class="admin_type"><?php echo $Translate->get_translate_module_phrase( 'module_page_adminpanel','_Chief_admin')?></div>
<div class="admin_rights"><?php echo $Translate->get_translate_module_phrase( 'module_page_adminpanel','_All_access_rights')?></div>
</div>
</div>
</div>
<div class="card menu">
<ul class="nav">
<li <?php get_section( 'section', 'gateways' ) == 'users' && print 'class="table-active"'?> onclick="location.href = '<?php echo set_url_section(get_url( 2 ),'section','users')?>';">
<a><?php echo $Translate->translate('module_page_lk_impulse','_UsersList')?></a>
<a><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_UsersList')?></a>
</li>
<li <?php get_section( 'section', 'gateways' ) == 'gateways' && print 'class="table-active"'?> onclick="location.href = '<?php echo set_url_section(get_url( 2 ),'section','gateways')?>';">
<a><?php echo $Translate->translate('module_page_lk_impulse','_SettingsGateways')?></a>
<a><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_SettingsGateways')?></a>
</li>
<li <?php get_section( 'section', 'gateways' ) == 'payments' && print 'class="table-active"'?> onclick="location.href = '<?php echo set_url_section(get_url( 2 ),'section','payments')?>';">
<a><?php echo $Translate->translate('module_page_lk_impulse','_PaymentsList')?></a>
<a><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_PaymentsList')?></a>
</li>
<li <?php get_section( 'section', 'gateways' ) == 'promocodes' && print 'class="table-active"'?> onclick="location.href = '<?php echo set_url_section(get_url( 2 ),'section','promocodes')?>';">
<a><?php echo $Translate->translate('module_page_lk_impulse','_Promo')?></a>
<a><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_Promo')?></a>
</li>
<li <?php get_section( 'section', 'gateways' ) == 'logs' && print 'class="table-active"'?> onclick="location.href = '<?php echo set_url_section(get_url( 2 ),'section','logs')?>';">
<a><?php echo $Translate->translate('module_page_lk_impulse','_Logs')?></a>
<a><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_Logs')?></a>
</li>
</ul>
</div>
Expand All @@ -55,14 +55,14 @@
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h5 class="badge"><i class="zmdi zmdi-money zmdi-hc-fw"></i> <?php echo $Translate->translate('module_page_lk_impulse','_LK')?></h5>
<h5 class="badge"><i class="zmdi zmdi-money zmdi-hc-fw"></i> <?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_LK')?></h5>
<div style="position: absolute;top: 15px;right: 15px;text-align: center;" id="profile"></div>
</div>
<div class="col-10 col-md-8 align-center">
<form id="pay" data-default="true" enctype="multipart/form-data" method="post">
<?php if(!empty($Gateways)):
if(COUNT($Gateways)>1 || $Gateways[0]['id'] == 5):?>
<div class="input-form text-center"><div style="margin-bottom: 10px;" class="input_text text-left"><?php echo $Translate->translate('module_page_lk_impulse','_ChangeGateway')?></div>
<div class="input-form text-center"><div style="margin-bottom: 10px;" class="input_text text-left"><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_ChangeGateway')?></div>
<?php foreach($Gateways as $info):?>
<input type="radio" name="gatewayPay" value="<?php echo mb_strtolower($info['name_kassa'])?>" id="Gateway<?=$info['id']?>" class="gateways">
<label for="Gateway<?=$info['id']?>" style="background: url('<?php echo $General->arr_general['site'] . MODULES ?>module_page_lk_impulse/assets/gateways/<?php echo mb_strtolower($info['name_kassa'])?>.svg') no-repeat;background-position: center;" class="gateways-label"></label>
Expand All @@ -82,18 +82,18 @@
<div class="input-form"><div class="input_text">STEAM ID:</div><input name="steam" placeholder="STEAM_1:1:390... / 7656119803... / [U:1:1234234] / https://steamcommunity.com/profiles/... "></div>
<?php endif?>
<div class="input-form">
<div class="input_text"><?php echo $Translate->translate('module_page_lk_impulse','_ToUpAmount')?></div>
<div class="input_text"><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_ToUpAmount')?></div>
<input name="amount">
</div>
<div class="input-form">
<div class="input_text"><?php echo $Translate->translate('module_page_lk_impulse','_Promo')?></div>
<div class="input_text"><?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_Promo')?></div>
<input name="promocode">
</div>
<div class="input-form" id="promoresult"></div>
</form>
</div>
<div class="card-bottom text-center padding-botom-20">
<input class="btn" form="pay" type="submit" value="<?php echo $Translate->translate('module_page_lk_impulse','_ButtonPay')?>"></h5>
<input class="btn" form="pay" type="submit" value="<?php echo $Translate->get_translate_module_phrase('module_page_lk_impulse','_ButtonPay')?>"></h5>
</div>
<br>
<div style="display: none;" id="resultForm"></div>
Expand Down
Loading