Browse Source

add translation for filter forms

rajven 3 years ago
parent
commit
76d0949884

+ 13 - 13
html/admin/filters/editfilter.php

@@ -27,16 +27,16 @@ print_filters_submenu($page_url);
 
 print "<div id=cont>";
 
-print "<br> <b>Фильтр</b> <br>";
+print "<br> <b>".WEB_title_filter."</b> <br>";
 
 print "<form name=def action='editfilter.php?id=".$id."' method=post>";
 print "<input type=hidden name=id value=$id>";
 
 if (isset($filter['type']) and $filter['type'] == 0) {
     print "<table class=\"data\" cellspacing=\"0\" cellpadding=\"4\">";
-    print "<tr><td><b>Имя</b></td>";
-    print "<td ><b>Комментарий</b></td>";
-    print "<td ><b>Действие</b></td>";
+    print "<tr><td><b>".WEB_cell_forename."</b></td>";
+    print "<td ><b>".WEB_cell_comment."</b></td>";
+    print "<td ><b>".WEB_traffic_action."</b></td>";
     print "</tr>";
     print "<tr>";
     print "<td align=left><input type=text name=f_name value='".$filter['name']."'></td>";
@@ -44,13 +44,13 @@ if (isset($filter['type']) and $filter['type'] == 0) {
     print "<td>";
     print_action_select('f_action', $filter['action']);
     print "</td>";
-    print "<td><input type=submit name=editfilter value=Сохранить></td>";
+    print "<td><input type=submit name=editfilter value='".WEB_btn_save."'></td>";
     print "</tr>";
     print "<tr>";
-    print "<td ><b>Протокол</b></td>";
-    print "<td ><b>Адрес назначения</b></td>";
-    print "<td ><b>Порт назначения</b></td>";
-    print "<td ><b>Порт источник</b></td>";
+    print "<td ><b>".WEB_traffic_proto."</b></td>";
+    print "<td ><b>".WEB_traffic_dest_address."</b></td>";
+    print "<td ><b>".WEB_traffic_dst_port."</b></td>";
+    print "<td ><b>".WEB_traffic_src_port."</b></td>";
     print "</tr>";
     print "<tr>";
     print "<td ><input type=text name=f_proto value='".$filter['proto']."'></td>";
@@ -61,10 +61,10 @@ if (isset($filter['type']) and $filter['type'] == 0) {
     print "</table>";
 } else {
     print "<table class=\"data\" cellspacing=\"0\" cellpadding=\"4\">";
-    print "<tr><td><b>Имя</b></td>";
-    print "<td ><b>Комментарий</b></td>";
-    print "<td ><b>Действие</b></td>";
-    print "<td><input type=submit name=editfilter value=Сохранить></td>";
+    print "<tr><td><b>".WEB_cell_forename."</b></td>";
+    print "<td ><b>".WEB_cell_comment."</b></td>";
+    print "<td ><b>".WEB_traffic_action."</b></td>";
+    print "<td><input type=submit name=editfilter value=".WEB_btn_save."></td>";
     print "</tr>";
     print "<tr>";
     print "<td align=left><input type=text name=f_name value='".$filter['name']."'></td>";

+ 12 - 14
html/admin/filters/editgroup.php

@@ -55,28 +55,28 @@ print_filters_submenu($page_url);
 require_once ($_SERVER['DOCUMENT_ROOT']."/inc/header.php");
 ?>
 <div id="cont">
-<br> <b>Группа</b> <br>
+<br> <b><?php echo WEB_title_group; ?></b> <br>
 
 <form name="def" action="editgroup.php?id=<?php echo $id; ?>" method="post">
 <input type="hidden" name="id" value=<?php echo $id; ?>>
 <table class="data">
 <tr>
-<td>Название</td>
+<td><?php echo WEB_cell_name; ?></td>
 <td><input type="text" name="f_group_name" value="<?php echo $group['group_name']; ?>"></td>
-<td>Комментарий</td>
+<td><?php echo WEB_cell_comment; ?></td>
 <td><input type="text" name="f_group_comment" value="<?php echo $group['comment']; ?>"></td>
 </tr>
 <tr>
-<td colspan=2><input type="submit" name="editgroup"	value="Сохранить"></td>
+<td colspan=2><input type="submit" name="editgroup"	value="<?php echo WEB_btn_save; ?>"></td>
 </tr>
 </table>
-<br> <b>Список фильтров группы</b><br>
+<br> <b><?php echo WEB_groups_filter_list; ?></b><br>
 <table class="data">
 <tr>
 <td><input type="checkbox" onClick="checkAll(this.checked);"></td>
-<td>Order</td>
-<td>Название фильтра</td>
-<td align="right"><input type="submit" onclick="return confirm('Удалиьт фильтр?')" name="removefilter" value="Удалить"></td>
+<td><?php echo WEB_group_filter_order; ?></td>
+<td><?php echo WEB_group_filter_name; ?></td>
+<td align="right"><input type="submit" onclick="return confirm('<?php echo WEB_msg_delete_filter; ?>?')" name="removefilter" value="<?php echo WEB_btn_delete; ?>"></td>
 </tr>
 
 <?php
@@ -92,12 +92,10 @@ foreach ($flist as $row) {
 }
 ?>
 </table>
-<table>
-<tr>
-<td><input type="submit" name="addfilter" value="Добавить фильтр"> <?php print_filter_select($db_link, 'newfilter', $id); ?> </td>
-<td align="right"><input type="submit" name="saveorder" value="Применить порядок"></td>
-</tr>
-</table>
+<div>
+<input type="submit" name="addfilter" value="<?php echo WEB_msg_add_filter; ?>"> <?php print_filter_select($db_link, 'newfilter', $id); ?>
+<input type="submit" name="saveorder" value="<?php echo WEB_btn_reorder; ?>">
+</div>
 </form>
 <?php
 require_once ($_SERVER['DOCUMENT_ROOT']."/inc/footer.php");

+ 7 - 9
html/admin/filters/groups.php

@@ -34,8 +34,8 @@ print_filters_submenu($page_url);
 <tr align="center">
 	<td><input type="checkbox" onClick="checkAll(this.checked);"></td>
 	<td><b>Id</b></td>
-	<td width=200><b>Название</b></td>
-	<td width=200><b>Комментарий</b></td>
+	<td width=200><b><?php echo WEB_cell_name; ?></b></td>
+	<td width=200><b><?php echo WEB_cell_comment; ?></b></td>
 </tr>
 <?php
 $groups = get_records_sql($db_link,'SELECT * FROM Group_list ORDER BY id');
@@ -48,13 +48,11 @@ foreach ($groups as $row) {
 }
 ?>
 </table>
-<table class="data">
-	<tr align=left>
-		<td>Название <input type=text name=newgroup value="Unknown"></td>
-		<td><input type="submit" name="create" value="Добавить"></td>
-		<td align="right"><input type="submit" onclick="return confirm('Удалить?')" name="remove" value="Удалить"></td>
-		</tr>
-	</table>
+<div>
+<?php echo WEB_cell_name; ?><input type=text name=newgroup value="Unknown">
+<input type="submit" name="create" value="<?php echo WEB_btn_add; ?>">
+<input type="submit" onclick="return confirm('<?php echo WEB_msg_delete; ?>?')" name="remove" value="<?php echo WEB_btn_delete; ?>">
+</div>
 </form>
 <?php
 require_once ($_SERVER['DOCUMENT_ROOT']."/inc/footer.php");

+ 16 - 18
html/admin/filters/index.php

@@ -38,14 +38,14 @@ print_filters_submenu($page_url);
 	<tr align="center">
 		<td><input type="checkbox" onClick="checkAll(this.checked);"></td>
 		<td><b>id</b></td>
-		<td><b>Имя</b></td>
-		<td><b>Тип</b></td>
-		<td><b>Протокол</b></td>
-		<td><b>Адрес назначения</b></td>
-		<td><b>Порт назначения</b></td>
-		<td><b>Порт источник</b></td>
-		<td><b>Действие</b></td>
-		<td><b>Комментарий</b></td>
+		<td><b><?php echo WEB_cell_forename; ?></b></td>
+		<td><b><?php echo WEB_cell_type; ?></b></td>
+		<td><b><?php echo WEB_traffic_proto; ?></b></td>
+		<td><b><?php echo WEB_traffic_dest_address; ?></b></td>
+		<td><b><?php echo WEB_traffic_dst_port; ?></b></td>
+		<td><b><?php echo WEB_traffic_src_port; ?></b></td>
+		<td><b><?php echo WEB_traffic_action; ?></b></td>
+		<td><b><?php echo WEB_cell_comment; ?></b></td>
 	</tr>
 <?php
 $filters = get_records_sql($db_link,'SELECT * FROM Filter_list ORDER BY name');
@@ -80,18 +80,16 @@ foreach ($filters as $row) {
 }
 ?>
 </table>
-<table class="data">
-	<tr align=left>
-	<td>Название <input type=text name=newfilter value="Unknown"></td>
-	<td>Тип фильтра <select name="filter_type" disabled=true>
+<div>
+<?php echo WEB_cell_name; ?>
+<input type=text name=newfilter value="Unknown">
+<?php echo Web_filter_type; ?>
+<select name="filter_type" disabled=true>
 	<option value=0 selected>IP фильтр</option>
 	<option value=1>Name фильтр</option>
-	</select>
-	</td>
-	<td><input type="submit" name="create" value="Добавить"></td>
-	<td align="right"><input type="submit" onclick="return confirm('Удалить?')" name="remove" value="Удалить"></td>
-	</tr>
-	</table>
+</select>
+<input type="submit" name="create" value="<?php echo WEB_btn_add; ?>">
+<input type="submit" onclick="return confirm('<?php echo WEB_msg_delete; ?>?')" name="remove" value="<?php echo WEB_btn_delete; ?>">
 </form>
 <?php
 require_once ($_SERVER['DOCUMENT_ROOT']."/inc/footer.php");

+ 20 - 0
html/inc/languages/russian.php

@@ -42,6 +42,8 @@ define("WEB_msg_internet","Интернет");
 define("WEB_msg_delete","Удалить");
 define("WEB_msg_additional","Дополнительно");
 define("WEB_msg_unsupported","Не поддерживается");
+define("WEB_msg_delete_filter","Удалить фильтр");
+define("WEB_msg_add_filter", "Добавить фильтр");
 
 /* SNMP */
 define("WEB_snmp_version","SNMP version");
@@ -192,6 +194,7 @@ define("WEB_cell_type","Тип");
 define("WEB_cell_skip","Пропустить");
 define("WEB_cell_vlan","Vlan");
 define("WEB_cell_mac_count","Mac count");
+define("WEB_cell_forename","Имя");
 
 /* lists name */
 define("WEB_list_ou","Список групп");
@@ -218,6 +221,7 @@ define("WEB_btn_refresh","Обновить");
 define("WEB_btn_delete","Удалить");
 define("WEB_btn_apply","Применить");
 define("WEB_btn_show","Показать");
+define("WEB_btn_reorder","Применить порядок");
 
 /* control options */
 define("WEB_config_remove_option","Удалён параметр");
@@ -354,4 +358,20 @@ define("WEB_device_port_off","Выключить порт");
 define("WEB_device_poe_on","Включить POE");
 define("WEB_device_poe_off","Выключить POE");
 
+/* edit filter */
+define("WEB_title_filter","Фильтр");
+define("Web_filter_type","Тип фильтра");
+define("WEB_traffic_action","Действие");
+define("WEB_traffic_dest_address","Адрес назначения");
+define("WEB_traffic_source_address","Адрес источника");
+define("WEB_traffic_proto","Протокол");
+define("WEB_traffic_src_port","Порт источник");
+define("WEB_traffic_dst_port","Порт назначения");
+
+/* edit group filters */
+define("WEB_title_group","Группа");
+define("WEB_groups_filter_list","Список фильтров группы");
+define("WEB_group_filter_order","Порядок правил");
+define("WEB_group_filter_name","Название фильтра");
+
 ?>