fix translation & add credits

This commit is contained in:
Minecon724 2024-10-02 18:04:55 +02:00
parent 2535e4bea6
commit 65cd9ce170
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
4 changed files with 22 additions and 3 deletions

View file

@ -1,5 +1,7 @@
package eu.m724.coincounter.home.compose 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.Arrangement
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
@ -9,12 +11,16 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier 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.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import eu.m724.coincounter.CurrencyUtils import eu.m724.coincounter.CurrencyUtils
import eu.m724.coincounter.R
@Composable @Composable
fun BalanceView(balance: Int) { fun BalanceView(balance: Int) {
val context = LocalContext.current
Column( Column(
modifier = Modifier modifier = Modifier
.height(150.dp) .height(150.dp)
@ -23,6 +29,17 @@ fun BalanceView(balance: Int) {
horizontalAlignment = Alignment.CenterHorizontally horizontalAlignment = Alignment.CenterHorizontally
) { ) {
Row( Row(
modifier = Modifier.pointerInput(Unit) {
detectTapGestures(
onDoubleTap = {
Toast.makeText(
context,
context.getString(R.string.translation_credits),
Toast.LENGTH_SHORT
).show()
}
)
},
verticalAlignment = Alignment.Bottom verticalAlignment = Alignment.Bottom
) { ) {
Text( Text(

View file

@ -89,7 +89,7 @@ fun TransactionDialog(
.weight(1f) .weight(1f)
.focusRequester(firstFocus) .focusRequester(firstFocus)
.focusProperties { next = secondFocus }, .focusProperties { next = secondFocus },
supportingText = { Text(stringResource(R.string.create_transaction_label)) }, supportingText = { Text(stringResource(R.string.create_transaction_title)) },
keyboardOptions = KeyboardOptions.Default.copy( keyboardOptions = KeyboardOptions.Default.copy(
imeAction = ImeAction.Next imeAction = ImeAction.Next
), ),

View file

@ -8,7 +8,7 @@
<string name="create_transaction_absolute">Bezwzględna</string> <string name="create_transaction_absolute">Bezwzględna</string>
<string name="create_transaction_value_error">Błąd</string> <string name="create_transaction_value_error">Błąd</string>
<string name="create_transaction_value">Wartość (%1$s)</string> <string name="create_transaction_value">Wartość (%1$s)</string>
<string name="create_transaction_label">Etykieta</string> <string name="create_transaction_title">Tytuł</string>
<string name="wallet_actions_rename">Zmień nazwę portfela</string> <string name="wallet_actions_rename">Zmień nazwę portfela</string>
<string name="wallet_actions_delete">Usuń portfel</string> <string name="wallet_actions_delete">Usuń portfel</string>
<string name="wallet_actions_cancel">Anuluj</string> <string name="wallet_actions_cancel">Anuluj</string>
@ -17,4 +17,5 @@
<string name="wallet_rename_confirm">Zmień nazwę</string> <string name="wallet_rename_confirm">Zmień nazwę</string>
<string name="wallet_new_transaction">Nowa transakcja</string> <string name="wallet_new_transaction">Nowa transakcja</string>
<string name="home_add_wallet">Utwórz portfel</string> <string name="home_add_wallet">Utwórz portfel</string>
<string name="translation_credits">Polskie tłumaczenie autorstwa m724</string>
</resources> </resources>

View file

@ -8,7 +8,7 @@
<string name="create_transaction_absolute">Absolute</string> <string name="create_transaction_absolute">Absolute</string>
<string name="create_transaction_value_error">Error</string> <string name="create_transaction_value_error">Error</string>
<string name="create_transaction_value">Value (%1$s)</string> <string name="create_transaction_value">Value (%1$s)</string>
<string name="create_transaction_label">Label</string> <string name="create_transaction_title">Title</string>
<string name="wallet_actions_rename">Rename wallet</string> <string name="wallet_actions_rename">Rename wallet</string>
<string name="wallet_actions_delete">Delete wallet</string> <string name="wallet_actions_delete">Delete wallet</string>
<string name="wallet_actions_cancel">Cancel</string> <string name="wallet_actions_cancel">Cancel</string>
@ -17,4 +17,5 @@
<string name="wallet_rename_confirm">Rename</string> <string name="wallet_rename_confirm">Rename</string>
<string name="wallet_new_transaction">New transaction</string> <string name="wallet_new_transaction">New transaction</string>
<string name="home_add_wallet">Create wallet</string> <string name="home_add_wallet">Create wallet</string>
<string name="translation_credits">English language by the CoinCounter Team</string>
</resources> </resources>