Localization: Phase 2 - public API#2477
Conversation
…, and localizationProvider(_:) on CheckoutConfiguration
… into component configurations
…e to showcase new localization API
There was a problem hiding this comment.
Code Review
This pull request introduces a custom localization framework for the Adyen SDK, allowing developers to override default UI strings via a new CheckoutLocalizationProvider protocol. The implementation includes the definition of public and internal localization keys, updates to various component configurations to propagate the provider, and an adapter for cross-module compatibility. Unit tests and a demo implementation are also provided. Review feedback highlights a potential runtime risk due to enum mapping and suggests using CaseIterable to ensure exhaustive synchronization between modules.
|
ℹ️ No baseline data found for 'feature/cosdk-1097-ios-v6-custom-localization-develop'.
|
…into feature/cosdk-1097-ios-v6-custom-localization-phase2
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the CheckoutLocalizationProvider protocol and CheckoutLocalizationKey enum to facilitate custom localization across checkout components. The localizationProvider property was added to multiple configuration objects, including those for Card, 3DS2, Twint, ACH, and BLIK, and integrated into the CheckoutComponentBuilder for propagation. Unit tests and a demo implementation were also provided. Feedback suggests explicitly defining snake_case raw values for the localization keys to align with the Android SDK and updating the configuration setter to accept optional values for consistency.
👀 3 public changes detectedComparing
|
5a4ed2d
into
feature/cosdk-1097-ios-v6-custom-localization-develop
Summary
✅ Phase 0 — #2463
✅ Phase 1 — Internalize legacy localization API
➡️ Phase 2 — Introduce the new public contract
Phase 3 — Wire provider resolution into card flow
Phase 4 — Unsupported locale warnings
Phase 5 — Final confidence pass for card alpha scope
This change completes Phase 2 of the custom localization feature by introducing the new Android-aligned public localization contract:
CheckoutLocalizationKey,CheckoutLocalizationProvider, andCheckoutConfiguration.localizationProvider(_).The provider is propagated generically through
CheckoutComponentBuilderinto checkout component configurations, with demo usage and focused unit coverage added.Note: I cannot make internal
public struct LocalizationKeyto becomepackageyet, as it causes a massive amount of downstream dependencies changes.Ticket
COSDK-1097Checklist