Files
letro-ios/Tools/Sources/DownloadStrings.swift
Doug 1f289b1334 Process InfoPlist.strings in Localazy config. (#2249)
Also merge the 2 configs into one using a group to download all strings.
2023-12-15 08:58:34 +00:00

24 lines
687 B
Swift

import ArgumentParser
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 Utilities.zsh("localazy download\(arguments)")
}
private func swiftgen() throws {
try Utilities.zsh("swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml")
}
}