Skip to content

Commit 152812c

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 cdcbaeb commit 152812c

12 files changed

+22
-51
lines changed

assets/l10n/app_en.arb

+3-4
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,11 @@
348348
"@composeBoxSelfDmContentHint": {
349349
"description": "Hint text for content input when sending a message to yourself."
350350
},
351-
"composeBoxChannelContentHint": "Message #{channel} > {topic}",
351+
"composeBoxChannelContentHint": "Message {destination}",
352352
"@composeBoxChannelContentHint": {
353-
"description": "Hint text for content input when sending a message to a channel",
353+
"description": "Hint text for content input when sending a message to a channel.",
354354
"placeholders": {
355-
"channel": {"type": "String", "example": "channel name"},
356-
"topic": {"type": "String", "example": "topic name"}
355+
"destination": {"type": "String", "example": "#channel name > topic name"}
357356
}
358357
},
359358
"composeBoxSendTooltip": "Send",

assets/l10n/app_pl.arb

-14
Original file line numberDiff line numberDiff line change
@@ -263,20 +263,6 @@
263263
"@composeBoxSelfDmContentHint": {
264264
"description": "Hint text for content input when sending a message to yourself."
265265
},
266-
"composeBoxChannelContentHint": "Wiadomość #{channel} > {topic}",
267-
"@composeBoxChannelContentHint": {
268-
"description": "Hint text for content input when sending a message to a channel",
269-
"placeholders": {
270-
"channel": {
271-
"type": "String",
272-
"example": "channel name"
273-
},
274-
"topic": {
275-
"type": "String",
276-
"example": "topic name"
277-
}
278-
}
279-
},
280266
"composeBoxTopicHintText": "Wątek",
281267
"@composeBoxTopicHintText": {
282268
"description": "Hint text for topic input widget in compose box."

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -567,11 +567,11 @@ abstract class ZulipLocalizations {
567567
/// **'Jot down something'**
568568
String get composeBoxSelfDmContentHint;
569569

570-
/// Hint text for content input when sending a message to a channel
570+
/// Hint text for content input when sending a message to a channel.
571571
///
572572
/// In en, this message translates to:
573-
/// **'Message #{channel} > {topic}'**
574-
String composeBoxChannelContentHint(String channel, String topic);
573+
/// **'Message {destination}'**
574+
String composeBoxChannelContentHint(String destination);
575575

576576
/// Tooltip for send button in compose box.
577577
///

lib/generated/l10n/zulip_localizations_ar.dart

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

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Message #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/generated/l10n/zulip_localizations_en.dart

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

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Message #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/generated/l10n/zulip_localizations_ja.dart

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

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Message #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/generated/l10n/zulip_localizations_nb.dart

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

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Message #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/generated/l10n/zulip_localizations_pl.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
276276
String get composeBoxSelfDmContentHint => 'Zanotuj coś na przyszłość';
277277

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Wiadomość #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/generated/l10n/zulip_localizations_ru.dart

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

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Сообщение для #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/generated/l10n/zulip_localizations_sk.dart

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

278278
@override
279-
String composeBoxChannelContentHint(String channel, String topic) {
280-
return 'Message #$channel > $topic';
279+
String composeBoxChannelContentHint(String destination) {
280+
return 'Message $destination';
281281
}
282282

283283
@override

lib/widgets/compose_box.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ class _StreamContentInputState extends State<_StreamContentInput> {
593593
destination: TopicNarrow(widget.narrow.streamId, topic),
594594
controller: widget.controller,
595595
hintText: zulipLocalizations.composeBoxChannelContentHint(
596-
streamName, topic.displayName));
596+
'#$streamName > ${topic.displayName}'));
597597
}
598598
}
599599

@@ -652,7 +652,7 @@ class _FixedDestinationContentInput extends StatelessWidget {
652652
final streamName = store.streams[streamId]?.name
653653
?? zulipLocalizations.unknownChannelName;
654654
return zulipLocalizations.composeBoxChannelContentHint(
655-
streamName, topic.displayName);
655+
'#$streamName > ${topic.displayName}');
656656

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

0 commit comments

Comments
 (0)