XCStringsTool

0.1.2

A plugin to generate Swift constants for your Strings Catalogs.
liamnichols/xcstrings-tool

What's New

0.1.2

2024-02-08T16:07:44Z

What's Changed

  • Add CONTRIBUTING.md with snapshot test documentation by @SamHastings1066 in #27
  • [doc] Correct repository url by @hiragram in #33
  • Disable use of auxiliary file to prevent permission error on XcodeCloud by @hiragram in #36

New Contributors

Full Changelog: 0.1.1...0.1.2

SHA for xcstrings-tool.artifactbundle.zip: 1731cfcfb5d8f2a5d704877667dcab798283b1f5a476ccad0315dccaf27f9bb5

XCStrings Tool

Tests

A plugin to generate Swift constants for your String Catalogs.

Motivation

Hardcoding localized strings in your code and then having the compiler automatically extract them into the Strings Catalog (or legacy .strings files) works great on smaller projects, but over time you will often find that this approach doesn't scale well.

You usually find yourself compromising on either code quality, translator comments or boilerplate code from having to define your own constants, but it doesn't have to be this way!

struct ContentView: View {
    @Query var items: [Item]

    var body: some View {
        List {
            Section {
                ForEach(items) { item in
                    ItemView(item)
                }
            } footer: {
                Text(.localizable.footerText(items.count))
            }
        }
        .navigationTitle(Text(.localizable.contentViewTitle))
    }
}

XCStrings Tool aims to extend your localization experience so that you don't have to compromise anything. It does this by using your Strings Catalog as a source for generating elegant Swift code that you can reference directly within the rest of your project.

Getting Started

XCStrings Tool is a Swift Package Plugin that can integrate directly into Xcode and Swift Package targets that contain Strings Catalog (.xcstrings) files.

For more information about the Strings Catalog format, check out the Discover Strings Catalogs video from WWDC 2023.

Demo

To see XCStrings Tool in action, check out the Dog Tracker demo project for yourself.

Documentation

View the documentation on the Swift Package Index

If you have an improvement for the documentation, you can modify it here.

Contributing

Contributions to XCStrings Tool are welcome!

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Sat May 04 2024 09:12:15 GMT-0900 (Hawaii-Aleutian Daylight Time)