Skip to content

Commit

Permalink
Merge branch 'release/4.7.1' into versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Aug 26, 2021
2 parents c16b219 + 69798d5 commit c83fe72
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion BartyCrouch.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "BartyCrouch"
s.version = "4.7.0"
s.version = "4.7.1"
s.summary = "Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files."

s.description = <<-DESC
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries se
### Security
- None.

## [4.7.1] - 2021-08-26
### Fixed
- Fixed that DeepL translation doesn't work for Simplified Chinese.
PR: [#232](https://github.com/Flinesoft/BartyCrouch/pull/232) | Author: [Manabu Nakazawa](https://github.com/mshibanami)

## [4.7.0] - 2021-07-31
### Added
- Add support for DeepL API Free
Expand Down
2 changes: 1 addition & 1 deletion Formula/bartycrouch.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Bartycrouch < Formula
desc "Incrementally update/translate your Strings files"
homepage "https://github.com/Flinesoft/BartyCrouch"
url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.6.0", :revision => "771a4aeaab1cf262f0af51811379aaeea675e3cc"
url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.7.0", :revision => "c16b219d28ce27e57744dcf67adfde7a2912d78a"
head "https://github.com/Flinesoft/BartyCrouch.git"

depends_on :xcode => ["12.0", :build]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<img src="https://api.codacy.com/project/badge/Coverage/7b34ad9193c2438aa32aa29a0490451f"/>
</a>
<a href="https://github.com/Flinesoft/BartyCrouch/releases">
<img src="https://img.shields.io/badge/Version-4.7.0-blue.svg"
alt="Version: 4.7.0">
<img src="https://img.shields.io/badge/Version-4.7.1-blue.svg"
alt="Version: 4.7.1">
</a>
<img src="https://img.shields.io/badge/Swift-5.4-FFAC45.svg"
alt="Swift: 5.4">
Expand Down
2 changes: 1 addition & 1 deletion Sources/BartyCrouch/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SwiftCLI
// MARK: - CLI
let cli = CLI(
name: "bartycrouch",
version: "4.7.0",
version: "4.7.1",
description: "Incrementally update & translate your Strings files from code or interface files."
)

Expand Down
16 changes: 14 additions & 2 deletions Sources/BartyCrouchTranslator/DeeplApi/DeepLApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ extension DeepLApi: Endpoint {
switch self {
case let .translate(texts, sourceLanguage, targetLanguage, apiKey):
urlParameters["text"] = .array(texts)
urlParameters["source_lang"] = .string(sourceLanguage.rawValue.capitalized)
urlParameters["target_lang"] = .string(targetLanguage.rawValue.capitalized)
urlParameters["source_lang"] = sourceLanguage.deepLParameterValue
urlParameters["target_lang"] = targetLanguage.deepLParameterValue
urlParameters["auth_key"] = .string(apiKey)
}

Expand All @@ -87,3 +87,15 @@ extension DeepLApi: Endpoint {
}
}
}

private extension Language {
var deepLParameterValue: QueryParameterValue {
switch self {
case .chineseSimplified:
return .string("ZH")

default:
return .string(rawValue.uppercased())
}
}
}
2 changes: 1 addition & 1 deletion Sources/SupportingFiles/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.7.0</string>
<string>4.7.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand Down

0 comments on commit c83fe72

Please sign in to comment.