Skip to content

Commit 52ce42a

Browse files
authored
Merge pull request #2238 from SatoshiPortal/home-translations
fix: missing localizations
2 parents 81fd14a + a04ba04 commit 52ce42a

45 files changed

Lines changed: 1399 additions & 326 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/core/widgets/cards/action_card.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'dart:io';
22

33
import 'package:bb_mobile/core/themes/app_theme.dart';
4+
import 'package:bb_mobile/core/utils/build_context_x.dart';
45
import 'package:bb_mobile/core/widgets/text/text.dart';
56
import 'package:bb_mobile/features/buy/ui/buy_router.dart';
67
import 'package:bb_mobile/features/exchange/presentation/exchange_cubit.dart';
@@ -48,7 +49,7 @@ class _ActionRow extends StatelessWidget {
4849
children: [
4950
_ActionButton(
5051
icon: Assets.icons.btc.path,
51-
label: 'Buy',
52+
label: context.loc.homeActionBuy,
5253
onPressed: () {
5354
if (Platform.isIOS) {
5455
final isSuperuser =
@@ -69,7 +70,7 @@ class _ActionRow extends StatelessWidget {
6970
const Gap(1),
7071
_ActionButton(
7172
icon: Assets.icons.dollar.path,
72-
label: 'Sell',
73+
label: context.loc.homeActionSell,
7374
onPressed: () {
7475
if (Platform.isIOS) {
7576
final isSuperuser =
@@ -90,7 +91,7 @@ class _ActionRow extends StatelessWidget {
9091
const Gap(1),
9192
_ActionButton(
9293
icon: Assets.icons.rightArrow.path,
93-
label: 'Pay',
94+
label: context.loc.homeActionPay,
9495
onPressed: () {
9596
final notLoggedIn = context
9697
.read<ExchangeCubit>()
@@ -120,7 +121,7 @@ class _ActionRow extends StatelessWidget {
120121
const Gap(1),
121122
_ActionButton(
122123
icon: Assets.icons.swap.path,
123-
label: 'Transfer',
124+
label: context.loc.homeActionTransfer,
124125
onPressed: () {
125126
context.pushNamed(SwapRoute.swap.name);
126127
},

lib/core/widgets/cards/backup_card.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:bb_mobile/core/themes/app_theme.dart';
2+
import 'package:bb_mobile/core/utils/build_context_x.dart';
23
import 'package:bb_mobile/core/widgets/text/text.dart';
34
import 'package:bb_mobile/generated/flutter_gen/assets.gen.dart';
45
import 'package:flutter/material.dart';
@@ -34,12 +35,12 @@ class BackupCard extends StatelessWidget {
3435
crossAxisAlignment: .start,
3536
children: [
3637
BBText(
37-
'Protect your bitcoin.',
38+
context.loc.backupCardTitle,
3839
style: context.font.bodyMedium,
3940
color: context.appColors.onSecondary,
4041
),
4142
BBText(
42-
'Back up your wallet now.',
43+
context.loc.backupCardSubtitle,
4344
style: context.font.bodyMedium,
4445
color: context.appColors.onSecondary,
4546
),

lib/core/widgets/inputs/copy_input.dart

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:bb_mobile/core/themes/app_theme.dart';
2+
import 'package:bb_mobile/core/utils/build_context_x.dart';
23
import 'package:bb_mobile/core/widgets/dialog/blurred_dialog.dart';
34
import 'package:bb_mobile/core/widgets/loading/loading_line_content.dart';
45
import 'package:bb_mobile/core/widgets/snackbar_utils.dart';
@@ -101,7 +102,7 @@ class CopyInput extends StatelessWidget {
101102
}
102103

103104
void _onShowValueModal(BuildContext context, {required bool canCopy}) {
104-
final theme = context.theme;
105+
final theme = Theme.of(context);
105106
BlurredDialog.show(
106107
context: context,
107108
builder: (dialogContext) => AlertDialog(
@@ -136,15 +137,21 @@ class CopyInput extends StatelessWidget {
136137
ClipboardData(text: clipboardText ?? text),
137138
);
138139
},
139-
child: Text('Copy', style: theme.textTheme.bodyLarge),
140+
child: Text(
141+
context.loc.copyDialogButton,
142+
style: theme.textTheme.bodyLarge,
143+
),
140144
),
141145
TextButton(
142146
style: TextButton.styleFrom(
143147
foregroundColor: context.appColors.primary,
144148
textStyle: theme.textTheme.bodyLarge,
145149
),
146150
onPressed: () => Navigator.of(dialogContext).pop(),
147-
child: Text('Close', style: theme.textTheme.bodyLarge),
151+
child: Text(
152+
context.loc.closeDialogButton,
153+
style: theme.textTheme.bodyLarge,
154+
),
148155
),
149156
],
150157
),

lib/core/widgets/log_viewer_widget.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:bb_mobile/core/themes/app_theme.dart';
2+
import 'package:bb_mobile/core/utils/build_context_x.dart';
23
import 'package:bb_mobile/core/utils/logger.dart';
34
import 'package:bb_mobile/core/widgets/bottom_sheet/x.dart';
45
import 'package:bb_mobile/core/widgets/buttons/button.dart';
@@ -245,10 +246,13 @@ Future<void> _showConfirmDeleteLogsBottomSheet(BuildContext context) async {
245246
child: Column(
246247
children: [
247248
const Gap(16),
248-
BBText('Delete logs', style: context.font.headlineMedium),
249+
BBText(
250+
context.loc.logsViewerDeleteTitle,
251+
style: context.font.headlineMedium,
252+
),
249253
const Gap(16),
250254
BBText(
251-
'Are you sure you want to delete all logs? This action cannot be undone.',
255+
context.loc.logsViewerDeleteConfirmation,
252256
style: context.font.bodyMedium,
253257
),
254258
const Gap(16),
@@ -260,13 +264,13 @@ Future<void> _showConfirmDeleteLogsBottomSheet(BuildContext context) async {
260264
context.goNamed(WalletRoute.walletHome.name);
261265
await log.deleteLogs();
262266
},
263-
label: 'Delete',
267+
label: context.loc.logsViewerDeleteButton,
264268
bgColor: context.appColors.primary,
265269
textColor: context.appColors.onPrimary,
266270
),
267271
BBButton.small(
268272
onPressed: () => context.pop(),
269-
label: 'Cancel',
273+
label: context.loc.logsViewerCancelButton,
270274
bgColor: context.appColors.secondary,
271275
textColor: context.appColors.onSecondary,
272276
),

lib/features/app_startup/ui/app_startup_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AppStartupFailureScreen extends StatelessWidget {
137137
),
138138
const SizedBox(height: 24),
139139
Text(
140-
'Contact support at app.bullbitcoin.com/support',
140+
context.loc.appStartupContactSupportMessage,
141141
style: context.font.bodySmall?.copyWith(
142142
color: context.appColors.secondary.withValues(alpha: 0.7),
143143
),

lib/features/autoswap/ui/screens/autoswap_settings_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class _AmountThresholdField extends StatelessWidget {
151151
crossAxisAlignment: CrossAxisAlignment.start,
152152
children: [
153153
BBText(
154-
'Target Instant Wallet Balance',
154+
context.loc.autoswapTargetBalanceLabel,
155155
style: context.font.bodyLarge?.copyWith(
156156
color: context.appColors.text,
157157
),
@@ -265,7 +265,7 @@ class _TriggerBalanceField extends StatelessWidget {
265265
crossAxisAlignment: CrossAxisAlignment.start,
266266
children: [
267267
BBText(
268-
'Maximum Instant Wallet Balance',
268+
context.loc.autoswapMaximumBalanceLabel,
269269
style: context.font.bodyLarge?.copyWith(
270270
color: context.appColors.text,
271271
),

lib/features/autoswap/ui/widgets/autoswap_settings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class _TriggerBalanceField extends StatelessWidget {
328328
crossAxisAlignment: .start,
329329
children: [
330330
BBText(
331-
'Maximum Instant Wallet Balance',
331+
context.loc.autoswapMaximumBalanceLabel,
332332
style: context.font.bodyLarge?.copyWith(
333333
color: context.appColors.text,
334334
),

lib/features/import_wallet/import_wallet_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class ImportWalletPage extends StatelessWidget {
117117
)
118118
: SnackBarUtils.showSnackBar(
119119
context,
120-
'BitBox is only supported on Android',
120+
context.loc.importWalletBitboxAndroidOnly,
121121
),
122122
),
123123
],

lib/features/import_watch_only_wallet/presentation/watch_only_details_widget.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,18 @@ class _XpubDetailsWidget extends StatelessWidget {
144144
BBText(entity.pubkey, style: context.font.bodyMedium),
145145
const Gap(24),
146146
if (!isXpub) ...[
147-
BBText('XPUB', style: context.font.titleMedium),
147+
BBText(
148+
context.loc.importWatchOnlyXpubLabel,
149+
style: context.font.titleMedium,
150+
),
148151
const Gap(8),
149152
BBText(
150153
entity.watchOnlyXpub.extendedPubkey.xpub,
151154
style: context.font.bodyMedium,
152155
),
153156
const Gap(24),
154157
],
155-
BBText('Type', style: context.font.titleMedium),
158+
BBText(context.loc.importWatchOnlyType, style: context.font.titleMedium),
156159
const Gap(8),
157160
if (!isXpub) ...[
158161
BBText(
@@ -196,7 +199,10 @@ class _XpubDetailsWidget extends StatelessWidget {
196199
),
197200
const Gap(24),
198201
],
199-
BBText('Label', style: context.font.titleMedium),
202+
BBText(
203+
context.loc.importWatchOnlyLabel,
204+
style: context.font.titleMedium,
205+
),
200206
const Gap(8),
201207
BBInputText(
202208
onChanged: cubit.updateLabel,

lib/features/mempool_settings/ui/widgets/custom_server_card.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ class CustomServerCard extends StatelessWidget {
7575
),
7676
),
7777
child: Text(
78-
customServer!.enableSsl ? 'SSL' : 'No SSL',
78+
customServer!.enableSsl
79+
? context.loc.mempoolCustomServerSsl
80+
: context.loc.mempoolCustomServerNoSsl,
7981
style: context.font.bodySmall?.copyWith(
8082
fontSize: 10,
8183
fontWeight: FontWeight.w500,

0 commit comments

Comments
 (0)