-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync the codes release/v0.1 to main (#17)
* [Bug] IOS Flutter SDK- Translation: English is not translated in the Subtitle section (#14) * Bug fix: [Flutter SDK] [RTL] Some of the images/texts are in the wrong direction (#15) * Bug fix: [Flutter SDK] [RTL] Some of the images/texts are in the wrong direction * Update UIView+AppLanguage.swift * Fix warning: Forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents. (#16) * [CPS-830] Bug fix: iOS RN SDK - DS - Invalid access token overlaps with the icon (#18) * Bug fix: CPS-830 * Update FireworkVideoUI.podspec
- Loading branch information
1 parent
e99d1ce
commit fc6b72f
Showing
12 changed files
with
125 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
Sources/FireworkVideoUI/AppLanguage/Extensions/Foundation/NSLocale+AppLanguage.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// Locale+AppLanguage.swift | ||
// | ||
// Created by linjie jiang on 5/7/24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension NSLocale { | ||
static func swizzleNSLocaleMethodsForAppLanguage() { | ||
Swizzle.swizzleClassSelector( | ||
cls: self, | ||
originalSelector: #selector(getter: NSLocale.current), | ||
customSelector: #selector(NSLocale.fw_current)) | ||
Swizzle.swizzleClassSelector( | ||
cls: self, | ||
originalSelector: #selector(getter: NSLocale.autoupdatingCurrent), | ||
customSelector: #selector(NSLocale.fw_autoupdatingCurrent)) | ||
Swizzle.swizzleClassSelector( | ||
cls: self, | ||
originalSelector: #selector(getter: NSLocale.preferredLanguages), | ||
customSelector: #selector(NSLocale.fw_preferredLanguages)) | ||
} | ||
|
||
@objc class func fw_current() -> Locale { | ||
if let language = AppLanguageManager.shared.appLanguage { | ||
return Locale(identifier: language) | ||
} | ||
|
||
return fw_current() | ||
} | ||
|
||
@objc class func fw_autoupdatingCurrent() -> Locale { | ||
if let language = AppLanguageManager.shared.appLanguage { | ||
return Locale(identifier: language) | ||
} | ||
|
||
return fw_autoupdatingCurrent() | ||
} | ||
|
||
@objc class func fw_preferredLanguages() -> [String] { | ||
let languages = fw_preferredLanguages() | ||
if let language = AppLanguageManager.shared.appLanguage { | ||
return [language] + languages | ||
} | ||
|
||
return languages | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
Sources/FireworkVideoUI/AppLanguage/Extensions/Foundation/NumberFormatter+AppLanguage.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters