Skip to content

Commit 51e01f4

Browse files
Khader-1gnprice
authored andcommitted
i18n: Rename string labels stream to channel
Fixes parts of zulip#631
1 parent ba829c6 commit 51e01f4

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

assets/l10n/app_en.arb

+7-7
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,20 @@
211211
"@composeBoxSelfDmContentHint": {
212212
"description": "Hint text for content input when sending a message to yourself."
213213
},
214-
"composeBoxStreamContentHint": "Message #{stream} > {topic}",
215-
"@composeBoxStreamContentHint": {
214+
"composeBoxChannelContentHint": "Message #{channel} > {topic}",
215+
"@composeBoxChannelContentHint": {
216216
"description": "Hint text for content input when sending a message to a channel",
217217
"placeholders": {
218-
"stream": {"type": "String", "example": "channel name"},
218+
"channel": {"type": "String", "example": "channel name"},
219219
"topic": {"type": "String", "example": "topic name"}
220220
}
221221
},
222222
"composeBoxSendTooltip": "Send",
223223
"@composeBoxSendTooltip": {
224224
"description": "Tooltip for send button in compose box."
225225
},
226-
"composeBoxUnknownStreamName": "(unknown channel)",
227-
"@composeBoxUnknownStreamName": {
226+
"composeBoxUnknownChannelName": "(unknown channel)",
227+
"@composeBoxUnknownChannelName": {
228228
"description": "Replacement name for channel when it cannot be found in the store."
229229
},
230230
"composeBoxTopicHintText": "Topic",
@@ -352,8 +352,8 @@
352352
"@topicValidationErrorMandatoryButEmpty": {
353353
"description": "Topic validation error when topic is required but was empty."
354354
},
355-
"subscribedToNStreams": "Subscribed to {num, plural, =0{no channels} =1{1 channel} other{{num} channels}}",
356-
"@subscribedToNStreams": {
355+
"subscribedToNChannels": "Subscribed to {num, plural, =0{no channels} =1{1 channel} other{{num} channels}}",
356+
"@subscribedToNChannels": {
357357
"description": "Test page label showing number of channels user is subscribed to.",
358358
"placeholders": {
359359
"num": {"type": "int", "example": "4"}

assets/l10n/app_ja.arb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"cameraAccessDeniedTitle": "権限が必要です",
66
"cameraAccessDeniedMessage": "画像をアップロードするには、「設定」で Zulip に追加の権限を許可してください。",
77
"cameraAccessDeniedButtonText": "設定を開く",
8-
"subscribedToNStreams": "{num, plural, other{{num}つのチャンネルをフォローしています}}",
8+
"subscribedToNChannels": "{num, plural, other{{num}つのチャンネルをフォローしています}}",
99
"userRoleOwner": "オーナー",
1010
"userRoleAdministrator": "管理者",
1111
"userRoleModerator": "モデレータ",

docs/translation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ the generated Dart binding for it will instead be a function,
8181
taking arguments corresponding to the placeholders.
8282

8383
For example:
84-
`zulipLocalizations.subscribedToNStreams(store.subscriptions.length)`.
84+
`zulipLocalizations.subscribedToNChannels(store.subscriptions.length)`.
8585

8686

8787
## Hack to enforce locale (for testing, etc.)

lib/widgets/app.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class HomePage extends StatelessWidget {
267267
Text.rich(TextSpan(
268268
text: 'Zulip server version: ',
269269
children: [bold(store.zulipVersion)])),
270-
Text(zulipLocalizations.subscribedToNStreams(store.subscriptions.length)),
270+
Text(zulipLocalizations.subscribedToNChannels(store.subscriptions.length)),
271271
])),
272272
const SizedBox(height: 16),
273273
ElevatedButton(

lib/widgets/compose_box.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,12 @@ class _StreamContentInputState extends State<_StreamContentInput> {
363363
final store = PerAccountStoreWidget.of(context);
364364
final zulipLocalizations = ZulipLocalizations.of(context);
365365
final streamName = store.streams[widget.narrow.streamId]?.name
366-
?? zulipLocalizations.composeBoxUnknownStreamName;
366+
?? zulipLocalizations.composeBoxUnknownChannelName;
367367
return _ContentInput(
368368
narrow: widget.narrow,
369369
controller: widget.controller,
370370
focusNode: widget.focusNode,
371-
hintText: zulipLocalizations.composeBoxStreamContentHint(streamName, _topicTextNormalized));
371+
hintText: zulipLocalizations.composeBoxChannelContentHint(streamName, _topicTextNormalized));
372372
}
373373
}
374374

@@ -389,8 +389,8 @@ class _FixedDestinationContentInput extends StatelessWidget {
389389
case TopicNarrow(:final streamId, :final topic):
390390
final store = PerAccountStoreWidget.of(context);
391391
final streamName = store.streams[streamId]?.name
392-
?? zulipLocalizations.composeBoxUnknownStreamName;
393-
return zulipLocalizations.composeBoxStreamContentHint(streamName, topic);
392+
?? zulipLocalizations.composeBoxUnknownChannelName;
393+
return zulipLocalizations.composeBoxChannelContentHint(streamName, topic);
394394

395395
case DmNarrow(otherRecipientIds: []): // The self-1:1 thread.
396396
return zulipLocalizations.composeBoxSelfDmContentHint;

0 commit comments

Comments
 (0)