Skip to content

Commit 7c7e79d

Browse files
author
Norbert Orzechowicz
committed
Merge pull request coduo#67 from nwatth/thai-translation
Thai translation
2 parents b364572 + cc2e2d7 commit 7c7e79d

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Currently we support following languages:
239239
* [Spanish] (src/Coduo/PHPHumanizer/Resources/translations/difference.es.yml)
240240
* [Ukrainian] (src/Coduo/PHPHumanizer/Resources/translations/difference.uk.yml)
241241
* [Danish] (src/Coduo/PHPHumanizer/Resources/translations/difference.da.yml)
242+
* [Thai] (src/Coduo/PHPHumanizer/Resources/translations/difference.th.yml)
242243

243244
# Credits
244245

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
just_now:
2+
past: "[0,Inf] เมื่อสักครู่"
3+
future: "[0,Inf] เร็วๆนี้"
4+
second:
5+
past: "[1,Inf] %count% วินาทีที่แล้ว"
6+
future: "[1,Inf] อีก %count% วินาที"
7+
minute:
8+
past: "[1,Inf] %count% นาทีที่แล้ว"
9+
future: "[1,Inf] อีก %count% นาที"
10+
hour:
11+
past: "[1,Inf] %count% ชั่วโมงที่แล้ว"
12+
future: "[1,Inf] อีก %count% ชั่วโมง"
13+
day:
14+
past: "[1,Inf] %count% วันที่แล้ว"
15+
future: "[1,Inf] อีก %count% วัน"
16+
week:
17+
past: "[1,Inf] %count% สัปดาห์ที่แล้ว"
18+
future: "[1,Inf] อีก %count% สัปดาห์"
19+
month:
20+
past: "[1,Inf] %count% เดือนที่แล้ว"
21+
future: "[1,Inf] อีก %count% เดือน"
22+
year:
23+
past: "[1,Inf] %count% ปีที่แล้ว"
24+
future: "[1,Inf] อีก %count% ปี"
25+
26+
compound:
27+
second: "[1,Inf] %count% วินาที"
28+
minute: "[1,Inf] %count% นาที"
29+
hour: "[1,Inf] %count% ชั่วโมง"
30+
day: "[1,Inf] %count% วัน"
31+
week: "[1,Inf] %count% สัปดาห์"
32+
month: "[1,Inf] %count% เดือน"
33+
year: "[1,Inf] %count% ปี"
34+
past: "%value%ที่แล้ว"
35+
future: "อีก %value%"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
only_two: "%first% และ %second%"
2+
comma_separated: "%list% และ %last%"
3+
comma_separated_with_limit: "{1} %list% และอีก 1|[2,Inf] %list% และอีก %count%"

tests/Coduo/PHPHumanizer/Tests/CollectionTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ public function oxfordCollectionProvider()
6464
array(array("Michal", "Norbert", "Lukasz"), 2, 'uk', 'Michal, Norbert і ще 1'),
6565
array(array("Michal", "Norbert", "Lukasz", "Pawel"), 2, 'uk', 'Michal, Norbert і ще 2'),
6666
array(array("Michal", "Norbert", "Lukasz", "Pawel"), null, 'uk', 'Michal, Norbert, Lukasz та Pawel'),
67+
68+
// Thai
69+
array(array("Michal"), null, 'th', 'Michal'),
70+
array(array("Michal", "Norbert"), null, 'th', 'Michal และ Norbert'),
71+
array(array("Michal", "Norbert", "Lukasz"), 2, 'th', 'Michal, Norbert และอีก 1'),
72+
array(array("Michal", "Norbert", "Lukasz", "Pawel"), 2, 'th', 'Michal, Norbert และอีก 2'),
73+
array(array("Michal", "Norbert", "Lukasz", "Pawel"), null, 'th', 'Michal, Norbert, Lukasz และ Pawel'),
6774
);
6875
}
6976
}

tests/Coduo/PHPHumanizer/Tests/DateTimeTest.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,25 @@ public function humanizeDataProvider()
212212
array("2014-05-01", "2014-04-01", "1 måned siden", "da"),
213213
array("2015-05-01", "2014-04-01", "1 år siden", "da"),
214214
array("2014-05-01", "2016-04-01", "2 år fra nu", "da"),
215+
216+
// Thai
217+
array("2014-04-26 13:00:00", "2014-04-26 13:00:00", 'เมื่อสักครู่', 'th'),
218+
array("2014-04-26 13:00:00", "2014-04-26 13:00:05", 'อีก 5 วินาที', 'th'),
219+
array("2014-04-26 13:00:00", "2014-04-26 12:59:00", '1 นาทีที่แล้ว', 'th'),
220+
array("2014-04-26 13:00:00", "2014-04-26 12:45:00", '15 นาทีที่แล้ว', 'th'),
221+
array("2014-04-26 13:00:00", "2014-04-26 13:15:00", 'อีก 15 นาที', 'th'),
222+
array("2014-04-26 13:00:00", "2014-04-26 14:00:00", 'อีก 1 ชั่วโมง', 'th'),
223+
array("2014-04-26 13:00:00", "2014-04-26 15:00:00", 'อีก 2 ชั่วโมง', 'th'),
224+
array("2014-04-26 13:00:00", "2014-04-26 12:00:00", '1 ชั่วโมงที่แล้ว', 'th'),
225+
array("2014-04-26", "2014-04-25", '1 วันที่แล้ว', 'th'),
226+
array("2014-04-26", "2014-04-24", '2 วันที่แล้ว', 'th'),
227+
array("2014-04-26", "2014-04-28", 'อีก 2 วัน', 'th'),
228+
array("2014-04-01", "2014-04-15", 'อีก 2 สัปดาห์', 'th'),
229+
array("2014-04-15", "2014-04-07", '1 สัปดาห์ที่แล้ว', 'th'),
230+
array("2014-01-01", "2014-04-01", 'อีก 3 เดือน', 'th'),
231+
array("2014-05-01", "2014-04-01", '1 เดือนที่แล้ว', 'th'),
232+
array("2015-05-01", "2014-04-01", '1 ปีที่แล้ว', 'th'),
233+
array("2014-05-01", "2016-04-01", 'อีก 2 ปี', 'th'),
215234
);
216235
}
217236

@@ -380,6 +399,16 @@ public function preciseDifferenceDataProvider()
380399
array("2014-04-26 13:00:00", "2014-04-28 23:00:00", "2 dage, 10 timer fra nu", "da"),
381400
array("2014-04-26 13:00:00", "2014-04-25 11:20:00", "1 dag, 1 time, 40 minutter siden", "da"),
382401
array("2014-04-26 13:00:00", "2016-04-27 13:00:00", "2 år, 1 dag fra nu", "da"),
402+
403+
// Thai
404+
array("2014-04-26 13:00:00", "2014-04-26 12:58:15", '1 นาที, 45 วินาทีที่แล้ว', 'th'),
405+
array("2014-04-26 13:00:00", "2014-04-26 11:20:00", '1 ชั่วโมง, 40 นาทีที่แล้ว', 'th'),
406+
array("2014-04-26 13:00:00", "2014-04-27 13:15:00", 'อีก 1 วัน, 15 นาที', 'th'),
407+
array("2014-04-26 13:00:00", "2014-05-03 15:00:00", 'อีก 7 วัน, 2 ชั่วโมง', 'th'),
408+
array("2014-04-26 13:00:00", "2015-04-28 17:00:00", 'อีก 1 ปี, 2 วัน, 4 ชั่วโมง', 'th'),
409+
array("2014-04-26 13:00:00", "2014-04-28 23:00:00", 'อีก 2 วัน, 10 ชั่วโมง', 'th'),
410+
array("2014-04-26 13:00:00", "2014-04-25 11:20:00", '1 วัน, 1 ชั่วโมง, 40 นาทีที่แล้ว', 'th'),
411+
array("2014-04-26 13:00:00", "2016-04-27 13:00:00", 'อีก 2 ปี, 1 วัน', 'th'),
383412
);
384413
}
385414
}

0 commit comments

Comments
 (0)