mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
25 lines
717 B
Swift
25 lines
717 B
Swift
import ArgumentParser
|
|
import CommandLineTools
|
|
import Foundation
|
|
|
|
struct DownloadStrings: ParsableCommand {
|
|
static var configuration = CommandConfiguration(abstract: "A tool to download localizable strings from localazy")
|
|
|
|
@Flag(help: "Use to download translation keys for all languages")
|
|
var allLanguages = false
|
|
|
|
func run() throws {
|
|
try localazyDownload()
|
|
try swiftgen()
|
|
}
|
|
|
|
private func localazyDownload() throws {
|
|
let arguments = allLanguages ? " all" : ""
|
|
try Zsh.run(command: "localazy download\(arguments)")
|
|
}
|
|
|
|
private func swiftgen() throws {
|
|
try Zsh.run(command: "swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml")
|
|
}
|
|
}
|