~修复多语言化导致的一系列显示错误
This commit is contained in:
@@ -265,6 +265,7 @@ set_redir_mod() {
|
||||
[ -z "$firewall_area" ] && firewall_area=1
|
||||
[ "$firewall_area" = 4 ] && redir_mod="$MENU_PURE_MOD"
|
||||
[ -z "$redir_mod" ] && redir_mod='Redir'
|
||||
[ -z "$vm_redir" ] && vm_redir='OFF'
|
||||
firewall_area_dsc=$(echo "$SET_FW_AREA_DESC($bypass_host)" | cut -d'|' -f$firewall_area)
|
||||
comp_box "\033[33m$SET_REDIR_RESTART_HINT\033[0m" \
|
||||
"$SET_REDIR_CURRENT\033[47;30m$redir_mod$MENU_MOD\033[0m; $SET_CORE_CURRENT\033[47;30m$crashcore\033[0m"
|
||||
@@ -550,7 +551,6 @@ set_adv_config() {
|
||||
|
||||
set_firewall_area() {
|
||||
while true; do
|
||||
[ -z "$vm_redir" ] && vm_redir='OFF'
|
||||
comp_box "\033[33m$FW_AREA_NOTE_1\033[0m" \
|
||||
"\033[33m$FW_AREA_NOTE_2\033[0m" \
|
||||
"" \
|
||||
|
||||
@@ -19,9 +19,9 @@ ssh_tools() {
|
||||
[ -z "$ssh_port" ] && ssh_port=10022
|
||||
comp_box "\033[33m$TOOLS_SSH_ONLY_OPENWRT\033[0m" \
|
||||
"\033[31m$TOOLS_SSH_UNSUPPORTED_SYSTEM\033[0m"
|
||||
btm_box "$TOOLS_SSH_PORT_ITEM" \
|
||||
btm_box "${TOOLS_SSH_PORT_ITEM_PREFIX}\033[36m$ssh_port\033[0m${TOOLS_SSH_PORT_ITEM_SUFFIX}" \
|
||||
"$TOOLS_SSH_PASS_ITEM" \
|
||||
"$TOOLS_SSH_TOGGLE_ITEM" \
|
||||
"${TOOLS_SSH_TOGGLE_ITEM_PREFIX}\033[33m$ssh_ol\033[0m${TOOLS_SSH_TOGGLE_ITEM_SUFFIX}" \
|
||||
"" \
|
||||
"0) $COMMON_BACK \033[0m"
|
||||
read -r -p "$COMMON_INPUT> " num
|
||||
@@ -88,9 +88,9 @@ tools() {
|
||||
content_line "$TOOLS_MENU_GUIDE_ITEM"
|
||||
content_line "$TOOLS_MENU_LOG_ITEM"
|
||||
[ -f /etc/firewall.user ] && content_line "$TOOLS_MENU_SSH_ITEM"
|
||||
[ -x /usr/sbin/otapredownload ] && content_line "$TOOLS_MENU_MI_UPDATE_ITEM"
|
||||
[ "$systype" = "mi_snapshot" ] && content_line "$TOOLS_MENU_MI_AUTO_SSH_ITEM"
|
||||
[ "$systype" = "mi_snapshot" ] && content_line "$TOOLS_MENU_MI_TUN_FIX_ITEM"
|
||||
[ -x /usr/sbin/otapredownload ] && content_line "${TOOLS_MENU_MI_UPDATE_ITEM_PREFIX}\033[33m$mi_update\033[0m${TOOLS_MENU_MI_UPDATE_ITEM_SUFFIX}"
|
||||
[ "$systype" = "mi_snapshot" ] && content_line "${TOOLS_MENU_MI_AUTO_SSH_ITEM_PREFIX}\033[$mi_mi_autoSSH_type \033[0m${TOOLS_MENU_MI_AUTO_SSH_ITEM_SUFFIX}"
|
||||
[ "$systype" = "mi_snapshot" ] && content_line "${TOOLS_MENU_MI_TUN_FIX_ITEM_PREFIX}\033[$mi_tunfix \033[0m${TOOLS_MENU_MI_TUN_FIX_ITEM_SUFFIX}"
|
||||
btm_box "" \
|
||||
"0) $COMMON_BACK"
|
||||
read -r -p "$COMMON_INPUT> " num
|
||||
@@ -123,7 +123,8 @@ tools() {
|
||||
sed -i "/^\s*#.*otapredownload/ s/^\s*#//" /etc/crontabs/root ||
|
||||
echo "15 3,4,5 * * * /usr/sbin/otapredownload >/dev/null 2>&1" >>/etc/crontabs/root
|
||||
fi
|
||||
msg_alert "\033[32m$TOOLS_MI_UPDATE_MSG"
|
||||
[ "$mi_update" = "$TOOLS_DISABLE" ] && mi_update=$TOOLS_ENABLE || mi_update=$TOOLS_DISABLE
|
||||
msg_alert "\033[32m${TOOLS_MI_UPDATE_MSG_PREFIX}\033[33m$mi_update\033[0m${TOOLS_MI_UPDATE_MSG_SUFFIX}\033[0m"
|
||||
fi
|
||||
;;
|
||||
6)
|
||||
@@ -227,17 +228,17 @@ log_pusher() {
|
||||
[ -n "$push_Gotify" ] && stat_Gotify=32mON || stat_Gotify=33mOFF
|
||||
[ "$task_push" = 1 ] && stat_task=32mON || stat_task=33mOFF
|
||||
[ -n "$device_name" ] && device_s=32m$device_name || device_s=33m$COMMON_UNSET
|
||||
comp_box "$TOOLS_LOG_TG" \
|
||||
"$TOOLS_LOG_DEER" \
|
||||
"$TOOLS_LOG_BARK" \
|
||||
"$TOOLS_LOG_PO" \
|
||||
"$TOOLS_LOG_PP" \
|
||||
"$TOOLS_LOG_SYNO" \
|
||||
"$TOOLS_LOG_GOTIFY" \
|
||||
comp_box "${TOOLS_LOG_TG_PREFIX}\033[$stat_TG\033[0m${TOOLS_LOG_TG_SUFFIX}" \
|
||||
"${TOOLS_LOG_DEER_PREFIX}\033[$stat_Deer\033[0m${TOOLS_LOG_DEER_SUFFIX}" \
|
||||
"${TOOLS_LOG_BARK_PREFIX}\033[$stat_bark\033[0m${TOOLS_LOG_BARK_SUFFIX}" \
|
||||
"${TOOLS_LOG_PO_PREFIX}\033[$stat_Po\033[0m${TOOLS_LOG_PO_SUFFIX}" \
|
||||
"${TOOLS_LOG_PP_PREFIX}\033[$stat_PP\033[0m${TOOLS_LOG_PP_SUFFIX}" \
|
||||
"${TOOLS_LOG_SYNO_PREFIX}\033[$stat_SynoChat\033[0m${TOOLS_LOG_SYNO_SUFFIX}" \
|
||||
"${TOOLS_LOG_GOTIFY_PREFIX}\033[$stat_Gotify\033[0m${TOOLS_LOG_GOTIFY_SUFFIX}" \
|
||||
"" \
|
||||
"$TOOLS_LOG_VIEW" \
|
||||
"$TOOLS_LOG_TASK" \
|
||||
"$TOOLS_LOG_DEVICE" \
|
||||
"${TOOLS_LOG_TASK_PREFIX}\033[$stat_task\033[0m${TOOLS_LOG_TASK_SUFFIX}" \
|
||||
"${TOOLS_LOG_DEVICE_PREFIX}\033[$device_s\033[0m${TOOLS_LOG_DEVICE_SUFFIX}" \
|
||||
"$TOOLS_LOG_CLEAR" \
|
||||
"" \
|
||||
"0) $COMMON_BACK"
|
||||
@@ -685,18 +686,18 @@ testcommand() {
|
||||
debug() {
|
||||
echo "$crashcore" | grep -q 'singbox' && config_tmp="$TMPDIR"/jsons || config_tmp="$TMPDIR"/config.yaml
|
||||
comp_box "\033[36m$TOOLS_DEBUG_WARN1\033[0m" \
|
||||
"$TOOLS_DEBUG_WARN2" \
|
||||
"${TOOLS_DEBUG_WARN2_PREFIX}\033[32m$TMPDIR/debug.log\033[0m${TOOLS_DEBUG_WARN2_SUFFIX}" \
|
||||
"$TOOLS_DEBUG_WARN3" \
|
||||
"$TOOLS_DEBUG_WARN4"
|
||||
content_line "$TOOLS_DEBUG_ITEM_1"
|
||||
content_line "$TOOLS_DEBUG_ITEM_2"
|
||||
content_line "${TOOLS_DEBUG_ITEM_1_PREFIX}\033[32m$config_tmp\033[0m${TOOLS_DEBUG_ITEM_1_SUFFIX}"
|
||||
content_line "${TOOLS_DEBUG_ITEM_2_PREFIX}\033[32m$config_tmp\033[0m${TOOLS_DEBUG_ITEM_2_SUFFIX}"
|
||||
content_line "$TOOLS_DEBUG_ITEM_3"
|
||||
content_line "$TOOLS_DEBUG_ITEM_4"
|
||||
content_line "$TOOLS_DEBUG_ITEM_5"
|
||||
content_line "$TOOLS_DEBUG_ITEM_6"
|
||||
content_line "${TOOLS_DEBUG_ITEM_6_PREFIX}\033[32m$CRASHDIR/debug.log\033[0m${TOOLS_DEBUG_ITEM_6_SUFFIX}"
|
||||
content_line ""
|
||||
content_line "$TOOLS_DEBUG_ITEM_8"
|
||||
[ -s "$TMPDIR"/jsons/inbounds.json ] && content_line "$TOOLS_DEBUG_ITEM_9"
|
||||
[ -s "$TMPDIR"/jsons/inbounds.json ] && content_line "${TOOLS_DEBUG_ITEM_9_PREFIX}\033[32m$config_tmp\033[0m${TOOLS_DEBUG_ITEM_9_SUFFIX}\033[32m$TMPDIR/debug.json\033[0m"
|
||||
btm_box "" \
|
||||
"0) $COMMON_BACK"
|
||||
read -r -p "$COMMON_INPUT> " num
|
||||
@@ -765,4 +766,3 @@ debug() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@@ -300,11 +300,11 @@ getcore() {
|
||||
# 获取在线内核文件
|
||||
line_break
|
||||
separator_line "="
|
||||
content_line "$UPG_GETTING_CORE_TEXT"
|
||||
content_line "${UPG_GETTING_CORE_TEXT_PREFIX}${crashcore}${UPG_GETTING_CORE_TEXT_SUFFIX}"
|
||||
core_webget
|
||||
case "$?" in
|
||||
0)
|
||||
content_line "\033[32m$UPG_CORE_DOWNLOAD_OK_TEXT\033[0m"
|
||||
content_line "\033[32m${UPG_CORE_DOWNLOAD_OK_TEXT_PREFIX}${crashcore}${UPG_CORE_DOWNLOAD_OK_TEXT_SUFFIX}\033[0m"
|
||||
separator_line "="
|
||||
sleep 1
|
||||
switch_core
|
||||
@@ -403,10 +403,10 @@ setcustcore() {
|
||||
separator_line "="
|
||||
content_line "$UPG_CUSTOM_CORE_SELECT"
|
||||
separator_line "-"
|
||||
btm_box "$UPG_CORE_MENU_1" \
|
||||
"$UPG_CORE_MENU_2" \
|
||||
"$UPG_CORE_MENU_3" \
|
||||
"$UPG_CORE_MENU_4" \
|
||||
btm_box "${UPG_CORE_MENU_1_PREFIX}${meta_v}${UPG_CORE_MENU_1_SUFFIX}" \
|
||||
"${UPG_CORE_MENU_2_PREFIX}${singboxr_v}${UPG_CORE_MENU_2_SUFFIX}" \
|
||||
"${UPG_CORE_MENU_3_PREFIX}${singbox_v}${UPG_CORE_MENU_3_SUFFIX}" \
|
||||
"${UPG_CORE_MENU_4_PREFIX}${clash_v}${UPG_CORE_MENU_4_SUFFIX}" \
|
||||
"$UPG_CORE_MENU_9" \
|
||||
"" \
|
||||
"0) $COMMON_BACK"
|
||||
@@ -506,22 +506,22 @@ setcore() {
|
||||
"" \
|
||||
"\033[33m$UPG_CORE_MENU_SELECT\033[0m"
|
||||
|
||||
content_line "$UPG_CORE_V1"
|
||||
content_line "${UPG_CORE_V1_PREFIX}${meta_v}${UPG_CORE_V1_SUFFIX}"
|
||||
sub_content_line "$UPG_CORE_V1_DOC"
|
||||
|
||||
content_line "$UPG_CORE_V2"
|
||||
content_line "${UPG_CORE_V2_PREFIX}${singboxr_v}${UPG_CORE_V2_SUFFIX}"
|
||||
sub_content_line "$UPG_CORE_V2_DOC"
|
||||
|
||||
[ "$zip_type" = 'upx' ] && {
|
||||
content_line "$UPG_CORE_V3"
|
||||
content_line "${UPG_CORE_V3_PREFIX}${singbox_v}${UPG_CORE_V3_SUFFIX}"
|
||||
sub_content_line "$UPG_CORE_V3_DOC"
|
||||
}
|
||||
[ "$zip_type" = 'upx' ] && {
|
||||
content_line "$UPG_CORE_V4"
|
||||
content_line "${UPG_CORE_V4_PREFIX}${clash_v}${UPG_CORE_V4_SUFFIX}"
|
||||
sub_content_line "$UPG_CORE_V4_DOC"
|
||||
}
|
||||
btm_box "$UPG_CORE_MENU_5" \
|
||||
"$UPG_CORE_MENU_6" \
|
||||
btm_box "${UPG_CORE_MENU_5_PREFIX}${zip_type}${UPG_CORE_MENU_5_SUFFIX}" \
|
||||
"${UPG_CORE_MENU_6_PREFIX}${custcore}${UPG_CORE_MENU_6_SUFFIX}" \
|
||||
"$UPG_CORE_MENU_7" \
|
||||
"$UPG_CORE_MENU_9" \
|
||||
"" \
|
||||
@@ -609,7 +609,7 @@ getgeo() {
|
||||
else
|
||||
mv -f "$TMPDIR"/"${geoname}" "$BINDIR"/"${geofile}""${geoname}"
|
||||
fi
|
||||
content_line "\033[32m$UPG_GEO_OK\033[0m"
|
||||
content_line "\033[32m${UPG_GEO_OK_PREFIX}${geotype}${UPG_GEO_OK_SUFFIX}\033[0m"
|
||||
geo_v="$(echo "$geotype" | awk -F "." '{print $1}')_v"
|
||||
setconfig "$geo_v" "$GeoIP_v"
|
||||
fi
|
||||
@@ -630,7 +630,7 @@ getcustgeo() {
|
||||
[ ! -d "$BINDIR"/ruleset ] && mkdir -p "$BINDIR"/ruleset
|
||||
}
|
||||
mv -f "$TMPDIR"/"${geoname}" "$BINDIR"/"${geofile}""${geoname}"
|
||||
content_line "\033[32m$UPG_GEO_OK\033[0m"
|
||||
content_line "\033[32m${UPG_GEO_OK_PREFIX}${geotype}${UPG_GEO_OK_SUFFIX}\033[0m"
|
||||
separator_line "="
|
||||
fi
|
||||
sleep 1
|
||||
@@ -818,7 +818,7 @@ setgeo() {
|
||||
;;
|
||||
9)
|
||||
while true; do
|
||||
comp_box "\033[33m$UPG_GEO_CLEAN_HINT1\033[0m" \
|
||||
comp_box "\033[33m${UPG_GEO_CLEAN_HINT1_PREFIX}${CRASHDIR}${UPG_GEO_CLEAN_HINT1_SUFFIX}\033[0m" \
|
||||
"$UPG_GEO_CLEAN_HINT2"
|
||||
btm_box "$UPG_GEO_CLEAN_CONFIRM" \
|
||||
"0) $COMMON_BACK"
|
||||
@@ -912,7 +912,7 @@ dbdir() {
|
||||
fi
|
||||
elif [ -w /www ] && [ -n "$(pidof nginx)" ]; then
|
||||
comp_box "$UPG_DB_DIR_SELECT"
|
||||
btm_box "$UPG_DB_DIR_1" \
|
||||
btm_box "${UPG_DB_DIR_1_PREFIX}${CRASHDIR}${UPG_DB_DIR_1_SUFFIX}" \
|
||||
"$UPG_DB_DIR_2" \
|
||||
"" \
|
||||
"0) $COMMON_BACK"
|
||||
|
||||
@@ -12,11 +12,11 @@ set_fw_filter() {
|
||||
[ -z "$quic_rj" ] && quic_rj=OFF
|
||||
[ -z "$cn_ip_route" ] && cn_ip_route=OFF
|
||||
touch "$CRASHDIR"/configs/mac "$CRASHDIR"/configs/ip_filter
|
||||
[ -z "$(cat "$CRASHDIR"/configs/mac "$CRASHDIR"/configs/ip_filter 2>/dev/null)" ] && mac_return=OFF || mac_return=ON
|
||||
comp_box "$FWF_ITEM_1" \
|
||||
"$FWF_ITEM_2" \
|
||||
"$FWF_ITEM_3" \
|
||||
"$FWF_ITEM_4" \
|
||||
[ -z "$(cat "$CRASHDIR"/configs/mac "$CRASHDIR"/configs/ip_filter 2>/dev/null)" ] && mac_filter_info=OFF || mac_filter_info=ON
|
||||
comp_box "${FWF_ITEM_1_PREFIX}\033[36m$common_ports\033[0m\t${FWF_ITEM_1_SUFFIX}" \
|
||||
"${FWF_ITEM_2_PREFIX}\033[36m$mac_filter_info\033[0m\t${FWF_ITEM_2_SUFFIX}" \
|
||||
"${FWF_ITEM_3_PREFIX}\033[36m$quic_rj\033[0m\t${FWF_ITEM_3_SUFFIX}" \
|
||||
"${FWF_ITEM_4_PREFIX}\033[36m$cn_ip_route\033[0m\t${FWF_ITEM_4_SUFFIX}" \
|
||||
"$FWF_ITEM_5" \
|
||||
"$FWF_ITEM_6" \
|
||||
"" \
|
||||
@@ -94,7 +94,7 @@ set_common_ports() {
|
||||
content_line "$FWF_ALLOWED_PORTS\033[36m$multiport\033[0m"
|
||||
fi
|
||||
separator_line "="
|
||||
btm_box "$FWF_PORT_MENU_1" \
|
||||
btm_box "${FWF_PORT_MENU_1_PREFIX}\033[36m$common_ports\033[0m${FWF_PORT_MENU_1_SUFFIX}" \
|
||||
"$FWF_PORT_MENU_2" \
|
||||
"$FWF_PORT_MENU_3" \
|
||||
"$FWF_PORT_MENU_4" \
|
||||
@@ -463,7 +463,7 @@ fw_filter_lan() {
|
||||
done
|
||||
separator_line "="
|
||||
fi
|
||||
btm_box "$FWF_FILTER_SWITCH" \
|
||||
btm_box "${FWF_FILTER_SWITCH_PREFIX}\033[33m$fw_filter_lan_over\033[0m${FWF_FILTER_SWITCH_SUFFIX}" \
|
||||
"$FWF_FILTER_ADD_MAC" \
|
||||
"$FWF_FILTER_ADD_IP" \
|
||||
"$FWF_FILTER_REMOVE" \
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
|
||||
[ -n "$__IS_MODULE_OVERRIDE" ] && return
|
||||
__IS_MODULE_OVERRIDE=1
|
||||
load_lang override
|
||||
|
||||
YAMLSDIR="$CRASHDIR"/yamls
|
||||
JSONSDIR="$CRASHDIR"/jsons
|
||||
load_lang override
|
||||
|
||||
# 配置文件覆写
|
||||
override() {
|
||||
@@ -48,7 +47,7 @@ override() {
|
||||
;;
|
||||
9)
|
||||
comp_box "\033[33m$OVR_WARN_1\033[0m" \
|
||||
"\033[33m$OVR_WARN_2\033[0m" \
|
||||
"\033[33m${OVR_WARN_2_PREFIX}$crashcore${OVR_WARN_2_SUFFIX}\033[0m" \
|
||||
"\033[33m$OVR_WARN_3\033[0m"
|
||||
sleep 2
|
||||
btm_box "$OVR_WARN_CONFIRM" \
|
||||
|
||||
Reference in New Issue
Block a user