bbc / simorgh

The BBC's Open Source Web Application. Contributions welcome! Used on some of our biggest websites, e.g.
https://www.bbc.com/thai
Other
1.4k stars 224 forks source link

Pass locale correctly to the relative timestamps in Persian. #1969

Closed 12 closed 5 years ago

12 commented 5 years ago

Is your feature request related to a problem? Please describe. We need to update our Gregorian timestamps to support Persian, this includes using different numerals and right-to-left support.

Describe the solution you'd like When viewing an article in Persian, the timestamp should:

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Testing notes Regression on timestamps in News/Persian. Checking with someone who reads Persian whether the date is correct.

Dev insight: Cypress and unit tests with updated snapshots should ensure translations are correct.

Additional context Add any other context or screenshots about the feature request here.

dr3 commented 5 years ago

~Duplicate of https://github.com/bbc/simorgh/issues/1567~

12 commented 5 years ago

No it's not @dr3. This is still the Gregorian calendar, #1567 is to investigate non-Gregorian (Jalili) calendars. We still need to translate the Gregorian calendar to Farsi.

dr3 commented 5 years ago

Use Eastern Arabic numerals (possibly returned when using moment's fa locale)

In that case, this is true :) and Eastern Arabic numerals will be done in https://github.com/bbc/simorgh/issues/1663

greenc05 commented 5 years ago

@rhell please could you expand on 'Have onscreen and offscreen translations in Farsi for Updated text'? What are the offscreen requirements??

12 commented 5 years ago

@greenc05 I think I was referring to the relative timestamp e.g. Updated 25 mins ago. Looking at our UX though I can't see any notes for offscreen text... I'll try and remember what I meant here 😛

RayNjeri commented 5 years ago

When these two fields are updated in the local fixture data, We get time updated in English instead of in Farsi which is the expected output.

"lastPublished": 1535122662000,
"lastUpdated": 1535122662000,
Screen Shot 2019-07-17 at 14 11 09
RayNjeri commented 5 years ago

Duplicate of https://github.com/bbc/psammead/issues/1161 https://github.com/bbc/psammead/pull/1067 fixes this issue