Skip to content

Commit 605a03f

Browse files
author
Jolo Balbin
committed
added filipino language
1 parent f956e03 commit 605a03f

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

data/languages.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,3 +1730,82 @@ vi:
17301730
- Thứ 6: friday
17311731
- Thứ 7: saturday
17321732

1733+
ph:
1734+
name: Filipino
1735+
skip: ["noong", "noon", "sa", "ganap", "na"]
1736+
1737+
monday:
1738+
- Lunes
1739+
tuesday:
1740+
- Martes
1741+
wednesday:
1742+
- Miyerkules
1743+
thursday:
1744+
- Huwebes
1745+
friday:
1746+
- Biyernes
1747+
saturday:
1748+
- Sabado
1749+
sunday:
1750+
- Linggo
1751+
1752+
january:
1753+
- Enero
1754+
- Ene
1755+
february:
1756+
- Pebrero
1757+
- Peb
1758+
march:
1759+
- Marso
1760+
- Mar
1761+
april:
1762+
- Abril
1763+
- Abr
1764+
may:
1765+
- Mayo
1766+
- May
1767+
june:
1768+
- Hunyo
1769+
- Hun
1770+
july:
1771+
- Hulyo
1772+
- Hul
1773+
august:
1774+
- Agosto
1775+
- Ago
1776+
september:
1777+
- Setyembre
1778+
- Set
1779+
october:
1780+
- Oktubre
1781+
- Okt
1782+
november:
1783+
- Nobyembre
1784+
- Nob
1785+
december:
1786+
- Disyembre
1787+
- Dis
1788+
1789+
year:
1790+
- taon
1791+
month:
1792+
- buwan
1793+
week:
1794+
- linggo
1795+
day:
1796+
- araw
1797+
hour:
1798+
- oras
1799+
minute:
1800+
- minuto
1801+
second:
1802+
- segundo
1803+
1804+
ago:
1805+
- nakaraan
1806+
- nakalipas
1807+
1808+
simplifications:
1809+
- kahapon: 1 araw
1810+
- ngayon: 0 segundo
1811+
- isang araw: 2 araw

tests/test_languages.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def setUp(self):
6161
# Thai
6262
param('th', "เมื่อ กุมภาพันธ์ 09, 2015, 09:27:57 AM", "february 09 2015 09:27:57 am"),
6363
param('th', "เมื่อ กรกฎาคม 05, 2012, 01:18:06 AM", "july 05 2012 01:18:06 am"),
64+
65+
# Filipino
66+
param('ph', "Biyernes Hulyo 3, 2015", "friday july 3 2015"),
67+
param('ph', "Pebrero 5, 2015 7:00 pm", "february 5 2015 7:00 pm"),
68+
6469
# Miscellaneous
6570
param('en', "2014-12-12T12:33:39-08:00", "2014-12-12 12:33:39-08:00"),
6671
param('en', "2014-10-15T16:12:20+00:00", "2014-10-15 16:12:20+00:00"),
@@ -154,6 +159,9 @@ def test_translation(self, shortname, datetime_string, expected_translation):
154159
param('vi', "21 giờ trước", "21 hour ago"),
155160
param('vi', "Hôm qua 08:16", "1 day 08:16"),
156161
param('vi', "Hôm nay 15:39", "0 day 15:39"),
162+
#Filipino
163+
param('ph', "kahapon", "1 day"),
164+
param('ph', "ngayon", "0 second"),
157165
])
158166
def test_freshness_translation(self, shortname, datetime_string, expected_translation):
159167
self.given_bundled_language(shortname)
@@ -178,6 +186,7 @@ def test_freshness_translation(self, shortname, datetime_string, expected_transl
178186
param('th', "8 มกราคม 2015 เวลา 12:22 น.", ['8', ' ', 'มกราคม', ' ', '2015', ' ', 'เวลา', ' ', '12', ':', '22', ' ', 'น.']),
179187
param('pl', "8 stycznia 2015 o 10:19", ['8', ' ', 'stycznia', ' ', '2015', ' ', 'o', ' ', '10', ':', '19']),
180188
param('vi', "Thứ Năm, ngày 8 tháng 1 năm 2015", ["Thứ Năm", " ", "ngày", " ", "8", " tháng ", "1", " ", "năm", " ", "2015"]),
189+
param('ph', "Biyernes Hulyo 3 2015", ["Biyernes", " ", "Hulyo", " ", "3", " ", "2015"]),
181190
])
182191
def test_split(self, shortname, datetime_string, expected_tokens):
183192
self.given_bundled_language(shortname)
@@ -200,6 +209,7 @@ def test_split(self, shortname, datetime_string, expected_tokens):
200209
param('pl', "przedwczoraj", strip_timezone=False),
201210
param('fa', "ژانویه 8, 2015، ساعت 15:46", strip_timezone=False),
202211
param('vi', "2 tuần 3 ngày", strip_timezone=False),
212+
param('ph', "Hulyo 3, 2015 7:00 pm", strip_timezone=False),
203213
])
204214
def test_applicable_languages(self, shortname, datetime_string, strip_timezone):
205215
self.given_bundled_language(shortname)

0 commit comments

Comments
 (0)