Skip to content

Commit 7542d20

Browse files
authored
Improve Korean (ko) phrasing for more natural cron descriptions (#193)
* Improve Korean locale phrasing for natural cron descriptions * Fix Korean spacing and last-weekday phrasing for KO locale tests
1 parent 9c00c18 commit 7542d20

2 files changed

Lines changed: 40 additions & 29 deletions

File tree

lib/Resources.ko.resx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<comment>At 설명</comment>
134134
</data>
135135
<data name="EveryMinuteBetweenX0AndX1" xml:space="preserve">
136-
<value>{0}~{1} 사이 매분</value>
136+
<value>매분 {0}~{1}</value>
137137
<comment>EveryMinuteBetweenX0AndX1 설명</comment>
138138
</data>
139139
<data name="At" xml:space="preserve">
@@ -153,23 +153,23 @@
153153
<comment>EveryX0Seconds 설명</comment>
154154
</data>
155155
<data name="SecondsX0ThroughX1PastTheMinute" xml:space="preserve">
156-
<value>분 이후 {0}~{1}초</value>
156+
<value>{0}~{1}초</value>
157157
<comment>SecondsX0ThroughX1PastTheMinute 설명</comment>
158158
</data>
159159
<data name="AtX0SecondsPastTheMinute" xml:space="preserve">
160-
<value>분 이후 {0}초</value>
160+
<value>{0}초</value>
161161
<comment>AtX0SecondsPastTheMinute 설명</comment>
162162
</data>
163163
<data name="EveryX0Minutes" xml:space="preserve">
164164
<value>매 {0}분</value>
165165
<comment>EveryX0Minutes 설명</comment>
166166
</data>
167167
<data name="MinutesX0ThroughX1PastTheHour" xml:space="preserve">
168-
<value>시간 이후 {0}~{1}분</value>
168+
<value>{0}~{1}분</value>
169169
<comment>MinutesX0ThroughX1PastTheHour 설명</comment>
170170
</data>
171171
<data name="AtX0MinutesPastTheHour" xml:space="preserve">
172-
<value>시간 이후 {0}분</value>
172+
<value>{0}분</value>
173173
<comment>AtX0MinutesPastTheHour 설명</comment>
174174
</data>
175175
<data name="EveryX0Hours" xml:space="preserve">
@@ -217,11 +217,11 @@
217217
<comment>Fifth 설명</comment>
218218
</data>
219219
<data name="ComaOnThe" xml:space="preserve">
220-
<value>, 날짜 </value>
220+
<value>, 매월 </value>
221221
<comment>OnThe 설명</comment>
222222
</data>
223223
<data name="SpaceX0OfTheMonth" xml:space="preserve">
224-
<value> 월의 {0}</value>
224+
<value> {0}</value>
225225
<comment>X0OfTheMonth 설명</comment>
226226
</data>
227227
<data name="ComaOnTheLastX0OfTheMonth" xml:space="preserve">
@@ -245,7 +245,7 @@
245245
<comment>ComaOnTheLastDayOfTheMonth 설명</comment>
246246
</data>
247247
<data name="ComaOnTheLastWeekdayOfTheMonth" xml:space="preserve">
248-
<value>, 월의 마지막 평일에</value>
248+
<value>, 매월 마지막 평일</value>
249249
<comment>OnTheLastWeekdayOfTheMonth 설명</comment>
250250
</data>
251251
<data name="FirstWeekday" xml:space="preserve">
@@ -257,7 +257,7 @@
257257
<comment>WeekdayNearestDayX0 설명</comment>
258258
</data>
259259
<data name="ComaOnTheX0OfTheMonth" xml:space="preserve">
260-
<value>, 월의 {0}</value>
260+
<value>, 매월 {0}</value>
261261
<comment>ComaOnTheX0OfTheMonth 설명</comment>
262262
</data>
263263
<data name="ComaEveryX0Days" xml:space="preserve">
@@ -269,7 +269,7 @@
269269
<comment>BetweenDayX0AndX1OfTheMonth 설명</comment>
270270
</data>
271271
<data name="ComaOnDayX0OfTheMonth" xml:space="preserve">
272-
<value>, 월의 {0}일에</value>
272+
<value>, 매월 {0}</value>
273273
<comment>ComaOnDayX0OfTheMonth 설명</comment>
274274
</data>
275275
<data name="SpaceAndSpace" xml:space="preserve">

test/TestFormats.ko.cs

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,18 @@ public void TestDailyAtTime()
7979
[Fact]
8080
public void TestMinuteSpan()
8181
{
82-
Assert.EqualsCaseInsensitive("11:00 오전~11:10 오전 사이 매분", GetDescription("0-10 11 * * *"));
82+
Assert.EqualsCaseInsensitive("매분 11:00 오전~11:10 오전", GetDescription("0-10 11 * * *"));
83+
}
84+
85+
[Fact]
86+
public void TestMinuteSpanWith24HourFormat()
87+
{
88+
var options = new Options
89+
{
90+
DayOfWeekStartIndexZero = false,
91+
Use24HourTimeFormat = true
92+
};
93+
Assert.EqualsCaseInsensitive("매분 11:00~11:10", GetDescription("0-10 11 * * *", options));
8394
}
8495

8596
[Fact]
@@ -115,7 +126,7 @@ public void TestOnceAWeek()
115126
[Fact]
116127
public void TestDayOfMonth()
117128
{
118-
Assert.EqualsCaseInsensitive("시간 12:23 오후, 월의 15일에", GetDescription("23 12 15 * *"));
129+
Assert.EqualsCaseInsensitive("시간 12:23 오후, 매월 15일", GetDescription("23 12 15 * *"));
119130
}
120131

121132
[Fact]
@@ -158,7 +169,7 @@ public void TestDayOfWeekRange()
158169
[Fact]
159170
public void TestDayOfWeekOnceInMonth()
160171
{
161-
Assert.EqualsCaseInsensitive("매분, 날짜 세 번째 월의 월요일", GetDescription("* * * * MON#3"));
172+
Assert.EqualsCaseInsensitive("매분, 매월 세 번째 월요일", GetDescription("* * * * MON#3"));
162173
}
163174

164175
[Fact]
@@ -176,37 +187,37 @@ public void TestLastDayOfTheMonth()
176187
[Fact]
177188
public void TestLastWeekdayOfTheMonth()
178189
{
179-
Assert.EqualsCaseInsensitive("매분, 월의 마지막 평일에", GetDescription("* * LW * *"));
190+
Assert.EqualsCaseInsensitive("매분, 매월 마지막 평일", GetDescription("* * LW * *"));
180191
}
181192

182193
[Fact]
183194
public void TestLastWeekdayOfTheMonth2()
184195
{
185-
Assert.EqualsCaseInsensitive("매분, 월의 마지막 평일에", GetDescription("* * WL * *"));
196+
Assert.EqualsCaseInsensitive("매분, 매월 마지막 평일", GetDescription("* * WL * *"));
186197
}
187198

188199
[Fact]
189200
public void TestFirstWeekdayOfTheMonth()
190201
{
191-
Assert.EqualsCaseInsensitive("매분, 월의 첫 번째 평일에", GetDescription("* * 1W * *"));
202+
Assert.EqualsCaseInsensitive("매분, 매월 첫 번째 평일", GetDescription("* * 1W * *"));
192203
}
193204

194205
[Fact]
195206
public void TestFirstWeekdayOfTheMonth2()
196207
{
197-
Assert.EqualsCaseInsensitive("매분, 월의 첫 번째 평일에", GetDescription("* * W1 * *"));
208+
Assert.EqualsCaseInsensitive("매분, 매월 첫 번째 평일", GetDescription("* * W1 * *"));
198209
}
199210

200211
[Fact]
201212
public void TestParticularWeekdayOfTheMonth()
202213
{
203-
Assert.EqualsCaseInsensitive("매분, 월의 5일에 가장 가까운 평일에", GetDescription("* * 5W * *"));
214+
Assert.EqualsCaseInsensitive("매분, 매월 5일에 가장 가까운 평일", GetDescription("* * 5W * *"));
204215
}
205216

206217
[Fact]
207218
public void TestParticularWeekdayOfTheMonth2()
208219
{
209-
Assert.EqualsCaseInsensitive("매분, 월의 5일에 가장 가까운 평일에", GetDescription("* * W5 * *"));
220+
Assert.EqualsCaseInsensitive("매분, 매월 5일에 가장 가까운 평일", GetDescription("* * W5 * *"));
210221
}
211222

212223
[Fact]
@@ -218,37 +229,37 @@ public void TestTimeOfDayWithSeconds()
218229
[Fact]
219230
public void TestSecondInternvals()
220231
{
221-
Assert.EqualsCaseInsensitive("분 이후 5~10초", GetDescription("5-10 * * * * *"));
232+
Assert.EqualsCaseInsensitive("5~10초", GetDescription("5-10 * * * * *"));
222233
}
223234

224235
[Fact]
225236
public void TestSecondMinutesHoursIntervals()
226237
{
227-
Assert.EqualsCaseInsensitive("분 이후 5~10초, 시간 이후 30~35분, 10:00 오전~12:59 오후 사이", GetDescription("5-10 30-35 10-12 * * *"));
238+
Assert.EqualsCaseInsensitive("5~10초, 30~35분, 10:00 오전~12:59 오후 사이", GetDescription("5-10 30-35 10-12 * * *"));
228239
}
229240

230241
[Fact]
231242
public void TestEvery5MinutesAt30Seconds()
232243
{
233-
Assert.EqualsCaseInsensitive("분 이후 30초, 매 5분", GetDescription("30 */5 * * * *"));
244+
Assert.EqualsCaseInsensitive("30초, 매 5분", GetDescription("30 */5 * * * *"));
234245
}
235246

236247
[Fact]
237248
public void TestMinutesPastTheHourRange()
238249
{
239-
Assert.EqualsCaseInsensitive("시간 이후 30분, 10:00 오전~01:59 오후 사이, 수요일 및 금요일에만", GetDescription("0 30 10-13 ? * WED,FRI"));
250+
Assert.EqualsCaseInsensitive("30분, 10:00 오전~01:59 오후 사이, 수요일 및 금요일에만", GetDescription("0 30 10-13 ? * WED,FRI"));
240251
}
241252

242253
[Fact]
243254
public void TestSecondsPastTheMinuteInterval()
244255
{
245-
Assert.EqualsCaseInsensitive("분 이후 10초, 매 5분", GetDescription("10 0/5 * * * ?"));
256+
Assert.EqualsCaseInsensitive("10초, 매 5분", GetDescription("10 0/5 * * * ?"));
246257
}
247258

248259
[Fact]
249260
public void TestBetweenWithInterval()
250261
{
251-
Assert.EqualsCaseInsensitive("매 3분, 시간 이후 2~59분, 01:00 오전, 09:00 오전, 및 10:00 오후, 월의 11~26일 사이, 1월~6월", GetDescription("2-59/3 1,9,22 11-26 1-6 ?"));
262+
Assert.EqualsCaseInsensitive("매 3분, 2~59분, 01:00 오전, 09:00 오전, 및 10:00 오후, 월의 11~26일 사이, 1월~6월", GetDescription("2-59/3 1,9,22 11-26 1-6 ?"));
252263
}
253264

254265
[Fact]
@@ -260,7 +271,7 @@ public void TestRecurringFirstOfMonth()
260271
[Fact]
261272
public void TestMinutesPastTheHour()
262273
{
263-
Assert.EqualsCaseInsensitive("시간 이후 5분", GetDescription("0 5 0/1 * * ?"));
274+
Assert.EqualsCaseInsensitive("5분", GetDescription("0 5 0/1 * * ?"));
264275
}
265276

266277
[Fact]
@@ -297,13 +308,13 @@ public void TestYearRange3()
297308
public void TestSecondsInternalWithStepValue()
298309
{
299310
// GitHub Issue #49: https://github.com/bradymholt/cron-expression-descriptor/issues/49
300-
Assert.EqualsCaseInsensitive("매 30초, 분 이후 5초부터", GetDescription("5/30 * * * * ?"));
311+
Assert.EqualsCaseInsensitive("매 30초, 5초부터", GetDescription("5/30 * * * * ?"));
301312
}
302313

303314
[Fact]
304315
public void TestMinutesInternalWithStepValue()
305316
{
306-
Assert.EqualsCaseInsensitive("매 30분, 시간 이후 5분부터", GetDescription("0 5/30 * * * ?"));
317+
Assert.EqualsCaseInsensitive("매 30분, 5분부터", GetDescription("0 5/30 * * * ?"));
307318
}
308319

309320
[Fact]
@@ -315,7 +326,7 @@ public void TestHoursInternalWithStepValue()
315326
[Fact]
316327
public void TestDayOfMonthInternalWithStepValue()
317328
{
318-
Assert.EqualsCaseInsensitive("시간 07:05 오전, 3일마다, 월의 2일에부터", GetDescription("0 5 7 2/3 * ? *"));
329+
Assert.EqualsCaseInsensitive("시간 07:05 오전, 3일마다, 매월 2일부터", GetDescription("0 5 7 2/3 * ? *"));
319330
}
320331

321332
[Fact]

0 commit comments

Comments
 (0)