Add finalized strings to strings.xml for backups.

This commit is contained in:
Alex Hart 2024-07-19 16:49:16 -03:00 committed by Nicholas Tinsley
parent 06d475fb6e
commit 44b2c62a0e
14 changed files with 167 additions and 255 deletions

View file

@ -1,179 +0,0 @@
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.thoughtcrime.securesms.backup.v2.ui.restore
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.theme.SignalTheme
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.backup.v2.ui.subscription.MessageBackupsTypeFeature
import org.thoughtcrime.securesms.backup.v2.ui.subscription.MessageBackupsTypeFeatureRow
import org.thoughtcrime.securesms.compose.ComposeFragment
import org.thoughtcrime.securesms.devicetransfer.moreoptions.MoreTransferOrRestoreOptionsMode
import org.thoughtcrime.securesms.util.navigation.safeNavigate
/**
* Fragment which facilitates restoring from a backup during
* registration.
*/
class RestoreFromBackupFragment : ComposeFragment() {
private val navArgs: RestoreFromBackupFragmentArgs by navArgs()
@Composable
override fun FragmentContent() {
RestoreFromBackupContent(
features = persistentListOf(),
onRestoreBackupClick = {
// TODO [message-backups] Restore backup.
},
onCancelClick = {
findNavController()
.popBackStack()
},
onMoreOptionsClick = {
findNavController()
.safeNavigate(RestoreFromBackupFragmentDirections.actionRestoreFromBacakupFragmentToMoreOptions(MoreTransferOrRestoreOptionsMode.SELECTION))
},
cancelable = navArgs.cancelable
)
}
}
@Preview
@Composable
private fun RestoreFromBackupContentPreview() {
Previews.Preview {
RestoreFromBackupContent(
features = persistentListOf(
MessageBackupsTypeFeature(
iconResourceId = R.drawable.symbol_thread_compact_bold_16,
label = "Your last 30 days of media"
),
MessageBackupsTypeFeature(
iconResourceId = R.drawable.symbol_recent_compact_bold_16,
label = "All of your text messages"
)
),
onRestoreBackupClick = {},
onCancelClick = {},
onMoreOptionsClick = {},
true
)
}
}
@Composable
private fun RestoreFromBackupContent(
features: ImmutableList<MessageBackupsTypeFeature>,
onRestoreBackupClick: () -> Unit,
onCancelClick: () -> Unit,
onMoreOptionsClick: () -> Unit,
cancelable: Boolean
) {
Column(
modifier = Modifier
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(top = 40.dp, bottom = 24.dp)
) {
Text(
text = "Restore from backup", // TODO [message-backups] Finalized copy.
style = MaterialTheme.typography.headlineMedium,
modifier = Modifier.padding(bottom = 12.dp)
)
val yourLastBackupText = buildAnnotatedString {
append("Your last backup was made on March 5, 2024 at 9:00am.") // TODO [message-backups] Finalized copy.
append(" ")
withStyle(SpanStyle(fontWeight = FontWeight.SemiBold)) {
append("Only media sent or received in the past 30 days is included.") // TODO [message-backups] Finalized copy.
}
}
Text(
text = yourLastBackupText,
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(bottom = 28.dp)
)
Column(
modifier = Modifier
.fillMaxWidth()
.background(color = SignalTheme.colors.colorSurface2, shape = RoundedCornerShape(18.dp))
.padding(horizontal = 20.dp)
.padding(top = 20.dp, bottom = 18.dp)
) {
Text(
text = "Your backup includes:", // TODO [message-backups] Finalized copy.
style = MaterialTheme.typography.titleMedium,
modifier = Modifier.padding(bottom = 6.dp)
)
features.forEach {
MessageBackupsTypeFeatureRow(
messageBackupsTypeFeature = it,
iconTint = MaterialTheme.colorScheme.primary,
modifier = Modifier.padding(start = 16.dp, top = 6.dp)
)
}
}
Spacer(modifier = Modifier.weight(1f))
Buttons.LargeTonal(
onClick = onRestoreBackupClick,
modifier = Modifier.fillMaxWidth()
) {
Text(
text = "Restore backup" // TODO [message-backups] Finalized copy.
)
}
if (cancelable) {
TextButton(
onClick = onCancelClick,
modifier = Modifier.fillMaxWidth()
) {
Text(
text = stringResource(id = android.R.string.cancel)
)
}
} else {
TextButton(
onClick = onMoreOptionsClick,
modifier = Modifier.fillMaxWidth()
) {
Text(
text = stringResource(id = R.string.TransferOrRestoreFragment__more_options)
)
}
}
}
}

View file

@ -88,13 +88,13 @@ private fun SheetContent(
}
Text(
text = "Pay $formattedPrice/month to Signal", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsCheckoutSheet__pay_s_per_month, formattedPrice),
style = MaterialTheme.typography.titleLarge,
modifier = Modifier.padding(top = 48.dp)
)
Text(
text = "You'll get:", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsCheckoutSheet__youll_get),
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(top = 5.dp)
)

View file

@ -26,6 +26,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@ -48,7 +49,7 @@ fun MessageBackupsEducationScreen(
Scaffolds.Settings(
onNavigationClick = onNavigationClick,
navigationIconPainter = painterResource(id = R.drawable.symbol_x_24),
title = "Chat backups" // TODO [message-backups] Finalized copy
title = stringResource(id = R.string.RemoteBackupsSettingsFragment__signal_backups)
) {
Column(
modifier = Modifier
@ -74,7 +75,7 @@ fun MessageBackupsEducationScreen(
item {
Text(
text = "Chat Backups", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.RemoteBackupsSettingsFragment__signal_backups),
style = MaterialTheme.typography.headlineMedium,
modifier = Modifier.padding(top = 15.dp)
)
@ -82,7 +83,7 @@ fun MessageBackupsEducationScreen(
item {
Text(
text = "Back up your messages and media and using Signals secure, end-to-end encrypted storage service. Never lose a message when you get a new phone or reinstall Signal.", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsEducationScreen__backup_your_messages_and_media),
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
textAlign = TextAlign.Center,
@ -97,17 +98,17 @@ fun MessageBackupsEducationScreen(
) {
NotableFeatureRow(
painter = painterResource(id = R.drawable.symbol_lock_compact_20),
text = "End-to-end Encrypted" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsEducationScreen__end_to_end_encrypted)
)
NotableFeatureRow(
painter = painterResource(id = R.drawable.symbol_check_square_compact_20),
text = "Optional, always" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsEducationScreen__optional_always)
)
NotableFeatureRow(
painter = painterResource(id = R.drawable.symbol_trash_compact_20),
text = "Delete your backup anytime" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsEducationScreen__delete_your_backup_anytime)
)
}
}
@ -118,7 +119,7 @@ fun MessageBackupsEducationScreen(
modifier = Modifier.fillMaxWidth()
) {
Text(
text = "Enable backups" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsEducationScreen__enable_backups)
)
}
@ -129,7 +130,7 @@ fun MessageBackupsEducationScreen(
.padding(bottom = 16.dp)
) {
Text(
text = "Learn more" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsEducationScreen__learn_more)
)
}
}

View file

@ -82,7 +82,7 @@ class MessageBackupsFlowFragment : ComposeFragment(), InAppPaymentCheckoutDelega
composable(route = MessageBackupsScreen.PIN_EDUCATION.name) {
MessageBackupsPinEducationScreen(
onNavigationClick = viewModel::goToPreviousScreen,
onGeneratePinClick = {},
onCreatePinClick = {},
onUseCurrentPinClick = viewModel::goToNextScreen,
recommendedPinSize = 16 // TODO [message-backups] This value should come from some kind of config
)

View file

@ -32,6 +32,7 @@ import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
@ -68,7 +69,7 @@ fun MessageBackupsPinConfirmationScreen(
) {
item {
Text(
text = "Enter your PIN", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinConfirmationScreen__enter_your_pin),
style = MaterialTheme.typography.headlineMedium,
modifier = Modifier.padding(top = 40.dp)
)
@ -76,7 +77,7 @@ fun MessageBackupsPinConfirmationScreen(
item {
Text(
text = "Enter your Signal PIN to enable backups", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinConfirmationScreen__enter_your_signal_pin_to_enable_backups),
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(top = 16.dp)
@ -84,7 +85,6 @@ fun MessageBackupsPinConfirmationScreen(
}
item {
// TODO [message-backups] Confirm default focus state
val keyboardType = remember(pinKeyboardType) {
when (pinKeyboardType) {
PinKeyboardType.NUMERIC -> KeyboardType.NumberPassword
@ -136,7 +136,7 @@ fun MessageBackupsPinConfirmationScreen(
onClick = onNextClick
) {
Text(
text = "Next" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinConfirmationScreen__next)
)
}
}
@ -198,7 +198,7 @@ private fun PinKeyboardTypeToggle(
modifier = Modifier.padding(end = 8.dp)
)
Text(
text = "Switch keyboard" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinConfirmationScreen__switch_keyboard)
)
}
}

View file

@ -20,6 +20,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@ -35,12 +36,12 @@ import org.thoughtcrime.securesms.R
@Composable
fun MessageBackupsPinEducationScreen(
onNavigationClick: () -> Unit,
onGeneratePinClick: () -> Unit,
onCreatePinClick: () -> Unit,
onUseCurrentPinClick: () -> Unit,
recommendedPinSize: Int
) {
Scaffolds.Settings(
title = "Backup type", // TODO [message-backups] Finalized copy
title = stringResource(id = R.string.RemoteBackupsSettingsFragment__signal_backups),
onNavigationClick = onNavigationClick,
navigationIconPainter = painterResource(id = R.drawable.symbol_arrow_left_24)
) {
@ -68,7 +69,7 @@ fun MessageBackupsPinEducationScreen(
item {
Text(
text = "PINs protect your backup", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinEducationScreen__pins_protect_your_backup),
style = MaterialTheme.typography.headlineMedium,
modifier = Modifier.padding(top = 16.dp)
)
@ -76,7 +77,7 @@ fun MessageBackupsPinEducationScreen(
item {
Text(
text = "Your Signal PIN lets you restore your backup when you re-install Signal. For increased security, we recommend updating to a new $recommendedPinSize-digit PIN.", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinEducationScreen__your_signal_pin_lets_you),
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyLarge,
@ -86,7 +87,7 @@ fun MessageBackupsPinEducationScreen(
item {
Text(
text = "If you forget your PIN, you will not be able to restore your backup. You can change your PIN at any time in settings.", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinEducationScreen__if_you_forget_your_pin),
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyLarge,
@ -100,18 +101,18 @@ fun MessageBackupsPinEducationScreen(
modifier = Modifier.fillMaxWidth()
) {
Text(
text = "Use current Signal PIN" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinEducationScreen__use_current_signal_pin)
)
}
TextButton(
onClick = onGeneratePinClick,
onClick = onCreatePinClick,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 16.dp)
) {
Text(
text = "Generate a new $recommendedPinSize-digit PIN" // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessageBackupsPinEducationScreen__create_new_pin)
)
}
}
@ -124,7 +125,7 @@ private fun MessageBackupsPinScreenPreview() {
Previews.Preview {
MessageBackupsPinEducationScreen(
onNavigationClick = {},
onGeneratePinClick = {},
onCreatePinClick = {},
onUseCurrentPinClick = {},
recommendedPinSize = 16
)

View file

@ -98,24 +98,26 @@ fun MessageBackupsTypeSelectionScreen(
item {
Text(
text = "Choose your backup type", // TODO [message-backups] Finalized copy
text = stringResource(id = R.string.MessagesBackupsTypeSelectionScreen__choose_your_backup_plan),
style = MaterialTheme.typography.headlineMedium,
modifier = Modifier.padding(top = 12.dp)
)
}
item {
// TODO [message-backups] Finalized copy
val primaryColor = MaterialTheme.colorScheme.primary
val readMoreString = buildAnnotatedString {
append("All backups are end-to-end encrypted. Signal is a non-profit—paying for backups helps support our mission. ")
append(stringResource(id = R.string.MessageBackupsTypeSelectionScreen__all_backups_are_end_to_end_encrypted))
val readMore = stringResource(id = R.string.MessageBackupsTypeSelectionScreen__read_more)
append(" ")
withAnnotation(tag = "URL", annotation = "read-more") {
withStyle(
style = SpanStyle(
color = primaryColor
)
) {
append("Read more")
append(readMore)
}
}
}

View file

@ -86,7 +86,7 @@ class ChatsSettingsFragment : DSLSettingsFragment(R.string.preferences_chats__ch
if (RemoteConfig.messageBackups || state.remoteBackupsEnabled) {
clickPref(
title = DSLSettingsText.from("Signal Backups"), // TODO [message-backups] -- Finalized copy
title = DSLSettingsText.from(R.string.RemoteBackupsSettingsFragment__signal_backups),
summary = DSLSettingsText.from(if (state.remoteBackupsEnabled) R.string.arrays__enabled else R.string.arrays__disabled),
onClick = {
if (state.remoteBackupsEnabled) {

View file

@ -121,7 +121,7 @@ private fun BackupsTypeSettingsContent(
item {
Rows.TextRow(
text = "Change or cancel subscription", // TODO [message-backups] final copy
text = stringResource(id = R.string.BackupsTypeSettingsFragment__change_or_cancel_subscription),
onClick = contentCallbacks::onChangeOrCancelSubscriptionClick
)
}
@ -154,7 +154,7 @@ private fun BackupsTypeRow(
Column {
Text(text = messageBackupsType.title)
Text(
text = "$formattedAmount/month . Renews $renewal", // TODO [message-backups] final copy
text = stringResource(id = R.string.BackupsTypeSettingsFragment__s_month_renews_s, formattedAmount, renewal),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)

View file

@ -58,14 +58,22 @@ class CreditCardFragment : Fragment(R.layout.credit_card_fragment) {
}
}
// TODO [message-backups] Copy for this button in backups checkout flow.
binding.continueButton.text = if (args.inAppPayment.type == InAppPaymentType.RECURRING_DONATION) {
getString(
R.string.CreditCardFragment__donate_s_month,
FiatMoneyUtil.format(resources, args.inAppPayment.data.amount!!.toFiatMoney(), FiatMoneyUtil.formatOptions().trimZerosAfterDecimal())
)
} else {
getString(R.string.CreditCardFragment__donate_s, FiatMoneyUtil.format(resources, args.inAppPayment.data.amount!!.toFiatMoney()))
binding.continueButton.text = when (args.inAppPayment.type) {
InAppPaymentType.RECURRING_DONATION -> {
getString(
R.string.CreditCardFragment__donate_s_month,
FiatMoneyUtil.format(resources, args.inAppPayment.data.amount!!.toFiatMoney(), FiatMoneyUtil.formatOptions().trimZerosAfterDecimal())
)
}
InAppPaymentType.RECURRING_BACKUP -> {
getString(
R.string.CreditCardFragment__pay_s_month,
FiatMoneyUtil.format(resources, args.inAppPayment.data.amount!!.toFiatMoney(), FiatMoneyUtil.formatOptions().trimZerosAfterDecimal())
)
}
else -> {
getString(R.string.CreditCardFragment__donate_s, FiatMoneyUtil.format(resources, args.inAppPayment.data.amount!!.toFiatMoney()))
}
}
binding.description.setLinkColor(ContextCompat.getColor(requireContext(), R.color.signal_colorPrimary))

View file

@ -196,8 +196,8 @@ private fun LogInWithoutTransferringOption(
}
},
isSelected = selectedOption == BackupRestorationType.NONE,
title = "Log in without transferring", // TODO [message-backups] Finalized copy.
subtitle = "Continue without transferring your messages and media", // TODO [message-backups] Finalized copy.
title = stringResource(id = R.string.MoreTransferOrRestoreOptionsSheet__log_in_without_transferring),
subtitle = stringResource(id = R.string.MoreTransferOrRestoreOptionsSheet__continue_without_transferring),
onClick = { onOptionSelected(BackupRestorationType.NONE) }
)
}
@ -232,8 +232,8 @@ private fun TransferFromAndroidDeviceOption(
}
},
isSelected = selectedOption == BackupRestorationType.DEVICE_TRANSFER,
title = "Transfer from Android device", // TODO [message-backups] Finalized copy.
subtitle = "Transfer your account and messages from your old device.", // TODO [message-backups] Finalized copy.
title = stringResource(id = R.string.MoreTransferOrRestoreOptionsSheet__transfer_from_android_device),
subtitle = stringResource(id = R.string.MoreTransferOrRestoreOptionsSheet__transfer_your_account_and_messages),
onClick = { onOptionSelected(BackupRestorationType.DEVICE_TRANSFER) }
)
}
@ -268,8 +268,8 @@ private fun RestoreLocalBackupOption(
}
},
isSelected = selectedOption == BackupRestorationType.LOCAL_BACKUP,
title = "Restore local backup", // TODO [message-backups] Finalized copy.
subtitle = "Restore your messages from a backup file you saved on your device.", // TODO [message-backups] Finalized copy.
title = stringResource(id = R.string.MoreTransferOrRestoreOptionsSheet__restore_local_backup),
subtitle = stringResource(id = R.string.MoreTransferOrRestoreOptionsSheet__restore_your_messages),
onClick = { onOptionSelected(BackupRestorationType.LOCAL_BACKUP) }
)
}
@ -284,7 +284,7 @@ private fun OptionPreview() {
modifier = Modifier.padding(horizontal = 18.dp)
) {
Icon(
painter = painterResource(id = R.drawable.symbol_backup_light), // TODO [message-backups] Finalized asset.
painter = painterResource(id = R.drawable.symbol_backup_light),
contentDescription = null,
tint = MaterialTheme.colorScheme.primary,
modifier = Modifier.size(36.dp)
@ -292,8 +292,8 @@ private fun OptionPreview() {
}
},
isSelected = false,
title = "Log in without transferring", // TODO [message-backups] Finalized copy.
subtitle = "Continue without transferring your messages and media", // TODO [message-backups] Finalized copy.
title = "Option Preview Title",
subtitle = "Option Preview Subtitle",
onClick = {}
)
}

View file

@ -119,6 +119,7 @@ class RemoteRestoreActivity : BaseActivity() {
viewModel.updateRestoreProgress(restoreEvent)
}
@Composable
private fun getFeatureList(tier: MessageBackupTier?): ImmutableList<MessageBackupsTypeFeature> {
return when (tier) {
null -> persistentListOf()
@ -126,11 +127,11 @@ class RemoteRestoreActivity : BaseActivity() {
persistentListOf(
MessageBackupsTypeFeature(
iconResourceId = R.drawable.symbol_thread_compact_bold_16,
label = "All of your media"
label = stringResource(id = R.string.RemoteRestoreActivity__all_of_your_media)
),
MessageBackupsTypeFeature(
iconResourceId = R.drawable.symbol_recent_compact_bold_16,
label = "All of your text messages"
label = stringResource(id = R.string.RemoteRestoreActivity__all_of_your_messages)
)
)
}
@ -138,11 +139,11 @@ class RemoteRestoreActivity : BaseActivity() {
persistentListOf(
MessageBackupsTypeFeature(
iconResourceId = R.drawable.symbol_thread_compact_bold_16,
label = "Your last 30 days of media"
label = stringResource(id = R.string.RemoteRestoreActivity__your_last_d_days_of_media, 30)
),
MessageBackupsTypeFeature(
iconResourceId = R.drawable.symbol_recent_compact_bold_16,
label = "All of your text messages"
label = stringResource(id = R.string.RemoteRestoreActivity__all_of_your_messages)
)
)
}
@ -186,11 +187,10 @@ class RemoteRestoreActivity : BaseActivity() {
)
}
// TODO [message-backups] Finalized copy.
val progressText = when (restoreProgress?.type) {
RestoreV2Event.Type.PROGRESS_DOWNLOAD -> "Downloading backup..."
RestoreV2Event.Type.PROGRESS_RESTORE -> "Restoring messages..."
else -> "Restoring..."
RestoreV2Event.Type.PROGRESS_DOWNLOAD -> stringResource(id = R.string.RemoteRestoreActivity__downloading_backup)
RestoreV2Event.Type.PROGRESS_RESTORE -> stringResource(id = R.string.RemoteRestoreActivity__downloading_backup)
else -> stringResource(id = R.string.RemoteRestoreActivity__restoring)
}
Text(
@ -203,7 +203,7 @@ class RemoteRestoreActivity : BaseActivity() {
val progressBytes = Util.getPrettyFileSize(restoreProgress.count)
val totalBytes = Util.getPrettyFileSize(restoreProgress.estimatedTotalCount)
Text(
text = "$progressBytes of $totalBytes (%.2f%%)".format(restoreProgress.getProgress()),
text = stringResource(id = R.string.RemoteRestoreActivity__s_of_s_s, progressBytes, totalBytes, "%.2f%%".format(restoreProgress.getProgress())),
style = MaterialTheme.typography.bodySmall,
modifier = Modifier.padding(bottom = 12.dp)
)
@ -264,7 +264,7 @@ class RemoteRestoreActivity : BaseActivity() {
.padding(top = 40.dp, bottom = 24.dp)
) {
Text(
text = "Restore from backup", // TODO [message-backups] Finalized copy.
text = stringResource(id = R.string.RemoteRestoreActivity__restore_from_backup),
style = MaterialTheme.typography.headlineMedium,
modifier = Modifier.padding(bottom = 12.dp)
)
@ -281,7 +281,7 @@ class RemoteRestoreActivity : BaseActivity() {
append(" ")
if (tier != MessageBackupTier.PAID) {
withStyle(SpanStyle(fontWeight = FontWeight.SemiBold)) {
append("Only media sent or received in the past 30 days is included.") // TODO [message-backups] Finalized copy.
append(stringResource(id = R.string.RemoteRestoreActivity__only_media_sent_or_received))
}
}
}
@ -301,7 +301,7 @@ class RemoteRestoreActivity : BaseActivity() {
.padding(top = 20.dp, bottom = 18.dp)
) {
Text(
text = "Your backup includes:", // TODO [message-backups] Finalized copy.
text = stringResource(id = R.string.RemoteRestoreActivity__your_backup_includes),
style = MaterialTheme.typography.titleMedium,
modifier = Modifier.padding(bottom = 6.dp)
)
@ -322,7 +322,7 @@ class RemoteRestoreActivity : BaseActivity() {
modifier = Modifier.fillMaxWidth()
) {
Text(
text = "Restore backup" // TODO [message-backups] Finalized copy.
text = stringResource(id = R.string.RemoteRestoreActivity__restore_backup)
)
}

View file

@ -172,20 +172,6 @@
</fragment>
<fragment
android:id="@+id/restoreFromBackupFragment"
android:name="org.thoughtcrime.securesms.backup.v2.ui.restore.RestoreFromBackupFragment">
<action
android:id="@+id/action_restoreFromBacakupFragment_to_moreOptions"
app:destination="@+id/transferOrRestoreMoreOptionsDialog" />
<argument
android:name="cancelable"
app:argType="boolean" />
</fragment>
<fragment
android:id="@+id/restoreCompleteFragment"
android:name="org.thoughtcrime.securesms.restore.restorecomplete.RestoreCompleteFragment" />

View file

@ -171,6 +171,8 @@
<string name="CreditCardFragment__donate_s">Donate %1$s</string>
<!-- Button label to confirm credit card input and proceed with subscription payment -->
<string name="CreditCardFragment__donate_s_month">Donate %1$s/month</string>
<!-- Button label to confirm credit card input and proceed with backups payment. Placeholder is formatted price. -->
<string name="CreditCardFragment__pay_s_month">Donate %1$s/month</string>
<!-- OneTimeDonationPreference -->
<!-- Preference title with placeholder for amount. -->
@ -1217,6 +1219,44 @@
<string name="ManageGroupActivity_more">more</string>
<string name="ManageGroupActivity_add_group_description">Add group description…</string>
<!-- MoreTransferOrRestoreOptionsSheet -->
<!-- Row title for transfer option -->
<string name="MoreTransferOrRestoreOptionsSheet__transfer_from_android_device">Transfer from Android device</string>
<!-- Row description for transfer option -->
<string name="MoreTransferOrRestoreOptionsSheet__transfer_your_account_and_messages">Transfer your account and messages from your old Android device.</string>
<!-- Row title for logging in without transfer -->
<string name="MoreTransferOrRestoreOptionsSheet__log_in_without_transferring">Log in without transferring</string>
<!-- Row description for logging in without transfer -->
<string name="MoreTransferOrRestoreOptionsSheet__continue_without_transferring">Continue without transferring your messages and media</string>
<!-- Row title for restoring from local backup -->
<string name="MoreTransferOrRestoreOptionsSheet__restore_local_backup">Restore local backup</string>
<!-- Row description for restoring from local backup -->
<string name="MoreTransferOrRestoreOptionsSheet__restore_your_messages">Restore your messages from a backup file you saved on your device.</string>
<!-- RemoteRestoreActivity -->
<!-- Progress dialog label when downloading a backup -->
<string name="RemoteRestoreActivity__downloading_backup">Downloading backup…</string>
<!-- Progress dialog label when restoring a backup -->
<string name="RemoteRestoreActivity__restoring_messages">Restoring messages…</string>
<!-- Progress dialog label while awaiting updates -->
<string name="RemoteRestoreActivity__restoring">Restoring…</string>
<!-- Progress readout for dialog while downloading or restoring a backup. First placeholder is the formatted size of the backup downloaded, the second is formatted total amount to go, and the last is a percentage. -->
<string name="RemoteRestoreActivity__s_of_s_s">%1$s of %2$s (%3$s)</string>
<!-- Feature list media label for paid tier -->
<string name="RemoteRestoreActivity__all_of_your_media">All of your media</string>
<!-- Feature list media label for free tier. Placeholder is days, and is currently fixed at 30. -->
<string name="RemoteRestoreActivity__your_last_d_days_of_media">Your last %1$d days of media</string>
<!-- Feature list message label for free and paid tier -->
<string name="RemoteRestoreActivity__all_of_your_messages">All of your messages</string>
<!-- Screen title for restoring from backup -->
<string name="RemoteRestoreActivity__restore_from_backup">Restore from backup</string>
<!-- Notice about what media will be included in backups. Placeholder is days, and is curerntly fixed at 30. -->
<string name="RemoteRestoreActivity__only_media_sent_or_received">Only media sent or received in the past %1$d days is included.</string>
<!-- Section title for explaining what your backup includes -->
<string name="RemoteRestoreActivity__your_backup_includes">Your backup includes:</string>
<!-- Primary action button copy for starting restoration -->
<string name="RemoteRestoreActivity__restore_backup">Restore backup</string>
<!-- GroupMentionSettingDialog -->
<string name="GroupMentionSettingDialog_notify_me_for_mentions">Notify me for Mentions</string>
<string name="GroupMentionSettingDialog_receive_notifications_when_youre_mentioned_in_muted_chats">Receive notifications when youre mentioned in muted chats?</string>
@ -7091,6 +7131,10 @@
<string name="BackupsTypeSettingsFragment__unknown">Unknown</string>
<!-- Row title for entering payment history -->
<string name="BackupsTypeSettingsFragment__payment_history">Payment history</string>
<!-- Row description detailing renewal information. First placeholder is formatted price. Second placeholder is formatted date. -->
<string name="BackupsTypeSettingsFragment__s_month_renews_s">%1$s/month · Renews %2$s</string>
<!-- Row title to change or cancel subscription -->
<string name="BackupsTypeSettingsFragment__change_or_cancel_subscription">Change or cancel subscription</string>
<!-- RemoteRestoreActivity -->
<!-- Displayed at restore time to tell the user when their last backup was made. %$1s is replaced with the date (e.g. March 5, 2024) and %$2s is replaced with the time (e.g. 9:00am) -->
@ -7195,6 +7239,55 @@
<!-- The body of an alert dialog shown when we detect the user may be confused by the lock screen -->
<string name="PassphrasePromptActivity_help_prompt_body">Please enter your device pin, password or pattern.</string>
<!-- MessageBackupsCheckoutSheet -->
<!-- Sheet title. Placeholder is formatted price. -->
<string name="MessageBackupsCheckoutSheet__pay_s_per_month">Pay %1$s/month to Signal</string>
<!-- Sheet subtitle -->
<string name="MessageBackupsCheckoutSheet__youll_get">You\'ll get:</string>
<!-- MessageBackupsEducationScreen -->
<!-- Screen subtitle underneath large headline title -->
<string name="MessageBackupsEducationScreen__backup_your_messages_and_media">Back up your messages and media and using Signal\'s secure, end-to-end encrypted storage service. Never lose a message when you get a new phone or reinstall Signal.</string>
<!-- Backups feature label for e2e encryption -->
<string name="MessageBackupsEducationScreen__end_to_end_encrypted">End-to-end Encrypted</string>
<!-- Backups feature label for informing the user that this feature is completely optional -->
<string name="MessageBackupsEducationScreen__optional_always">Optional, always</string>
<!-- Backups feature label for informing the user that they can delete their backup at any time -->
<string name="MessageBackupsEducationScreen__delete_your_backup_anytime">Delete your backup anytime</string>
<!-- Action button label to proceed with backups activation -->
<string name="MessageBackupsEducationScreen__enable_backups">Enable backups</string>
<!-- Action button label to learn more -->
<string name="MessageBackupsEducationScreen__learn_more">Learn more</string>
<!-- MessageBackupsPinConfirmationScreen -->
<!-- Screen title -->
<string name="MessageBackupsPinConfirmationScreen__enter_your_pin">Enter your PIN</string>
<!-- Screen subtitle -->
<string name="MessageBackupsPinConfirmationScreen__enter_your_signal_pin_to_enable_backups">Enter your Signal PIN to enable backups</string>
<!-- Action button to confirm pin entry and continue -->
<string name="MessageBackupsPinConfirmationScreen__next">Next</string>
<!-- Action button to switch keyboard type -->
<string name="MessageBackupsPinConfirmationScreen__switch_keyboard">Switch keyboard</string>
<!-- MessageBackupsPinEducationScreen -->
<!-- Screen headline -->
<string name="MessageBackupsPinEducationScreen__pins_protect_your_backup">PINs protect your backup</string>
<!-- Notice about pin length. Placeholder is recommended pin length -->
<string name="MessageBackupsPinEducationScreen__your_signal_pin_lets_you">Your Signal PIN lets you restore your backup when you re-install Signal. We recommend using a PIN that\'s at least %1$d digits.</string>
<!-- Notice about changing your pin. -->
<string name="MessageBackupsPinEducationScreen__if_you_forget_your_pin">If you forget your PIN, you will not be able to restore your backup. You can change your PIN at any time in settings.</string>
<!-- Action button label to utilize current pin -->
<string name="MessageBackupsPinEducationScreen__use_current_signal_pin">Use current Signal PIN</string>
<!-- Action button to create a new pin -->
<string name="MessageBackupsPinEducationScreen__create_new_pin">Create new PIN</string>
<!-- MessagesBackupsTypeSelectionScreen -->
<!-- Screen headline -->
<string name="MessagesBackupsTypeSelectionScreen__choose_your_backup_plan">Choose your backup plan</string>
<!-- Screen subhead -->
<string name="MessageBackupsTypeSelectionScreen__all_backups_are_end_to_end_encrypted">All backups are end-to-end encrypted. Signal is a non-profit—paying for backups helps support our mission.</string>
<!-- Screen subhead highlighted read-more button -->
<string name="MessageBackupsTypeSelectionScreen__read_more">Read more</string>
<!-- Primary action button label when selecting a backup tier without a current selection -->
<string name="MessageBackupsTypeSelectionScreen__next">Next</string>
<!-- Primary action button label when selecting a backup tier with a current selection -->