Skip to content

feat(sync): show the Quran ID sign-in page in the app's language - #1315

Merged
mohamede1945 merged 2 commits into
mainfrom
afifi/sign-in-ui-locales
Nov 18, 2026
Merged

mohamede1945 merged 2 commits into
mainfrom
afifi/sign-in-ui-locales

Conversation

@mohamede1945

@mohamede1945 mohamede1945 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Signing in to Quran.com opened the Quran ID page in the phone's language, not the app's. So an app set to Arabic through iOS's per-app language, on an English phone, got an English sign-in page. Sign-in now sends the language the app's strings resolved to as the OIDC ui_locales, and the page shows in Arabic. A language the page doesn't support yet falls back to the browser's language, as before.

Change

  • AuthenticationClientMobileSyncImpl.login(on:) passes [Locale.preferredLanguageLocale.languageCode] to MobileSyncAuthService.login(uiLocales:). preferredLanguageLocale follows Bundle.fixedModule.preferredLocalizations, which honors a per-app language.
  • AuthenticationClient now depends on Localization.

Dependencies

This PR moves mobile-sync-spm to 0.4.16 (quran/mobile-sync-spm#54, released on mobile-sync 0.1.60 from quran/mobile-sync#397), which adds login(uiLocales:). Package.resolved doesn't change, because it keeps no sync-only pins.

Tests

No new test: the locale only appears in the browser request inside MobileSync, and testing it here would mean faking MobileSync's auth service. PreferredLanguageLocaleTests already covers how the locale is chosen.

  • make build-sync-local-debug and make test-sync-local-debug TARGET=AuthenticationClientTests with the local mobile-sync and mobile-sync-spm branches.
  • make test-sync TARGET=AuthenticationClientTests against the released mobile-sync-spm 0.4.16: 6 tests, 0 failures.
  • make build-no-sync and make format-lint.
  • quran-ios-private on the iOS 27.2 simulator: phone in English, app in Arabic, prelive account.
App in Arabic Sign-in page Signed in
Settings in Arabic Quran ID sign-in in Arabic Signed in

The system's "Wants to Use … to Sign In" alert stays in the phone's language; iOS draws it.

🤖 Generated with Claude Code

mohamede1945 and others added 2 commits November 17, 2026 20:04
Sign-in now sends the language the app's strings resolved to
(Locale.preferredLanguageLocale, which honors a per-app language) as
the OIDC ui_locales, so an app in Arabic on an English phone gets the
sign-in page in Arabic instead of the browser's language. Languages
the page doesn't support fall back to Accept-Language as before.

Needs a mobile-sync-spm release with login(uiLocales:).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mobile-sync-spm 0.4.16 (quran/mobile-sync-spm#54) adds
MobileSyncAuthService.login(uiLocales:) on mobile-sync 0.1.60
(quran/mobile-sync#397), which sign-in now calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mohamede1945
mohamede1945 marked this pull request as ready for review November 18, 2026 01:47
@mohamede1945
mohamede1945 merged commit becca3d into main Nov 18, 2026
8 checks passed
@mohamede1945
mohamede1945 deleted the afifi/sign-in-ui-locales branch November 18, 2026 01:50
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.

1 participant