Skip to content

feat(i18n): Add Simplified Chinese (zh-Hans) localization, in-app language switcher, and standard MapKit compatibility - #7

Closed
IamNewHands wants to merge 2 commits into
seanhowarthdev:mainfrom
IamNewHands:feat/simplified-chinese-localization
Closed

IamNewHands wants to merge 2 commits into
seanhowarthdev:mainfrom
IamNewHands:feat/simplified-chinese-localization

Conversation

@IamNewHands

Copy link
Copy Markdown

Hi @seanhowarthdev,

First of all, thank you so much for creating Roam Control! It is a remarkably well-architected and helpful tool for on-device location testing and development.

This PR introduces comprehensive Simplified Chinese (\zh-Hans) localization support along with an in-app language switcher, allowing users to seamlessly switch between System default, 简体中文, and English. Additionally, it addresses standard MapKit API compatibility for iOS 17/18 SDK compilation.


🌟 Summary of Changes

  1. Native String Catalogs (.xcstrings):

    • Added \RoamControl/Resources/Localizable.xcstrings\ covering 100% of user-facing UI text, error alerts, diagnostic logs, pairing guidance, and settings.
    • Added \RoamControl/Resources/InfoPlist.xcstrings\ for localized permission descriptions (\NSLocationWhenInUseUsageDescription, \NSLocalNetworkUsageDescription).
    • Added \zh-Hans\ to \knownRegions\ in \RoamControl.xcodeproj/project.pbxproj.
    • All translations have been carefully crafted and contextualized for iOS and GPS/navigation conventions (avoiding literal/machine translations).
  2. In-App Language Selection:

    • Added \AppLanguage\ (.system, .zhHans, .en) to \AppPreferences\ and \AppModel.
    • Added an Appearance & Language picker in \SettingsView.
    • Propagated locale updates via SwiftUI .environment(\.locale, ...), allowing dynamic, instant re-rendering without requiring an app restart.
    • Updated UI string definitions across views to \LocalizedStringKey\ where appropriate.
  3. MapKit & CoreLocation SDK Compatibility:

    • Migrated reverse geocoding to standard \CLGeocoder.reverseGeocodeLocation\ and \item.placemark\ properties, ensuring seamless compilation across standard Xcode 16 / iOS 17/18 SDK environments.
    • Updated \WalkingRoutePlanner\ to use standard \MKMapItem(placemark:)\ initializers.

✅ Verification & Quality

  • Ran \scripts/test-release-invariants.py: Passed (Build 61 release, scheduler and consent-gate source checks passed).
  • Validated all .xcstrings\ JSON structures and keys against source SwiftUI views.
  • Verified in-app language switching and layout across English and Simplified Chinese on physical devices.

Please let me know if there are any adjustments or improvements you'd like me to make. Thank you again for your time and for maintaining this fantastic project!

@seanhowarthdev

Copy link
Copy Markdown
Owner

Thanks for putting this together! This is a substantial contribution, so I’m going to take some time to review it properly before making any changes.

I’ve only just released Build 61 with some fairly significant changes to pairing and background behaviour, so I want to let that settle and make sure I’ve got a stable baseline before bringing in another large set of changes.

I’ll go through the PR in detail once that’s settled. Thanks again for taking the time to contribute.

@seanhowarthdev

Copy link
Copy Markdown
Owner

Thanks again for putting this PR together, and for your patience while I’ve been working through the recent Build 61 changes and some repository housekeeping.

I’ve now updated Roam Control’s licensing and contribution terms. Before any external contribution can be accepted or incorporated into the project, I’m asking contributors to read and sign the Contributor Agreement in Documentation/Licensing/CONTRIBUTOR_AGREEMENT.md.

Just to set expectations clearly, signing the agreement doesn’t mean that a PR will necessarily be merged or included in a future release. Contributions still need to fit the current architecture, stability requirements and project roadmap, and I may decide that a particular change isn’t suitable or isn’t something I want to prioritise at this time.

I also don’t want you to put any personal information or a signature into the public repository. If you’re happy to proceed under the new contribution terms, let me know here and I’ll arrange a private way for you to return the signed agreement.

Thanks again for the time you’ve already put into this.

@seanhowarthdev

Copy link
Copy Markdown
Owner

Thanks again for putting all the work into this. I wanted to come back to this rather than leave the PR sitting open while waiting on the Contributor Agreement.

Since my last comment, I've had a rethink about how I want to handle development of Roam Control. I'm going to keep implementation and code changes maintainer-developed rather than accept external feature PRs, so there's no need for you to complete the Contributor Agreement for this.

Simplified Chinese support is still something I'm interested in exploring, particularly as Roam Control is getting interest from users in China, but I'd want to approach the localisation and any related MapKit changes as part of my own development and testing rather than merge this implementation.

I'm going to close the PR rather than leave you waiting when I don't intend to merge it. I really appreciate the amount of time you've put into translating and testing this, and the work here is useful context for understanding what Chinese localisation needs to cover.

Thanks again for contributing and for taking the time to put such a detailed PR together.

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.

2 participants