This repository has been archived by the owner on Aug 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'latest' into pullinicons
- Loading branch information
Showing
9 changed files
with
196 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<!-- prettier-ignore --> | ||
| Version | Description | | ||
| ------- | ----------- | | ||
| 2.13.0 | [PR#2193](https://github.com/bbc/psammead/pull/2193) Create `rw` (Gahuza) and `ti` (Tigrinya) locales | | ||
| 2.12.0 | [PR#2179](https://github.com/bbc/psammead/pull/2179) Create `om` (Afaan Oromoo) and `am` (Amharic) locales | | ||
| 2.11.0 | [PR#2196](https://github.com/bbc/psammead/pull/2196) Create `ha` (Hausa) and `so` (Somali) locales | | ||
| 2.10.0 | [PR#2165](https://github.com/bbc/psammead/pull/2165) Add `ky` (Kyrgyz) locale and update `mr` (Marathi) and `ta` (Tamil) locales | | ||
|
@@ -33,9 +34,9 @@ | |
| 1.3.1 | [PR#1803](https://github.com/bbc/psammead/pull/1803/) Patches broken links on badges in documentation | | ||
| 1.3.0 | [PR#1794](https://github.com/bbc/psammead/pull/1794) Add david dependency badges | | ||
| 1.2.2 | [PR#1682](https://github.com/bbc/psammead/pull/1682) Move all dev dependencies to top level package.json | | ||
| 1.2.1 | [PR#1599](https://github.com/bbc/psammead/pull/1599) Bump dependencies | | ||
| 1.2.0 | [PR#1477](https://github.com/bbc/psammead/pull/1477) Add numerals as exports | | ||
| 1.1.0 | [PR#1430](https://github.com/bbc/psammead/pull/1430) Adds some overrides for Yoruba | | ||
| 1.2.1 | [PR#1599](https://github.com/bbc/psammead/pull/1599) Bump dependencies | | ||
| 1.2.0 | [PR#1477](https://github.com/bbc/psammead/pull/1477) Add numerals as exports | | ||
| 1.1.0 | [PR#1430](https://github.com/bbc/psammead/pull/1430) Adds some overrides for Yoruba | | ||
| 1.0.2 | [PR#1365](https://github.com/bbc/psammead/pull/1365) Bump psammead-styles to 1.2.0| | ||
| 1.0.1 | [PR#1181](https://github.com/BBC-News/psammead/pull/1181) use `[email protected]` and `[email protected]` | | ||
| 1.0.0 | [PR#638](https://github.com/BBC-News/psammead/pull/638) Initial creation of package | | ||
| 1.0.1 | [PR#1181](https://github.com/bbc/psammead/pull/1181) use `[email protected]` and `[email protected]` | | ||
| 1.0.0 | [PR#638](https://github.com/bbc/psammead/pull/638) Initial creation of package | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var moment = require('moment'); | ||
|
||
moment.defineLocale('rw', { | ||
months: "Ukwa mbere_Ukwa kabiri_Ukwa gatatu_Ukwa kane_Ukwa gatanu_Ukwa gatandatu_Ukw'indwi_Ukw'umunani_Ukw'icenda_Ukw'icumi_Ukw'icumi na rimwe_Ukw'icumi na kabiri".split( | ||
'_' | ||
), | ||
longDateFormat: { LL: 'D MMMM YYYY' }, | ||
relativeTime: { | ||
past: '%s', | ||
m: 'Haciye umunota 1', | ||
mm: 'Iminota %d iraheze', | ||
h: 'Haciye isaha 1', | ||
hh: 'Haciye amasaha %d', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import moment from 'moment'; | ||
import './rw'; | ||
|
||
moment.locale('rw'); | ||
|
||
// This asset overrides the gunit assertion done in the moment codebase. | ||
// Format and styling of this file has been keep consistent with the official moment tests. | ||
// An example of these tests can be seen at https://github.com/moment/moment/blob/develop/src/test/locale/en-gb.js | ||
const assert = { equal: (val1, val2) => expect(val1).toEqual(val2) }; | ||
|
||
test('format', function() { | ||
var a = [ | ||
['LL', '14 Ukwa kabiri 2010'], | ||
['D MMMM YYYY', '14 Ukwa kabiri 2010'], | ||
], | ||
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), | ||
i; | ||
for (i = 0; i < a.length; i++) { | ||
assert.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); | ||
} | ||
}); | ||
|
||
test('from', function() { | ||
var start = moment([2007, 1, 28]); | ||
|
||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ s: 45 }), true), | ||
'Haciye umunota 1', | ||
'45 seconds = a minute' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ s: 89 }), true), | ||
'Haciye umunota 1', | ||
'89 seconds = a minute' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ s: 90 }), true), | ||
'Iminota 2 iraheze', | ||
'90 seconds = 2 minutes' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 44 }), true), | ||
'Iminota 44 iraheze', | ||
'44 minutes = 44 minutes' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 45 }), true), | ||
'Haciye isaha 1', | ||
'45 minutes = an hour' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 89 }), true), | ||
'Haciye isaha 1', | ||
'89 minutes = an hour' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 90 }), true), | ||
'Haciye amasaha 2', | ||
'90 minutes = 2 hours' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ h: 5 }), true), | ||
'Haciye amasaha 5', | ||
'5 hours = 5 hours' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ h: 21 }), true), | ||
'Haciye amasaha 21', | ||
'21 hours = 21 hours' | ||
); | ||
}); | ||
|
||
test('suffix', function() { | ||
assert.equal(moment(0).from(50000), 'Haciye umunota 1', 'suffix'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var moment = require('moment'); | ||
|
||
moment.defineLocale('ti', { | ||
months: 'ጥሪ_ለካቲት_መጋቢት_ሚያዝያ_ጉንቦት_ሰነ_ሓምለ_ነሓሰ_መስከረም_ጥቅምቲ_ሕዳር_ታሕሳስ'.split('_'), | ||
longDateFormat: { LL: 'D MMMM YYYY' }, | ||
relativeTime: { | ||
past: 'ቅድሚ %s', | ||
m: 'ደቒቕ', | ||
mm: '%d ደቓይቕ', | ||
h: 'ሓደ ሰዓት', | ||
hh: '%d ሰዓታት', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import moment from 'moment'; | ||
import './ti'; | ||
|
||
moment.locale('ti'); | ||
|
||
// This asset overrides the gunit assertion done in the moment codebase. | ||
// Format and styling of this file has been keep consistent with the official moment tests. | ||
// An example of these tests can be seen at https://github.com/moment/moment/blob/develop/src/test/locale/en-gb.js | ||
const assert = { equal: (val1, val2) => expect(val1).toEqual(val2) }; | ||
|
||
test('format', function() { | ||
var a = [['LL', '14 ለካቲት 2010'], ['D MMMM YYYY', '14 ለካቲት 2010']], | ||
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), | ||
i; | ||
for (i = 0; i < a.length; i++) { | ||
assert.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); | ||
} | ||
}); | ||
|
||
test('from', function() { | ||
var start = moment([2007, 1, 28]); | ||
|
||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ s: 45 }), true), | ||
'ደቒቕ', | ||
'45 seconds = a minute' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ s: 89 }), true), | ||
'ደቒቕ', | ||
'89 seconds = a minute' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ s: 90 }), true), | ||
'2 ደቓይቕ', | ||
'90 seconds = 2 minutes' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 44 }), true), | ||
'44 ደቓይቕ', | ||
'44 minutes = 44 minutes' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 45 }), true), | ||
'ሓደ ሰዓት', | ||
'45 minutes = an hour' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 89 }), true), | ||
'ሓደ ሰዓት', | ||
'89 minutes = an hour' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ m: 90 }), true), | ||
'2 ሰዓታት', | ||
'90 minutes = 2 hours' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ h: 5 }), true), | ||
'5 ሰዓታት', | ||
'5 hours = 5 hours' | ||
); | ||
assert.equal( | ||
start.from(moment([2007, 1, 28]).add({ h: 21 }), true), | ||
'21 ሰዓታት', | ||
'21 hours = 21 hours' | ||
); | ||
}); | ||
|
||
test('suffix', function() { | ||
assert.equal(moment(0).from(50000), 'ቅድሚ ደቒቕ', 'suffix'); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters