Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve --keep-translations argument issue #31

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ always be able to export the source locale from the Xcode project.
- Fixes the issue where leading and trailing white space was being added around
the extracted ICU pluralization rules.

## Transifex Command Line Tool 2.1.3
## Transifex Command Line Tool 2.1.4

*October 30, 2023*
*March 7, 2024*

- Adds `--base-sdk` option to `push` command so that developers can specify the
sdk to be used when exporting localizations.
- Addresses issue with the `--keep-translations` option of the `push` command
due to inversion. The option has been replaced by the `--delete-translations`
option, in order to allow the underlying `keep_translations` meta flag to be
set to `false`.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/transifex/transifex-swift",
"state": {
"branch": null,
"revision": "aa97b51b642f3865cc9810d7e07ab2d33d6db215",
"version": "2.0.0"
"revision": "4490b3ed7abae304e9bb3fed02882320b1df224e",
"version": "2.0.1"
}
}
]
Expand Down
14 changes: 7 additions & 7 deletions Sources/TXCli/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ that can be bundled with the iOS application.
The tool can be also used to force CDS cache invalidation so that the next pull
command will fetch fresh translations from CDS.
""",
version: "2.1.3",
version: "2.1.4",
subcommands: [Push.self, Pull.self, Invalidate.self])
}

Expand Down Expand Up @@ -143,13 +143,13 @@ content to occurrences of existing strings instead of overwriting them.
private var overrideOccurrences: Bool = false

@Flag(name: .long, help: """
If keep-translations: true (default), then preserve translations on source
content updates.

If keep-translations: false, then delete translations on source string content
If delete-translations: true, then delete translations on source string content
updates.

If delete-translations: false (default), then preserve translations on source
content updates.
""")
private var keepTranslations: Bool = true
private var deleteTranslations: Bool = false

@Flag(name: .long, help: """
Emulate a content push, without doing actual changes.
Expand Down Expand Up @@ -293,7 +293,7 @@ Emulate a content push, without doing actual changes.
let configuration = TXPushConfiguration(purge: purge,
overrideTags: overrideTags,
overrideOccurrences: overrideOccurrences,
keepTranslations: keepTranslations,
keepTranslations: !deleteTranslations,
dryRun: dryRun)

logHandler.verbose("Push configuration: \(configuration.debugDescription)")
Expand Down
Loading