Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Override default moment relative time - Arabic, Brasil and Mundo #2176

Merged
merged 17 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/utilities/psammead-locales/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
| ------- | ----------- |
| 2.10.0 | [PR#2176](https://github.com/bbc/psammead/pull/2176) Add `es` (Spanish) locale and update `ar` (Arabic) and `pt-br` (Brasil) locales |
DenisHdz marked this conversation as resolved.
Show resolved Hide resolved
| 2.9.0 | [PR#2141](https://github.com/bbc/psammead/pull/2141) Add `ne` (Nepali) locale |
| 2.8.0 | [PR#2149](https://github.com/bbc/psammead/pull/2149) Add `gu` (Gujarati) locale |
| 2.7.0 | [PR#2114](https://github.com/bbc/psammead/pull/2114) Add some overrides for Brasil, Russian, Serbian and Ukrainian |
Expand Down
13 changes: 7 additions & 6 deletions packages/utilities/psammead-locales/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ The following [Moment.js](https://momentjs.com/) locales have been added as they
The following locales have overrides to meet BBC World Service requirements where these differ from the upstream locale. Note that importing them will also cause the upstream locale to be loaded.

- `/moment/ar` - locale override for Arabic
- `/moment/es` - locale override for Spanish (Mundo)
- `/moment/fa` - locale override for Persian (Farsi)
- `/moment/gu` - locale override for Gujarati
- `/moment/hi` - locale override for Hindi
- `/moment/mr` - locale override for Marathi
- `/moment/ne` - locale override for Nepali
- `/moment/pa-in` - locale override for Punjabi
- `/moment/pt-br` - locale override for Brasil
- `/moment/ru` - locale override for Russian
- `/moment/sr` - locale override for Serbian
- `/moment/sr-cyrl` - locale override for Serbian Cyrillic
- `/moment/ta` - locale override for Tamil
- `/moment/uk` - locale override for Ukrainian
- `/moment/yo` - locale override for Yoruba
- `/moment/ta` - locale override for Tamil
- `/moment/mr` - locale override for Marathi
- `/moment/pa-in` - locale override for Punjabi
- `/moment/hi` - locale override for Hindi
- `/moment/gu` - locale override for Gujarati
- `/moment/ne` - locale override for Nepali

### Numerals

Expand Down
7 changes: 7 additions & 0 deletions packages/utilities/psammead-locales/moment/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ moment.updateLocale('ar', {
// Suppress conversion to Eastern numerals from base `ar` locale but retain use of Arabic comma
return string.replace(/,/g, '،');
},
relativeTime: {
past: '%s',
m: 'قبل دقيقة واحدة',
sareh marked this conversation as resolved.
Show resolved Hide resolved
mm: 'قبل %d دقيقة',
h: 'قبل ساعة واحدة',
hh: 'قبل %d ساع',
},
});
Loading