Skip to content

Instantly share code, notes, and snippets.

@bill350
Last active April 10, 2019 16:48
Show Gist options
  • Save bill350/559eab38680a87f1440469a74097302a to your computer and use it in GitHub Desktop.
Save bill350/559eab38680a87f1440469a74097302a to your computer and use it in GitHub Desktop.
func copyLokalizableStrings() {
managedLanguages.forEach { (key, value) in
if key == baseLanguage {
bash(command: "cp", arguments: ["./\(key).lproj/Localizable.strings", "../\(languageFolderPath)/Base.lproj/"])
bash(command: "cp", arguments: ["./\(key).lproj/Localizable.stringsdict", "../\(languageFolderPath)/Base.lproj/"])
} else {
bash(command: "cp", arguments: ["./\(key).lproj/Localizable.strings", "../\(languageFolderPath)/\(key).lproj/"])
bash(command: "cp", arguments: ["./\(key).lproj/Localizable.stringsdict", "../\(languageFolderPath)/\(key).lproj/"])
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment