All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
Formatting Rules for Entries
Each entry should use the following format:- Summary of what was changed in a single line using past tense & followed by two whitespaces.
Issue: [#0](https://github.com/FlineDev/BartyCrouch/issues/0) | PR: [#0](https://github.com/FlineDev/BartyCrouch/pull/0) | Author: [Cihat Gündüz](https://github.com/Jeehut)
Note that at the end of the summary line, you need to add two whitespaces (
) for correct rendering on GitHub.
If needed, pluralize to Tasks
, PRs
or Authors
and list multiple entries separated by ,
. Also, remove entries not needed in the second line.
- None.
- None.
- None.
- None.
- None.
- None.
- Improved implementation of DeepL API client for more reliable escaping than the previous manual escaping logic.
PR: #277 | Author: Nico - Upgraded Swift-Syntax dependency to work with Swift 5.8 to fix build issues.
PR: #279 | Author: Alex Deem
- Support for Swift 5.7 and Xcode 14, dropping support for older versions and fixing the 'could not parse syntax tree' issue.
- BartyCrouch now recognizes
LocalizedStringResource
entries by default (unless you override thecustomFunction
option). This helps support localization in newer APIs like the AppIntents framework. See README for more info.
- Updated DeepL API to a POST request according to the documentation to fix issues.
- Re-implement option
overrideComments
for code update (see README).
Issues: #261 | Author: Cihat Gündüz
- Fixes an issue with linking of SwiftSyntaxParser which prevented from making a new Homebrew release for 4.12.0. See here.
- Adds new
separateWithEmptyLine
options to allow removing the empty line between Strings entries.
Issues: #251 | PR: #254 | Author: Cihat Gündüz
- Fixed an issue where defaulting to Microsoft Translator no longer worked after starting to support DeepL as a translator, too.
Author: Cihat Gündüz
- Update SwiftSyntax dependency to Swift 5.5 to support Xcode 13.
Issues: #201, #249 | Author: Cihat Gündüz
- Added a new option
ignoreKeys
to provide custom alternatives to the defaultbc-ignore
kind of keys if needed. New option defaults to["#bartycrouch-ignore!", "#bc-ignore!", "#i!"]
if not specified otherwise.
PR: #242 | Author: Cihat Gündüz - Added a new option
subpathsToIgnore
to provide subpaths to be ignored (with case-insensitive comparison) inside of the providedpaths
. New option defaults to[".git", "carthage", "pods", "build", ".build", "docs"]
if not specified otherwise.
PR: #242 | Author: Cihat Gündüz
- Removed ignoring all
InfoPlist.strings
files by default. If you want this to actually be the case, just addInfoPlist.strings
to the array in the newsubpathsToIgnore
option, e.g.:subPathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs", "InfoPlist.strings"]
PR: #242 | Author: Cihat Gündüz - Less situations where the empty
tmpstring
folder continues to exist.
PR: #238 | Author: Benjamin Erhart - Only apply ignores on subpaths of explicitly mentioned folders in
path
options, don't ignore any paths that are explicitly mentioned.
PR: #240 | Author: Benjamin Erhart
- Update SwiftSyntax dependency to Swift 5.5 to support Xcode 13.
Author: Kevin
- Fixed that DeepL translation doesn't work for Simplified Chinese.
PR: #232 | Author: Manabu Nakazawa
- Add support for DeepL API Free
PR: #230 | Author: Manabu Nakazawa
- Updated swift-syntax to match Swift 5.4 to support Xcode 12.5.
Issues: #222 | PR: #223 | Author: Matt Sanford
- Fixed an issue with unmatching country code casing for Portuguese and Canadian French.
Author: Cihat Gündüz
- Updated languages supported by Microsoft Translator – 17 more languages available now!
Issue: #216 | PR: #219 | Author: Jamie Gough - BartyCrouch doesn't fail anymore when there's a language not supported by Microsoft Translator (yet) – it prints a warning instead.
Issue: #215 | PR: #219 | Author: Jamie Gough
- Fixed an issue where BartyCrouch did not skip the directories ".git", "Carthage", "Pods", "build", ".build", "docs" anymore.
Issues: #213, #2 | PR: #214 | Author: Bill Panagiotopoulos
- Fix missing usage of
harmonizeWithSource
parameter fornormalize
task.
Issue: #196 | PR: #182 | Author: Marco Pagliari
- Added new
-p
/--path
option to run BartyCrouch from a different path than current.
Issues: #166, #177 | PR: #181 | Author: Cihat Gündüz
- Removed code magic that used the localization comment from Interface Builder files as a source for new translation values.
Issue: #140 | PR: #182 | Author: Cihat Gündüz
- Normalize sortByKeys no longer adds empty line to begining of .strings file.
Issue: #178 | PR: #180 | Author: Patrick Wolowicz
- Fixed crashes in projects with large number of files by introducing new
plist
file based approach for passing arguments. See the new--plist-arguments
option. Will be automatically turned on when needed (many files in project).
Issues: #92, #99 | PRs: #150, #176 | Authors: Christos Koninis, Cihat Gündüz
- Added support for specifying multiple paths for all
path
options.
Issue: #155 | PR: #167 | Author: Frederick Pietschmann
- Upgraded SwiftSyntax to Swift 5.2 version
0.50200.0
.
Issue: #170 | PRs: #171, #172, #173 | Authors: Tomoya Hirano, Cihat Gündüz - Updated all dependencies to their latest versions to prevent warnings.
PR: #172 | Author: Cihat Gündüz
- Make Code Transform, Normalize & Lint fast again (up to 50x faster). Fixes #128 by Frederick Pietschmann.
- Support for Swift 5.0 and Xcode 10.2 command line tools. By Cihat Gündüz.
- Don't rewrite files if they didn't change to improve performance. Via #111 by Keith Bauer.
- None.
- Support for Swift 4.2 and Xcode <=10.1. If you need to run BartyCrouch with older Xcode versions and had a previous version of BartyCrouch installed, then simply switch to it via
brew switch bartycrouch 4.0.0
. By Cihat Gündüz.
- Turns off multiple key/value pairs warning by default. Fixes #120 via #121 by Robert Baker.
- None.
- Support for installation via Mint (SwiftSPM based).
- Use configuration file instead of thousands of command line options.
- Demo project based integration tests.
- Sophisticated SwiftGen-Integration (automatic static NSLocalizedString code replacement) via new
transform
option.
- All subcommands except
lint
were bundled into theupdate
subcommand. - Own client implementation of updated Microsowft Translator API.
- None.
- The
--override-comments
(-c
) option on thecode
subcommand is now always turned on, no need to configure. - The
--extract-loc-strings
(-e
) option on thecode
subcommand is now always turned on, no need to configure.
- More resilient search behavior (to fix issues such as #64, #87, #102, #105).
- None.
- Added ability to ignore empty strings. via #107 by Ludvig Eriksson
- Restructure code for SPM compatibility.
- Introduce CHANGELOG.md, CONTRIBUTION.md and CODE_OF_CONDUCT.md
- Improve Installation section of README
- None.
- None.
- None.
- None.
– Adds new sub command lint
with multiple options.
For example you can now add this to your CI service:
bartycrouch lint -p "/path/to/code/files" -d -e
This will:
- fail the CI if duplicate keys are found within the same file (
-d
) - fail the CI if empty values are found (
-e
)
– Adds new sub command normalize
with multiple options.
For example you can now add this to your build script:
bartycrouch normalize -p "/path/to/code/files" -l en -d -w -h -s
This will:
- warn against duplicate keys or fix them if it can (
-d
) - warn against empty values (
-w
) - make sure your target languages have exactly the same keys as your source language (
-h
) - sort your keys except for those without translations (
-s
)
- Fixed an issue which didn't run sorting keys when no translations were found
- Improved performance with many files
- Fixes a bug related to the new
--custom-localizable-name
option.
– Adds new option --custom-localizable-name
for code
subcommand
- Add support for Swift Package Manager + fixed some issues. Thanks to @mshibanami & @ClementPadovani.
Fixes #72.
Fixes #65.
- Update to Swift 4 & Xcode 9
Fixes #66.
- Adds new
custom-function
command line option forcode
subcommands. See #25 for details. Thanks to @diederich and @crystalstorm for their help to get this done!
- Added compatibility with Xcode 8.3 and Swift 3.1.
- Add new
unstripped
command line option forinterface
andcode
subcommands. See #49.
- Added support for multi-line comments. See #44 for additional details.
Adds two new options to the code
sub command:
- extract-loc-strings: Uses newer tool to extract strings from code. Solves #41.
- Thanks to @fvolchyok for the PR!
- sort-by-keys: Sorts the translation entries by their keys. Solves #26. See also their documentation sections in the README for additional details.
- Adds an option to force update existing comments only via
override-comments
option on thecode
sub command.
- Updated project to Swift 3 and Xcode 8.
- Add & configure SwiftLint linter and fix all warnings & errors (#28)
- Better error message when no
Localizable.strings
file found (#11) - Escape double quotes and backslashes in translated strings (#19)
- Add support for Objective-C++ '.mm' files for subcommand
code
(#22)
- Ignores NSLocalizedStrings which have ignore constant (e.g.
#bc-ignore!
) in comment (#16)
- Sub Commands for updating
interfaces
/translate
instead of options (like-t
) - New sub command to update
Localizable.strings
files fromcode
- Streamlined names of options (force >> override,
-s
>>-p
) - Refactored quite some code
- Input (
-i
), Exclude (-e
) and Output (-o
) options
Please have a look at the migration guide for a flawless upgrade from version 2.x.
- Automatic search for files now also possible when using
-t
(translate) via-s
- Reworked option
-a
(auto) to take a path argument and renamed to-s
(search)
- Improved build times when configured with Git root folder path
- Translating adds missing keys by default, therefore
-c
option was dropped
- Adds support for adding missing keys to target translations Strings files via the
-c
command line option. Note that the undocumented previous behavior of keeping keys in translation targets that didn't exist in translation source Strings files was dropped. From now on only keys that also exist in the source Strings file are kept in the target files to clean up target files. For most projects this change shouldn't have any effect.
- Add support for automatically detecting all Storyboards/XIBs Thanks to this change the suggested build script is now much shorter and will automatically adapt to new Interface Builder file additions. No need to keep the build script updated anymore (for incremental change updates)!
- Add comment Base value update support (only if structure not changed from defaults)
- Update actual translation value if same as Base (assuming comment value is previous Base value) See #4 for further details on the rationale for the changes made here.
- Add option to use Base localization values when adding new keys
- Add support for automatic machine-translation using Microsoft Translator
- Help messages & more by using CommandLine
- Shorter argument names (
--input
or-i
,--output
or-o
,--auto
or-a
) - Migration Guide section for major release upgrades in README
- Improved error handling and exit codes
- Further internal improvements