relative-time-element icon indicating copy to clipboard operation
relative-time-element copied to clipboard

With relative times, tooltip shows in browser language instead of document language

Open JasonBarnabe opened this issue 4 years ago • 1 comments
trafficstars

When using relative times, times older than a month are show absolutely, localized using the document's language (good!); however, the title is localized using the browser language (bad!). This should consistently use the document language.

https://github.com/github/time-elements/blob/4414cbacdb1e0cf95b7e99960897bb0c55736323/src/extended-time-element.ts#L64

JasonBarnabe avatar Dec 06 '20 02:12 JasonBarnabe

@JasonBarnabe did you open a PR?

Wulfheart avatar Sep 26 '21 19:09 Wulfheart

In v3.2.0 they both now use the same way to determine the local; looking for the closest element with a lang attribute. So I believe this fixes the issue. Let me know if you run into any other issues.

keithamus avatar Nov 04 '22 12:11 keithamus