mirror of https://github.com/zulip/zulip.git
stats: Update translated strings for stream to channel rename.
Updates the labels for the "Messages sent by recipient type" chart to use "channel", and updates the error message that would be sent for the "messages_sent_by_stream" chart (that has not yet been implemented) for a missing channel/stream. Part of the stream to channel rename project.
This commit is contained in:
parent
abc6f5b8a2
commit
d0a62020ff
|
@ -192,21 +192,21 @@ class TestGetChartData(ZulipTestCase):
|
||||||
"end_times": [datetime_to_timestamp(dt) for dt in self.end_times_day],
|
"end_times": [datetime_to_timestamp(dt) for dt in self.end_times_day],
|
||||||
"frequency": CountStat.DAY,
|
"frequency": CountStat.DAY,
|
||||||
"everyone": {
|
"everyone": {
|
||||||
"Public streams": self.data(100),
|
"Public channels": self.data(100),
|
||||||
"Private streams": self.data(0),
|
"Private channels": self.data(0),
|
||||||
"Direct messages": self.data(101),
|
"Direct messages": self.data(101),
|
||||||
"Group direct messages": self.data(0),
|
"Group direct messages": self.data(0),
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"Public streams": self.data(200),
|
"Public channels": self.data(200),
|
||||||
"Private streams": self.data(201),
|
"Private channels": self.data(201),
|
||||||
"Direct messages": self.data(0),
|
"Direct messages": self.data(0),
|
||||||
"Group direct messages": self.data(0),
|
"Group direct messages": self.data(0),
|
||||||
},
|
},
|
||||||
"display_order": [
|
"display_order": [
|
||||||
"Direct messages",
|
"Direct messages",
|
||||||
"Public streams",
|
"Public channels",
|
||||||
"Private streams",
|
"Private channels",
|
||||||
"Group direct messages",
|
"Group direct messages",
|
||||||
],
|
],
|
||||||
"result": "success",
|
"result": "success",
|
||||||
|
@ -343,8 +343,8 @@ class TestGetChartData(ZulipTestCase):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
data["everyone"],
|
data["everyone"],
|
||||||
{
|
{
|
||||||
"Public streams": [0],
|
"Public channels": [0],
|
||||||
"Private streams": [0],
|
"Private channels": [0],
|
||||||
"Direct messages": [0],
|
"Direct messages": [0],
|
||||||
"Group direct messages": [0],
|
"Group direct messages": [0],
|
||||||
},
|
},
|
||||||
|
@ -352,8 +352,8 @@ class TestGetChartData(ZulipTestCase):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
data["user"],
|
data["user"],
|
||||||
{
|
{
|
||||||
"Public streams": [0],
|
"Public channels": [0],
|
||||||
"Private streams": [0],
|
"Private channels": [0],
|
||||||
"Direct messages": [0],
|
"Direct messages": [0],
|
||||||
"Group direct messages": [0],
|
"Group direct messages": [0],
|
||||||
},
|
},
|
||||||
|
|
|
@ -310,8 +310,8 @@ def get_chart_data(
|
||||||
tables = (aggregate_table, UserCount)
|
tables = (aggregate_table, UserCount)
|
||||||
subgroup_to_label = {
|
subgroup_to_label = {
|
||||||
stats[0]: {
|
stats[0]: {
|
||||||
"public_stream": _("Public streams"),
|
"public_stream": _("Public channels"),
|
||||||
"private_stream": _("Private streams"),
|
"private_stream": _("Private channels"),
|
||||||
"private_message": _("Direct messages"),
|
"private_message": _("Direct messages"),
|
||||||
"huddle_message": _("Group direct messages"),
|
"huddle_message": _("Group direct messages"),
|
||||||
}
|
}
|
||||||
|
@ -336,7 +336,7 @@ def get_chart_data(
|
||||||
elif chart_name == "messages_sent_by_stream":
|
elif chart_name == "messages_sent_by_stream":
|
||||||
if stream is None:
|
if stream is None:
|
||||||
raise JsonableError(
|
raise JsonableError(
|
||||||
_("Missing stream for chart: {chart_name}").format(chart_name=chart_name)
|
_("Missing channel for chart: {chart_name}").format(chart_name=chart_name)
|
||||||
)
|
)
|
||||||
stats = [COUNT_STATS["messages_in_stream:is_bot:day"]]
|
stats = [COUNT_STATS["messages_in_stream:is_bot:day"]]
|
||||||
tables = (aggregate_table, StreamCount)
|
tables = (aggregate_table, StreamCount)
|
||||||
|
|
Loading…
Reference in New Issue