Skip to content

Commit

Permalink
Release/1.0.5 (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgzonArifi authored Sep 25, 2024
2 parents dffc14f + 2fd1a4a commit 7409b23
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 334 deletions.
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/Lingua.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/LinguaLib.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/LinguaTests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
348 changes: 25 additions & 323 deletions Lingua-App/Lingua/Lingua.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum Lingua {
static let inputProjectName = tr("ProjectForm", "input_project_name")
/// Sheet ID *
static let inputSheetId = tr("ProjectForm", "input_sheet_id")
/// After you "Localize", you have to Add files to "%@"... in Xcode, if they are not added already
/// After you "Localize", you have to Add files to "%@"... in Xcode, if they are not added already.\n\nNOTE: If you are using Xcode 16 and have structured your project using 'Folders' instead of 'Groups', this step is not necessary.
static func iosLocalizationInfoMessage(_ param1: String) -> String {
return tr("ProjectForm", "ios_localization_info_message", param1)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"localize_button" = "Localize";
"swift_code_toggle_title" = "Generate Swift Code";
"input_directory_button" = "Choose Directory";
"ios_localization_info_message" = "After you \"Localize\", you have to Add files to \"%@\"... in Xcode, if they are not added already";
"ios_localization_info_message" = "After you \"Localize\", you have to Add files to \"%@\"... in Xcode, if they are not added already.

NOTE: If you are using Xcode 16 and have structured your project using 'Folders' instead of 'Groups', this step is not necessary.";
"api_key_help" = "Here are the steps to enable the Google Sheets API and create an API key:

* Go to the https://console.cloud.google.com/.
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ Then in the configuration file created you need to provide your data, like below

The output directory property should be the path where you want the tool to create localization files.

* For iOS it can be any directory on your project. After you run the command, for the first time, you have to **`Add files to 'YourProject'`** in Xcode.
* For iOS it can be any directory on your project.

After you run the command, for the first time, you have to **`Add files to 'YourProject'`** in Xcode.\
**NOTE:** If you are using Xcode 16 and have structured your project using **Folders** instead of **Groups**, this step is not necessary.

* For Android, since the translation are placed in a specific project directory, the output directory it should look something like this: **`path/YourProject/app/src/main/res `**

Expand Down
2 changes: 1 addition & 1 deletion Sources/LinguaLib/Common/Extensions/String+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

public extension String {
static let packageName = "Lingua"
static let version = "1.0.4"
static let version = "1.0.5"
static let swiftLocalizedName = "\(String.packageName).swift"
static let fileHeader = """
This file was generated with Lingua command line tool. Please do not change it!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

final class CustomJSONEncoder: JSONEncoder {
final class CustomJSONEncoder: JSONEncoder, @unchecked Sendable {
override func encode<T: Encodable>(_ value: T) throws -> Data {
let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ struct NSRegularExpressionPlaceholderExtractor: PlaceholderExtractorStrategy {
func extractPlaceholders(from translation: String, pattern: String) -> [Placeholder] {
guard let regex = try? NSRegularExpression(pattern: pattern) else { return [] }

let matches = regex.matches(in: translation,
range: NSRange(location: 0, length: translation.count))
let range = NSRange(location: 0, length: translation.count)
let matches = regex.matches(in: translation, range: range)

return matches
.enumerated()
Expand Down

0 comments on commit 7409b23

Please sign in to comment.