Signal-Windows
Signal-Windows copied to clipboard
localized timestamps
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
What about using Humanizer for relative timestamps?
Hmmm do we need something that CultureInfo.CurrentCulture.DateTimeFormat
does not provide?
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.
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?
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.
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.
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"
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?