mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 13:05:21 +00:00
COVIDSafe code from version 1.7 (#8)
This commit is contained in:
parent
2063cea613
commit
6f92ff8fb8
38 changed files with 4504 additions and 1281 deletions
|
@ -9,10 +9,19 @@ import Foundation
|
|||
|
||||
struct URLHelper {
|
||||
static func getAustralianNumberURL() -> String {
|
||||
return "https://www.covidsafe.gov.au/help-topics.html#verify-mobile-number-pin"
|
||||
return "\(getHelpURL())#verify-mobile-number-pin"
|
||||
}
|
||||
static func getHelpURL() -> String {
|
||||
return "https://www.covidsafe.gov.au/help-topics.html"
|
||||
let localeId = Locale.current.identifier
|
||||
let supportedLocales = Bundle.main.localizations
|
||||
let matches = supportedLocales.filter { (supportedLocale) -> Bool in
|
||||
return localeId.starts(with: supportedLocale)
|
||||
}
|
||||
guard let localeCode = matches.first, localeCode != "en" else {
|
||||
return "https://www.covidsafe.gov.au/help-topics.html"
|
||||
}
|
||||
|
||||
return "https://www.covidsafe.gov.au/help-topics/\(localeCode.lowercased()).html"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue