Skip to content

Commit d8b7a47

Browse files
committed
chore: l10n 진행
1 parent 1998151 commit d8b7a47

8 files changed

Lines changed: 171 additions & 17 deletions

DevLogWidget/Heatmap/HeatmapWidget.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct HeatmapWidget: Widget {
2323
.widgetURL(WidgetDeepLink.heatmapURL)
2424
}
2525
.configurationDisplayName("Heatmap")
26-
.description("활동 히트맵을 표시합니다.")
26+
.description("widget_heatmap_description")
2727
.supportedFamilies([.systemSmall, .systemMedium])
2828
}
2929
}

DevLogWidget/Heatmap/HeatmapWidgetConfigurationIntent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ import WidgetKit
1010

1111
struct HeatmapWidgetConfigurationIntent: WidgetConfigurationIntent {
1212
static var title: LocalizedStringResource = "Heatmap"
13-
static var description = IntentDescription("활동 히트맵을 표시합니다.")
13+
static var description = IntentDescription("widget_heatmap_description")
1414
}

DevLogWidget/Heatmap/HeatmapWidgetEntryView.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct HeatmapWidgetEntryView: View {
2828
switch widgetFamily {
2929
case .systemSmall:
3030
VStack(alignment: .leading, spacing: 4) {
31-
header(title: "이번 달 히트맵")
31+
header(title: "widget_heatmap_current_month_title")
3232
WidgetHeatmapGrid(
3333
months: currentMonths(from: snapshot),
3434
selectedActivityKindRawValues: snapshot.selectedActivityKindRawValues,
@@ -38,7 +38,7 @@ struct HeatmapWidgetEntryView: View {
3838
}
3939
case .systemMedium:
4040
VStack(alignment: .leading, spacing: 8) {
41-
header(title: "이번 분기 히트맵")
41+
header(title: "widget_heatmap_current_quarter_title")
4242
WidgetHeatmapGrid(
4343
months: snapshot.months,
4444
selectedActivityKindRawValues: snapshot.selectedActivityKindRawValues,
@@ -58,15 +58,15 @@ struct HeatmapWidgetEntryView: View {
5858
switch widgetFamily {
5959
case .systemSmall:
6060
VStack(alignment: .leading, spacing: 8) {
61-
header(title: "이번 달 히트맵")
61+
header(title: "widget_heatmap_current_month_title")
6262
WidgetHeatmapPlaceholderGrid(
6363
months: shape.currentMonths,
6464
showsMonthTitles: false
6565
)
6666
}
6767
case .systemMedium:
6868
VStack(alignment: .leading, spacing: 8) {
69-
header(title: "이번 분기 히트맵")
69+
header(title: "widget_heatmap_current_quarter_title")
7070
WidgetHeatmapPlaceholderGrid(
7171
months: shape.quarterMonths,
7272
showsMonthTitles: true
@@ -77,7 +77,7 @@ struct HeatmapWidgetEntryView: View {
7777
}
7878
}
7979

80-
private func header(title: String) -> some View {
80+
private func header(title: LocalizedStringKey) -> some View {
8181
HStack(alignment: .firstTextBaseline, spacing: 6) {
8282
Text(title)
8383
.font(.headline)

DevLogWidget/Heatmap/WidgetHeatmapGrid.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ struct WidgetHeatmapPlaceholderGrid: View {
7474
private struct WidgetHeatmapWeekdayLabels: View {
7575
let layout: WidgetHeatmapLayout
7676
private let orderedWeekdays = Array(1...7)
77-
private let weekdayLabels = [
78-
2: "",
79-
4: "",
80-
6: ""
77+
private let weekdayLocalizedStringKeys: [Int: LocalizedStringKey] = [
78+
2: "widget_heatmap_weekday_monday",
79+
4: "widget_heatmap_weekday_wednesday",
80+
6: "widget_heatmap_weekday_friday"
8181
]
8282

8383
var body: some View {
@@ -91,8 +91,8 @@ private struct WidgetHeatmapWeekdayLabels: View {
9191

9292
@ViewBuilder
9393
private func weekdayLabel(for weekday: Int) -> some View {
94-
if let label = weekdayLabels[weekday] {
95-
Text(label)
94+
if let localizedStringKey = weekdayLocalizedStringKeys[weekday] {
95+
Text(localizedStringKey)
9696
.font(.caption2)
9797
.foregroundStyle(.secondary)
9898
.frame(
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
{
2+
"sourceLanguage" : "ko",
3+
"strings" : {
4+
"#%lld" : {
5+
6+
},
7+
"%lld" : {
8+
9+
},
10+
"Heatmap" : {
11+
12+
},
13+
"Today" : {
14+
15+
},
16+
"widget_heatmap_current_month_title" : {
17+
"extractionState" : "manual",
18+
"localizations" : {
19+
"en" : {
20+
"stringUnit" : {
21+
"state" : "translated",
22+
"value" : "This Month Heatmap"
23+
}
24+
},
25+
"ko" : {
26+
"stringUnit" : {
27+
"state" : "translated",
28+
"value" : "이번 달 히트맵"
29+
}
30+
}
31+
}
32+
},
33+
"widget_heatmap_current_quarter_title" : {
34+
"extractionState" : "manual",
35+
"localizations" : {
36+
"en" : {
37+
"stringUnit" : {
38+
"state" : "translated",
39+
"value" : "This Quarter Heatmap"
40+
}
41+
},
42+
"ko" : {
43+
"stringUnit" : {
44+
"state" : "translated",
45+
"value" : "이번 분기 히트맵"
46+
}
47+
}
48+
}
49+
},
50+
"widget_heatmap_weekday_friday" : {
51+
"extractionState" : "manual",
52+
"localizations" : {
53+
"en" : {
54+
"stringUnit" : {
55+
"state" : "translated",
56+
"value" : "Fri"
57+
}
58+
},
59+
"ko" : {
60+
"stringUnit" : {
61+
"state" : "translated",
62+
"value" : "금"
63+
}
64+
}
65+
}
66+
},
67+
"widget_heatmap_weekday_monday" : {
68+
"extractionState" : "manual",
69+
"localizations" : {
70+
"en" : {
71+
"stringUnit" : {
72+
"state" : "translated",
73+
"value" : "Mon"
74+
}
75+
},
76+
"ko" : {
77+
"stringUnit" : {
78+
"state" : "translated",
79+
"value" : "월"
80+
}
81+
}
82+
}
83+
},
84+
"widget_heatmap_weekday_wednesday" : {
85+
"extractionState" : "manual",
86+
"localizations" : {
87+
"en" : {
88+
"stringUnit" : {
89+
"state" : "translated",
90+
"value" : "Wed"
91+
}
92+
},
93+
"ko" : {
94+
"stringUnit" : {
95+
"state" : "translated",
96+
"value" : "수"
97+
}
98+
}
99+
}
100+
},
101+
"widget_heatmap_description" : {
102+
"extractionState" : "manual",
103+
"localizations" : {
104+
"en" : {
105+
"stringUnit" : {
106+
"state" : "translated",
107+
"value" : "Shows your activity heatmap."
108+
}
109+
},
110+
"ko" : {
111+
"stringUnit" : {
112+
"state" : "translated",
113+
"value" : "활동 히트맵을 표시합니다."
114+
}
115+
}
116+
}
117+
},
118+
"widget_today_description" : {
119+
"extractionState" : "manual",
120+
"localizations" : {
121+
"en" : {
122+
"stringUnit" : {
123+
"state" : "translated",
124+
"value" : "Shows today's Todo list."
125+
}
126+
},
127+
"ko" : {
128+
"stringUnit" : {
129+
"state" : "translated",
130+
"value" : "오늘 기준 Todo 목록을 표시합니다."
131+
}
132+
}
133+
}
134+
},
135+
"widget_today_empty_message" : {
136+
"extractionState" : "manual",
137+
"localizations" : {
138+
"en" : {
139+
"stringUnit" : {
140+
"state" : "translated",
141+
"value" : "No tasks for today.\nTake a short break!"
142+
}
143+
},
144+
"ko" : {
145+
"stringUnit" : {
146+
"state" : "translated",
147+
"value" : "오늘은 할 일이 없어요.\n잠시 휴식을 취해보세요!"
148+
}
149+
}
150+
}
151+
}
152+
},
153+
"version" : "1.0"
154+
}

DevLogWidget/Today/TodayTodoWidget.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct TodayTodoWidget: Widget {
2222
.containerBackground(.fill.tertiary, for: .widget)
2323
.widgetURL(WidgetDeepLink.todayTodoURL)
2424
}
25-
.description("오늘 기준 Todo 목록을 표시합니다.")
25+
.description("widget_today_description")
2626
.configurationDisplayName("Today")
2727
.supportedFamilies([.systemSmall, .systemMedium])
2828
}

DevLogWidget/Today/TodayTodoWidgetConfigurationIntent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ import WidgetKit
1010

1111
struct TodayTodoWidgetConfigurationIntent: WidgetConfigurationIntent {
1212
static var title: LocalizedStringResource = "Today"
13-
static var description = IntentDescription("오늘 기준 Todo 목록을 표시합니다.")
13+
static var description = IntentDescription("widget_today_description")
1414
}

DevLogWidget/Today/TodayTodoWidgetEntryView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct TodayTodoWidgetEntryView: View {
4141
if let item = displayedItems(from: snapshot).first {
4242
todoRow(item)
4343
} else {
44-
Text("오늘은 할 일이 없어요.\n잠시 휴식을 취해보세요!")
44+
Text("widget_today_empty_message")
4545
.font(.caption)
4646
.foregroundStyle(.secondary)
4747
.lineLimit(2)
@@ -51,7 +51,7 @@ struct TodayTodoWidgetEntryView: View {
5151
let items = displayedItems(from: snapshot)
5252
VStack(alignment: .leading, spacing: 6) {
5353
if items.isEmpty {
54-
Text("오늘은 할 일이 없어요.\n잠시 휴식을 취해보세요!")
54+
Text("widget_today_empty_message")
5555
.multilineTextAlignment(.center)
5656
.font(.caption)
5757
.foregroundStyle(.secondary)

0 commit comments

Comments
 (0)