Skip to content

Commit a55f5a6

Browse files
refactor: add a type for translation placeholder
1 parent 5c2aefd commit a55f5a6

5 files changed

Lines changed: 90 additions & 89 deletions

File tree

lib/features/dca/ui/screens/dca_confirmation_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class DcaConfirmationScreen extends StatelessWidget {
9595
const Spacer(),
9696
if (confirmationState.error != null) ...[
9797
Text(
98-
context.loc.dcaConfirmError(confirmationState.error!),
98+
context.loc.dcaConfirmError(confirmationState.error!.toString()),
9999
style: Theme.of(context).textTheme.bodySmall?.copyWith(
100100
color: context.appColors.error,
101101
),

lib/features/withdraw/ui/screens/withdraw_confirmation_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class _ConfirmButton extends StatelessWidget {
247247
children: [
248248
if (withdrawError != null) ...[
249249
Text(
250-
context.loc.withdrawConfirmError(withdrawError),
250+
context.loc.withdrawConfirmError(withdrawError.toString()),
251251
style: context.font.bodyMedium?.copyWith(
252252
color: context.appColors.error,
253253
),

localization/app_en.arb

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4385,7 +4385,7 @@
43854385
"amount": {
43864386
"type": "String"
43874387
},
4388-
"currency": {} }
4388+
"currency": {"type": "String"} }
43894389
},
43904390
"swapValidationSelectFromWallet": "Please select a wallet to transfer from",
43914391
"@swapValidationSelectFromWallet": {
@@ -9653,9 +9653,9 @@
96539653
"@dcaBuyingMessage": {
96549654
"description": "DCA status message",
96559655
"placeholders": {
9656-
"amount": {},
9657-
"frequency": {},
9658-
"network": {}
9656+
"amount": {"type": "String"},
9657+
"frequency": {"type": "String"},
9658+
"network": {"type": "String"}
96599659
}
96609660
},
96619661
"exchangeAuthLoginFailed": "Login Failed",
@@ -9754,7 +9754,7 @@
97549754
"@withdrawConfirmError": {
97559755
"description": "Error message on confirmation screen",
97569756
"placeholders": {
9757-
"error": {}
9757+
"error": {"type": "String"}
97589758
}
97599759
},
97609760
"fundExchangeFundAccount": "Fund your account",
@@ -9849,7 +9849,7 @@
98499849
"@dcaConfirmPaymentBalance": {
98509850
"description": "Payment method balance format",
98519851
"placeholders": {
9852-
"currency": {}
9852+
"currency": {"type": "String"}
98539853
}
98549854
},
98559855
"dcaConfirmOrderType": "Order type",
@@ -9884,7 +9884,7 @@
98849884
"@dcaConfirmError": {
98859885
"description": "DCA confirmation error message",
98869886
"placeholders": {
9887-
"error": {}
9887+
"error": {"type": "String"}
98889888
}
98899889
},
98909890
"dcaConfirmContinue": "Continue",
@@ -10203,7 +10203,7 @@
1020310203
"@autoswapSaveError": {
1020410204
"description": "Error message when save fails",
1020510205
"placeholders": {
10206-
"error": {}
10206+
"error": {"type": "String"}
1020710207
}
1020810208
},
1020910209
"electrumTitle": "Electrum Server Settings",
@@ -10234,8 +10234,8 @@
1023410234
"@electrumServerUrlHint": {
1023510235
"description": "Hint text for server URL input",
1023610236
"placeholders": {
10237-
"network": {},
10238-
"environment": {}
10237+
"network": {"type": "String"},
10238+
"environment": {"type": "String"}
1023910239
}
1024010240
},
1024110241
"electrumMainnet": "Mainnet",
@@ -10310,7 +10310,7 @@
1031010310
"@electrumStopGapTooHighError": {
1031110311
"description": "Validation error for Stop Gap exceeding maximum",
1031210312
"placeholders": {
10313-
"maxStopGap": {}
10313+
"maxStopGap": {"type": "String"}
1031410314
}
1031510315
},
1031610316
"electrumTimeoutEmptyError": "Timeout can't be empty",
@@ -10325,7 +10325,7 @@
1032510325
"@electrumTimeoutTooHighError": {
1032610326
"description": "Validation error for Timeout exceeding maximum",
1032710327
"placeholders": {
10328-
"maxTimeout": {}
10328+
"maxTimeout": {"type": "String"}
1032910329
}
1033010330
},
1033110331
"electrumRetryCountEmptyError": "Retry Count can't be empty",
@@ -10340,29 +10340,29 @@
1034010340
"@electrumTimeoutWarning": {
1034110341
"description": "Warning message when timeout is too low for the configured Stop Gap",
1034210342
"placeholders": {
10343-
"timeoutValue": {},
10344-
"recommended": {}
10343+
"timeoutValue": {"type": "String"},
10344+
"recommended": {"type": "String"}
1034510345
}
1034610346
},
1034710347
"electrumInvalidStopGapError": "Invalid Stop Gap value: {value}",
1034810348
"@electrumInvalidStopGapError": {
1034910349
"description": "Error message for invalid Stop Gap value from backend",
1035010350
"placeholders": {
10351-
"value": {}
10351+
"value": {"type": "String"}
1035210352
}
1035310353
},
1035410354
"electrumInvalidTimeoutError": "Invalid Timeout value: {value}",
1035510355
"@electrumInvalidTimeoutError": {
1035610356
"description": "Error message for invalid Timeout value from backend",
1035710357
"placeholders": {
10358-
"value": {}
10358+
"value": {"type": "String"}
1035910359
}
1036010360
},
1036110361
"electrumInvalidRetryError": "Invalid Retry Count value: {value}",
1036210362
"@electrumInvalidRetryError": {
1036310363
"description": "Error message for invalid Retry Count value from backend",
1036410364
"placeholders": {
10365-
"value": {}
10365+
"value": {"type": "String"}
1036610366
}
1036710367
},
1036810368
"electrumSaveFailedError": "Failed to save advanced options",
@@ -10393,7 +10393,7 @@
1039310393
"@electrumDeleteConfirmation": {
1039410394
"description": "Confirmation message for server deletion",
1039510395
"placeholders": {
10396-
"serverUrl": {}
10396+
"serverUrl": {"type": "String"}
1039710397
}
1039810398
},
1039910399
"electrumCancel": "Cancel",
@@ -10572,7 +10572,7 @@
1057210572
"@arkAboutDustValue": {
1057310573
"description": "Dust value format",
1057410574
"placeholders": {
10575-
"dust": {}
10575+
"dust": {"type": "int"}
1057610576
}
1057710577
},
1057810578
"arkAboutSessionDuration": "Session duration",
@@ -10599,56 +10599,56 @@
1059910599
"@arkAboutCopiedMessage": {
1060010600
"description": "Snackbar message when field copied",
1060110601
"placeholders": {
10602-
"label": {}
10602+
"label": {"type": "String"}
1060310603
}
1060410604
},
1060510605
"arkAboutDurationSeconds": "{seconds} seconds",
1060610606
"@arkAboutDurationSeconds": {
1060710607
"description": "Duration format for seconds",
1060810608
"placeholders": {
10609-
"seconds": {}
10609+
"seconds": {"type": "int"}
1061010610
}
1061110611
},
1061210612
"arkAboutDurationMinute": "{minutes} minute",
1061310613
"@arkAboutDurationMinute": {
1061410614
"description": "Duration format for singular minute",
1061510615
"placeholders": {
10616-
"minutes": {}
10616+
"minutes": {"type": "int"}
1061710617
}
1061810618
},
1061910619
"arkAboutDurationMinutes": "{minutes} minutes",
1062010620
"@arkAboutDurationMinutes": {
1062110621
"description": "Duration format for plural minutes",
1062210622
"placeholders": {
10623-
"minutes": {}
10623+
"minutes": {"type": "int"}
1062410624
}
1062510625
},
1062610626
"arkAboutDurationHour": "{hours} hour",
1062710627
"@arkAboutDurationHour": {
1062810628
"description": "Duration format for singular hour",
1062910629
"placeholders": {
10630-
"hours": {}
10630+
"hours": {"type": "int"}
1063110631
}
1063210632
},
1063310633
"arkAboutDurationHours": "{hours} hours",
1063410634
"@arkAboutDurationHours": {
1063510635
"description": "Duration format for plural hours",
1063610636
"placeholders": {
10637-
"hours": {}
10637+
"hours": {"type": "int"}
1063810638
}
1063910639
},
1064010640
"arkAboutDurationDay": "{days} day",
1064110641
"@arkAboutDurationDay": {
1064210642
"description": "Duration format for singular day",
1064310643
"placeholders": {
10644-
"days": {}
10644+
"days": {"type": "int"}
1064510645
}
1064610646
},
1064710647
"arkAboutDurationDays": "{days} days",
1064810648
"@arkAboutDurationDays": {
1064910649
"description": "Duration format for plural days",
1065010650
"placeholders": {
10651-
"days": {}
10651+
"days": {"type": "int"}
1065210652
}
1065310653
},
1065410654
"arkSendRecipientTitle": "Send to Recipient",
@@ -11151,8 +11151,8 @@
1115111151
"type": "String",
1115211152
"description": "The amount being purchased (e.g., '$100 CAD')"
1115311153
},
11154-
"frequency": {},
11155-
"network": {} }
11154+
"frequency": {"type": "String"},
11155+
"network": {"type": "String"} }
1115611156
},
1115711157
"exchangeDcaAddressDisplay": "{addressLabel}: {address}",
1115811158
"@exchangeDcaAddressDisplay": {

0 commit comments

Comments
 (0)