From 1ef6aad7190ff6600d10d146c19553ba04f95944 Mon Sep 17 00:00:00 2001 From: wzsx150 Date: Tue, 17 Sep 2024 02:13:38 +0800 Subject: [PATCH 1/4] Fix Temperature Symbol --- wm_strings_en.h | 2 +- wm_strings_es.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wm_strings_en.h b/wm_strings_en.h index 4b531603c..49e384f07 100644 --- a/wm_strings_en.h +++ b/wm_strings_en.h @@ -181,7 +181,7 @@ const char HTTP_JS[] PROGMEM = const char HTTP_INFO_lastreset[] PROGMEM = "
Last reset reason
CPU0: {1}
CPU1: {2}
"; const char HTTP_INFO_aphost[] PROGMEM = "
Access point hostname
{1}
"; const char HTTP_INFO_psrsize[] PROGMEM = "
PSRAM Size
{1} bytes
"; - const char HTTP_INFO_temp[] PROGMEM = "
Temperature
{1} C° / {2} F°
"; + const char HTTP_INFO_temp[] PROGMEM = "
Temperature
{1} °C / {2} °F
"; const char HTTP_INFO_hall[] PROGMEM = "
Hall
{1}
"; #else const char HTTP_INFO_esphead[] PROGMEM = "

esp8266


"; diff --git a/wm_strings_es.h b/wm_strings_es.h index 781d0553c..af922371b 100644 --- a/wm_strings_es.h +++ b/wm_strings_es.h @@ -189,7 +189,7 @@ const char HTTP_JS[] PROGMEM = const char HTTP_INFO_lastreset[] PROGMEM = "
Last reset reason
CPU0: {1}
CPU1: {2}
"; const char HTTP_INFO_aphost[] PROGMEM = "
Access Point Hostname
{1}
"; const char HTTP_INFO_psrsize[] PROGMEM = "
PSRAM Size
{1} bytes
"; - const char HTTP_INFO_temp[] PROGMEM = "
Temperature
{1} C° / {2} F°
Hall
{3}
"; + const char HTTP_INFO_temp[] PROGMEM = "
Temperature
{1} °C / {2} °F
Hall
{3}
"; #else const char HTTP_INFO_esphead[] PROGMEM = "

esp8266


"; const char HTTP_INFO_fchipid[] PROGMEM = "
Flash Chip ID
{1}
"; From cf232b64d44e516b789df41b9806dff07aa76dfe Mon Sep 17 00:00:00 2001 From: wzsx150 Date: Tue, 17 Sep 2024 02:17:12 +0800 Subject: [PATCH 2/4] Fix untranslated 'About' issue --- WiFiManager.cpp | 5 ++++- wm_strings_en.h | 1 + wm_strings_es.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index c36f46d82..148636cb3 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -2057,7 +2057,7 @@ void WiFiManager::handleInfo() { } page += F("
"); - page += F("

About


"); + page += getInfoData("abouthead"); page += getInfoData("aboutver"); page += getInfoData("aboutarduinover"); page += getInfoData("aboutidfver"); @@ -2282,6 +2282,9 @@ String WiFiManager::getInfoData(String id){ // p.replace(FPSTR(T_1),(String)hallRead()); // hall sensor reads can cause issues with adcs // } #endif + else if(id==F("abouthead")){ + p = FPSTR(HTTP_INFO_abouthead); + } else if(id==F("aboutver")){ p = FPSTR(HTTP_INFO_aboutver); p.replace(FPSTR(T_1),FPSTR(WM_VERSION_STR)); diff --git a/wm_strings_en.h b/wm_strings_en.h index 49e384f07..a8f7a20bc 100644 --- a/wm_strings_en.h +++ b/wm_strings_en.h @@ -215,6 +215,7 @@ const char HTTP_INFO_stamac[] PROGMEM = "
Station MAC
{1}
"; const char HTTP_INFO_conx[] PROGMEM = "
Connected
{1}
"; const char HTTP_INFO_autoconx[] PROGMEM = "
Autoconnect
{1}
"; +const char HTTP_INFO_abouthead[] PROGMEM = "

About


"; const char HTTP_INFO_aboutver[] PROGMEM = "
WiFiManager
{1}
"; const char HTTP_INFO_aboutarduino[] PROGMEM = "
Arduino
{1}
"; const char HTTP_INFO_aboutsdk[] PROGMEM = "
ESP-SDK/IDF
{1}
"; diff --git a/wm_strings_es.h b/wm_strings_es.h index af922371b..aa6c9e743 100644 --- a/wm_strings_es.h +++ b/wm_strings_es.h @@ -222,6 +222,7 @@ const char HTTP_INFO_stamac[] PROGMEM = "
Station MAC
{1}
"; const char HTTP_INFO_conx[] PROGMEM = "
Connected
{1}
"; const char HTTP_INFO_autoconx[] PROGMEM = "
Autoconnect
{1}
"; +const char HTTP_INFO_abouthead[] PROGMEM = "

About


"; const char HTTP_INFO_aboutver[] PROGMEM = "
WiFiManager
{1}
"; const char HTTP_INFO_aboutarduino[] PROGMEM = "
Arduino
{1}
"; const char HTTP_INFO_aboutsdk[] PROGMEM = "
ESP-SDK/IDF
{1}
"; From bd35e400c14b6987c2a3a2d47513d9a12a3dedcb Mon Sep 17 00:00:00 2001 From: wzsx150 Date: Tue, 17 Sep 2024 02:23:34 +0800 Subject: [PATCH 3/4] Add Simplified Chinese (zh-CN) Translation --- wm_consts_cn.h | 265 +++++++++++++++++++++++++++++++++++++++++++++ wm_strings_cn.h | 278 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 543 insertions(+) create mode 100644 wm_consts_cn.h create mode 100644 wm_strings_cn.h diff --git a/wm_consts_cn.h b/wm_consts_cn.h new file mode 100644 index 000000000..fb8b3f2f1 --- /dev/null +++ b/wm_consts_cn.h @@ -0,0 +1,265 @@ +/** + * wm_consts_cn.h + * internal const strings/tokens + * WiFiManager, a library for the ESP8266/Arduino platform + * for configuration of WiFi credentials using a Captive Portal + * + * @author Creator tzapu + * @author tablatronix + * @version 0.0.0 + * @license MIT + */ + +#ifndef _WM_CONSTS_CN_H +#define _WM_CONSTS_CN_H + + +// ----------------------------------------------------------------------------------------------- +// TOKENS + +const char WM_VERSION_STR[] PROGMEM = "v2.0.17"; + +static const char _wifi_token[] PROGMEM = "wifi"; +static const char _wifinoscan_token[] PROGMEM = "wifinoscan"; +static const char _info_token[] PROGMEM = "info"; +static const char _param_token[] PROGMEM = "param"; +static const char _close_token[] PROGMEM = "close"; +static const char _restart_token[] PROGMEM = "restart"; +static const char _exit_token[] PROGMEM = "exit"; +static const char _erase_token[] PROGMEM = "erase"; +static const char _update_token[] PROGMEM = "update"; +static const char _sep_token[] PROGMEM = "sep"; +static const char _custom_token[] PROGMEM = "custom"; +static PGM_P _menutokens[] PROGMEM = { + _wifi_token, + _wifinoscan_token, + _info_token, + _param_token, + _close_token, + _restart_token, + _exit_token, + _erase_token, + _update_token, + _sep_token, + _custom_token +}; +const uint8_t _nummenutokens = (sizeof(_menutokens) / sizeof(PGM_P)); + + +const char R_root[] PROGMEM = "/"; +const char R_wifi[] PROGMEM = "/wifi"; +const char R_wifinoscan[] PROGMEM = "/0wifi"; +const char R_wifisave[] PROGMEM = "/wifisave"; +const char R_info[] PROGMEM = "/info"; +const char R_param[] PROGMEM = "/param"; +const char R_paramsave[] PROGMEM = "/paramsave"; +const char R_restart[] PROGMEM = "/restart"; +const char R_exit[] PROGMEM = "/exit"; +const char R_close[] PROGMEM = "/close"; +const char R_erase[] PROGMEM = "/erase"; +const char R_status[] PROGMEM = "/status"; +const char R_update[] PROGMEM = "/update"; +const char R_updatedone[] PROGMEM = "/u"; + + +//Strings +const char S_ip[] PROGMEM = "ip"; +const char S_gw[] PROGMEM = "gw"; +const char S_sn[] PROGMEM = "sn"; +const char S_dns[] PROGMEM = "dns"; + + + +//Tokens +//@todo consolidate and reduce +const char T_ss[] PROGMEM = "{"; // token start sentinel +const char T_es[] PROGMEM = "}"; // token end sentinel +const char T_1[] PROGMEM = "{1}"; // @token 1 +const char T_2[] PROGMEM = "{2}"; // @token 2 +const char T_3[] PROGMEM = "{3}"; // @token 3 +const char T_v[] PROGMEM = "{v}"; // @token v +const char T_V[] PROGMEM = "{V}"; // @token v +const char T_I[] PROGMEM = "{I}"; // @token I +const char T_i[] PROGMEM = "{i}"; // @token i +const char T_n[] PROGMEM = "{n}"; // @token n +const char T_p[] PROGMEM = "{p}"; // @token p +const char T_t[] PROGMEM = "{t}"; // @token t +const char T_l[] PROGMEM = "{l}"; // @token l +const char T_c[] PROGMEM = "{c}"; // @token c +const char T_e[] PROGMEM = "{e}"; // @token e +const char T_q[] PROGMEM = "{q}"; // @token q +const char T_r[] PROGMEM = "{r}"; // @token r +const char T_R[] PROGMEM = "{R}"; // @token R +const char T_h[] PROGMEM = "{h}"; // @token h + +// http +const char HTTP_HEAD_CL[] PROGMEM = "Content-Length"; +const char HTTP_HEAD_CT[] PROGMEM = "text/html"; +const char HTTP_HEAD_CT2[] PROGMEM = "text/plain"; +const char HTTP_HEAD_CORS[] PROGMEM = "Access-Control-Allow-Origin"; +const char HTTP_HEAD_CORS_ALLOW_ALL[] PROGMEM = "*"; + +const char * const WIFI_STA_STATUS[] PROGMEM +{ + "WL_IDLE_STATUS", // 0 STATION_IDLE + "WL_NO_SSID_AVAIL", // 1 STATION_NO_AP_FOUND + "WL_SCAN_COMPLETED", // 2 + "WL_CONNECTED", // 3 STATION_GOT_IP + "WL_CONNECT_FAILED", // 4 STATION_CONNECT_FAIL, STATION_WRONG_PASSWORD(NI) + "WL_CONNECTION_LOST", // 5 + "WL_DISCONNECTED", // 6 + "WL_STATION_WRONG_PASSWORD" // 7 KLUDGE +}; + +#ifdef ESP32 +const char * const AUTH_MODE_NAMES[] PROGMEM +{ + "OPEN", + "WEP", + "WPA_PSK", + "WPA2_PSK", + "WPA_WPA2_PSK", + "WPA2_ENTERPRISE", + "MAX" +}; +#elif defined(ESP8266) +const char * const AUTH_MODE_NAMES[] PROGMEM +{ + "", + "", + "WPA_PSK", // 2 ENC_TYPE_TKIP + "", + "WPA2_PSK", // 4 ENC_TYPE_CCMP + "WEP", // 5 ENC_TYPE_WEP + "", + "OPEN", //7 ENC_TYPE_NONE + "WPA_WPA2_PSK", // 8 ENC_TYPE_AUTO +}; +#endif + +const char* const WIFI_MODES[] PROGMEM = { "NULL", "STA", "AP", "STA+AP" }; + + +#ifdef ESP32 +// as 2.5.2 +// typedef struct { +// char cc[3]; /**< country code string */ +// uint8_t schan; /**< start channel */ +// uint8_t nchan; /**< total channel number */ +// int8_t max_tx_power; /**< This field is used for getting WiFi maximum transmitting power, call esp_wifi_set_max_tx_power to set the maximum transmitting power. */ +// wifi_country_policy_t policy; /**< country policy */ +// } wifi_country_t; +const wifi_country_t WM_COUNTRY_US{"US",1,11,CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER,WIFI_COUNTRY_POLICY_AUTO}; +const wifi_country_t WM_COUNTRY_CN{"CN",1,13,CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER,WIFI_COUNTRY_POLICY_AUTO}; +const wifi_country_t WM_COUNTRY_JP{"JP",1,14,CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER,WIFI_COUNTRY_POLICY_AUTO}; +#elif defined(ESP8266) && !defined(WM_NOCOUNTRY) +// typedef struct { +// char cc[3]; /**< country code string */ +// uint8_t schan; /**< start channel */ +// uint8_t nchan; /**< total channel number */ +// uint8_t policy; /**< country policy */ +// } wifi_country_t; +const wifi_country_t WM_COUNTRY_US{"US",1,11,WIFI_COUNTRY_POLICY_AUTO}; +const wifi_country_t WM_COUNTRY_CN{"CN",1,13,WIFI_COUNTRY_POLICY_AUTO}; +const wifi_country_t WM_COUNTRY_JP{"JP",1,14,WIFI_COUNTRY_POLICY_AUTO}; +#endif + + +/* +* ESP32 WiFi Events + +0 SYSTEM_EVENT_WIFI_READY < ESP32 WiFi ready +1 SYSTEM_EVENT_SCAN_DONE < ESP32 finish scanning AP +2 SYSTEM_EVENT_STA_START < ESP32 station start +3 SYSTEM_EVENT_STA_STOP < ESP32 station stop +4 SYSTEM_EVENT_STA_CONNECTED < ESP32 station connected to AP +5 SYSTEM_EVENT_STA_DISCONNECTED < ESP32 station disconnected from AP +6 SYSTEM_EVENT_STA_AUTHMODE_CHANGE < the auth mode of AP connected by ESP32 station changed +7 SYSTEM_EVENT_STA_GOT_IP < ESP32 station got IP from connected AP +8 SYSTEM_EVENT_STA_LOST_IP < ESP32 station lost IP and the IP is reset to 0 +9 SYSTEM_EVENT_STA_WPS_ER_SUCCESS < ESP32 station wps succeeds in enrollee mode +10 SYSTEM_EVENT_STA_WPS_ER_FAILED < ESP32 station wps fails in enrollee mode +11 SYSTEM_EVENT_STA_WPS_ER_TIMEOUT < ESP32 station wps timeout in enrollee mode +12 SYSTEM_EVENT_STA_WPS_ER_PIN < ESP32 station wps pin code in enrollee mode +13 SYSTEM_EVENT_AP_START < ESP32 soft-AP start +14 SYSTEM_EVENT_AP_STOP < ESP32 soft-AP stop +15 SYSTEM_EVENT_AP_STACONNECTED < a station connected to ESP32 soft-AP +16 SYSTEM_EVENT_AP_STADISCONNECTED < a station disconnected from ESP32 soft-AP +17 SYSTEM_EVENT_AP_STAIPASSIGNED < ESP32 soft-AP assign an IP to a connected station +18 SYSTEM_EVENT_AP_PROBEREQRECVED < Receive probe request packet in soft-AP interface +19 SYSTEM_EVENT_GOT_IP6 < ESP32 station or ap or ethernet interface v6IP addr is preferred +20 SYSTEM_EVENT_ETH_START < ESP32 ethernet start +21 SYSTEM_EVENT_ETH_STOP < ESP32 ethernet stop +22 SYSTEM_EVENT_ETH_CONNECTED < ESP32 ethernet phy link up +23 SYSTEM_EVENT_ETH_DISCONNECTED < ESP32 ethernet phy link down +24 SYSTEM_EVENT_ETH_GOT_IP < ESP32 ethernet got IP from connected AP +25 SYSTEM_EVENT_MAX + + +typedef enum { + ARDUINO_EVENT_WIFI_READY = 0, + ARDUINO_EVENT_WIFI_SCAN_DONE, + ARDUINO_EVENT_WIFI_STA_START, + ARDUINO_EVENT_WIFI_STA_STOP, + ARDUINO_EVENT_WIFI_STA_CONNECTED, + ARDUINO_EVENT_WIFI_STA_DISCONNECTED, + ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE, + ARDUINO_EVENT_WIFI_STA_GOT_IP, + ARDUINO_EVENT_WIFI_STA_GOT_IP6, + ARDUINO_EVENT_WIFI_STA_LOST_IP, + ARDUINO_EVENT_WIFI_AP_START, + ARDUINO_EVENT_WIFI_AP_STOP, + ARDUINO_EVENT_WIFI_AP_STACONNECTED, + ARDUINO_EVENT_WIFI_AP_STADISCONNECTED, + ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED, + ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED, + ARDUINO_EVENT_WIFI_AP_GOT_IP6, + ARDUINO_EVENT_WIFI_FTM_REPORT, + ARDUINO_EVENT_ETH_START, + ARDUINO_EVENT_ETH_STOP, + ARDUINO_EVENT_ETH_CONNECTED, + ARDUINO_EVENT_ETH_DISCONNECTED, + ARDUINO_EVENT_ETH_GOT_IP, + ARDUINO_EVENT_ETH_GOT_IP6, + ARDUINO_EVENT_WPS_ER_SUCCESS, + ARDUINO_EVENT_WPS_ER_FAILED, + ARDUINO_EVENT_WPS_ER_TIMEOUT, + ARDUINO_EVENT_WPS_ER_PIN, + ARDUINO_EVENT_WPS_ER_PBC_OVERLAP, + ARDUINO_EVENT_SC_SCAN_DONE, + ARDUINO_EVENT_SC_FOUND_CHANNEL, + ARDUINO_EVENT_SC_GOT_SSID_PSWD, + ARDUINO_EVENT_SC_SEND_ACK_DONE, + ARDUINO_EVENT_PROV_INIT, + ARDUINO_EVENT_PROV_DEINIT, + ARDUINO_EVENT_PROV_START, + ARDUINO_EVENT_PROV_END, + ARDUINO_EVENT_PROV_CRED_RECV, + ARDUINO_EVENT_PROV_CRED_FAIL, + ARDUINO_EVENT_PROV_CRED_SUCCESS, + ARDUINO_EVENT_MAX +} arduino_event_id_t; + +typedef union { + wifi_event_sta_scan_done_t wifi_scan_done; + wifi_event_sta_authmode_change_t wifi_sta_authmode_change; + wifi_event_sta_connected_t wifi_sta_connected; + wifi_event_sta_disconnected_t wifi_sta_disconnected; + wifi_event_sta_wps_er_pin_t wps_er_pin; + wifi_event_sta_wps_fail_reason_t wps_fail_reason; + wifi_event_ap_probe_req_rx_t wifi_ap_probereqrecved; + wifi_event_ap_staconnected_t wifi_ap_staconnected; + wifi_event_ap_stadisconnected_t wifi_ap_stadisconnected; + wifi_event_ftm_report_t wifi_ftm_report; + ip_event_ap_staipassigned_t wifi_ap_staipassigned; + ip_event_got_ip_t got_ip; + ip_event_got_ip6_t got_ip6; + smartconfig_event_got_ssid_pswd_t sc_got_ssid_pswd; + esp_eth_handle_t eth_connected; + wifi_sta_config_t prov_cred_recv; + wifi_prov_sta_fail_reason_t prov_fail_reason; +} arduino_event_info_t; + +*/ + +#endif \ No newline at end of file diff --git a/wm_strings_cn.h b/wm_strings_cn.h new file mode 100644 index 000000000..92d75b12a --- /dev/null +++ b/wm_strings_cn.h @@ -0,0 +1,278 @@ +/** + * wm_strings_cn.h + * engligh strings for + * WiFiManager, a library for the ESP8266/Arduino platform + * for configuration of WiFi credentials using a Captive Portal + * + * @author Creator tzapu + * @author tablatronix + * @version 0.0.0 + * @license MIT + */ + +#ifndef _WM_STRINGS_CN_H_ +#define _WM_STRINGS_CN_H_ + + +#ifndef WIFI_MANAGER_OVERRIDE_STRINGS +// !!! ABOVE WILL NOT WORK if you define in your sketch, must be build flag, if anyone one knows how to order includes to be able to do this it would be neat.. I have seen it done.. + +// strings files must include a consts file! +#include "wm_consts_cn.h" // include constants, tokens, routes + +const char WM_LANGUAGE[] PROGMEM = "zh-CN"; // i18n lang code + +const char HTTP_HEAD_START[] PROGMEM = "" +"" +"" +"" +"" +"{v}"; + +const char HTTP_SCRIPT[] PROGMEM = ""; // @todo add button states, disable on click , show ack , spinner etc + +const char HTTP_HEAD_END[] PROGMEM = "
"; // {c} = _bodyclass +// example of embedded logo, base64 encoded inline, No styling here +// const char HTTP_ROOT_MAIN[] PROGMEM = "

{v}

WiFiManager

"; +const char HTTP_ROOT_MAIN[] PROGMEM = "

{t}

{v}

"; + +const char * const HTTP_PORTAL_MENU[] PROGMEM = { +"

\n", // MENU_WIFI +"

\n", // MENU_WIFINOSCAN +"

\n", // MENU_INFO +"

\n",//MENU_PARAM +"

\n", // MENU_CLOSE +"

\n",// MENU_RESTART +"

\n", // MENU_EXIT +"

\n", // MENU_ERASE +"

\n",// MENU_UPDATE +"

" // MENU_SEP +}; + +// const char HTTP_PORTAL_OPTIONS[] PROGMEM = strcat(HTTP_PORTAL_MENU[0] , HTTP_PORTAL_MENU[3] , HTTP_PORTAL_MENU[7]); +const char HTTP_PORTAL_OPTIONS[] PROGMEM = ""; +const char HTTP_ITEM_QI[] PROGMEM = ""; // rssi icons +const char HTTP_ITEM_QP[] PROGMEM = "
{r}%
"; // rssi percentage {h} = hidden showperc pref +const char HTTP_ITEM[] PROGMEM = "
{v}{qi}{qp}
"; // {q} = HTTP_ITEM_QI, {r} = HTTP_ITEM_QP +// const char HTTP_ITEM[] PROGMEM = "
{v} {R} {r}% {q} {e}
"; // test all tokens + +const char HTTP_FORM_START[] PROGMEM = "
"; +const char HTTP_FORM_WIFI[] PROGMEM = "

"; +const char HTTP_FORM_WIFI_END[] PROGMEM = ""; +const char HTTP_FORM_STATIC_HEAD[] PROGMEM = "

"; +const char HTTP_FORM_END[] PROGMEM = "

"; +const char HTTP_FORM_LABEL[] PROGMEM = ""; +const char HTTP_FORM_PARAM_HEAD[] PROGMEM = "

"; +const char HTTP_FORM_PARAM[] PROGMEM = "
\n"; // do not remove newline! + +const char HTTP_SCAN_LINK[] PROGMEM = "
"; +const char HTTP_SAVED[] PROGMEM = "
已保存信息
设备正在尝试连接到WiFi网络

如果连接失败,请重新连接热点
或者浏览器访问 http://192.168.4.1
进行重新配置
"; +const char HTTP_PARAMSAVED[] PROGMEM = "
已保存
"; +const char HTTP_END[] PROGMEM = "
"; +const char HTTP_ERASEBTN[] PROGMEM = "
"; +const char HTTP_UPDATEBTN[] PROGMEM = "
"; +const char HTTP_BACKBTN[] PROGMEM = "

"; + +const char HTTP_STATUS_ON[] PROGMEM = "
WiFi连接成功:{v}
IP地址:{i}
"; +const char HTTP_STATUS_OFF[] PROGMEM = "
WiFi连接失败:{v}{r}
"; // {c=class} {v=ssid} {r=status_off} +const char HTTP_STATUS_OFFPW[] PROGMEM = "
认证失败"; // STATION_WRONG_PASSWORD, no eps32 +const char HTTP_STATUS_OFFNOAP[] PROGMEM = "
找不到该WiFi"; // WL_NO_SSID_AVAIL +const char HTTP_STATUS_OFFFAIL[] PROGMEM = "
无法连接该WiFi"; // WL_CONNECT_FAILED +const char HTTP_STATUS_NONE[] PROGMEM = "
未配置WiFi
"; +const char HTTP_BR[] PROGMEM = "
"; + +const char HTTP_STYLE[] PROGMEM = ""; + +#ifndef WM_NOHELP +const char HTTP_HELP[] PROGMEM = + "

可用页面URL地址


" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "
页面地址功能
/主菜单页面。
/wifi显示WiFi扫描结果,并进行WiFi配置。
/0wifi不扫描WiFi,直接进行WiFi配置。
/wifisave保存WiFi配置信息到设备。需要提供相应参数。
/param参数页面。
/info信息页面。
/updateOTA固件升级。
/close关闭弹出的配置页面,WiFi配置服务将保持运行。
/exit退出WiFi配置,WiFi配置服务将停止运行。
/restart重启设备
/erase清除WiFi配置信息并重启设备。
" + "

Github https://github.com/tzapu/WiFiManager"; +#else +const char HTTP_HELP[] PROGMEM = ""; +#endif + +const char HTTP_UPDATE[] PROGMEM = "升级新固件

*可能无法正常弹出页面,请在浏览器中打开 http://192.168.4.1"; +const char HTTP_UPDATE_FAIL[] PROGMEM = "
升级失败!
重启设备后,请重试
"; +const char HTTP_UPDATE_SUCCESS[] PROGMEM = "
升级成功!
设备正在重启...
"; + +#ifdef WM_JSTEST +const char HTTP_JS[] PROGMEM = +""; +#endif + +// Info html +// @todo remove html elements from progmem, repetetive strings +#ifdef ESP32 + const char HTTP_INFO_esphead[] PROGMEM = "

esp32


"; + const char HTTP_INFO_chiprev[] PROGMEM = "
芯片版本
{1}
"; + const char HTTP_INFO_lastreset[] PROGMEM = "
上次重启原因
CPU0: {1}
CPU1: {2}
"; + const char HTTP_INFO_aphost[] PROGMEM = "
热点主机名
{1}
"; + const char HTTP_INFO_psrsize[] PROGMEM = "
PSRAM大小
{1}字节
"; + const char HTTP_INFO_temp[] PROGMEM = "
温度
{1} °C / {2} °F
"; + const char HTTP_INFO_hall[] PROGMEM = "
霍尔传感器
{1}
"; +#else + const char HTTP_INFO_esphead[] PROGMEM = "

esp8266


"; + const char HTTP_INFO_fchipid[] PROGMEM = "
闪存芯片ID
{1}
"; + const char HTTP_INFO_corever[] PROGMEM = "
核心版本
{1}
"; + const char HTTP_INFO_bootver[] PROGMEM = "
引导版本
{1}
"; + const char HTTP_INFO_lastreset[] PROGMEM = "
上次重启原因
{1}
"; + const char HTTP_INFO_flashsize[] PROGMEM = "
实际闪存大小
{1}字节
"; +#endif + +const char HTTP_INFO_memsmeter[] PROGMEM = "
"; +const char HTTP_INFO_memsketch[] PROGMEM = "
内存-程序大小
已用/总共字节数
{1}/{2}"; +const char HTTP_INFO_freeheap[] PROGMEM = "
内存-空闲堆
可用{1}字节
"; +const char HTTP_INFO_wifihead[] PROGMEM = "

WiFi


"; +const char HTTP_INFO_uptime[] PROGMEM = "
运行时间
{1}分钟{2}秒
"; +const char HTTP_INFO_chipid[] PROGMEM = "
芯片ID
{1}
"; +const char HTTP_INFO_idesize[] PROGMEM = "
闪存大小
{1}字节
"; +const char HTTP_INFO_sdkver[] PROGMEM = "
SDK版本
{1}
"; +const char HTTP_INFO_cpufreq[] PROGMEM = "
CPU频率
{1}MHz
"; +const char HTTP_INFO_apip[] PROGMEM = "
热点IP地址
{1}
"; +const char HTTP_INFO_apmac[] PROGMEM = "
热点MAC地址
{1}
"; +const char HTTP_INFO_apssid[] PROGMEM = "
热点名称(SSID)
{1}
"; +const char HTTP_INFO_apbssid[] PROGMEM = "
BSSID
{1}
"; +const char HTTP_INFO_stassid[] PROGMEM = "
WiFi名称(SSID)
{1}
"; +const char HTTP_INFO_staip[] PROGMEM = "
IP地址
{1}
"; +const char HTTP_INFO_stagw[] PROGMEM = "
网关地址
{1}
"; +const char HTTP_INFO_stasub[] PROGMEM = "
子网掩码
{1}
"; +const char HTTP_INFO_dnss[] PROGMEM = "
DNS服务器
{1}
"; +const char HTTP_INFO_host[] PROGMEM = "
主机名
{1}
"; +const char HTTP_INFO_stamac[] PROGMEM = "
MAC地址
{1}
"; +const char HTTP_INFO_conx[] PROGMEM = "
已连接
{1}
"; +const char HTTP_INFO_autoconx[] PROGMEM = "
自动连接
{1}
"; + +const char HTTP_INFO_abouthead[] PROGMEM = "

关于


"; +const char HTTP_INFO_aboutver[] PROGMEM = "
WiFiManager
{1}
"; +const char HTTP_INFO_aboutarduino[] PROGMEM = "
Arduino
{1}
"; +const char HTTP_INFO_aboutsdk[] PROGMEM = "
ESP-SDK/IDF
{1}
"; +const char HTTP_INFO_aboutdate[] PROGMEM = "
编译日期
{1}
"; + +const char S_brand[] PROGMEM = "WiFiManager"; +const char S_debugPrefix[] PROGMEM = "*wm:"; +const char S_y[] PROGMEM = "是"; +const char S_n[] PROGMEM = "否"; +const char S_enable[] PROGMEM = "启用"; +const char S_disable[] PROGMEM = "禁用"; +const char S_GET[] PROGMEM = "GET"; +const char S_POST[] PROGMEM = "POST"; +const char S_NA[] PROGMEM = "未知"; +const char S_passph[] PROGMEM = "********"; +const char S_titlewifisaved[] PROGMEM = "信息已保存"; +const char S_titlewifisettings[] PROGMEM = "设置已保存"; +const char S_titlewifi[] PROGMEM = "配置设备"; +const char S_titleinfo[] PROGMEM = "信息"; +const char S_titleparam[] PROGMEM = "设置"; +const char S_titleparamsaved[] PROGMEM = "设置已保存"; +const char S_titleexit[] PROGMEM = "退出"; +const char S_titlereset[] PROGMEM = "重启"; +const char S_titleerase[] PROGMEM = "清除"; +const char S_titleclose[] PROGMEM = "关闭"; +const char S_options[] PROGMEM = "选项"; +const char S_nonetworks[] PROGMEM = "未找到网络,请刷新进行重新扫描"; +const char S_staticip[] PROGMEM = "静态IP地址"; +const char S_staticgw[] PROGMEM = "静态网关地址"; +const char S_staticdns[] PROGMEM = "静态DNS服务地址"; +const char S_subnet[] PROGMEM = "子网掩码"; +const char S_exiting[] PROGMEM = "正在退出WiFi配置,WiFi配置服务将停止运行"; +const char S_resetting[] PROGMEM = "设备即将重启"; +const char S_closing[] PROGMEM = "你可以关闭页面,WiFi配置服务将保持运行"; +const char S_error[] PROGMEM = "发生错误"; +const char S_notfound[] PROGMEM = "未找到文件或路径不存在\n\n"; +const char S_uri[] PROGMEM = "URI: "; +const char S_method[] PROGMEM = "\n方法: "; +const char S_args[] PROGMEM = "\n参数: "; +const char S_parampre[] PROGMEM = "参数_"; + +// debug strings +const char D_HR[] PROGMEM = "--------------------"; + + +// softap ssid default prefix +#ifdef ESP8266 + const char S_ssidpre[] PROGMEM = "ESP"; +#elif defined(ESP32) + const char S_ssidpre[] PROGMEM = "ESP32"; +#else + const char S_ssidpre[] PROGMEM = "WM"; +#endif + +// END WIFI_MANAGER_OVERRIDE_STRINGS +#endif + +#endif From 6e633c6560e6be4347e92c47bf24f4286017a7ab Mon Sep 17 00:00:00 2001 From: wzsx150 Date: Mon, 7 Oct 2024 22:17:00 +0800 Subject: [PATCH 4/4] Translate Main title --- wm_strings_cn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wm_strings_cn.h b/wm_strings_cn.h index 92d75b12a..9c7e6cd78 100644 --- a/wm_strings_cn.h +++ b/wm_strings_cn.h @@ -223,7 +223,7 @@ const char HTTP_INFO_aboutarduino[] PROGMEM = "
Arduino
{1}
"; const char HTTP_INFO_aboutsdk[] PROGMEM = "
ESP-SDK/IDF
{1}
"; const char HTTP_INFO_aboutdate[] PROGMEM = "
编译日期
{1}
"; -const char S_brand[] PROGMEM = "WiFiManager"; +const char S_brand[] PROGMEM = "WiFi管理"; const char S_debugPrefix[] PROGMEM = "*wm:"; const char S_y[] PROGMEM = "是"; const char S_n[] PROGMEM = "否";