Skip to content

feat: enhance localization methods to use SDK's active locale for plural rules#391

Open
serhii-londar wants to merge 2 commits intomasterfrom
#365
Open

feat: enhance localization methods to use SDK's active locale for plural rules#391
serhii-londar wants to merge 2 commits intomasterfrom
#365

Conversation

@serhii-londar
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 15, 2026 08:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enhances the String localization helpers so formatted localization (including .stringsdict plural resolution) uses the SDK’s active localization locale instead of the device locale.

Changes:

  • Update cw_localized(with:) overloads to call String(format:locale:arguments:) with an SDK-derived Locale.
  • Add a private String.crowdinLocale helper to derive the locale from the SDK’s current localization (with fallback).

Comment thread Sources/CrowdinSDK/CrowdinSDK/Extensions/String.swift Outdated
Comment thread Sources/CrowdinSDK/CrowdinSDK/Extensions/String.swift
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 1.17647% with 84 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.58%. Comparing base (30455af) to head (8096376).

Files with missing lines Patch % Lines
Sources/Tests/Core/CrowdinLocaleTests.swift 0.00% 78 Missing ⚠️
...rces/CrowdinSDK/CrowdinSDK/Extensions/String.swift 14.29% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #391      +/-   ##
==========================================
- Coverage   57.30%   56.58%   -0.71%     
==========================================
  Files         134      135       +1     
  Lines        6540     6623      +83     
==========================================
  Hits         3747     3747              
- Misses       2793     2876      +83     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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