Skip to content

Commit

Permalink
i18n: Rename string labels stream to channel
Browse files Browse the repository at this point in the history
Fixes parts of zulip#631
  • Loading branch information
Khader-1 authored and gnprice committed Jul 10, 2024
1 parent ba829c6 commit 51e01f4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,20 @@
"@composeBoxSelfDmContentHint": {
"description": "Hint text for content input when sending a message to yourself."
},
"composeBoxStreamContentHint": "Message #{stream} > {topic}",
"@composeBoxStreamContentHint": {
"composeBoxChannelContentHint": "Message #{channel} > {topic}",
"@composeBoxChannelContentHint": {
"description": "Hint text for content input when sending a message to a channel",
"placeholders": {
"stream": {"type": "String", "example": "channel name"},
"channel": {"type": "String", "example": "channel name"},
"topic": {"type": "String", "example": "topic name"}
}
},
"composeBoxSendTooltip": "Send",
"@composeBoxSendTooltip": {
"description": "Tooltip for send button in compose box."
},
"composeBoxUnknownStreamName": "(unknown channel)",
"@composeBoxUnknownStreamName": {
"composeBoxUnknownChannelName": "(unknown channel)",
"@composeBoxUnknownChannelName": {
"description": "Replacement name for channel when it cannot be found in the store."
},
"composeBoxTopicHintText": "Topic",
Expand Down Expand Up @@ -352,8 +352,8 @@
"@topicValidationErrorMandatoryButEmpty": {
"description": "Topic validation error when topic is required but was empty."
},
"subscribedToNStreams": "Subscribed to {num, plural, =0{no channels} =1{1 channel} other{{num} channels}}",
"@subscribedToNStreams": {
"subscribedToNChannels": "Subscribed to {num, plural, =0{no channels} =1{1 channel} other{{num} channels}}",
"@subscribedToNChannels": {
"description": "Test page label showing number of channels user is subscribed to.",
"placeholders": {
"num": {"type": "int", "example": "4"}
Expand Down
2 changes: 1 addition & 1 deletion assets/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"cameraAccessDeniedTitle": "権限が必要です",
"cameraAccessDeniedMessage": "画像をアップロードするには、「設定」で Zulip に追加の権限を許可してください。",
"cameraAccessDeniedButtonText": "設定を開く",
"subscribedToNStreams": "{num, plural, other{{num}つのチャンネルをフォローしています}}",
"subscribedToNChannels": "{num, plural, other{{num}つのチャンネルをフォローしています}}",
"userRoleOwner": "オーナー",
"userRoleAdministrator": "管理者",
"userRoleModerator": "モデレータ",
Expand Down
2 changes: 1 addition & 1 deletion docs/translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ the generated Dart binding for it will instead be a function,
taking arguments corresponding to the placeholders.

For example:
`zulipLocalizations.subscribedToNStreams(store.subscriptions.length)`.
`zulipLocalizations.subscribedToNChannels(store.subscriptions.length)`.


## Hack to enforce locale (for testing, etc.)
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class HomePage extends StatelessWidget {
Text.rich(TextSpan(
text: 'Zulip server version: ',
children: [bold(store.zulipVersion)])),
Text(zulipLocalizations.subscribedToNStreams(store.subscriptions.length)),
Text(zulipLocalizations.subscribedToNChannels(store.subscriptions.length)),
])),
const SizedBox(height: 16),
ElevatedButton(
Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/compose_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ class _StreamContentInputState extends State<_StreamContentInput> {
final store = PerAccountStoreWidget.of(context);
final zulipLocalizations = ZulipLocalizations.of(context);
final streamName = store.streams[widget.narrow.streamId]?.name
?? zulipLocalizations.composeBoxUnknownStreamName;
?? zulipLocalizations.composeBoxUnknownChannelName;
return _ContentInput(
narrow: widget.narrow,
controller: widget.controller,
focusNode: widget.focusNode,
hintText: zulipLocalizations.composeBoxStreamContentHint(streamName, _topicTextNormalized));
hintText: zulipLocalizations.composeBoxChannelContentHint(streamName, _topicTextNormalized));
}
}

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

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

0 comments on commit 51e01f4

Please sign in to comment.