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