Skip to content

Commit 5dbaa2d

Browse files
committed
ui: 분기 표시를 로컬라이징 처리
1 parent c2e44c7 commit 5dbaa2d

3 files changed

Lines changed: 47 additions & 29 deletions

File tree

DevLog/Presentation/ViewModel/ProfileViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,11 @@ extension ProfileViewModel {
262262
let year = calendar.component(.year, from: start)
263263
let month = calendar.component(.month, from: start)
264264
let quarter = ((month - 1) / 3) + 1
265-
return "\(year) Q\(quarter)"
265+
return String.localizedStringWithFormat(
266+
String(localized: "profile_year_quarter_format"),
267+
String(year),
268+
String(quarter)
269+
)
266270
}
267271

268272
var selectedDayActivities: [ProfileSelectedDayActivity] {

DevLog/Resource/Localizable.xcstrings

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,40 @@
911911
}
912912
}
913913
},
914+
"profile_quarter_format" : {
915+
"extractionState" : "manual",
916+
"localizations" : {
917+
"en" : {
918+
"stringUnit" : {
919+
"state" : "translated",
920+
"value" : "Q%1$lld"
921+
}
922+
},
923+
"ko" : {
924+
"stringUnit" : {
925+
"state" : "translated",
926+
"value" : "%1$lld분기"
927+
}
928+
}
929+
}
930+
},
931+
"profile_year_quarter_format" : {
932+
"extractionState" : "manual",
933+
"localizations" : {
934+
"en" : {
935+
"stringUnit" : {
936+
"state" : "translated",
937+
"value" : "Q%2$@ %1$@"
938+
}
939+
},
940+
"ko" : {
941+
"stringUnit" : {
942+
"state" : "translated",
943+
"value" : "%1$@년 %2$@분기"
944+
}
945+
}
946+
}
947+
},
914948
"profile_quarterly_activity" : {
915949
"extractionState" : "manual",
916950
"localizations" : {
@@ -1064,23 +1098,6 @@
10641098
}
10651099
}
10661100
},
1067-
"profile_year_option_format" : {
1068-
"extractionState" : "manual",
1069-
"localizations" : {
1070-
"en" : {
1071-
"stringUnit" : {
1072-
"state" : "translated",
1073-
"value" : "%1$lld"
1074-
}
1075-
},
1076-
"ko" : {
1077-
"stringUnit" : {
1078-
"state" : "translated",
1079-
"value" : "%1$lld년"
1080-
}
1081-
}
1082-
}
1083-
},
10841101
"push_clear_all_filters" : {
10851102
"extractionState" : "manual",
10861103
"localizations" : {
@@ -1386,9 +1403,6 @@
13861403
}
13871404
}
13881405
}
1389-
},
1390-
"Q%lld" : {
1391-
13921406
},
13931407
"relative_time_days_ago_format" : {
13941408
"extractionState" : "manual",

DevLog/UI/Profile/ProfileView.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,8 @@ struct ProfileView: View {
260260
set: { viewModel.send(.setQuarterPickerYear($0)) }
261261
)) {
262262
ForEach(viewModel.availableQuarterYears, id: \.self) { year in
263-
Text(
264-
String.localizedStringWithFormat(
265-
String(localized: "profile_year_option_format"),
266-
Int64(year)
267-
)
268-
)
269-
.tag(year)
263+
Text(verbatim: String(year))
264+
.tag(year)
270265
}
271266
}
272267
.pickerStyle(.menu)
@@ -304,7 +299,12 @@ struct ProfileView: View {
304299
guard let quarterStart else { return }
305300
viewModel.send(.selectQuarter(quarterStart))
306301
} label: {
307-
Text("Q\(quarter)")
302+
Text(
303+
String.localizedStringWithFormat(
304+
String(localized: "profile_quarter_format"),
305+
Int64(quarter)
306+
)
307+
)
308308
.font(.subheadline.weight(.semibold))
309309
.frame(maxWidth: .infinity)
310310
.padding(.vertical, 12)

0 commit comments

Comments
 (0)