Skip to content

Commit

Permalink
ABW-2346 - String copies imported from Crowdin. (#605)
Browse files Browse the repository at this point in the history
* ABW-2346 - String copies imported from Crowdin.

* ABW-2346 - Space added.

* ABW-2346 - Detekt fixed.

* ABW-2346 - Missing strings added and marked non existing ones with TODO.

* ABW-2346 - Missing string copies added.

* ABW-2346 - Missing string copy added.

* ABW-2346 - Detekt fixed.
  • Loading branch information
raf-rdx authored Nov 1, 2023
1 parent 9a58908 commit b1c09cb
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fun LSUBottomSheetDetails(
AddressRow(
modifier = Modifier.fillMaxWidth(),
address = lsuUnit.validatorAddress,
label = "Validator address"
label = stringResource(id = R.string.assetDetails_validator)
)

if (lsuUnit.fungibleResource.behaviours.isNotEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ fun CreateAccountContent(
onValueChanged = onAccountNameChange,
value = accountName,
error = if (isAccountNameLengthMoreThanTheMaximum) {
"Account label too long"
stringResource(id = R.string.error_accountLabel_tooLong)
} else {
null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private fun RenameAccountSheet(
value = accountNameChanged,
singleLine = true,
error = if (isNewNameLengthMoreThanTheMaximum) {
"Account label too long"
stringResource(id = R.string.error_accountLabel_tooLong)
} else {
null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.rememberSwipeableState
import androidx.compose.material.swipeable
Expand Down Expand Up @@ -224,7 +225,7 @@ private fun SuccessContent(
contentDescription = null
)
Text(
text = "Transaction Success", // stringResource(id = R.string.transaction_status_success_title),
text = stringResource(id = R.string.transaction_status_success_title),
style = RadixTheme.typography.title,
color = RadixTheme.colors.gray1,
textAlign = TextAlign.Center
Expand All @@ -243,10 +244,11 @@ private fun SuccessContent(
horizontalArrangement = Arrangement.Center
) {
Text(
text = "Transaction ID: ",
text = stringResource(id = R.string.transaction_status_transaction_id_text),
style = RadixTheme.typography.body1Regular,
color = RadixTheme.colors.gray1
)
Spacer(modifier = Modifier.width(RadixTheme.dimensions.paddingXSmall))
ActionableAddressView(
address = transactionAddress,
textStyle = RadixTheme.typography.body1Regular,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ fun NetworkFeeContent(
placeholderFadeTransitionSpec = { tween() },
contentFadeTransitionSpec = { tween() }
),
text = "${fees.transactionFeeToLock.displayableQuantity()} XRD",
text = stringResource(
id = R.string.transactionReview_xrdAmount,
fees.transactionFeeToLock.displayableQuantity()
),
style = RadixTheme.typography.body1Link,
color = RadixTheme.colors.gray1
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.babylon.wallet.android.R
import com.babylon.wallet.android.designsystem.theme.RadixTheme
import com.babylon.wallet.android.designsystem.theme.RadixWalletTheme
import com.babylon.wallet.android.domain.model.resources.Resource
Expand Down Expand Up @@ -231,7 +232,7 @@ private fun ColumnScope.FungibleSpendingAsset(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = RadixTheme.dimensions.paddingDefault),
text = "Total Sum is over your current balance",
text = stringResource(id = R.string.assetTransfer_error_insufficientBalance),
style = RadixTheme.typography.body2HighImportance.copy(
fontSize = 12.sp,
color = RadixTheme.colors.red1,
Expand All @@ -257,7 +258,7 @@ private fun ColumnScope.FungibleSpendingAsset(
modifier = Modifier
.padding(horizontal = RadixTheme.dimensions.paddingXSmall)
.clickable { onMaxClicked() },
text = "Max",
text = stringResource(id = R.string.common_max),
style = RadixTheme.typography.body1Link.copy(
color = RadixTheme.colors.blue1,
fontSize = 12.sp
Expand Down Expand Up @@ -322,7 +323,7 @@ private fun NonFungibleSpendingAsset(
) {
Text(
modifier = Modifier.fillMaxWidth(),
text = "This NFT is already used in another account",
text = stringResource(id = R.string.assetTransfer_error_resourceAlreadyAdded),
style = RadixTheme.typography.body2HighImportance.copy(
fontSize = 12.sp,
color = RadixTheme.colors.red1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material.AlertDialog
import androidx.compose.material.IconButton
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -257,10 +259,11 @@ fun SomethingWentWrongDialogContent(
horizontalArrangement = Arrangement.Center
) {
Text(
text = "Transaction ID: ",
text = stringResource(id = R.string.transaction_status_transaction_id_text),
style = RadixTheme.typography.body1Regular,
color = RadixTheme.colors.gray1
)
Spacer(modifier = Modifier.width(RadixTheme.dimensions.paddingXSmall))
ActionableAddressView(
address = transactionAddress,
textStyle = RadixTheme.typography.body1Regular,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typealias DSR = com.babylon.wallet.android.designsystem.R.drawable
@Composable
fun Tag.name(): String {
return when (this) {
is Tag.Official -> "RADIX NETWORK"
is Tag.Official -> stringResource(id = R.string.assetDetails_tags_officialRadix)
is Tag.Dynamic -> name
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ private fun StakeSectionTitle(title: String, modifier: Modifier = Modifier) {
)
}

@Composable
fun poolName(name: String?): String {
return name?.ifEmpty { "Unnamed Pool" } ?: "Unnamed Pool"
return name?.ifEmpty {
stringResource(id = R.string.account_poolUnits_unknownPoolUnitName)
} ?: stringResource(id = R.string.account_poolUnits_unknownPoolUnitName)
}

0 comments on commit b1c09cb

Please sign in to comment.