Skip to content

Commit 1c629ac

Browse files
committed
compose: Avoid translating Zulip message destinations
The '#channel > topic' style strings are not supposed to be translated into different languages as they are Zulip's language of expressing the desintation, not something bound to the English language. See also: zulip#1148 (comment) Signed-off-by: Zixuan James Li <[email protected]>
1 parent 8e8fc44 commit 1c629ac

10 files changed

+18
-19
lines changed

Diff for: assets/l10n/app_en.arb

+2-3
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,11 @@
360360
"@composeBoxSelfDmContentHint": {
361361
"description": "Hint text for content input when sending a message to yourself."
362362
},
363-
"composeBoxChannelContentHint": "Message #{channel} > {topic}",
363+
"composeBoxChannelContentHint": "Message {destination}",
364364
"@composeBoxChannelContentHint": {
365365
"description": "Hint text for content input when sending a message to a channel",
366366
"placeholders": {
367-
"channel": {"type": "String", "example": "channel name"},
368-
"topic": {"type": "String", "example": "topic name"}
367+
"destination": {"type": "String", "example": "#channel name > topic name"}
369368
}
370369
},
371370
"composeBoxSendTooltip": "Send",

Diff for: lib/generated/l10n/zulip_localizations.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ abstract class ZulipLocalizations {
594594
/// Hint text for content input when sending a message to a channel
595595
///
596596
/// In en, this message translates to:
597-
/// **'Message #{channel} > {topic}'**
598-
String composeBoxChannelContentHint(String channel, String topic);
597+
/// **'Message {destination}'**
598+
String composeBoxChannelContentHint(String destination);
599599

600600
/// Tooltip for send button in compose box.
601601
///

Diff for: lib/generated/l10n/zulip_localizations_ar.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Jot down something';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
290-
return 'Message #$channel > $topic';
289+
String composeBoxChannelContentHint(String destination) {
290+
return 'Message $destination';
291291
}
292292

293293
@override

Diff for: lib/generated/l10n/zulip_localizations_en.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Jot down something';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
290-
return 'Message #$channel > $topic';
289+
String composeBoxChannelContentHint(String destination) {
290+
return 'Message $destination';
291291
}
292292

293293
@override

Diff for: lib/generated/l10n/zulip_localizations_ja.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Jot down something';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
290-
return 'Message #$channel > $topic';
289+
String composeBoxChannelContentHint(String destination) {
290+
return 'Message $destination';
291291
}
292292

293293
@override

Diff for: lib/generated/l10n/zulip_localizations_nb.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Jot down something';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
290-
return 'Message #$channel > $topic';
289+
String composeBoxChannelContentHint(String destination) {
290+
return 'Message $destination';
291291
}
292292

293293
@override

Diff for: lib/generated/l10n/zulip_localizations_pl.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Zanotuj coś na przyszłość';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
289+
String composeBoxChannelContentHint(String destination) {
290290
return 'Wiadomość #$channel > $topic';
291291
}
292292

Diff for: lib/generated/l10n/zulip_localizations_ru.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Сделать заметку';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
289+
String composeBoxChannelContentHint(String destination) {
290290
return 'Сообщение для #$channel > $topic';
291291
}
292292

Diff for: lib/generated/l10n/zulip_localizations_sk.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
286286
String get composeBoxSelfDmContentHint => 'Jot down something';
287287

288288
@override
289-
String composeBoxChannelContentHint(String channel, String topic) {
290-
return 'Message #$channel > $topic';
289+
String composeBoxChannelContentHint(String destination) {
290+
return 'Message $destination';
291291
}
292292

293293
@override

Diff for: lib/widgets/compose_box.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ class _StreamContentInputState extends State<_StreamContentInput> {
589589
destination: TopicNarrow(widget.narrow.streamId, topic),
590590
controller: widget.controller,
591591
hint: Text(zulipLocalizations.composeBoxChannelContentHint(
592-
streamName, topic.displayName)));
592+
'#$streamName > ${topic.displayName}')));
593593
}
594594
}
595595

@@ -648,7 +648,7 @@ class _FixedDestinationContentInput extends StatelessWidget {
648648
final streamName = store.streams[streamId]?.name
649649
?? zulipLocalizations.unknownChannelName;
650650
return Text(zulipLocalizations.composeBoxChannelContentHint(
651-
streamName, topic.displayName));
651+
'#$streamName > ${topic.displayName}'));
652652

653653
case DmNarrow(otherRecipientIds: []): // The self-1:1 thread.
654654
return Text(zulipLocalizations.composeBoxSelfDmContentHint);

0 commit comments

Comments
 (0)