mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 21:15:21 +00:00
COVIDSafe code from version 2.4 (#45)
This commit is contained in:
parent
f14aa60482
commit
377bc0009b
63 changed files with 3096 additions and 372 deletions
45
CovidSafe/StateTerritory.swift
Normal file
45
CovidSafe/StateTerritory.swift
Normal file
|
@ -0,0 +1,45 @@
|
|||
//
|
||||
// StateTerritory.swift
|
||||
// CovidSafe
|
||||
//
|
||||
// Copyright © 2021 Australian Government. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
enum StateTerritory: String {
|
||||
case AU, ACT, NSW, NT, QLD, SA, TAS, VIC, WA
|
||||
}
|
||||
|
||||
extension StateTerritory {
|
||||
|
||||
func stateTerritoryFullName() -> String {
|
||||
switch self {
|
||||
case .ACT:
|
||||
return "australian_capital_territory".localizedString()
|
||||
case .NSW:
|
||||
return "new_south_wales".localizedString()
|
||||
case .NT:
|
||||
return "northern_territory".localizedString()
|
||||
case .QLD:
|
||||
return "queensland".localizedString()
|
||||
case .SA:
|
||||
return "south_australia".localizedString()
|
||||
case .TAS:
|
||||
return "tasmania".localizedString()
|
||||
case .VIC:
|
||||
return "victoria".localizedString()
|
||||
case .WA:
|
||||
return "western_australia".localizedString()
|
||||
default:
|
||||
return "country_region_name_au".localizedString()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension StateTerritory: SimpleCellObject {
|
||||
|
||||
func getCellTitle() -> String {
|
||||
return stateTerritoryFullName()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue