Skip to content

Commit 69060bd

Browse files
PIG208chrisbobbe
authored andcommitted
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 f47fa11 commit 69060bd

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
@@ -377,9 +377,9 @@
377377
"@discardDraftConfirmationDialogTitle": {
378378
"description": "Title for a confirmation dialog for discarding message text that was typed into the compose box."
379379
},
380-
"discardDraftConfirmationDialogMessage": "When you edit a message, the content that was previously in the compose box is discarded.",
381-
"@discardDraftConfirmationDialogMessage": {
382-
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box."
380+
"discardDraftForEditConfirmationDialogMessage": "When you edit a message, the content that was previously in the compose box is discarded.",
381+
"@discardDraftForEditConfirmationDialogMessage": {
382+
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box, when editing a message."
383383
},
384384
"discardDraftConfirmationDialogConfirmButton": "Discard",
385385
"@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
@@ -631,11 +631,11 @@ abstract class ZulipLocalizations {
631631
/// **'Discard the message you’re writing?'**
632632
String get discardDraftConfirmationDialogTitle;
633633

634-
/// Message for a confirmation dialog for discarding message text that was typed into the compose box.
634+
/// Message for a confirmation dialog for discarding message text that was typed into the compose box, when editing a message.
635635
///
636636
/// In en, this message translates to:
637637
/// **'When you edit a message, the content that was previously in the compose box is discarded.'**
638-
String get discardDraftConfirmationDialogMessage;
638+
String get discardDraftForEditConfirmationDialogMessage;
639639

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

lib/generated/l10n/zulip_localizations_ar.dart

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

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

324324
@override

lib/generated/l10n/zulip_localizations_de.dart

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

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

324324
@override

lib/generated/l10n/zulip_localizations_en.dart

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

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

324324
@override

lib/generated/l10n/zulip_localizations_ja.dart

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

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

324324
@override

lib/generated/l10n/zulip_localizations_nb.dart

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

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

324324
@override

lib/generated/l10n/zulip_localizations_pl.dart

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

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

331331
@override

lib/generated/l10n/zulip_localizations_ru.dart

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

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

332332
@override

lib/generated/l10n/zulip_localizations_sk.dart

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

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

324324
@override

lib/generated/l10n/zulip_localizations_uk.dart

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

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

333333
@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
final abort = await _abortBecauseContentInputNotEmpty(
1855-
dialogMessage: zulipLocalizations.discardDraftConfirmationDialogMessage);
1855+
dialogMessage: zulipLocalizations.discardDraftForEditConfirmationDialogMessage);
18561856
if (abort || !mounted) return;
18571857

18581858
final store = PerAccountStoreWidget.of(context);

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)