From 65cd9ce1704f54aafd10be29d28898e9df1e7d21 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Wed, 2 Oct 2024 18:04:55 +0200 Subject: [PATCH] fix translation & add credits --- .../coincounter/home/compose/BalanceView.kt | 17 +++++++++++++++++ .../wallet/compose/TransactionDialog.kt | 2 +- app/src/main/res/values-pl/strings.xml | 3 ++- app/src/main/res/values/strings.xml | 3 ++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/m724/coincounter/home/compose/BalanceView.kt b/app/src/main/java/eu/m724/coincounter/home/compose/BalanceView.kt index 193db18..c989250 100644 --- a/app/src/main/java/eu/m724/coincounter/home/compose/BalanceView.kt +++ b/app/src/main/java/eu/m724/coincounter/home/compose/BalanceView.kt @@ -1,5 +1,7 @@ package eu.m724.coincounter.home.compose +import android.widget.Toast +import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -9,12 +11,16 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import eu.m724.coincounter.CurrencyUtils +import eu.m724.coincounter.R @Composable fun BalanceView(balance: Int) { + val context = LocalContext.current Column( modifier = Modifier .height(150.dp) @@ -23,6 +29,17 @@ fun BalanceView(balance: Int) { horizontalAlignment = Alignment.CenterHorizontally ) { Row( + modifier = Modifier.pointerInput(Unit) { + detectTapGestures( + onDoubleTap = { + Toast.makeText( + context, + context.getString(R.string.translation_credits), + Toast.LENGTH_SHORT + ).show() + } + ) + }, verticalAlignment = Alignment.Bottom ) { Text( diff --git a/app/src/main/java/eu/m724/coincounter/wallet/compose/TransactionDialog.kt b/app/src/main/java/eu/m724/coincounter/wallet/compose/TransactionDialog.kt index 4d3cc2b..72e918f 100644 --- a/app/src/main/java/eu/m724/coincounter/wallet/compose/TransactionDialog.kt +++ b/app/src/main/java/eu/m724/coincounter/wallet/compose/TransactionDialog.kt @@ -89,7 +89,7 @@ fun TransactionDialog( .weight(1f) .focusRequester(firstFocus) .focusProperties { next = secondFocus }, - supportingText = { Text(stringResource(R.string.create_transaction_label)) }, + supportingText = { Text(stringResource(R.string.create_transaction_title)) }, keyboardOptions = KeyboardOptions.Default.copy( imeAction = ImeAction.Next ), diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 6414acb..36fc8a8 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -8,7 +8,7 @@ Bezwzględna Błąd Wartość (%1$s) - Etykieta + Tytuł Zmień nazwę portfela Usuń portfel Anuluj @@ -17,4 +17,5 @@ Zmień nazwę Nowa transakcja Utwórz portfel + Polskie tłumaczenie autorstwa m724 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 20a4dcf..735bba9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -8,7 +8,7 @@ Absolute Error Value (%1$s) - Label + Title Rename wallet Delete wallet Cancel @@ -17,4 +17,5 @@ Rename New transaction Create wallet + English language by the CoinCounter Team \ No newline at end of file