mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00

* fixing locheck * fixing locheck tool * Revert "fixing locheck tool" This reverts commit 9bb3dbcd70d1ecbc62b4289623b5f9e584929997. * locheck install * using the original code to get the directory * adding swiftgen to download strings * setup project on ci * added Strings.swift to the path * adding String.swift
24 lines
716 B
Swift
24 lines
716 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 json = allLanguages ? "localazy-all.json" : "localazy-en.json"
|
|
try Utilities.zsh("localazy download --config \(json)")
|
|
}
|
|
|
|
private func swiftgen() throws {
|
|
try Utilities.zsh("swiftgen config run --config Tools/SwiftGen/swiftgen-config.yml")
|
|
}
|
|
}
|