Skip to content

Commit 5e50fa6

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. The string needs to be re-translated in other languages, as the placeholder is now different. See also: zulip#1148 (comment) Signed-off-by: Zixuan James Li <[email protected]>
1 parent 67c8c13 commit 5e50fa6

11 files changed

+19
-34
lines changed

assets/l10n/app_en.arb

+2-3
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,11 @@
340340
"@composeBoxSelfDmContentHint": {
341341
"description": "Hint text for content input when sending a message to yourself."
342342
},
343-
"composeBoxChannelContentHint": "Message #{channel} > {topic}",
343+
"composeBoxChannelContentHint": "Message {destination}",
344344
"@composeBoxChannelContentHint": {
345345
"description": "Hint text for content input when sending a message to a channel",
346346
"placeholders": {
347-
"channel": {"type": "String", "example": "channel name"},
348-
"topic": {"type": "String", "example": "topic name"}
347+
"destination": {"type": "String", "example": "#channel name > topic name"}
349348
}
350349
},
351350
"composeBoxSendTooltip": "Send",

assets/l10n/app_ru.arb

-14
Original file line numberDiff line numberDiff line change
@@ -373,20 +373,6 @@
373373
"@composeBoxGenericContentHint": {
374374
"description": "Hint text for content input when sending a message."
375375
},
376-
"composeBoxChannelContentHint": "Сообщение для #{channel} > {topic}",
377-
"@composeBoxChannelContentHint": {
378-
"description": "Hint text for content input when sending a message to a channel",
379-
"placeholders": {
380-
"channel": {
381-
"type": "String",
382-
"example": "channel name"
383-
},
384-
"topic": {
385-
"type": "String",
386-
"example": "topic name"
387-
}
388-
}
389-
},
390376
"composeBoxSendTooltip": "Отправить",
391377
"@composeBoxSendTooltip": {
392378
"description": "Tooltip for send button in compose box."

lib/generated/l10n/zulip_localizations.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ abstract class ZulipLocalizations {
564564
/// Hint text for content input when sending a message to a channel
565565
///
566566
/// In en, this message translates to:
567-
/// **'Message #{channel} > {topic}'**
568-
String composeBoxChannelContentHint(String channel, String topic);
567+
/// **'Message {destination}'**
568+
String composeBoxChannelContentHint(String destination);
569569

570570
/// Tooltip for send button in compose box.
571571
///

lib/generated/l10n/zulip_localizations_ar.dart

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

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
275-
return 'Message #$channel > $topic';
274+
String composeBoxChannelContentHint(String destination) {
275+
return 'Message $destination';
276276
}
277277

278278
@override

lib/generated/l10n/zulip_localizations_en.dart

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

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
275-
return 'Message #$channel > $topic';
274+
String composeBoxChannelContentHint(String destination) {
275+
return 'Message $destination';
276276
}
277277

278278
@override

lib/generated/l10n/zulip_localizations_ja.dart

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

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
275-
return 'Message #$channel > $topic';
274+
String composeBoxChannelContentHint(String destination) {
275+
return 'Message $destination';
276276
}
277277

278278
@override

lib/generated/l10n/zulip_localizations_nb.dart

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

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
275-
return 'Message #$channel > $topic';
274+
String composeBoxChannelContentHint(String destination) {
275+
return 'Message $destination';
276276
}
277277

278278
@override

lib/generated/l10n/zulip_localizations_pl.dart

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

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
274+
String composeBoxChannelContentHint(String destination) {
275275
return 'Wiadomość #$channel > $topic';
276276
}
277277

lib/generated/l10n/zulip_localizations_ru.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
271271
String get composeBoxSelfDmContentHint => 'Сделать заметку';
272272

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
275-
return 'Сообщение для #$channel > $topic';
274+
String composeBoxChannelContentHint(String destination) {
275+
return 'Message $destination';
276276
}
277277

278278
@override

lib/generated/l10n/zulip_localizations_sk.dart

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

273273
@override
274-
String composeBoxChannelContentHint(String channel, String topic) {
275-
return 'Message #$channel > $topic';
274+
String composeBoxChannelContentHint(String destination) {
275+
return 'Message $destination';
276276
}
277277

278278
@override

lib/widgets/compose_box.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ class _StreamContentInputState extends State<_StreamContentInput> {
587587
destination: TopicNarrow(widget.narrow.streamId, topic),
588588
controller: widget.controller,
589589
hintText: zulipLocalizations.composeBoxChannelContentHint(
590-
streamName, topic.displayName));
590+
'#$streamName > ${topic.displayName}'));
591591
}
592592
}
593593

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

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

0 commit comments

Comments
 (0)