Skip to content

Commit cfbbdc0

Browse files
committed
compose [nfc]: Update string to mention "edit" in name and description
This migrates the Polish translation (the only existing non-en locale to translate this) to use the new string as well.
1 parent b2d6c50 commit cfbbdc0

14 files changed

+32
-23
lines changed

assets/l10n/app_en.arb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@
373373
"@discardDraftConfirmationDialogTitle": {
374374
"description": "Title for a confirmation dialog for discarding message text that was typed into the compose box."
375375
},
376-
"discardDraftConfirmationDialogMessage": "When you edit a message, the content that was previously in the compose box is discarded.",
377-
"@discardDraftConfirmationDialogMessage": {
378-
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box."
376+
"discardDraftForEditConfirmationDialogMessage": "When you edit a message, the content that was previously in the compose box is discarded.",
377+
"@discardDraftForEditConfirmationDialogMessage": {
378+
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box, when editing a message."
379379
},
380380
"discardDraftConfirmationDialogConfirmButton": "Discard",
381381
"@discardDraftConfirmationDialogConfirmButton": {

assets/l10n/app_pl.arb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,9 @@
10491049
"@discardDraftConfirmationDialogTitle": {
10501050
"description": "Title for a confirmation dialog for discarding message text that was typed into the compose box."
10511051
},
1052-
"discardDraftConfirmationDialogMessage": "Miej na uwadze, że przechodząc do zmiany wiadomości wyczyścisz okno nowej wiadomości.",
1053-
"@discardDraftConfirmationDialogMessage": {
1054-
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box."
1052+
"discardDraftForEditConfirmationDialogMessage": "Miej na uwadze, że przechodząc do zmiany wiadomości wyczyścisz okno nowej wiadomości.",
1053+
"@discardDraftForEditConfirmationDialogMessage": {
1054+
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box, when editing a message."
10551055
},
10561056
"discardDraftConfirmationDialogConfirmButton": "Odrzuć",
10571057
"@discardDraftConfirmationDialogConfirmButton": {

lib/generated/l10n/zulip_localizations.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,11 @@ abstract class ZulipLocalizations {
625625
/// **'Discard the message you’re writing?'**
626626
String get discardDraftConfirmationDialogTitle;
627627

628-
/// Message for a confirmation dialog for discarding message text that was typed into the compose box.
628+
/// Message for a confirmation dialog for discarding message text that was typed into the compose box, when editing a message.
629629
///
630630
/// In en, this message translates to:
631631
/// **'When you edit a message, the content that was previously in the compose box is discarded.'**
632-
String get discardDraftConfirmationDialogMessage;
632+
String get discardDraftForEditConfirmationDialogMessage;
633633

634634
/// Label for the 'Discard' button on a confirmation dialog for discarding message text that was typed into the compose box.
635635
///

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
315315
'Discard the message you’re writing?';
316316

317317
@override
318-
String get discardDraftConfirmationDialogMessage =>
318+
String get discardDraftForEditConfirmationDialogMessage =>
319319
'When you edit a message, the content that was previously in the compose box is discarded.';
320320

321321
@override

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
315315
'Discard the message you’re writing?';
316316

317317
@override
318-
String get discardDraftConfirmationDialogMessage =>
318+
String get discardDraftForEditConfirmationDialogMessage =>
319319
'When you edit a message, the content that was previously in the compose box is discarded.';
320320

321321
@override

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
315315
'Discard the message you’re writing?';
316316

317317
@override
318-
String get discardDraftConfirmationDialogMessage =>
318+
String get discardDraftForEditConfirmationDialogMessage =>
319319
'When you edit a message, the content that was previously in the compose box is discarded.';
320320

321321
@override

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
315315
'Discard the message you’re writing?';
316316

317317
@override
318-
String get discardDraftConfirmationDialogMessage =>
318+
String get discardDraftForEditConfirmationDialogMessage =>
319319
'When you edit a message, the content that was previously in the compose box is discarded.';
320320

321321
@override

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
315315
'Discard the message you’re writing?';
316316

317317
@override
318-
String get discardDraftConfirmationDialogMessage =>
318+
String get discardDraftForEditConfirmationDialogMessage =>
319319
'When you edit a message, the content that was previously in the compose box is discarded.';
320320

321321
@override

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
322322
'Czy chcesz przerwać szykowanie wpisu?';
323323

324324
@override
325-
String get discardDraftConfirmationDialogMessage =>
325+
String get discardDraftForEditConfirmationDialogMessage =>
326326
'Miej na uwadze, że przechodząc do zmiany wiadomości wyczyścisz okno nowej wiadomości.';
327327

328328
@override

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
323323
'Discard the message you’re writing?';
324324

325325
@override
326-
String get discardDraftConfirmationDialogMessage =>
326+
String get discardDraftForEditConfirmationDialogMessage =>
327327
'When you edit a message, the content that was previously in the compose box is discarded.';
328328

329329
@override

lib/generated/l10n/zulip_localizations_sk.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
315315
'Discard the message you’re writing?';
316316

317317
@override
318-
String get discardDraftConfirmationDialogMessage =>
318+
String get discardDraftForEditConfirmationDialogMessage =>
319319
'When you edit a message, the content that was previously in the compose box is discarded.';
320320

321321
@override

lib/generated/l10n/zulip_localizations_uk.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class ZulipLocalizationsUk extends ZulipLocalizations {
324324
'Discard the message you’re writing?';
325325

326326
@override
327-
String get discardDraftConfirmationDialogMessage =>
327+
String get discardDraftForEditConfirmationDialogMessage =>
328328
'When you edit a message, the content that was previously in the compose box is discarded.';
329329

330330
@override

lib/widgets/compose_box.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
18521852
final zulipLocalizations = ZulipLocalizations.of(context);
18531853

18541854
if (await _abortBecauseContentInputNotEmpty(
1855-
message: zulipLocalizations.discardDraftConfirmationDialogMessage)) {
1855+
message: zulipLocalizations.discardDraftForEditConfirmationDialogMessage)) {
18561856
return;
18571857
}
18581858
if (!mounted) return;

test/widgets/compose_box_test.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,11 +1444,12 @@ void main() {
14441444

14451445
Future<void> expectAndHandleDiscardConfirmation(
14461446
WidgetTester tester, {
1447+
required String expectedMessage,
14471448
required bool shouldContinue,
14481449
}) async {
14491450
final (actionButton, cancelButton) = checkSuggestedActionDialog(tester,
14501451
expectedTitle: 'Discard the message you’re writing?',
1451-
expectedMessage: 'When you edit a message, the content that was previously in the compose box is discarded.',
1452+
expectedMessage: expectedMessage,
14521453
expectedActionButtonText: 'Discard');
14531454
if (shouldContinue) {
14541455
await tester.tap(find.byWidget(actionButton));
@@ -1623,6 +1624,14 @@ void main() {
16231624
testSmoke(narrow: topicNarrow, start: _EditInteractionStart.restoreFailedEdit);
16241625
testSmoke(narrow: dmNarrow, start: _EditInteractionStart.restoreFailedEdit);
16251626

1627+
Future<void> expectAndHandleDiscardForEditConfirmation(WidgetTester tester, {
1628+
required bool shouldContinue,
1629+
}) {
1630+
return expectAndHandleDiscardConfirmation(tester,
1631+
expectedMessage: 'When you edit a message, the content that was previously in the compose box is discarded.',
1632+
shouldContinue: shouldContinue);
1633+
}
1634+
16261635
// Test the "Discard…?" confirmation dialog when you tap "Edit message" in
16271636
// the action sheet but there's text in the compose box for a new message.
16281637
void testInterruptComposingFromActionSheet({required Narrow narrow}) {
@@ -1638,7 +1647,7 @@ void main() {
16381647

16391648
// Expect confirmation dialog; tap Cancel
16401649
await startEditInteractionFromActionSheet(tester, messageId: messageId);
1641-
await expectAndHandleDiscardConfirmation(tester, shouldContinue: false);
1650+
await expectAndHandleDiscardForEditConfirmation(tester, shouldContinue: false);
16421651
check(connection.takeRequests()).isEmpty();
16431652
// fetch-raw-content request wasn't actually sent;
16441653
// take back its prepared response
@@ -1653,7 +1662,7 @@ void main() {
16531662
// Try again, but this time tap Discard and expect to enter an edit session
16541663
await startEditInteractionFromActionSheet(tester,
16551664
messageId: messageId, originalRawContent: 'foo');
1656-
await expectAndHandleDiscardConfirmation(tester, shouldContinue: true);
1665+
await expectAndHandleDiscardForEditConfirmation(tester, shouldContinue: true);
16571666
await tester.pump();
16581667
await checkAwaitingRawMessageContent(tester);
16591668
await tester.pump(Duration(seconds: 1)); // fetch-raw-content request
@@ -1702,7 +1711,7 @@ void main() {
17021711
// Expect confirmation dialog; tap Cancel
17031712
await tester.tap(find.text('EDIT NOT SAVED'));
17041713
await tester.pump();
1705-
await expectAndHandleDiscardConfirmation(tester, shouldContinue: false);
1714+
await expectAndHandleDiscardForEditConfirmation(tester, shouldContinue: false);
17061715
checkNotInEditingMode(tester,
17071716
narrow: narrow, expectedContentText: 'composing new message');
17081717

@@ -1712,7 +1721,7 @@ void main() {
17121721
// Try again, but this time tap Discard and expect to enter edit session
17131722
await tester.tap(find.text('EDIT NOT SAVED'));
17141723
await tester.pump();
1715-
await expectAndHandleDiscardConfirmation(tester, shouldContinue: true);
1724+
await expectAndHandleDiscardForEditConfirmation(tester, shouldContinue: true);
17161725
await tester.pump();
17171726
checkContentInputValue(tester, 'bar');
17181727
await enterContent(tester, 'baz');

0 commit comments

Comments
 (0)