mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 16:57:08 +00:00
feat: update terminology and descriptions in luci
This commit is contained in:
parent
82c9d7ebc8
commit
7a483ec09d
@ -65,7 +65,7 @@ function M.add_general_fields(section)
|
|||||||
rewrite_mode:value("RULES", translate("Rule Based"))
|
rewrite_mode:value("RULES", translate("Rule Based"))
|
||||||
rewrite_mode.default = "GLOBAL"
|
rewrite_mode.default = "GLOBAL"
|
||||||
rewrite_mode.description = translate(
|
rewrite_mode.description = translate(
|
||||||
"Direct Forward: No rewriting. Global Rewrite: Rewrite all User-Agents to the specified value. Rule Based: Use rewrite rules to determine behavior.")
|
"Direct Forward: No rewriting. Global Rewrite: Rewrite all User-Agents. Rule Based: Use rewrite rules to determine behavior.")
|
||||||
|
|
||||||
-- User-Agent (for Global Rewrite)
|
-- User-Agent (for Global Rewrite)
|
||||||
local ua = section:taboption("general", Value, "ua", translate("User-Agent"))
|
local ua = section:taboption("general", Value, "ua", translate("User-Agent"))
|
||||||
|
|||||||
@ -57,11 +57,11 @@ local rules_data = uci:get("ua3f", "main", "rewrite_rules") or "[]"
|
|||||||
<tr class="tr table-titles">
|
<tr class="tr table-titles">
|
||||||
<th class="th" style="width: 50px; text-align: center"><%:Enabled%></th>
|
<th class="th" style="width: 50px; text-align: center"><%:Enabled%></th>
|
||||||
<th class="th" style="width: 50px"><%:Index%></th>
|
<th class="th" style="width: 50px"><%:Index%></th>
|
||||||
<th class="th" style="width: 95px"><%:Rule Type%></th>
|
<th class="th" style="width: 95px"><%:Type%></th>
|
||||||
<th class="th" style="width: 120px"><%:Rewrite Header%></th>
|
<th class="th" style="width: 120px"><%:Rewrite Header%></th>
|
||||||
<th class="th"><%:Match Value%></th>
|
<th class="th"><%:Match Value%></th>
|
||||||
<th class="th" style="width: 100px"><%:Rewrite Action%></th>
|
<th class="th" style="width: 100px"><%:Action%></th>
|
||||||
<th class="th"><%:Rewrite Value%></th>
|
<th class="th"><%:Value%></th>
|
||||||
<th class="th" style="width: 280px"><%:Actions%></th>
|
<th class="th" style="width: 280px"><%:Actions%></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tbody id="rulesTableBody"></tbody>
|
<tbody id="rulesTableBody"></tbody>
|
||||||
@ -253,7 +253,7 @@ local rules_data = uci:get("ua3f", "main", "rewrite_rules") or "[]"
|
|||||||
var upBtn = document.createElement('button');
|
var upBtn = document.createElement('button');
|
||||||
upBtn.type = 'button';
|
upBtn.type = 'button';
|
||||||
upBtn.className = 'cbi-button cbi-button-neutral';
|
upBtn.className = 'cbi-button cbi-button-neutral';
|
||||||
upBtn.textContent = '<%:Move Up%>';
|
upBtn.textContent = '<%:Up%>';
|
||||||
upBtn.disabled = index === 0;
|
upBtn.disabled = index === 0;
|
||||||
upBtn.onclick = function() { rewriteRules.moveRuleUp(index); };
|
upBtn.onclick = function() { rewriteRules.moveRuleUp(index); };
|
||||||
td8.appendChild(upBtn);
|
td8.appendChild(upBtn);
|
||||||
@ -263,7 +263,7 @@ local rules_data = uci:get("ua3f", "main", "rewrite_rules") or "[]"
|
|||||||
var downBtn = document.createElement('button');
|
var downBtn = document.createElement('button');
|
||||||
downBtn.type = 'button';
|
downBtn.type = 'button';
|
||||||
downBtn.className = 'cbi-button cbi-button-neutral';
|
downBtn.className = 'cbi-button cbi-button-neutral';
|
||||||
downBtn.textContent = '<%:Move Down%>';
|
downBtn.textContent = '<%:Down%>';
|
||||||
// Can't move down if it's the second-to-last (because last is FINAL)
|
// Can't move down if it's the second-to-last (because last is FINAL)
|
||||||
downBtn.disabled = index >= this.rules.length - 2;
|
downBtn.disabled = index >= this.rules.length - 2;
|
||||||
downBtn.onclick = function() { rewriteRules.moveRuleDown(index); };
|
downBtn.onclick = function() { rewriteRules.moveRuleDown(index); };
|
||||||
@ -348,7 +348,7 @@ local rules_data = uci:get("ua3f", "main", "rewrite_rules") or "[]"
|
|||||||
typeValue.className = 'cbi-value';
|
typeValue.className = 'cbi-value';
|
||||||
var typeLabel = document.createElement('label');
|
var typeLabel = document.createElement('label');
|
||||||
typeLabel.className = 'cbi-value-title';
|
typeLabel.className = 'cbi-value-title';
|
||||||
typeLabel.textContent = '<%:Rule Type%>';
|
typeLabel.textContent = '<%:Type%>';
|
||||||
typeValue.appendChild(typeLabel);
|
typeValue.appendChild(typeLabel);
|
||||||
var typeField = document.createElement('div');
|
var typeField = document.createElement('div');
|
||||||
typeField.className = 'cbi-value-field';
|
typeField.className = 'cbi-value-field';
|
||||||
@ -421,7 +421,7 @@ local rules_data = uci:get("ua3f", "main", "rewrite_rules") or "[]"
|
|||||||
actionValue.className = 'cbi-value';
|
actionValue.className = 'cbi-value';
|
||||||
var actionLabel = document.createElement('label');
|
var actionLabel = document.createElement('label');
|
||||||
actionLabel.className = 'cbi-value-title';
|
actionLabel.className = 'cbi-value-title';
|
||||||
actionLabel.textContent = '<%:Rewrite Action%>';
|
actionLabel.textContent = '<%:Action%>';
|
||||||
actionValue.appendChild(actionLabel);
|
actionValue.appendChild(actionLabel);
|
||||||
var actionField = document.createElement('div');
|
var actionField = document.createElement('div');
|
||||||
actionField.className = 'cbi-value-field';
|
actionField.className = 'cbi-value-field';
|
||||||
|
|||||||
@ -14,7 +14,7 @@ local rowstyle = data.rowstyle
|
|||||||
<table id="rewrite-stats-table" class="table cbi-section-table">
|
<table id="rewrite-stats-table" class="table cbi-section-table">
|
||||||
<tr class="tr table-titles">
|
<tr class="tr table-titles">
|
||||||
<th class="th" data-sortable-row="true"><%:Host%></th>
|
<th class="th" data-sortable-row="true"><%:Host%></th>
|
||||||
<th class="th" data-sortable-row="true"><%:Rewrite Count%></th>
|
<th class="th" data-sortable-row="true"><%:Count%></th>
|
||||||
<th class="th" data-sortable-row="true"><%:Original Header%></th>
|
<th class="th" data-sortable-row="true"><%:Original Header%></th>
|
||||||
<th class="th" data-sortable-row="true"><%:Modified Header%></th>
|
<th class="th" data-sortable-row="true"><%:Modified Header%></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -22,7 +22,7 @@ local rowstyle = data.rowstyle
|
|||||||
<% for i, item in ipairs(rewrite_stats) do %>
|
<% for i, item in ipairs(rewrite_stats) do %>
|
||||||
<tr class="tr <%= rowstyle(i) %>">
|
<tr class="tr <%= rowstyle(i) %>">
|
||||||
<td class="td" data-title="<%:Host%>"><span><%= item.host %></span></td>
|
<td class="td" data-title="<%:Host%>"><span><%= item.host %></span></td>
|
||||||
<td class="td" data-title="<%:Rewrite Count%>"><%= item.count %></td>
|
<td class="td" data-title="<%:Count%>"><%= item.count %></td>
|
||||||
<td class="td" data-title="<%:Original Header%>"><span><%= item.origin_ua %></span></td>
|
<td class="td" data-title="<%:Original Header%>"><span><%= item.origin_ua %></span></td>
|
||||||
<td class="td" data-title="<%:Modified Header%>"><span><%= item.mocked_ua %></span></td>
|
<td class="td" data-title="<%:Modified Header%>"><span><%= item.mocked_ua %></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -34,7 +34,7 @@ local rowstyle = data.rowstyle
|
|||||||
<table id="pass-stats-table" class="table cbi-section-table">
|
<table id="pass-stats-table" class="table cbi-section-table">
|
||||||
<tr class="tr table-titles">
|
<tr class="tr table-titles">
|
||||||
<th class="th" data-sortable-row="true"><%:Header%></th>
|
<th class="th" data-sortable-row="true"><%:Header%></th>
|
||||||
<th class="th" data-sortable-row="true"><%:Pass-Through Count%></th>
|
<th class="th" data-sortable-row="true"><%:Count%></th>
|
||||||
<th class="th" data-sortable-row="true"><%:Last Source Address%></th>
|
<th class="th" data-sortable-row="true"><%:Last Source Address%></th>
|
||||||
<th class="th" data-sortable-row="true"><%:Last Destination Address%></th>
|
<th class="th" data-sortable-row="true"><%:Last Destination Address%></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -42,7 +42,7 @@ local rowstyle = data.rowstyle
|
|||||||
<% for i, item in ipairs(pass_stats) do %>
|
<% for i, item in ipairs(pass_stats) do %>
|
||||||
<tr class="tr <%= rowstyle(i) %>">
|
<tr class="tr <%= rowstyle(i) %>">
|
||||||
<td class="td" data-title="<%:Header%>"><span><%= item.ua %></span></td>
|
<td class="td" data-title="<%:Header%>"><span><%= item.ua %></span></td>
|
||||||
<td class="td" data-title="<%:Pass-Through Count%>"><%= item.count %></td>
|
<td class="td" data-title="<%:Count%>"><%= item.count %></td>
|
||||||
<td class="td" data-title="<%:Last Source Address%>"><span><%= item.srcAddr %></span></td>
|
<td class="td" data-title="<%:Last Source Address%>"><span><%= item.srcAddr %></span></td>
|
||||||
<td class="td" data-title="<%:Last Destination Address%>"><span><%= item.destAddr %></span></td>
|
<td class="td" data-title="<%:Last Destination Address%>"><span><%= item.destAddr %></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -56,7 +56,7 @@ msgstr "全局重写"
|
|||||||
msgid "Rule Based"
|
msgid "Rule Based"
|
||||||
msgstr "规则判定"
|
msgstr "规则判定"
|
||||||
|
|
||||||
msgid "Direct Forward: No rewriting. Global Rewrite: Rewrite all User-Agents to the specified value. Rule Based: Use rewrite rules to determine behavior."
|
msgid "Direct Forward: No rewriting. Global Rewrite: Rewrite all User-Agents. Rule Based: Use rewrite rules to determine behavior."
|
||||||
msgstr "直接转发:不进行任何重写。全局重写:将所有 User-Agent 重写为指定值。规则判定:根据重写规则判定行为。"
|
msgstr "直接转发:不进行任何重写。全局重写:将所有 User-Agent 重写为指定值。规则判定:根据重写规则判定行为。"
|
||||||
|
|
||||||
msgid "User-Agent"
|
msgid "User-Agent"
|
||||||
@ -89,8 +89,8 @@ msgstr "重写次数实时统计"
|
|||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr "地址"
|
msgstr "地址"
|
||||||
|
|
||||||
msgid "Rewrite Count"
|
msgid "Count"
|
||||||
msgstr "重写次数"
|
msgstr "次数"
|
||||||
|
|
||||||
msgid "Original Header"
|
msgid "Original Header"
|
||||||
msgstr "原始 Header"
|
msgstr "原始 Header"
|
||||||
@ -101,9 +101,6 @@ msgstr "重写后 Header"
|
|||||||
msgid "Pass-Through Statistics"
|
msgid "Pass-Through Statistics"
|
||||||
msgstr "放行次数实时统计"
|
msgstr "放行次数实时统计"
|
||||||
|
|
||||||
msgid "Pass-Through Count"
|
|
||||||
msgstr "放行次数"
|
|
||||||
|
|
||||||
msgid "Last Source Address"
|
msgid "Last Source Address"
|
||||||
msgstr "最近访问源地址"
|
msgstr "最近访问源地址"
|
||||||
|
|
||||||
@ -155,13 +152,13 @@ msgstr "添加规则"
|
|||||||
msgid "Index"
|
msgid "Index"
|
||||||
msgstr "序号"
|
msgstr "序号"
|
||||||
|
|
||||||
msgid "Rule Type"
|
msgid "Type"
|
||||||
msgstr "规则类型"
|
msgstr "类型"
|
||||||
|
|
||||||
msgid "Match Value"
|
msgid "Match Value"
|
||||||
msgstr "匹配值"
|
msgstr "匹配值"
|
||||||
|
|
||||||
msgid "Rewrite Action"
|
msgid "Action"
|
||||||
msgstr "重写策略"
|
msgstr "重写策略"
|
||||||
|
|
||||||
msgid "Rewrite Value"
|
msgid "Rewrite Value"
|
||||||
@ -209,10 +206,10 @@ msgstr "保存"
|
|||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr "编辑"
|
msgstr "编辑"
|
||||||
|
|
||||||
msgid "Move Up"
|
msgid "Up"
|
||||||
msgstr "上移"
|
msgstr "上移"
|
||||||
|
|
||||||
msgid "Move Down"
|
msgid "Down"
|
||||||
msgstr "下移"
|
msgstr "下移"
|
||||||
|
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user