This file contains hidden or 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
import os | |
def parse_input(input_path): | |
with open(input_path, 'r') as f: | |
lines = f.readlines() | |
translations = {} | |
for line in lines: | |
line = line.strip() | |
if not line.startswith('"') or '=' not in line: |
This file contains hidden or 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
enum WeatherHazardType: String, Codable { | |
case rain = "Rain" | |
case snowIce = "Snow/Ice" | |
case thunderstorm = "Thunderstorm" | |
case fog = "Fog" | |
case extremeTemperature = "Extreme temperature value" | |
case wind = "Wind" | |
case fireWarning = "Fire warning" | |
case coastalEvent = "Marine event" | |
case flooding = "Flood" |
This file contains hidden or 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
struct CustomSegmentedControl: View { | |
@Binding var arrayOfItems: [Item] | |
@Binding var selection: Item | |
@State private var frames: [CGRect] = Array(repeating: .zero, count: 3) | |
var body: some View { | |
ScrollView(.horizontal, showsIndicators: false, content: { | |
HStack(spacing: 0) { | |
ForEach(arrayOfItems.indices, id: \.self) { index in | |
Button( |