Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose StringCatalog target as a library #48

Merged
merged 6 commits into from
Apr 3, 2024

Conversation

tricky-vrc
Copy link
Contributor

@tricky-vrc tricky-vrc commented Apr 2, 2024

In some cases you might want to use the xcstrings-tool project to parse string catalogs or create new ones in other command line apps. Swift requires explicitly defining initializers in order to make them public. The test checks that the necessary StringCatalog symbols (for basic StringCatalog operations) are accessible without importing the rest of xcstrings-tool.

Copy link
Owner

@liamnichols liamnichols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution @tricky-vrc!

I did consider exposing the library, but I was a bit hesitant because I wasn't quite sure if I matched the .xcstrings spec properly as it is an undocumented format.

That said, I don't mind doing so if it helps you. Once it matures a bit, I want to consider moving it to its own repository so that it can be versioned correctly, but we can leave that for another day.

Please just look at my small suggestions then I will merge this 🙏

Sources/StringCatalog/Types/StringSubstitution.swift Outdated Show resolved Hide resolved
Tests/StringCatalogTests/Tests.swift Outdated Show resolved Hide resolved
Tests/StringCatalogTests/Tests.swift Outdated Show resolved Hide resolved
Tests/StringCatalogTests/Tests.swift Outdated Show resolved Hide resolved
Package.swift Outdated Show resolved Hide resolved
@liamnichols
Copy link
Owner

I'm not sure why the tests failed, but perhaps the generated scheme names have changed now that there are multiple products... Please can you double check the scheme name and update .github/workflows/ci.yml? iirc, I think we need to change -scheme XCStringsTool to -scheme XCStringsTool-Package or something like that.

@liamnichols
Copy link
Owner

Thanks again @tricky-vrc! I'll merge this now 🙇

@liamnichols liamnichols changed the title Make StringCatalog usable as a library Expose StringCatalog target as a library Apr 3, 2024
@liamnichols liamnichols merged commit ddbda75 into liamnichols:main Apr 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants