Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
inderdhir committed Jun 23, 2024
1 parent bb8a409 commit f1d821b
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 213 deletions.
4 changes: 0 additions & 4 deletions DatWeatherDoe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
2077BC4D278DEBA300E0453C /* MenuBarManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2077BC4C278DEBA300E0453C /* MenuBarManager.swift */; };
2077BC52278DF98800E0453C /* WeatherConditionTextMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2077BC51278DF98800E0453C /* WeatherConditionTextMapper.swift */; };
209174102A9BDA4A00BB63E0 /* ConfigureViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2085263427E80B9E0017D7F4 /* ConfigureViewModel.swift */; };
209174112A9BDA5000BB63E0 /* TemperatureConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209F8A2F2790DE5B00EB5C45 /* TemperatureConverter.swift */; };
209482C629934BFF00AF39D4 /* MeasurementUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209482C529934BFF00AF39D4 /* MeasurementUnit.swift */; };
209F8A38279136D300EB5C45 /* LocationValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209F8A37279136D300EB5C45 /* LocationValidator.swift */; };
209F8A3D27914A5900EB5C45 /* NetworkClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209F8A3C27914A5900EB5C45 /* NetworkClient.swift */; };
Expand Down Expand Up @@ -139,7 +138,6 @@
207E989B26838D0D00DC2162 /* DatWeatherDoe.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = DatWeatherDoe.xctestplan; sourceTree = "<group>"; };
2085263427E80B9E0017D7F4 /* ConfigureViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigureViewModel.swift; sourceTree = "<group>"; };
209482C529934BFF00AF39D4 /* MeasurementUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeasurementUnit.swift; sourceTree = "<group>"; };
209F8A2F2790DE5B00EB5C45 /* TemperatureConverter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemperatureConverter.swift; sourceTree = "<group>"; };
209F8A37279136D300EB5C45 /* LocationValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationValidator.swift; sourceTree = "<group>"; };
209F8A3C27914A5900EB5C45 /* NetworkClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkClient.swift; sourceTree = "<group>"; };
209F8A4027915DBC00EB5C45 /* LocationCoordinatesWeatherRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationCoordinatesWeatherRepository.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -481,7 +479,6 @@
isa = PBXGroup;
children = (
20B4681A2793A7E300FC6050 /* TemperatureTextBuilder.swift */,
209F8A2F2790DE5B00EB5C45 /* TemperatureConverter.swift */,
20CA6E10278F49AC00FFC53A /* TemperatureFormatter.swift */,
2044E91D2867D3CF00AED55B /* TemperatureForecastTextBuilder.swift */,
204597672A84492400CF73CE /* TemperatureWithDegreesCreator.swift */,
Expand Down Expand Up @@ -719,7 +716,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
209174112A9BDA5000BB63E0 /* TemperatureConverter.swift in Sources */,
209174102A9BDA4A00BB63E0 /* ConfigureViewModel.swift in Sources */,
2005C055278CB4E40067BBD1 /* WeatherValidatorType.swift in Sources */,
20B468222793B85900FC6050 /* SystemLocationWeatherRepository.swift in Sources */,
Expand Down
30 changes: 0 additions & 30 deletions DatWeatherDoe/Resources/Localization/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,6 @@
/* Clear at night weather condition */
"Clear" = "Klar";

/* Tornado weather condition */
"Tornado" = "Tornado";

/* Squall weather condition */
"Squall" = "Böen";

/* Ash weather condition */
"Ash" = "Asche";

/* Dust weather condition */
"Dust" = "Staub";

/* Sand weather condition */
"Sand" = "Sand";

/* Fog weather condition */
"Fog" = "Nebel";

/* Sand/Dust Whirls weather condition */
"Sand/Dust Whirls" = "Sand-/Staubwirbel";

/* Haze weather condition */
"Haze" = "Dunst";

/* Smoke weather condition */
"Smoke" = "Rauch";

/* Mist weather condition */
"Mist" = "Feuchter Nebel";

/* Snow weather condition */
"Snow" = "Schnee";

Expand Down
30 changes: 0 additions & 30 deletions DatWeatherDoe/Resources/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,6 @@
/* Clear at night weather condition */
"Clear" = "Clear";

/* Tornado weather condition */
"Tornado" = "Tornado";

/* Squall weather condition */
"Squall" = "Squall";

/* Ash weather condition */
"Ash" = "Ash";

/* Dust weather condition */
"Dust" = "Dust";

/* Sand weather condition */
"Sand" = "Sand";

/* Fog weather condition */
"Fog" = "Fog";

/* Sand/Dust Whirls weather condition */
"Sand/Dust Whirls" = "Sand/Dust Whirls";

/* Haze weather condition */
"Haze" = "Haze";

/* Smoke weather condition */
"Smoke" = "Smoke";

/* Mist weather condition */
"Mist" = "Mist";

/* Snow weather condition */
"Snow" = "Snow";

Expand Down
30 changes: 0 additions & 30 deletions DatWeatherDoe/Resources/Localization/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,6 @@
/* Clear at night weather condition */
"Clear" = "Temps clair";

/* Tornado weather condition */
"Tornado" = "Tornade";

/* Squall weather condition */
"Squall" = "Bourrasque";

/* Ash weather condition */
"Ash" = "Cendre";

/* Dust weather condition */
"Dust" = "Poussière";

/* Sand weather condition */
"Sand" = "Sable";

/* Fog weather condition */
"Fog" = "Brouillard";

/* Sand/Dust Whirls weather condition */
"Sand/Dust Whirls" = "Tourbillons de sable/poussière";

/* Haze weather condition */
"Haze" = "Brume";

/* Smoke weather condition */
"Smoke" = "Fumée";

/* Cloudy weather condition */
"Cloudy" = "Nuageux";

Expand Down Expand Up @@ -91,9 +64,6 @@
/* Location error when fetching weather */
"❗️Location" = "Erreur d’emplacement";

/* Mist weather condition */
"Mist" = "Brumeux";

/* Partly cloudy weather condition */
"Partly cloudy" = "Partiellement couvert";

Expand Down
30 changes: 0 additions & 30 deletions DatWeatherDoe/Resources/Localization/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,6 @@
/* Clear at night weather condition */
"Clear" = "Sereno";

/* Tornado weather condition */
"Tornado" = "Tornado";

/* Squall weather condition */
"Squall" = "Acquazzone";

/* Ash weather condition */
"Ash" = "Cenere";

/* Dust weather condition */
"Dust" = "Polvere";

/* Sand weather condition */
"Sand" = "Sabbia";

/* Fog weather condition */
"Fog" = "Nebbia";

/* Sand/Dust Whirls weather condition */
"Sand/Dust Whirls" = "Vortici Sabbia/Polvere";

/* Haze weather condition */
"Haze" = "Caligine";

/* Smoke weather condition */
"Smoke" = "Fumo";

/* Mist weather condition */
"Mist" = "Foschia";

/* Snow weather condition */
"Snow" = "Neve";

Expand Down
30 changes: 0 additions & 30 deletions DatWeatherDoe/Resources/Localization/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,6 @@
/* Clear at night weather condition */
"Clear" = "クリア";

/* Tornado weather condition */
"Tornado" = "竜巻";

/* Squall weather condition */
"Squall" = "スコール";

/* Ash weather condition */
"Ash" = "灰";

/* Dust weather condition */
"Dust" = "埃";

/* Sand weather condition */
"Sand" = "砂";

/* Fog weather condition */
"Fog" = "霧";

/* Sand/Dust Whirls weather condition */
"Sand/Dust Whirls" = "砂または埃の渦";

/* Haze weather condition */
"Haze" = "霞";

/* Smoke weather condition */
"Smoke" = "煙";

/* Mist weather condition */
"Mist" = "靄";

/* Snow weather condition */
"Snow" = "雪";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,6 @@
/* Clear at night weather condition */
"Clear" = "无云";

/* Tornado weather condition */
"Tornado" = "龙卷风";

/* Squall weather condition */
"Squall" = "雷暴雨";

/* Ash weather condition */
"Ash" = "火山灰天气";

/* Dust weather condition */
"Dust" = "尘埃天气";

/* Sand weather condition */
"Sand" = "沙尘";

/* Fog weather condition */
"Fog" = "雾";

/* Sand/Dust Whirls weather condition */
"Sand/Dust Whirls" = "局部龙卷风";

/* Haze weather condition */
"Haze" = "霾";

/* Smoke weather condition */
"Smoke" = "烟雾";

/* Mist weather condition */
"Mist" = "薄雾";

/* Snow weather condition */
"Snow" = "雪";

Expand Down

This file was deleted.

8 changes: 6 additions & 2 deletions DatWeatherDoe/UI/Menu Bar/StatusItem/WindSpeedFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class WindSpeedFormatter: WindSpeedFormatterType {
isRoundingOff _: Bool
) -> String {
let mphSpeed = windData.speedMph
let mpsSpeed = 0.4469 * mphSpeed
let mpsSpeed = mpsSpeedFrom(mphSpeed: mphSpeed)

let mphRounded = formatter.string(from: NSNumber(value: mphSpeed)) ?? ""
let windSpeedMph = [mphRounded, "mi/hr"].joined()
Expand All @@ -59,7 +59,7 @@ final class WindSpeedFormatter: WindSpeedFormatterType {
windData: WindData
) -> String {
let mphSpeed = windData.speedMph
let mpsSpeed = 0.4469 * mphSpeed
let mpsSpeed = mpsSpeedFrom(mphSpeed: mphSpeed)

let speed = unit == .imperial ? mphSpeed : mpsSpeed
let speedRounded = formatter.string(from: NSNumber(value: speed)) ?? ""
Expand All @@ -83,4 +83,8 @@ final class WindSpeedFormatter: WindSpeedFormatterType {
let windFullStr = [windAndDegreesStr, windDirectionStr].joined(separator: " ")
return windFullStr
}

private func mpsSpeedFrom(mphSpeed: Double) -> Double {
0.4469 * mphSpeed
}
}

0 comments on commit f1d821b

Please sign in to comment.