From 369bad4fed77d7fccdbcaaddd79a9ae3844e9698 Mon Sep 17 00:00:00 2001 From: Felix Date: Sat, 11 Jan 2025 19:43:47 +0900 Subject: [PATCH 1/4] fix: The xcstrings not be compiled when using Tuist binary cache. When using Tuist, make sure that xcstrings files can be compiled and included in the xcframework. --- Package.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index d233735..038c7ec 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,10 @@ let package = Package( .target( name: "SwiftyCrop", path: "Sources", - resources: [.copy("PrivacyInfo.xcprivacy")] + resources: [ + .copy("PrivacyInfo.xcprivacy"), + .process("SwiftyCrop/Resources/*.xcstrings"), + ] ), .testTarget( name: "SwiftyCropTests", From a61d440a1a6f64e2a4374972ddd6c8bc301e9c11 Mon Sep 17 00:00:00 2001 From: Felix Date: Sat, 11 Jan 2025 19:55:31 +0900 Subject: [PATCH 2/4] misc: Support Chinese. --- README.md | 1 + .../SwiftyCrop/Resources/Localizable.xcstrings | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index 00b8f30..94c7d23 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ The following languages are supported & localized: - 🇧🇷 Brazilian Portuguese - 🇰🇷 Korean - 🇯🇵 Japanese +- 🇨🇳 Chinese The localization file can be found in `Sources/SwiftyCrop/Resources`. diff --git a/Sources/SwiftyCrop/Resources/Localizable.xcstrings b/Sources/SwiftyCrop/Resources/Localizable.xcstrings index 70c560d..73240db 100644 --- a/Sources/SwiftyCrop/Resources/Localizable.xcstrings +++ b/Sources/SwiftyCrop/Resources/Localizable.xcstrings @@ -75,6 +75,12 @@ "state" : "translated", "value" : "Скасувати" } + }, + "zh" : { + "stringUnit" : { + "state" : "translated", + "value" : "取消" + } } } }, @@ -152,6 +158,12 @@ "state" : "translated", "value" : "Переміщення та масштабування" } + }, + "zh" : { + "stringUnit" : { + "state" : "translated", + "value" : "移动·缩放" + } } } }, @@ -229,6 +241,12 @@ "state" : "translated", "value" : "Зберегти" } + }, + "zh" : { + "stringUnit" : { + "state" : "translated", + "value" : "保存" + } } } } From a59200cfdd39d84b94ecf25afe111ece79b3f52e Mon Sep 17 00:00:00 2001 From: Felix Date: Sat, 11 Jan 2025 23:47:38 +0900 Subject: [PATCH 3/4] fix: Build warning about the xcstrings file. --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 038c7ec..59ee436 100644 --- a/Package.swift +++ b/Package.swift @@ -21,7 +21,7 @@ let package = Package( path: "Sources", resources: [ .copy("PrivacyInfo.xcprivacy"), - .process("SwiftyCrop/Resources/*.xcstrings"), + .process("SwiftyCrop/Resources/Localizable.xcstrings"), ] ), .testTarget( From f0264c38ed15335ff6d51aace2c6ff0c1a9d5fcb Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 11 Jan 2025 15:52:15 +0100 Subject: [PATCH 4/4] Added contributor in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 94c7d23..fb5826f 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,8 @@ Thanks to [@yhirano](https://github.com/yhirano) for adding the japanese localiz Thanks to [@yefimtsev](https://github.com/yefimtsev) for adding the ability to customize fonts and colors 🖼️ +Thanks to [@SuperY](https://github.com/SuperY) for adding the chinese localization 🇨🇳 + ## ✍️ Author Benedikt Betz