Skip to content

Commit

Permalink
Merge pull request #10 from transifex/stelios/feature/fetch-tags
Browse files Browse the repository at this point in the history
Add support for fetch tags in Pull command
  • Loading branch information
stelabouras authored Jun 23, 2021
2 parents 993f08a + b21c2c5 commit af01445
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/TXCli/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ will try to create it (alongside any intermediate folders).
""")
private var output: String

@Option(name: .long, parsing: .upToNextOption, help: """
If set, only the strings that have all of the given tags will be downloaded.
""")
private var withTagsOnly: [String]

func run() throws {
let logHandler = CliLogHandler()
logHandler.verbose = options.verbose
Expand Down Expand Up @@ -273,7 +278,7 @@ will try to create it (alongside any intermediate folders).
var appTranslations: [String: TXLocaleStrings] = [:]
var appErrors: [Error] = []

TXNative.fetchTranslations(nil) { (fetchedTranslations, errors) in
TXNative.fetchTranslations(tags: withTagsOnly) { (fetchedTranslations, errors) in
appErrors = errors
appTranslations = fetchedTranslations
semaphore.signal()
Expand Down

0 comments on commit af01445

Please sign in to comment.