Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
recent_topics: Use `plural` syntax to conditionally display text.
Aman Agrawala65af97692ac
diff --git a/static/js/recent_topics_ui.js b/static/js/recent_topics_ui.jsindex a62255888ef..decd3cf12f4 100644--- a/static/js/recent_topics_ui.js+++ b/static/js/recent_topics_ui.js@@ -256,8 +256,16 @@ function format_topic(topic_data) {// We display only 10 extra senders in tooltips,// and just display remaining number of senders.const remaining_senders = extra_sender_ids.length - MAX_EXTRA_SENDERS;+ // Pluralization syntax from:+ // https://formatjs.io/docs/core-concepts/icu-syntax/#plural-formatdisplayed_other_names.push(- $t({defaultMessage: `and {remaining_senders} other(s).`}, {remaining_senders}),+ $t(+ {+ defaultMessage:+ "and {remaining_senders, plural, one {1 other} other {# others}}.",+ },+ {remaining_senders},+ ),);}const other_sender_names = displayed_other_names.join("<br/>");