Skip to content

Commit 50c9656

Browse files
committed
i18n: Offer UI strings with "channel" terminology to translators
But don't yet show them in the UI. Since the strings aren't yet shown in the UI, we have to tweak our garbage-collecting logic in tools/check-messages-en (the thing that powers `tools/test intl`).
1 parent 630caee commit 50c9656

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

static/translations/messages_en.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"all": "all",
1616
"everyone": "everyone",
1717
"stream": "stream",
18+
"channel": "channel",
1819
"topic": "topic",
1920
"Notify stream": "Notify stream",
21+
"Notify channel": "Notify channel",
2022
"Notify topic": "Notify topic",
2123
"Notify recipients": "Notify recipients",
2224
"Notify everyone": "Notify everyone",
@@ -46,30 +48,46 @@
4648
"Discard changes": "Discard changes",
4749
"You have unsaved changes. Leave without saving?": "You have unsaved changes. Leave without saving?",
4850
"Who can access the stream?": "Who can access the stream?",
51+
"Who can access the channel?": "Who can access the channel?",
4952
"Cannot apply requested settings": "Cannot apply requested settings",
5053
"Insufficient permission": "Insufficient permission",
5154
"Web-public": "Web-public",
5255
"Organization members can join (guests must be invited by a subscriber); anyone on the Internet can view complete message history without creating an account": "Organization members can join (guests must be invited by a subscriber); anyone on the Internet can view complete message history without creating an account",
5356
"Only organization administrators and owners can edit streams.": "Only organization administrators and owners can edit streams.",
57+
"Only organization administrators and owners can edit channels.": "Only organization administrators and owners can edit channels.",
5458
"{realmName} only allows organization administrators or owners to make public streams.": "{realmName} only allows organization administrators or owners to make public streams.",
59+
"{realmName} only allows organization administrators or owners to make public channels.": "{realmName} only allows organization administrators or owners to make public channels.",
5560
"{realmName} only allows organization moderators, administrators, or owners to make public streams.": "{realmName} only allows organization moderators, administrators, or owners to make public streams.",
61+
"{realmName} only allows organization moderators, administrators, or owners to make public channels.": "{realmName} only allows organization moderators, administrators, or owners to make public channels.",
5662
"{realmName} only allows full organization members, moderators, administrators, or owners to make public streams.": "{realmName} only allows full organization members, moderators, administrators, or owners to make public streams.",
63+
"{realmName} only allows full organization members, moderators, administrators, or owners to make public channels.": "{realmName} only allows full organization members, moderators, administrators, or owners to make public channels.",
5764
"{realmName} only allows organization members, moderators, administrators, or owners to make public streams.": "{realmName} only allows organization members, moderators, administrators, or owners to make public streams.",
65+
"{realmName} only allows organization members, moderators, administrators, or owners to make public channels.": "{realmName} only allows organization members, moderators, administrators, or owners to make public channels.",
5866
"{realmName} only allows organization administrators or owners to make private streams.": "{realmName} only allows organization administrators or owners to make private streams.",
67+
"{realmName} only allows organization administrators or owners to make private channels.": "{realmName} only allows organization administrators or owners to make private channels.",
5968
"{realmName} only allows organization moderators, administrators, or owners to make private streams.": "{realmName} only allows organization moderators, administrators, or owners to make private streams.",
69+
"{realmName} only allows organization moderators, administrators, or owners to make private channels.": "{realmName} only allows organization moderators, administrators, or owners to make private channels.",
6070
"{realmName} only allows full organization members, moderators, administrators, or owners to make private streams.": "{realmName} only allows full organization members, moderators, administrators, or owners to make private streams.",
71+
"{realmName} only allows full organization members, moderators, administrators, or owners to make private channels.": "{realmName} only allows full organization members, moderators, administrators, or owners to make private channels.",
6172
"{realmName} only allows organization members, moderators, administrators, or owners to make private streams.": "{realmName} only allows organization members, moderators, administrators, or owners to make private streams.",
73+
"{realmName} only allows organization members, moderators, administrators, or owners to make private channels.": "{realmName} only allows organization members, moderators, administrators, or owners to make private channels.",
6274
"{realmName} does not allow anybody to make web-public streams.": "{realmName} does not allow anybody to make web-public streams.",
75+
"{realmName} does not allow anybody to make web-public channels.": "{realmName} does not allow anybody to make web-public channels.",
6376
"{realmName} only allows organization owners to make web-public streams.": "{realmName} only allows organization owners to make web-public streams.",
77+
"{realmName} only allows organization owners to make web-public channels.": "{realmName} only allows organization owners to make web-public channels.",
6478
"{realmName} only allows organization administrators or owners to make web-public streams.": "{realmName} only allows organization administrators or owners to make web-public streams.",
79+
"{realmName} only allows organization administrators or owners to make web-public channels.": "{realmName} only allows organization administrators or owners to make web-public channels.",
6580
"{realmName} only allows organization moderators, administrators, or owners to make web-public streams.": "{realmName} only allows organization moderators, administrators, or owners to make web-public streams.",
81+
"{realmName} only allows organization moderators, administrators, or owners to make web-public channels.": "{realmName} only allows organization moderators, administrators, or owners to make web-public channels.",
6682
"Organization members can join (guests must be invited by a subscriber); organization members can view complete message history without joining": "Organization members can join (guests must be invited by a subscriber); organization members can view complete message history without joining",
6783
"Private, shared history": "Private, shared history",
6884
"Must be invited by a subscriber; new subscribers can view complete message history; hidden from non-administrator users": "Must be invited by a subscriber; new subscribers can view complete message history; hidden from non-administrator users",
6985
"Private, protected history": "Private, protected history",
7086
"Must be invited by a subscriber; new subscribers can only see messages sent after they join; hidden from non-administrator users": "Must be invited by a subscriber; new subscribers can only see messages sent after they join; hidden from non-administrator users",
7187
"Cannot subscribe to stream": "Cannot subscribe to stream",
88+
"Cannot subscribe to channel": "Cannot subscribe to channel",
7289
"Stream #{name} is private.": "Stream #{name} is private.",
90+
"Channel #{name} is private.": "Channel #{name} is private.",
7391
"See details": "See details",
7492
"Failed to show details": "Failed to show details",
7593
"Share canceled": "Share canceled",
@@ -100,7 +118,9 @@
100118
"Message not sent": "Message not sent",
101119
"Please specify a topic.": "Please specify a topic.",
102120
"Please specify a stream.": "Please specify a stream.",
121+
"Please specify a channel.": "Please specify a channel.",
103122
"Please specify a valid stream.": "Please specify a valid stream.",
123+
"Please specify a valid channel.": "Please specify a valid channel.",
104124
"Please choose recipients.": "Please choose recipients.",
105125
"Message is empty.": "Message is empty.",
106126
"Could not connect": "Could not connect",
@@ -125,6 +145,7 @@
125145
"No messages": "No messages",
126146
"No messages on server": "No messages on server",
127147
"No messages in stream": "No messages in stream",
148+
"No messages in channel": "No messages in channel",
128149
"No messages with this topic": "No messages with this topic",
129150
"No messages with this person": "No messages with this person",
130151
"No messages in this group": "No messages in this group",
@@ -141,6 +162,7 @@
141162
"This will log out {email} on {realmUrl} from the mobile app on this device.": "This will log out {email} on {realmUrl} from the mobile app on this device.",
142163
"Add new account": "Add new account",
143164
"All streams": "All streams",
165+
"All channels": "All channels",
144166
"Email": "Email",
145167
"Username": "Username",
146168
"Password": "Password",
@@ -178,7 +200,9 @@
178200
"Unfollow topic": "Unfollow topic",
179201
"Failed to unfollow topic": "Failed to unfollow topic",
180202
"Mute stream": "Mute stream",
203+
"Mute channel": "Mute channel",
181204
"Unmute stream": "Unmute stream",
205+
"Unmute channel": "Unmute channel",
182206
"No Internet connection": "No Internet connection",
183207
"Please check your Internet connection": "Please check your Internet connection",
184208
"Zulip’s Internet connection is uncertain.": "Zulip’s Internet connection is uncertain.",
@@ -252,6 +276,7 @@
252276
"Jot down something": "Jot down something",
253277
"Message {recipient}": "Message {recipient}",
254278
"{username} will not be notified unless you subscribe them to this stream.": "{username} will not be notified unless you subscribe them to this stream.",
279+
"{username} will not be notified unless you subscribe them to this channel.": "{username} will not be notified unless you subscribe them to this channel.",
255280
"Send direct message": "Send direct message",
256281
"View direct messages": "View direct messages",
257282
"(This user has been deactivated)": "(This user has been deactivated)",
@@ -288,11 +313,14 @@
288313
"Notifications when online": "Notifications when online",
289314
"Notifications when offline": "Notifications when offline",
290315
"Stream notifications": "Stream notifications",
316+
"Channel notifications": "Channel notifications",
291317
"No users found": "No users found",
292318
"No streams found": "No streams found",
319+
"No channels found": "No channels found",
293320
"Legal": "Legal",
294321
"Mark all as read": "Mark all as read",
295322
"Mark stream as read": "Mark stream as read",
323+
"Mark channel as read": "Mark channel as read",
296324
"Mark topic as read": "Mark topic as read",
297325
"Mark conversation as read": "Mark conversation as read",
298326
"Mark as unread from here": "Mark as unread from here",
@@ -321,28 +349,36 @@
321349
"Failed to unmute topic": "Failed to unmute topic",
322350
"Failed to mute topic": "Failed to mute topic",
323351
"Failed to mute stream": "Failed to mute stream",
352+
"Failed to mute channel": "Failed to mute channel",
324353
"Failed to unmute stream": "Failed to unmute stream",
354+
"Failed to unmute channel": "Failed to unmute channel",
325355
"Failed to delete topic": "Failed to delete topic",
326356
"Failed to mark as unread": "Failed to mark as unread",
327357
"Stream settings": "Stream settings",
358+
"Channel settings": "Channel settings",
328359
"Failed to show stream settings": "Failed to show stream settings",
360+
"Failed to show channel settings": "Failed to show channel settings",
329361
"show": "show",
330362
"hide": "hide",
331363
"Administrators": "Administrators",
332364
"Normal users": "Normal users",
333365
"Share image": "Share image",
334366
"Share link to image": "Share link to image",
335367
"You are not subscribed to this stream": "You are not subscribed to this stream",
368+
"You are not subscribed to this channel": "You are not subscribed to this channel",
336369
"Create new stream": "Create new stream",
370+
"Create new channel": "Create new channel",
337371
"Name": "Name",
338372
"Description": "Description",
339373
"Create": "Create",
340374
"Privacy": "Privacy",
341375
"Public": "Public",
342376
"Notifications": "Notifications",
343377
"Stream": "Stream",
378+
"Channel": "Channel",
344379
"Direct message": "Direct message",
345380
"Edit stream": "Edit stream",
381+
"Edit channel": "Edit channel",
346382
"OK": "OK",
347383
"Please share the image from your browser": "Please share the image from your browser",
348384
"Share failed": "Share failed",
@@ -367,6 +403,7 @@
367403
"{userFullName} (guest)": "{userFullName} (guest)",
368404
"{userFullName} <i>(guest)</i>": "{userFullName} <i>(guest)</i>",
369405
"Only organization admins are allowed to post to this stream.": "Only organization admins are allowed to post to this stream.",
406+
"Only organization admins are allowed to post to this channel.": "Only organization admins are allowed to post to this channel.",
370407
"Connecting...": "Connecting...",
371408
"Set your status": "Set your status",
372409
"Muted": "Muted",
@@ -402,9 +439,13 @@
402439
"Copy link to topic": "Copy link to topic",
403440
"Failed to copy topic link": "Failed to copy topic link",
404441
"Copy link to stream": "Copy link to stream",
442+
"Copy link to channel": "Copy link to channel",
405443
"Failed to copy stream link": "Failed to copy stream link",
444+
"Failed to copy channel link": "Failed to copy channel link",
406445
"A stream with this name already exists.": "A stream with this name already exists.",
446+
"A channel with this name already exists.": "A channel with this name already exists.",
407447
"Streams": "Streams",
448+
"Channels": "Channels",
408449
"Owner": "Owner",
409450
"Admin": "Admin",
410451
"Moderator": "Moderator",

tools/check-messages-en

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,12 @@ function main() {
194194

195195
// Check each key ("message ID" in formatjs's lingo) against
196196
// possibleUiStrings, and make a list of any that aren't found.
197-
const danglingMessageIds = Object.keys(messages_en).filter(
198-
messageId => !possibleUiStrings.has(messageId),
199-
);
197+
const danglingMessageIds = Object.keys(messages_en)
198+
.filter(messageId => !possibleUiStrings.has(messageId))
199+
// Ignore some UI strings that we want to offer to our translators
200+
// but that aren't yet ready to show in the UI (although we intend to).
201+
// TODO(#5827) Stop filtering out messages with "channel" terminology
202+
.filter(messageId => !/[cC]hannel/.test(messageId));
200203

201204
if (danglingMessageIds.length > 0) {
202205
console.error(

0 commit comments

Comments
 (0)