Skip to content

0.4.1

Compare
Choose a tag to compare
@liamnichols liamnichols released this 28 May 20:27
· 29 commits to main since this release
ed5fb37

What's Changed

New in 0.4.0, dedicated support for SwiftUI has been added through extensions on Text and LocalizedStringKey 🎉 APIs support iOS 13/macOS 10.5 and later and allow you to benefit from full SwiftUI support for features such as markdown and dynamic language overrides.

var body: some View {
    Form {
        TextField(.localizable(.namePlaceholder), text: $name)
        Text(localizable: .footnote)
    }
    .navigationTitle(.localizable(.createAccountTitle))
}

It is now preferred to use the LocalizedStringKey.localizable(_:) or LocalizedStringResource.localizable(_:) static methods instead of the LocalizedStringResource.localizable static property. The static property has been marked as deprecated. A warning will be emitted starting in 0.5.0 and the code will be completely removed in 1.0.0. See below for migrating your code:

- Text(.localizable.foo)
+ Text(.localizable(.foo))
- String(localized: .localizable.bar)
+ String(localizable: .bar)
- .navigationTitle("\(.localizable.title)")
+ .navigationTitle(.localizable(.title))

Pull Requests

0.4.1

0.4.0

Full Changelog: 0.4.0...0.4.1

SHA for xcstrings-tool.artifactbundle.zip: 0dea864c5d351258f5d513e1c749a9a2f1b3eb9b9cab907b4acdd74a02988770