Update strings for ios parity

This commit is contained in:
Jenna Vassar
2026-06-04 09:41:55 -07:00
parent 3fc48787b8
commit 8722305e12
2 changed files with 50 additions and 54 deletions
@@ -30,7 +30,6 @@ import androidx.compose.ui.autofill.ContentType
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.lerp
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.contentType
@@ -149,8 +148,8 @@ private fun title(state: SecureBackupSetupState): String {
// Custom flow has no "save your key" step — use per-step custom titles throughout.
if (state.isCustomEntry()) {
return when (state.customEntryStep) {
CustomEntryStep.Entry -> stringResource(id = R.string.screen_recovery_key_custom_title)
CustomEntryStep.Confirm -> stringResource(id = R.string.screen_recovery_key_custom_confirm_title)
CustomEntryStep.Entry -> stringResource(id = R.string.pro_screen_recovery_key_mode_input_title)
CustomEntryStep.Confirm -> stringResource(id = R.string.pro_screen_recovery_key_mode_confirm_title)
}
}
return when (state.setupState) {
@@ -171,8 +170,8 @@ private fun subtitle(state: SecureBackupSetupState): String? {
if (!state.wellknownLoaded) return null
if (state.isCustomEntry()) {
return when (state.customEntryStep) {
CustomEntryStep.Entry -> stringResource(id = R.string.screen_recovery_key_custom_description)
CustomEntryStep.Confirm -> stringResource(id = R.string.screen_recovery_key_custom_confirm_description)
CustomEntryStep.Entry -> stringResource(id = R.string.pro_screen_recovery_key_mode_input_description)
CustomEntryStep.Confirm -> stringResource(id = R.string.pro_screen_recovery_key_mode_confirm_description)
}
}
return when (state.setupState) {
@@ -295,9 +294,8 @@ private fun CustomPassphraseEntry(state: SecureBackupSetupState) {
}
},
),
supportingText = pluralStringResource(
id = R.plurals.screen_recovery_key_custom_requirement_length,
count = specs.minCharacterCount,
supportingText = stringResource(
id = R.string.pro_screen_recovery_key_mode_input_passphrase_field_footer,
specs.minCharacterCount,
),
)
@@ -317,7 +315,7 @@ private fun PassphraseStrengthIndicator(
modifier: Modifier = Modifier,
) {
val label = stringResource(
id = result?.strength?.labelRes() ?: R.string.screen_recovery_key_custom_strength_base,
id = result?.strength?.labelRes() ?: R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_base,
)
val hint = result?.strength?.hintRes()?.let { stringResource(id = it) }
val score = result?.score ?: 0f
@@ -354,25 +352,25 @@ private fun PassphraseStrengthIndicator(
}
private fun CustomRecoveryPassphraseStrength.labelRes(): Int = when (this) {
CustomRecoveryPassphraseStrength.Garbage -> R.string.screen_recovery_key_custom_strength_garbage
CustomRecoveryPassphraseStrength.Weak -> R.string.screen_recovery_key_custom_strength_weak
CustomRecoveryPassphraseStrength.Moderate -> R.string.screen_recovery_key_custom_strength_moderate
CustomRecoveryPassphraseStrength.Okay -> R.string.screen_recovery_key_custom_strength_okay
CustomRecoveryPassphraseStrength.Strong -> R.string.screen_recovery_key_custom_strength_strong
CustomRecoveryPassphraseStrength.VeryStrong -> R.string.screen_recovery_key_custom_strength_very_strong
CustomRecoveryPassphraseStrength.UltraStrong -> R.string.screen_recovery_key_custom_strength_ultra_strong
CustomRecoveryPassphraseStrength.Mega -> R.string.screen_recovery_key_custom_strength_mega
CustomRecoveryPassphraseStrength.Garbage -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_garbage
CustomRecoveryPassphraseStrength.Weak -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_weak
CustomRecoveryPassphraseStrength.Moderate -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_moderate
CustomRecoveryPassphraseStrength.Okay -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_okay
CustomRecoveryPassphraseStrength.Strong -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_strong
CustomRecoveryPassphraseStrength.VeryStrong -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_very_strong
CustomRecoveryPassphraseStrength.UltraStrong -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_ultra_strong
CustomRecoveryPassphraseStrength.Mega -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_mega
}
private fun CustomRecoveryPassphraseStrength.hintRes(): Int = when (this) {
CustomRecoveryPassphraseStrength.Garbage -> R.string.screen_recovery_key_custom_strength_hint_garbage
CustomRecoveryPassphraseStrength.Weak -> R.string.screen_recovery_key_custom_strength_hint_weak
CustomRecoveryPassphraseStrength.Moderate -> R.string.screen_recovery_key_custom_strength_hint_moderate
CustomRecoveryPassphraseStrength.Okay -> R.string.screen_recovery_key_custom_strength_hint_okay
CustomRecoveryPassphraseStrength.Strong -> R.string.screen_recovery_key_custom_strength_hint_strong
CustomRecoveryPassphraseStrength.VeryStrong -> R.string.screen_recovery_key_custom_strength_hint_very_strong
CustomRecoveryPassphraseStrength.UltraStrong -> R.string.screen_recovery_key_custom_strength_hint_ultra_strong
CustomRecoveryPassphraseStrength.Mega -> R.string.screen_recovery_key_custom_strength_hint_mega
CustomRecoveryPassphraseStrength.Garbage -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_garbage
CustomRecoveryPassphraseStrength.Weak -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_weak
CustomRecoveryPassphraseStrength.Moderate -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_moderate
CustomRecoveryPassphraseStrength.Okay -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_okay
CustomRecoveryPassphraseStrength.Strong -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_strong
CustomRecoveryPassphraseStrength.VeryStrong -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_very_strong
CustomRecoveryPassphraseStrength.UltraStrong -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_ultra_strong
CustomRecoveryPassphraseStrength.Mega -> R.string.pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_mega
}
// Stops mirror iOS PasswordStrengthBar.gradient: Compound red900 / lime700 with the same vivid
@@ -439,7 +437,7 @@ private fun CustomPassphraseConfirm(state: SecureBackupSetupState) {
),
validity = if (state.customPassphraseMismatch) TextFieldValidity.Invalid else TextFieldValidity.None,
supportingText = if (state.customPassphraseMismatch) {
stringResource(id = R.string.screen_recovery_key_custom_mismatch)
stringResource(id = R.string.pro_screen_recovery_key_mode_custom_mismatch)
} else {
null
},
@@ -491,7 +489,7 @@ private fun ColumnScope.CustomButtons(
}
CustomEntryStep.Confirm -> {
Button(
text = stringResource(id = R.string.screen_recovery_key_custom_finish_action),
text = stringResource(id = R.string.pro_screen_recovery_key_mode_confirm_finish_button),
enabled = state.canSubmitCustomPassphrase,
modifier = Modifier.fillMaxWidth(),
onClick = { state.eventSink.invoke(SecureBackupSetupEvents.SubmitCustomPassphrase) },
@@ -5,33 +5,31 @@
~ Please see LICENSE files in the repository root for full details.
-->
<resources>
<string name="screen_recovery_key_custom_title">Enter a custom recovery key</string>
<string name="screen_recovery_key_custom_description">Choose a recovery key that you can memorize.</string>
<string name="screen_recovery_key_custom_confirm_title">Confirm your recovery key</string>
<string name="screen_recovery_key_custom_confirm_description">Enter your recovery key again.</string>
<string name="screen_recovery_key_custom_mismatch">The recovery key you entered doesn\'t match</string>
<plurals name="screen_recovery_key_custom_requirement_length">
<item quantity="one">Minimum %1$d character</item>
<item quantity="other">Minimum %1$d characters</item>
</plurals>
<string name="screen_recovery_key_custom_finish_action">Finish setup</string>
<string name="screen_recovery_key_custom_strength_base">Strength</string>
<string name="screen_recovery_key_custom_strength_garbage">Garbage</string>
<string name="screen_recovery_key_custom_strength_weak">Weak</string>
<string name="screen_recovery_key_custom_strength_moderate">Moderate</string>
<string name="screen_recovery_key_custom_strength_okay">Okay</string>
<string name="screen_recovery_key_custom_strength_strong">Strong</string>
<string name="screen_recovery_key_custom_strength_very_strong">Very strong</string>
<string name="screen_recovery_key_custom_strength_ultra_strong">Super strong</string>
<string name="screen_recovery_key_custom_strength_mega">Ideal</string>
<string name="screen_recovery_key_custom_strength_hint_garbage">Cracking would take roughly milliseconds.</string>
<string name="screen_recovery_key_custom_strength_hint_weak">Cracking would take roughly minutes to months.</string>
<string name="screen_recovery_key_custom_strength_hint_moderate">Cracking would take roughly years.</string>
<string name="screen_recovery_key_custom_strength_hint_okay">Cracking would take roughly hundreds of years.</string>
<string name="screen_recovery_key_custom_strength_hint_strong">Cracking would take roughly billions of years.</string>
<string name="screen_recovery_key_custom_strength_hint_very_strong">Cracking would take roughly trillions of years.</string>
<string name="screen_recovery_key_custom_strength_hint_ultra_strong">Cracking would take roughly quadrillions of years.</string>
<string name="screen_recovery_key_custom_strength_hint_mega">Cracking would take roughly quintillions of years.</string>
<string name="pro_screen_recovery_key_mode_input_title">Enter a recovery key</string>
<string name="pro_screen_recovery_key_mode_input_description">Choose a recovery key that you can memorize.</string>
<string name="pro_screen_recovery_key_mode_confirm_title">Confirm your recovery key</string>
<string name="pro_screen_recovery_key_mode_confirm_description">Enter your recovery key again.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_field_footer">Minimum %1$s characters</string>
<string name="pro_screen_recovery_key_mode_confirm_finish_button">Finish setup</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_base">Strength</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_garbage">Garbage</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_weak">Weak</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_moderate">Moderate</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_okay">Okay</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_strong">Strong</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_very_strong">Very Strong</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_ultra_strong">Super Strong</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_mega">Ideal</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_garbage">Cracking would take roughly milliseconds.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_weak">Cracking would take roughly minutes to months.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_moderate">Cracking would take roughly years.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_okay">Cracking would take roughly hundreds of years.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_strong">Cracking would take roughly billions of years.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_very_strong">Cracking would take roughly trillions of years.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_ultra_strong">Cracking would take roughly quadrillions of years.</string>
<string name="pro_screen_recovery_key_mode_input_passphrase_strength_label_hint_mega">Cracking would take roughly quintillions of years.</string>
<!-- Android-only strings: no iOS counterpart was provided, so keys are left as-is. -->
<string name="pro_screen_recovery_key_mode_custom_mismatch">The recovery key you entered doesn\'t match</string>
<string name="a11y_recovery_key_loading_specs">Loading recovery key requirements</string>
<string name="a11y_recovery_key_custom_strength_announcement">Passphrase strength: %1$s</string>
</resources>