Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve localization usage #113

Merged
merged 11 commits into from
Mar 1, 2021
Merged

Improve localization usage #113

merged 11 commits into from
Mar 1, 2021

Conversation

serhii-londar
Copy link
Collaborator

@serhii-londar serhii-londar commented Feb 7, 2021

Use bundled translations if not available on Crowdin

Used local localization in case crowdin localization is missing.
Fix issue with handling downloaded localization after localization is changed.
Fix issue with language changing.
Fix issue with language detecting.
Add plurals support for localization extrantor.
@crowdin-bot
Copy link
Collaborator

crowdin-bot commented Feb 7, 2021

Warnings
⚠️ Big PR, try to keep changes smaller if you can

Generated by 🚫 Danger Swift against f253ac7

@andrii-bodnar andrii-bodnar changed the title #116 Improve localization usage Feb 8, 2021
Add better error handling, notidy anout errors while downloading supported languages and manifest file.
Remove SDK modes.
@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #113 (f253ac7) into master (59fffbf) will decrease coverage by 1.77%.
The diff coverage is 62.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
- Coverage   50.54%   48.78%   -1.76%     
==========================================
  Files         118      117       -1     
  Lines        4567     4558       -9     
==========================================
- Hits         2308     2223      -85     
- Misses       2259     2335      +76     
Impacted Files Coverage Δ
...inSDK/Classes/CrowdinAPI/SocketAPI/SocketAPI.swift 0.00% <0.00%> (ø)
...ization/Provider/InBundleLocalizationStorage.swift 0.00% <0.00%> (ø)
...ader/Operations/CrowdinJsonDownloadOperation.swift 0.00% <0.00%> (ø)
...der/Operations/CrowdinXliffDownloadOperation.swift 0.00% <0.00%> (ø)
Tests/Pods/BaseAPI/BaseAPI/Classes/BaseAPI.swift 24.49% <ø> (ø)
...aseAPI/BaseAPI/Classes/Extensions/URLSession.swift 50.00% <ø> (ø)
Tests/UnitTests/CrowdinTesterTests.swift 100.00% <ø> (ø)
...ContentDeliveryAPI/CrowdinContentDeliveryAPI.swift 52.30% <50.00%> (-0.97%) ⬇️
CrowdinSDK/Classes/CrowdinSDK/CrowdinSDK.swift 83.12% <50.00%> (-3.97%) ⬇️
...ization/Extractor/LocalLocalizationExtractor.swift 40.00% <51.86%> (+3.77%) ⬆️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59fffbf...f253ac7. Read the comment docs.

localizations.insert(Strings.auto.rawValue.capitalized.localized, at: 0)

self.title = Strings.settings.rawValue.capitalized.localized
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: Strings.done.rawValue.capitalized.localized, style: .done, target: self, action: #selector(cancelBtnTapped))
self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: "SettingsCell")
self.tableView.reloadData()
Copy link
Contributor

Choose a reason for hiding this comment

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

A lot of "self" usage, can we remove it?

Add gear icon.
Remove unused properties from Localization.
Add disconnect handle to SocketManager.
Fix issue with saving wrong localization strings after switching language.
Fix issue with storing localization strings while realtime-preview feature is enabled.
Add method for clearing up local localization storage.
Fix issue with starting real-time for the first time.
Improve refresh localization option.
Improve storing e-tag's for localization files.
Update pods in Tests project.
Set launch arguments for tests target to use en localization.
@NazarYavornytskyy NazarYavornytskyy merged commit f33e701 into master Mar 1, 2021
@serhii-londar serhii-londar deleted the #116 branch March 17, 2021 09:40
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.

4 participants