Skip to content

Commit

Permalink
Fix issue with parsing correct localization from xcstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-londar committed Feb 4, 2025
1 parent 2b8aefb commit ed6d309
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class CrowdinLocalizationDownloader: CrowdinDownloaderProtocol {

xcstrings.forEach { filePath in
let download = CrowdinXcstringsDownloadOperation(filePath: filePath,
localization: manifestManager.xcstringsLanguage,
localization: localization,
xcstringsLanguage: manifestManager.xcstringsLanguage,
timestamp: timestamp,
contentDeliveryAPI: contentDeliveryAPI)
download.completion = { [weak self] (strings, plurals, error) in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,18 @@ class CrowdinXcstringsDownloadOperation: CrowdinDownloadOperation {
var completion: CrowdinDownloadOperationCompletion? = nil
let localization: String

init(filePath: String, localization: String, timestamp: TimeInterval?, contentDeliveryAPI: CrowdinContentDeliveryAPI, completion: CrowdinDownloadOperationCompletion?) {
init(filePath: String, localization: String, xcstringsLanguage: String, timestamp: TimeInterval?, contentDeliveryAPI: CrowdinContentDeliveryAPI, completion: CrowdinDownloadOperationCompletion?) {
self.localization = localization
self.timestamp = timestamp
self.eTagStorage = FileEtagStorage(localization: localization)
self.eTagStorage = FileEtagStorage(localization: xcstringsLanguage)
super.init(filePath: filePath, contentDeliveryAPI: contentDeliveryAPI)
self.completion = completion
}

required init(filePath: String, localization: String, timestamp: TimeInterval?, contentDeliveryAPI: CrowdinContentDeliveryAPI) {
required init(filePath: String, localization: String, xcstringsLanguage: String, timestamp: TimeInterval?, contentDeliveryAPI: CrowdinContentDeliveryAPI) {
self.localization = localization
self.timestamp = timestamp
self.eTagStorage = FileEtagStorage(localization: localization)
self.eTagStorage = FileEtagStorage(localization: xcstringsLanguage)
super.init(filePath: filePath, contentDeliveryAPI: contentDeliveryAPI)
}

Expand Down

0 comments on commit ed6d309

Please sign in to comment.