Reusable, end-to-end prompt for localizing ANY SwiftUI app's user-facing strings into the App Store locales, correctly and verifiably.
This document is structured into TWO self-contained sections:
- SECTION 1 — IMPLEMENTATION: How to actually localize an app (recon through translation, build, verify)
- SECTION 2 — TESTING/VALIDATION: How to verify localization works at runtime (simulator testing, screenshots, validation)
Each section can power a separate reusable template task: "Localize App" and "Test App Localization". >
| enum Parked {} | |
| enum Driving {} | |
| enum Gaming {} | |
| private class EngineSystem { | |
| static var shared = EngineSystem() | |
| private init() {} | |
| func start() {/**/} | |
| func accelerate() { /* Uses gas pedal input to accelerate the real car */ } |
| // | |
| // RegularExpression.swift | |
| // RegularExpressions | |
| // | |
| // Created by John Scott on 15/07/2020. | |
| // | |
| // Original matching implementation Brian Kernighan : https://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html | |
| // Swift port Ben Cohen : https://github.com/apple/swift/blob/a9eee38e109e3d99f103a9bee71bed4422fbb6fd/benchmark/single-source/StringMatch.swift | |
| import Foundation |
Author: Richard Wei (rxwei@google.com) on behalf of the Swift for TensorFlow team
Last updated: October 2, 2019
The differentiable programming feature (AutoDiff) has been incubated in the 'tensorflow' branch of apple/swift since December 2017 and released as part of the Swift for TensorFlow toolchains. The Differentiable Programming Mega-Proposal, which serves as a manifesto, received general positive feedback from the community, but there is a long way between receiving conceptual approval and obtaining Swift Evolution approval of such a large feature. We would like to merge the pieces into the 'master' branch under a gate to further development and bake the feature on master, just like Apple develops its major features
| enum JSON: Decodable { | |
| case bool(Bool) | |
| case double(Double) | |
| case string(String) | |
| indirect case array([JSON]) | |
| indirect case dictionary([String: JSON]) | |
| init(from decoder: Decoder) throws { | |
| if let container = try? decoder.container(keyedBy: JSONCodingKeys.self) { | |
| self = JSON(from: container) |
Most of the manifesto is background and detailed definitions -- if you're confused or want details, read the manifesto!
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170213/032155.html
Note also that manifestos aren't complete proposals -- syntax and details may change!
One piece of background: inout is kinda complicated because it can be used on computed properties -- foo(&val.x) might be sugar for
The goal of this document is to provide a comprehensive view of what value subtyping might look like in Swift and demonstrate how generalized enums play a significant role in this future.
Note: All syntax used in this document that is not currently valid Swift syntax is only intended to serve the purpose of demonstrating ideas and to serve as a point of reference for future proposals. The intent is not to propose that this exact syntax be used.
Acknowledgement: some of the ideas in this document have been inspired by Niko Matsakis' blog post exploring similar ideas in the context of Rust: http://smallcultfollowing.com/babysteps/blog/2015/08/20/virtual-structs-part-3-bringing-enums-and-structs-together/
| import Foundation | |
| private class BasicValueTransformer: ValueTransformer { | |
| let transform: (AnyObject?) -> (AnyObject?) | |
| init(transform: @escaping (AnyObject?) -> (AnyObject?)) { | |
| self.transform = transform | |
| } | |
| // MARK: NSValueTransformer |
First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)
$ git checkout masterFetch the remote, bringing the branches and their commits from the remote repository.
You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master.