Skip to content

Commit ee76933

Browse files
committed
feat: 시간 표시에 지역화 설정
1 parent 69acbba commit ee76933

2 files changed

Lines changed: 1 addition & 27 deletions

File tree

DevLog/Resource/Localizable.xcstrings

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,23 +1307,6 @@
13071307
}
13081308
}
13091309
},
1310-
"push_settings_minute_suffix" : {
1311-
"extractionState" : "manual",
1312-
"localizations" : {
1313-
"en" : {
1314-
"stringUnit" : {
1315-
"state" : "translated",
1316-
"value" : " min"
1317-
}
1318-
},
1319-
"ko" : {
1320-
"stringUnit" : {
1321-
"state" : "translated",
1322-
"value" : "분"
1323-
}
1324-
}
1325-
}
1326-
},
13271310
"push_settings_title" : {
13281311
"extractionState" : "manual",
13291312
"localizations" : {

DevLog/UI/Setting/PushNotificationSettingsView.swift

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@ struct PushNotificationSettingsView: View {
109109
}
110110

111111
private func formattedTimeString(_ date: Date) -> String {
112-
let minuteValue = Calendar.current.component(.minute, from: date)
113-
let formatStyle: Date.FormatStyle = .dateTime.hour(.twoDigits(amPM: .wide))
114-
115-
if minuteValue == 0 {
116-
return "\(date.formatted(formatStyle))"
117-
}
118-
119-
let hourText = date.formatted(formatStyle)
120-
let minuteText = date.formatted(.dateTime.minute(.twoDigits))
121-
return "\(hourText) \(minuteText)\(String(localized: "push_settings_minute_suffix"))"
112+
date.formatted(.dateTime.hour().minute())
122113
}
123114
}

0 commit comments

Comments
 (0)