Localization guide
Orifold ships full interface localization in English, Spanish, French, Hindi, Simplified Chinese, and Japanese, stored in Orifold/Resources/Localizable.xcstrings.
Coverage is enforced by a test
Section titled “Coverage is enforced by a test”A test in the suite checks that every localization key has a translation in all six languages, so a missing string fails CI rather than shipping silently.
The SwiftPM gotcha: swift test never compiles .xcstrings, so load via Bundle.module
swift test alone never compiles .xcstrings — only Xcode’s build step does. This gap once caused 27 CI test failures that looked unrelated to localization at all. The fix loads strings through Bundle.module with a JSON fallback, so swift test and Xcode both resolve the same strings consistently.
Adding a language
Section titled “Adding a language”- Add the new language to
Localizable.xcstrings. - Translate every existing key.
- Update the coverage test’s expected language list.
- Run the full test suite to confirm nothing is missing.