Signal-Windows icon indicating copy to clipboard operation
Signal-Windows copied to clipboard

localized timestamps

Open Trolldemorted opened this issue 6 years ago • 8 comments

46e946eb9778c40b531aa0028ad1fde824b66c9f broke the localization of messages - we need culture-specific timestamps.

MSDN article: https://msdn.microsoft.com/en-us/library/5hh873ya(v=vs.90).aspx

Trolldemorted avatar Oct 22 '17 11:10 Trolldemorted

What about using Humanizer for relative timestamps?

SERVCUBED avatar Oct 22 '17 11:10 SERVCUBED

Hmmm do we need something that CultureInfo.CurrentCulture.DateTimeFormat does not provide?

Trolldemorted avatar Oct 22 '17 11:10 Trolldemorted

It may just be down to personal preference, but for the thread list I prefer relative timestamps for recent messages and absolute timestamps for older messages. In the conversation view absolute timestamps would be more useful than relative.

SERVCUBED avatar Oct 22 '17 12:10 SERVCUBED

Ugh, that's what I get for making an assumption. @Trolldemorted can you give a example of what the 4 date time scenarios I laid out would look like in German?

When you see relative timestamps do you expect the time listed to update in real time?

golf1052 avatar Oct 22 '17 16:10 golf1052

I have only seen implementations in production apps where the relative timestamps update once when the page is navigated to. We could add a timer to update these every n seconds wile the user is viewing the conversation list.

SERVCUBED avatar Oct 23 '17 07:10 SERVCUBED

I'd use:

same day: XX:XX, ranging from 00:00 to 24:00 without AM and PM same week: day of week[comma] XX:XX, ranging from 00:00 to 24:00 without AM and PM other week: day of week[comma] day of month[dot] month XX:XX, ranging from 00:00 to 24:00 without AM and PM other year: day of week[comma] day of month[dot] month year XX:XX, ranging from 00:00 to 24:00 without AM and PM

But I don't know whether other branches of german (like austrian or swiss german) would prefer different formats. We should not implement the localization manually, I hope DateTimeFormat supports all of them.

I too would favour a "x minutes ago" style for <1hour, but for that we need to monitor which messages are currently visible without leaking/using too much memory. Localization will get even worse because there are languages with different plural forms depending on the quantity.

Trolldemorted avatar Oct 23 '17 07:10 Trolldemorted

Weird that you're not basically getting that with the change, maybe the DateTime.ToString() isn't picking up the Culture by default?

Here's what each should be doing Same day: "t"
Same week: "ddd" + "t"
Other week: "M" + "t"
Other year: "g"

golf1052 avatar Oct 23 '17 07:10 golf1052

Woops - somehow now (and I'd really know why) CultureInfo.CurrentCulture is en-US on my device, despite w10 using the german localization. I suppose that explains the us timestamps, but why is the culture wrong?

Trolldemorted avatar Oct 23 '17 10:10 Trolldemorted