From a208a7948c91f5a83372477195d028209f17ca14 Mon Sep 17 00:00:00 2001 From: kap1bala <243586394+kap1bala@users.noreply.github.com> Date: Mon, 8 Dec 2025 00:40:14 +0800 Subject: [PATCH 1/5] feat: add zh translation --- wled.xcodeproj/project.pbxproj | 5 +++++ wled/zh-Hans.lproj/InfoPlist.strings | 1 + wled/zh-Hans.lproj/Localizable.strings | Bin 0 -> 4524 bytes 3 files changed, 6 insertions(+) create mode 100644 wled/zh-Hans.lproj/InfoPlist.strings create mode 100644 wled/zh-Hans.lproj/Localizable.strings diff --git a/wled.xcodeproj/project.pbxproj b/wled.xcodeproj/project.pbxproj index 4980102..5b9d124 100644 --- a/wled.xcodeproj/project.pbxproj +++ b/wled.xcodeproj/project.pbxproj @@ -117,8 +117,10 @@ C9C4B47E2AC0050500791D20 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; C9D43A7C29BAE3BA005A71C2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; C9D43A8029BAE3F8005A71C2 /* fr-CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "fr-CA.lproj/Localizable.strings"; sourceTree = ""; }; + 99E2313B2EE5E2B200D14C3E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; C9F82F2329BBD0E100B8A5EE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; C9F82F2529BBD0E300B8A5EE /* fr-CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "fr-CA.lproj/InfoPlist.strings"; sourceTree = ""; }; + 99E2313C2EE5E2B200D14C3E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; C9FCC384293DB69F00DEDDEA /* WledState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WledState.swift; path = wled/Model/DeviceApi/Response/WledState.swift; sourceTree = SOURCE_ROOT; }; C9FCC388293DB86900DEDDEA /* FileSystem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FileSystem.swift; path = wled/Model/DeviceApi/Response/FileSystem.swift; sourceTree = SOURCE_ROOT; }; C9FCC38A293DB8A000DEDDEA /* WLEDRequestState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WLEDRequestState.swift; path = wled/Model/DeviceApi/Request/WLEDRequestState.swift; sourceTree = SOURCE_ROOT; }; @@ -345,6 +347,7 @@ en, Base, "fr-CA", + "zh-Hans", ); mainGroup = C9A9E5B42918D1C3005B5C22; packageReferences = ( @@ -441,6 +444,7 @@ children = ( C9D43A7C29BAE3BA005A71C2 /* en */, C9D43A8029BAE3F8005A71C2 /* fr-CA */, + 99E2313B2EE5E2B200D14C3E /* zh-Hans */, ); name = Localizable.strings; sourceTree = ""; @@ -450,6 +454,7 @@ children = ( C9F82F2329BBD0E100B8A5EE /* en */, C9F82F2529BBD0E300B8A5EE /* fr-CA */, + 99E2313C2EE5E2B200D14C3E /* zh-Hans */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/wled/zh-Hans.lproj/InfoPlist.strings b/wled/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 0000000..5ea06ae --- /dev/null +++ b/wled/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1 @@ +NSLocalNetworkUsageDescription = "WLED 通过本地网络连接至您附近的 WLED 设备。"; diff --git a/wled/zh-Hans.lproj/Localizable.strings b/wled/zh-Hans.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..578ed01055d5450d344915e08a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}hg=s!L2?bYW*<2mp?|17>J-^P>8Xp>~<9jM4|Jfc_ zg=^hQcmtlo!t@Wx_jOO%UHNG03sDR*+(-kTgsRzjRW*$;) zv+I+OGg5Gg^t^$xG$}h#r8snQHlJePlLj<0ut4v)Dg4Ht(0(GuMNny)O1#VSHt%TL zX6!x7_ZZ2^^X!mR{kx@#k?Z Date: Mon, 8 Dec 2025 09:44:40 +0800 Subject: [PATCH 2/5] feat: update zh-Hans localization strings --- wled/zh-Hans.lproj/Localizable.strings | Bin 4524 -> 4522 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/wled/zh-Hans.lproj/Localizable.strings b/wled/zh-Hans.lproj/Localizable.strings index 578ed01055d5450d344915e08a04bb461cc6ff65..d899bad5f54f1e4be318f9105e027d29d46e01d0 100644 GIT binary patch delta 12 TcmZ3Zyh?dP5Bugmb~!EpAq)gi delta 14 VcmZ3byheFL4?E+6&E4$sTmUMC1n&R< From 1579357c9e933f59bc7827d22514087339bd5a69 Mon Sep 17 00:00:00 2001 From: kap1bala <243586394+kap1bala@users.noreply.github.com> Date: Mon, 8 Dec 2025 09:45:31 +0800 Subject: [PATCH 3/5] feat: add errorpage.zh.html --- wled/errorPage.zh.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 wled/errorPage.zh.html diff --git a/wled/errorPage.zh.html b/wled/errorPage.zh.html new file mode 100644 index 0000000..f75e5da --- /dev/null +++ b/wled/errorPage.zh.html @@ -0,0 +1,16 @@ + + + + + 设备不可用 + + + + +
+ Dead LED character +

无法连接至设备

+

请确认设备已接通电源并连接到网络

+
+ + From 91078b5c4828ecb1f99113e3d5107acf30d505cf Mon Sep 17 00:00:00 2001 From: kap1bala <243586394+kap1bala@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:19:37 +0800 Subject: [PATCH 4/5] feat: add zh localization support in WebView --- wled.xcodeproj/project.pbxproj | 8 ++++++-- wled/View/WebView.swift | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wled.xcodeproj/project.pbxproj b/wled.xcodeproj/project.pbxproj index 5b9d124..72a2bd6 100644 --- a/wled.xcodeproj/project.pbxproj +++ b/wled.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ C96440E82AF095B500C51204 /* DeviceListItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C96440E72AF095B500C51204 /* DeviceListItemView.swift */; }; C96827212B01AF5900A5DDEC /* errorPage.css in Resources */ = {isa = PBXBuildFile; fileRef = C96827202B01AF5900A5DDEC /* errorPage.css */; }; C96827232B01AFB900A5DDEC /* errorPage.fr.html in Resources */ = {isa = PBXBuildFile; fileRef = C96827222B01AFB900A5DDEC /* errorPage.fr.html */; }; + 99ECEB982EE66C2F00C24FD6 /* errorPage.zh.html in Resources */ = {isa = PBXBuildFile; fileRef = 99ECEB972EE66C2F00C24FD6 /* errorPage.zh.html */; }; C9767DDE2AF9F435002F3EA9 /* DeviceAddView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9767DDD2AF9F435002F3EA9 /* DeviceAddView.swift */; }; C9767DE02AFA04E0002F3EA9 /* DeviceEditView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9767DDF2AFA04E0002F3EA9 /* DeviceEditView.swift */; }; C9767DE32AFAE65C002F3EA9 /* FetchedObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9767DE22AFAE65C002F3EA9 /* FetchedObjects.swift */; }; @@ -90,6 +91,7 @@ C96440E72AF095B500C51204 /* DeviceListItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceListItemView.swift; sourceTree = ""; }; C96827202B01AF5900A5DDEC /* errorPage.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = errorPage.css; sourceTree = ""; }; C96827222B01AFB900A5DDEC /* errorPage.fr.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = errorPage.fr.html; sourceTree = ""; }; + 99ECEB972EE66C2F00C24FD6 /* errorPage.zh.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = errorPage.zh.html; sourceTree = ""; }; C9767DDD2AF9F435002F3EA9 /* DeviceAddView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceAddView.swift; sourceTree = ""; }; C9767DDF2AFA04E0002F3EA9 /* DeviceEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceEditView.swift; sourceTree = ""; }; C9767DE22AFAE65C002F3EA9 /* FetchedObjects.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchedObjects.swift; sourceTree = ""; }; @@ -117,10 +119,10 @@ C9C4B47E2AC0050500791D20 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; C9D43A7C29BAE3BA005A71C2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; C9D43A8029BAE3F8005A71C2 /* fr-CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "fr-CA.lproj/Localizable.strings"; sourceTree = ""; }; - 99E2313B2EE5E2B200D14C3E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 99E2313B2EE5E2B200D14C3E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; C9F82F2329BBD0E100B8A5EE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; C9F82F2529BBD0E300B8A5EE /* fr-CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "fr-CA.lproj/InfoPlist.strings"; sourceTree = ""; }; - 99E2313C2EE5E2B200D14C3E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; + 99E2313C2EE5E2B200D14C3E /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; C9FCC384293DB69F00DEDDEA /* WledState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WledState.swift; path = wled/Model/DeviceApi/Response/WledState.swift; sourceTree = SOURCE_ROOT; }; C9FCC388293DB86900DEDDEA /* FileSystem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FileSystem.swift; path = wled/Model/DeviceApi/Response/FileSystem.swift; sourceTree = SOURCE_ROOT; }; C9FCC38A293DB8A000DEDDEA /* WLEDRequestState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WLEDRequestState.swift; path = wled/Model/DeviceApi/Request/WLEDRequestState.swift; sourceTree = SOURCE_ROOT; }; @@ -265,6 +267,7 @@ C93470AD29D905BD0085D9D5 /* 012_rip.png */, C93470AB29D904C20085D9D5 /* errorPage.en.html */, C96827222B01AFB900A5DDEC /* errorPage.fr.html */, + 99ECEB972EE66C2F00C24FD6 /* errorPage.zh.html */, C96827202B01AF5900A5DDEC /* errorPage.css */, C9A9E5CE2918D1C4005B5C22 /* Info.plist */, C9AF215A2AFDCF7500E03749 /* Launch Screen.storyboard */, @@ -369,6 +372,7 @@ buildActionMask = 2147483647; files = ( C96827232B01AFB900A5DDEC /* errorPage.fr.html in Resources */, + 99ECEB982EE66C2F00C24FD6 /* errorPage.zh.html in Resources */, C93470AC29D904C20085D9D5 /* errorPage.en.html in Resources */, C9D43A7B29BAE3BA005A71C2 /* Localizable.strings in Resources */, C93470AE29D905BD0085D9D5 /* 012_rip.png in Resources */, diff --git a/wled/View/WebView.swift b/wled/View/WebView.swift index 592e714..0e2f25e 100644 --- a/wled/View/WebView.swift +++ b/wled/View/WebView.swift @@ -56,6 +56,8 @@ struct WebView: UIViewRepresentable { switch Locale.current.language.languageCode?.identifier { case "fr": return "fr" + case "zh": + return "zh" default: return "en" } From 361ad4d5699a7459fc359764cc9e2fe654f627a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E7=9A=AE=E5=B7=B4=E6=8B=89?= <243586394+kap1bala@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:47:57 +0800 Subject: [PATCH 5/5] fix: change errorPage.zh.html lang Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- wled/errorPage.zh.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled/errorPage.zh.html b/wled/errorPage.zh.html index f75e5da..a68a8cf 100644 --- a/wled/errorPage.zh.html +++ b/wled/errorPage.zh.html @@ -1,5 +1,5 @@ - + 设备不可用