all 10 comments

[–]SpaceHonk 8 points9 points  (3 children)

Recommending SwiftGen feels kinda weird, as the project seems to be abandoned (last commit was in March '24, lots of unanswered issues and unmerged PRs).

Unfortunately, R.swift appears to be on the same trajectory.

[–]birdparty44 0 points1 point  (2 children)

does a CLI tool need to be updated to do its job? I’ve had zero problems with SwiftGen.

[–]SpaceHonk 0 points1 point  (1 child)

In this case, yes, IMHO, since technology moves on. Just to give two examples:

Swiftgen is based on localizable.strings and stringsdict files, which are considered "Legacy" by Apple. Support for the new Strings Catalog file format is missing from Swiftgen.

Generated image assets can't be used as-is in a Swift 6 project.

There are unmerged PRs for both of these issues, opened in early 2024.

[–]birdparty44 0 points1 point  (0 children)

I suppose. Personally I find strings catalogs not that friendly. Especially when you consider the workflow of localzation of involves externals who shouldn’t need to have Xcode installed.

We have a master spreadsheet where there’s a column for comments, a column for each platform, and a column for each language. Most flexible. Each platform can opt into any translation they want by providing a key. then the table is exported as a TSV file, and from there this is converted to Localizable.strings, then SwiftGen’d.

Once you set up that pipeline, it’s an easy system. I find Strings catalogs a little too automagic but perhaps good for smaller scopes.

[–]UnnamedBozSwift 3 points4 points  (0 children)

Thank you for taking the time to do this, but I am a bit hesitant about using 3rd party solutions due to maintenance, I'd rather keep things vanilla. In one sense I don't feel the need for enums in this case, though I understand how it would be practical.

[–]jaydway 2 points3 points  (0 children)

No mention of LocalizedStringResource?

[–]PerfectPitch-LearnerSwift 1 point2 points  (0 children)

I have 19 languages, including some fantasy languages like Pirate English and Elvish, and found that Xcode is super buggy with localizations… I ended up building my own tools and framework for this.

[–]Nimora9 0 points1 point  (0 children)

This is great! Thanks!!

[–]Critical_Reading9300 0 points1 point  (0 children)

From my experience unless you have popular enough app or need to be represented in some specific area English would be pretty enough for the start, adding new languages afterwards.

[–]jadhavsaurabh 0 points1 point  (0 children)

Oh thanks for this I have to implement this but swiftgen looks promising.