Fixes#26774.
We don't need the today argument anymore since every value passed to
it was a new Date() except the tests where we are using MockDate now.
Subscripting an empty array does not throw an exception in JavaScript,
"default" is not a valid locale, and the browser APIs already fall
back on unrecognized locales anyway.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Currently, we are displaying the "Complete the organization profile"
banner immediately after the organization was created. It's important to
strongly encourage orgs to configure their profile, so we should delay
showing the banner if the profile has not been configured after 15 days.
Thus also allows the users to check out Zulip and see how it works before
configuring the organization settings.
Fixes: #24122.
Separating these concepts allows us to provide a much nicer format for
contexts where ultra-specific clarification is not a priority.
This new variant is currently only used in the scheduled messages UI.
Currently, we only show the "Active just now" status once a user has gone
offline within the last 2 minutes. This ends up never showing up the
threshhold which the client marks an user as user is longer than 3 minutes.
Thus deemingthe user status as useless. After a discussion on CZO, it was
decided that we should remove this status altogether as the phrasing doesn't
make sense as well.
In #25012, which was intended to only modify the buddy list, we
accidentally changed the rendering of times for several other code
paths, including recent conversations, that were using the
last_status_from_time function, whose name really suggested it only
was used for the buddy list.
Extract a new function with a better name for the more common relative
time use case.
Usually when a user uses the time picker, they're most likely going to
set the time to the hour rather than the current minute. These changes
will set the minutes to zero whenever we are opening the global time
picker.
Fixes: #23874.
Implemented date localization using native Intl object.
Created special function get_localized_date_or_time_for_format
Made necessary string formatting changes in 'timerender.ts'.
Fixed tests and added some localization tests too.
Tested on my local development server, with some random languages.
Fixes#23987.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>