Skip to content

Commit 3efa06f

Browse files
committed
Merge branch 'master' into feat/backup-polish
# Conflicts: # app/src/main/java/to/bitkit/repositories/BackupRepo.kt
2 parents 4ecd67b + d7ca7ad commit 3efa06f

File tree

24 files changed

+366
-46
lines changed

24 files changed

+366
-46
lines changed

.github/workflows/e2e.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,17 @@ jobs:
205205
- name: Dump docker logs on failure (${{ matrix.shard.name }})
206206
if: failure()
207207
uses: jwalton/gh-docker-logs@v2
208+
209+
e2e-status:
210+
if: always() && github.event.pull_request.draft == false
211+
name: e2e-status
212+
runs-on: ubuntu-latest
213+
needs: [e2e-tests]
214+
steps:
215+
- name: Verify all E2E shards succeeded
216+
run: |
217+
if [ "${{ needs.e2e-tests.result }}" != "success" ]; then
218+
echo "❌ Some E2E shards failed."
219+
exit 1
220+
fi
221+
echo "✅ All E2E shards passed!"

.tx/config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[main]
2+
host = https://app.transifex.com
3+
4+
[o:synonym:p:bitkit:r:stringsxml]
5+
file_filter = app/src/main/res/values-<lang>/strings.xml
6+
source_file = app/src/main/res/values/strings.xml
7+
source_lang = en
8+
type = ANDROID

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,28 @@ Reports are generated in: `app/build/reports/detekt/`.
6868
```
6969

7070
## Localization
71-
See repo: https://github.com/synonymdev/bitkit-transifex-sync
71+
72+
### Pulling Translations
73+
74+
To pull the latest translations from Transifex:
75+
76+
1. **Install Transifex CLI** (if not already installed):
77+
- Follow the installation instructions: [Transifex CLI Installation](https://developers.transifex.com/docs/cli)
78+
79+
2. **Authenticate with Transifex** (if not already configured):
80+
- Create a `.transifexrc` file in your home directory (`~/.transifexrc`) with your API token:
81+
```ini
82+
[https://www.transifex.com]
83+
rest_hostname = https://rest.api.transifex.com
84+
token = YOUR_API_TOKEN_HERE
85+
```
86+
- You can get your API token from your [Transifex account settings](https://www.transifex.com/user/settings/api/)
87+
- The CLI will prompt you for an API token if one is not configured
88+
89+
3. **Pull translations**:
90+
```sh
91+
./scripts/pull-translations.sh
92+
```
7293

7394
## Build
7495

app/src/androidTest/java/to/bitkit/ui/settings/backups/BackupIntroScreenTest.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ class BackupIntroScreenTest {
3030
}
3131

3232
// Assert
33-
composeTestRule.onNodeWithTag("backup_intro_screen").assertExists()
34-
composeTestRule.onNodeWithTag("backup_image").assertExists()
35-
composeTestRule.onNodeWithTag("backup_title").assertExists()
33+
composeTestRule.onNodeWithTag("BackupIntroView").assertExists()
34+
composeTestRule.onNodeWithTag("BackupIntroViewImage").assertExists()
35+
composeTestRule.onNodeWithTag("BackupIntroViewTitle").assertExists()
3636

3737
// Verify buttons
38-
composeTestRule.onNodeWithTag("buttons_row").assertExists()
39-
composeTestRule.onNodeWithTag("later_button").assertExists().performClick()
38+
composeTestRule.onNodeWithTag("BackupIntroViewButtons").assertExists()
39+
composeTestRule.onNodeWithTag("BackupIntroViewCancel").assertExists().performClick()
4040
assert(closeClicked)
4141

42-
composeTestRule.onNodeWithTag("backup_button").assertExists().performClick()
42+
composeTestRule.onNodeWithTag("BackupIntroViewContinue").assertExists().performClick()
4343
assert(confirmClicked)
4444
}
4545

@@ -85,12 +85,12 @@ class BackupIntroScreenTest {
8585
}
8686

8787
// Assert
88-
composeTestRule.onNodeWithTag("backup_intro_screen").assertExists()
89-
composeTestRule.onNodeWithTag("backup_image").assertExists()
90-
composeTestRule.onNodeWithTag("backup_title").assertExists()
91-
composeTestRule.onNodeWithTag("backup_description").assertExists()
92-
composeTestRule.onNodeWithTag("buttons_row").assertExists()
93-
composeTestRule.onNodeWithTag("later_button").assertExists()
94-
composeTestRule.onNodeWithTag("backup_button").assertExists()
88+
composeTestRule.onNodeWithTag("BackupIntroView").assertExists()
89+
composeTestRule.onNodeWithTag("BackupIntroViewImage").assertExists()
90+
composeTestRule.onNodeWithTag("BackupIntroViewTitle").assertExists()
91+
composeTestRule.onNodeWithTag("BackupIntroViewDescription").assertExists()
92+
composeTestRule.onNodeWithTag("BackupIntroViewButtons").assertExists()
93+
composeTestRule.onNodeWithTag("BackupIntroViewCancel").assertExists()
94+
composeTestRule.onNodeWithTag("BackupIntroViewContinue").assertExists()
9595
}
9696
}

app/src/main/java/to/bitkit/models/Currency.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,16 @@ fun Long.formatToModernDisplay(locale: Locale = Locale.getDefault()): String {
106106
fun ULong.formatToModernDisplay(locale: Locale = Locale.getDefault()): String = toLong().formatToModernDisplay(locale)
107107

108108
fun Long.formatToClassicDisplay(locale: Locale = Locale.getDefault()): String {
109-
val sats = this
110109
val symbols = DecimalFormatSymbols(locale).apply {
111110
decimalSeparator = DECIMAL_SEPARATOR
112111
}
113-
val formatter = DecimalFormat("###.########", symbols)
114-
return formatter.format(sats.asBtc())
112+
val pattern = "0.${"0".repeat(CLASSIC_DECIMALS)}"
113+
val formatter = DecimalFormat(pattern, symbols).apply {
114+
minimumFractionDigits = CLASSIC_DECIMALS
115+
maximumFractionDigits = CLASSIC_DECIMALS
116+
isGroupingUsed = false
117+
}
118+
return formatter.format(asBtc())
115119
}
116120

117121
fun BigDecimal.formatCurrency(decimalPlaces: Int = FIAT_DECIMALS, locale: Locale = Locale.getDefault()): String? {

app/src/main/java/to/bitkit/ui/settings/backups/BackupIntroScreen.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fun BackupIntroScreen(
4444
.fillMaxSize()
4545
.gradientBackground()
4646
.navigationBarsPadding()
47-
.testTag("backup_intro_screen")
47+
.testTag("BackupIntroView")
4848
) {
4949
SheetTopBar(stringResource(R.string.security__backup_wallet))
5050

@@ -58,14 +58,14 @@ fun BackupIntroScreen(
5858
modifier = Modifier
5959
.fillMaxWidth()
6060
.weight(1f)
61-
.testTag("backup_image")
61+
.testTag("BackupIntroViewImage")
6262
)
6363

6464
Display(
6565
text = stringResource(R.string.security__backup_title).withAccent(accentColor = Colors.Blue),
6666
color = Colors.White,
6767
modifier = Modifier
68-
.testTag("backup_title")
68+
.testTag("BackupIntroViewTitle")
6969
)
7070
Spacer(Modifier.height(8.dp))
7171
BodyM(
@@ -76,13 +76,13 @@ fun BackupIntroScreen(
7676
},
7777
color = Colors.White64,
7878
modifier = Modifier
79-
.testTag("backup_description")
79+
.testTag("BackupIntroViewDescription")
8080
)
8181
Spacer(Modifier.height(32.dp))
8282
Row(
8383
modifier = Modifier
8484
.fillMaxWidth()
85-
.testTag("buttons_row"),
85+
.testTag("BackupIntroViewButtons"),
8686
horizontalArrangement = Arrangement.spacedBy(16.dp)
8787
) {
8888
SecondaryButton(
@@ -91,7 +91,7 @@ fun BackupIntroScreen(
9191
onClick = onClose,
9292
modifier = Modifier
9393
.weight(1f)
94-
.testTag("later_button"),
94+
.testTag("BackupIntroViewCancel"),
9595
)
9696

9797
PrimaryButton(
@@ -100,7 +100,7 @@ fun BackupIntroScreen(
100100
onClick = onConfirm,
101101
modifier = Modifier
102102
.weight(1f)
103-
.testTag("backup_button"),
103+
.testTag("BackupIntroViewContinue"),
104104
)
105105
}
106106
Spacer(Modifier.height(16.dp))

app/src/main/java/to/bitkit/ui/sheets/BoostTransactionSheet.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ object BoostTransactionTestTags {
437437
const val FEE_RATE_TEXT = "fee_rate_text"
438438

439439
@Suppress("SpellCheckingInspection")
440-
const val USE_SUGGESTED_FEE_BUTTON = "RecomendedFeeButton"
440+
const val USE_SUGGESTED_FEE_BUTTON = "RecommendedFeeButton"
441441
}
442442

443443
@Preview(showSystemUi = true, name = "Default mode")

app/src/main/java/to/bitkit/ui/sheets/HighBalanceWarningSheet.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fun HighBalanceWarningSheet(
4242
.sheetHeight(isModal = true)
4343
.gradientBackground()
4444
.navigationBarsPadding()
45-
.testTag("high_balance_intro_screen")
45+
.testTag("HighBalanceSheet")
4646
) {
4747
SheetTopBar(stringResource(R.string.other__high_balance__nav_title))
4848

@@ -56,15 +56,15 @@ fun HighBalanceWarningSheet(
5656
modifier = Modifier
5757
.fillMaxWidth()
5858
.weight(1f)
59-
.testTag("high_balance_image")
59+
.testTag("HighBalanceSheetImage")
6060
)
6161

6262
Display(
6363
text = stringResource(R.string.other__high_balance__title).withAccent(accentColor = Colors.Yellow),
6464
color = Colors.White,
6565
modifier = Modifier
6666
.fillMaxWidth()
67-
.testTag("high_balance_title")
67+
.testTag("HighBalanceSheetTitle")
6868
)
6969
VerticalSpacer(8.dp)
7070
BodyM(
@@ -74,13 +74,13 @@ fun HighBalanceWarningSheet(
7474
),
7575
color = Colors.White64,
7676
modifier = Modifier
77-
.testTag("high_balance_description")
77+
.testTag("HighBalanceSheetDescription")
7878
)
7979
VerticalSpacer(32.dp)
8080
Row(
8181
modifier = Modifier
8282
.fillMaxWidth()
83-
.testTag("buttons_row"),
83+
.testTag("HighBalanceSheetButtons"),
8484
horizontalArrangement = Arrangement.spacedBy(16.dp)
8585
) {
8686
SecondaryButton(
@@ -89,7 +89,7 @@ fun HighBalanceWarningSheet(
8989
onClick = learnMoreClick,
9090
modifier = Modifier
9191
.weight(1f)
92-
.testTag("learn_more_button"),
92+
.testTag("HighBalanceSheetCancel"),
9393
)
9494

9595
PrimaryButton(
@@ -98,7 +98,7 @@ fun HighBalanceWarningSheet(
9898
onClick = understoodClick,
9999
modifier = Modifier
100100
.weight(1f)
101-
.testTag("understood_button"),
101+
.testTag("HighBalanceSheetContinue"),
102102
)
103103
}
104104
VerticalSpacer(16.dp)

app/src/main/res/values-ar/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<string name="common__delete_yes">نعم، احذف</string>
4+
<string name="settings__backup__category_contacts">جهات الاتصال</string>
45
<string name="slashtags__your_name">اسمك</string>
56
<string name="slashtags__your_name_capital">اسمك</string>
67
<string name="slashtags__contact_name">اسم جهة الاتصال</string>
@@ -28,4 +29,4 @@
2829
<string name="wallet__drawer__contacts">جهات الاتصال</string>
2930
<string name="wallet__recipient_contact">جهة الاتصال</string>
3031
<string name="wallet__activity_contact">جهة الاتصال</string>
31-
</resources>
32+
</resources>

app/src/main/res/values-b+es+419/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,4 +1121,4 @@
11211121
<string name="widgets__weather__current_fee">Tasa media actual</string>
11221122
<string name="widgets__weather__next_block">Inclusión en siguiente bloque</string>
11231123
<string name="widgets__weather__error">No se pudo consultar la condición actual de fees</string>
1124-
</resources>
1124+
</resources>

0 commit comments

Comments
 (0)