Skip to content

Commit

Permalink
Merge branch 'release/4.3.0' into versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Sep 28, 2020
2 parents 49b4cf2 + 4d7d519 commit 42a6dd8
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 142 deletions.
1 change: 0 additions & 1 deletion .jamithub/projconf.json

This file was deleted.

85 changes: 0 additions & 85 deletions .projlint.yml

This file was deleted.

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.2.0"
s.version = "4.3.0"
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.3.0] - 2020-09-28
### Changed
- Updated swift-syntax to match Swift 5.3.
Issues: [#199](https://github.com/Flinesoft/BartyCrouch/issues/199), [#201](https://github.com/Flinesoft/BartyCrouch/issues/201) | PR: [#204](https://github.com/Flinesoft/BartyCrouch/pull/204) | Author: [w8wjb](https://github.com/w8wjb)

## [4.2.0] - 2020-04-24
### Added
- Added new `-p` / `--path` option to run BartyCrouch from a different path than current.
Expand Down
4 changes: 2 additions & 2 deletions Formula/bartycrouch.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
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.1.1", :revision => "201b0b02c196dcda14c806a539ab963284abeeaf"
url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.2.0", :revision => "49b4cf27d5b521abf615d4ccb7754d642205f802"
head "https://github.com/Flinesoft/BartyCrouch.git"

depends_on :xcode => ["11.4", :build]
depends_on :xcode => ["12.0", :build]

def install
system "make", "install", "prefix=#{prefix}"
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"repositoryURL": "https://github.com/apple/swift-syntax.git",
"state": {
"branch": null,
"revision": "0688b9cfc4c3dd234e4f55f1f056b2affc849873",
"version": "0.50200.0"
"revision": "844574d683f53d0737a9c6d706c3ef31ed2955eb",
"version": "0.50300.0"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.2
// swift-tools-version:5.3
import PackageDescription

let package = Package(
Expand All @@ -16,7 +16,7 @@ let package = Package(
.package(name: "Rainbow", url: "https://github.com/onevcat/Rainbow.git", from: "3.1.5"),
.package(name: "SwiftCLI", url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.1"),
.package(name: "Toml", url: "https://github.com/jdfergason/swift-toml.git", .branch("master")),
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50200.0")),
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50300.0")),
],
targets: [
.target(
Expand Down
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<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.2.0-blue.svg"
alt="Version: 4.2.0">
<img src="https://img.shields.io/badge/Version-4.3.0-blue.svg"
alt="Version: 4.3.0">
</a>
<img src="https://img.shields.io/badge/Swift-5.2-FFAC45.svg"
alt="Swift: 5.2">
<img src="https://img.shields.io/badge/Swift-5.3-FFAC45.svg"
alt="Swift: 5.3">
<a href="https://github.com/Flinesoft/BartyCrouch/blob/main/LICENSE.md">
<img src="https://img.shields.io/badge/License-MIT-lightgrey.svg"
alt="License: MIT">
Expand Down Expand Up @@ -66,7 +66,7 @@ Checkout [this blog post](https://medium.com/@Jeehut/localization-in-swift-like-
### Installation

<details>
<summary>Via [Homebrew](https://brew.sh/)</summary>
<summary>Via <a href="https://brew.sh/">Homebrew</a></summary>

To install Bartycrouch the first time, simply run the command:

Expand All @@ -82,7 +82,7 @@ brew upgrade bartycrouch
</details>

<details>
<summary>Via [Mint](https://github.com/yonaskolb/Mint)</summary>
<summary>Via <a href="https://github.com/yonaskolb/Mint">Mint</a></summary>

To **install** or update to the latest version of BartyCrouch simply run this command:

Expand Down Expand Up @@ -140,16 +140,14 @@ emptyValues = true

This is the default configuration of BartyCrouch and should work for most projects as is. In order to use BartyCrouch to its extent, it is recommended though to consider making the following changes:

1. To speed up execution time provide more specific paths for any key containing `path` if possible. (especially in the `update.transform` section, e.g. `"App/Sources"` for `codePath` or `"App/Supporting Files"` for `supportedLanguageEnumPath` )
1. To speed it up significantly, provide more specific paths for any key containing `path` if possible (especially in the `update.transform` section, e.g. `["App/Sources"]` for `codePaths` or `["App/Supporting Files"]` for `supportedLanguageEnumPaths`).
2. Remove the `code` task if your project is Swift-only and you use the new [`transform` update task](#localization-workflow-via-transform).
3. If you are using [SwiftGen](https://github.com/SwiftGen/SwiftGen#strings) with the `structured-swift4` template, you will probably want to user the `transform` task and change its `transformer` option to `swiftgenStructured`.
3. If you are using [SwiftGen](https://github.com/SwiftGen/SwiftGen#strings) with the `structured-swift4` template, you will probably want to use the `transform` task and change its `transformer` option to `swiftgenStructured`.
4. If you decided to use the `transform` task, create a new file in your project (e.g. under `SupportingFiles`) named `BartyCrouch.swift` and copy the following code:

```swift
//
// This file is required in order for the `transform` task of the translation helper tool BartyCrouch to work.
// See here for more details: https://github.com/Flinesoft/BartyCrouch
//

import Foundation

Expand Down Expand Up @@ -215,7 +213,7 @@ Also the following command line options can be provided:
- **`-v`, `--verbose`**: Prints more detailed information about the executed command.
- **`-x`, `--xcode-output`**: Prints warnings & errors in Xcode compatible format.
- **`-w`, `--fail-on-warnings`**: Returns a failed status code if any warning is encountered.
- **`-p`, `--path`: Specifies a different path than current to run BartyCrouch from there.
- **`-p`, `--path`**: Specifies a different path than current to run BartyCrouch from there.

### `update` subcommand

Expand All @@ -234,7 +232,7 @@ In order to configure which tasks are executed, edit this section in the config
tasks = ["interfaces", "code", "transform", "normalize"]
```

<details><summary>Options for `interfaces`</summary>
<details><summary>Options for <code>interfaces</code></summary>

- `paths`: The directory / directories to search for Storyboards & XIB files.
- `defaultToBase`: Add Base translation as value to new keys.
Expand All @@ -243,11 +241,11 @@ tasks = ["interfaces", "code", "transform", "normalize"]

</details>

<details><summary>Options for `code`</summary>
<details><summary>Options for <code>code</code></summary>

- `codePaths`: The directory / directories to search for Swift code files.
- `localizablePaths`: The enclosing path(s) containing the localized `Localizable.strings` files.
- `defaultsToKeys`: Add new keys both as key and value.
- `defaultToKeys`: Add new keys both as key and value.
- `additive`: Prevents cleaning up keys not found in code.
- `customFunction`: Use alternative name to `NSLocalizedString`.
- `customLocalizableName`: Use alternative name for `Localizable.strings`.
Expand All @@ -256,7 +254,7 @@ tasks = ["interfaces", "code", "transform", "normalize"]

</details>

<details><summary>Options for `transform`</summary>
<details><summary>Options for <code>transform</code></summary>

- `codePaths`: The directory / directories to search for Swift code files.
- `localizablePaths`: The enclosing path(s) containing the localized `Localizable.strings` files.
Expand All @@ -268,15 +266,15 @@ tasks = ["interfaces", "code", "transform", "normalize"]

</details>

<details><summary>Options for `translate`</summary>
<details><summary>Options for <code>translate</code></summary>

- `paths`: The directory / directories to search for Strings files.
- `secret`: Your [Microsoft Translator Text API Subscription Key](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/translator-text-how-to-signup#authentication-key).
- `sourceLocale`: The source language to translate from.

</details>

<details><summary>Options for `normalize`</summary>
<details><summary>Options for <code>normalize</code></summary>

- `paths`: The directory / directories to search for Strings files.
- `sourceLocale`: The source language to harmonize keys of other languages with.
Expand Down Expand Up @@ -405,5 +403,12 @@ See the file [MIGRATION_GUIDES.md](https://github.com/Flinesoft/BartyCrouch/blob

Contributions are welcome. Feel free to open an issue on GitHub with your ideas or implement an idea yourself and post a pull request. If you want to contribute code, please try to follow the same syntax and semantic in your **commit messages** (see rationale [here](http://chris.beams.io/posts/git-commit/)). Also, please make sure to add an entry to the `CHANGELOG.md` file which explains your change.

After Release Checklist:

1. Run `make portable_zip` to generate `.build/release/portable_bartycrouch.zip`
2. Create new release with text from new `CHANGELOG.md` section & attach `portable_bartycrouch.zip` as binary
2. Update `tag` and `revision` in `Formula/bartycrouch.rb`, commit & push change
3. Run `brew bump-formula-pr bartycrouch --tag=<tag> --revision=<revision>`

## License
This library is released under the [MIT License](http://opensource.org/licenses/MIT). See LICENSE for details.
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.2.0",
version: "4.3.0",
description: "Incrementally update & translate your Strings files from code or interface files."
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ class TranslateTransformer: SyntaxRewriter {
leftParen: SyntaxFactory.makeLeftParenToken(),
argumentList: SyntaxFactory.makeTupleExprElementList([keyArgument, commentArgument]),
rightParen: SyntaxFactory.makeRightParenToken(),
trailingClosure: nil
trailingClosure: nil,
additionalTrailingClosures: nil
)
)
}
Expand Down
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.2.0</string>
<string>4.3.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
29 changes: 0 additions & 29 deletions beak.swift

This file was deleted.

0 comments on commit 42a6dd8

Please sign in to comment.