Merge pull request #1454 from vector-im/feature/bma/stringDuplicate
String duplicate
This commit is contained in:
commit
496601a8e0
17 changed files with 37 additions and 31 deletions
|
|
@ -43,6 +43,7 @@ import io.element.android.libraries.designsystem.theme.components.TextButton
|
|||
import io.element.android.libraries.matrix.api.auth.OidcDetails
|
||||
import io.element.android.libraries.testtags.TestTags
|
||||
import io.element.android.libraries.testtags.testTag
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
|
||||
@Composable
|
||||
fun ConfirmAccountProviderView(
|
||||
|
|
@ -86,7 +87,7 @@ fun ConfirmAccountProviderView(
|
|||
footer = {
|
||||
ButtonColumnMolecule {
|
||||
Button(
|
||||
text = stringResource(id = R.string.screen_account_provider_continue),
|
||||
text = stringResource(id = CommonStrings.action_continue),
|
||||
showProgress = isLoading,
|
||||
onClick = { eventSink.invoke(ConfirmAccountProviderEvents.Continue) },
|
||||
enabled = state.submitEnabled || isLoading,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ fun LoginPasswordView(
|
|||
Spacer(modifier = Modifier.weight(1f))
|
||||
// Submit
|
||||
Button(
|
||||
text = stringResource(R.string.screen_login_submit),
|
||||
text = stringResource(CommonStrings.action_continue),
|
||||
showProgress = isLoading,
|
||||
onClick = ::submit,
|
||||
enabled = state.submitEnabled || isLoading,
|
||||
|
|
@ -199,7 +199,7 @@ internal fun LoginForm(
|
|||
eventSink(LoginPasswordEvents.SetLogin(it))
|
||||
}),
|
||||
placeholder = {
|
||||
Text(text = stringResource(R.string.screen_login_username_hint))
|
||||
Text(text = stringResource(CommonStrings.common_username))
|
||||
},
|
||||
onValueChange = {
|
||||
loginFieldState = it
|
||||
|
|
@ -246,7 +246,7 @@ internal fun LoginForm(
|
|||
eventSink(LoginPasswordEvents.SetPassword(it))
|
||||
},
|
||||
placeholder = {
|
||||
Text(text = stringResource(R.string.screen_login_password_hint))
|
||||
Text(text = stringResource(CommonStrings.common_password))
|
||||
},
|
||||
visualTransformation = if (passwordVisible) VisualTransformation.None else PasswordVisualTransformation(),
|
||||
trailingIcon = {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import io.element.android.libraries.designsystem.preview.ElementPreview
|
|||
import io.element.android.libraries.designsystem.theme.components.ModalBottomSheet
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
|
|
@ -133,7 +134,7 @@ private fun ColumnScope.RetrySendMenuContents(
|
|||
ListItem(
|
||||
headlineContent = {
|
||||
Text(
|
||||
text = stringResource(R.string.screen_room_retry_send_menu_remove_action),
|
||||
text = stringResource(CommonStrings.action_remove),
|
||||
style = ElementTheme.typography.fontBodyLgRegular,
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import io.element.android.features.preferences.impl.R
|
||||
import io.element.android.libraries.designsystem.components.preferences.PreferenceSwitch
|
||||
import io.element.android.libraries.designsystem.components.preferences.PreferenceView
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
|
||||
@Composable
|
||||
|
|
@ -39,16 +40,13 @@ fun AdvancedSettingsView(
|
|||
) {
|
||||
PreferenceSwitch(
|
||||
title = stringResource(id = CommonStrings.common_rich_text_editor),
|
||||
// TODO i18n
|
||||
subtitle = "Disable the rich text editor to type Markdown manually",
|
||||
subtitle = stringResource(id = R.string.screen_advanced_settings_rich_text_editor_description),
|
||||
isChecked = state.isRichTextEditorEnabled,
|
||||
onCheckedChange = { state.eventSink(AdvancedSettingsEvents.SetRichTextEditorEnabled(it)) },
|
||||
)
|
||||
PreferenceSwitch(
|
||||
// TODO i18n
|
||||
title = "Developer mode",
|
||||
// TODO i18n
|
||||
subtitle = "The developer mode activates hidden features. For developers only!",
|
||||
title = stringResource(id = R.string.screen_advanced_settings_developer_mode),
|
||||
subtitle = stringResource(id = R.string.screen_advanced_settings_developer_mode_description),
|
||||
isChecked = state.isDeveloperModeEnabled,
|
||||
onCheckedChange = { state.eventSink(AdvancedSettingsEvents.SetDeveloperModeEnabled(it)) },
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="screen_advanced_settings_developer_mode">"Developer mode"</string>
|
||||
<string name="screen_advanced_settings_developer_mode_description">"Enable to have access to features and functionality for developers."</string>
|
||||
<string name="screen_advanced_settings_rich_text_editor_description">"Disable the rich text editor to type Markdown manually."</string>
|
||||
<string name="screen_edit_profile_display_name">"Display name"</string>
|
||||
<string name="screen_edit_profile_display_name_placeholder">"Your display name"</string>
|
||||
<string name="screen_edit_profile_error">"An unknown error was encountered and the information couldn\'t be changed."</string>
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ internal fun MembersSection(
|
|||
) {
|
||||
PreferenceCategory(modifier = modifier) {
|
||||
PreferenceText(
|
||||
title = stringResource(R.string.screen_room_details_people_title),
|
||||
title = stringResource(CommonStrings.common_people),
|
||||
icon = Icons.Outlined.Person,
|
||||
currentValue = memberCount.toString(),
|
||||
onClick = openRoomMemberList,
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ private fun RoomMemberListTopBar(
|
|||
modifier = modifier,
|
||||
title = {
|
||||
Text(
|
||||
text = stringResource(R.string.screen_room_details_people_title),
|
||||
text = stringResource(CommonStrings.common_people),
|
||||
style = ElementTheme.typography.aliasScreenTitle,
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ internal fun HeaderContent(verificationFlowStep: FlowStep, modifier: Modifier =
|
|||
}
|
||||
val titleTextId = when (verificationFlowStep) {
|
||||
FlowStep.Initial -> R.string.screen_session_verification_open_existing_session_title
|
||||
FlowStep.Canceled -> R.string.screen_session_verification_cancelled_title
|
||||
FlowStep.Canceled -> CommonStrings.common_verification_cancelled
|
||||
FlowStep.AwaitingOtherDeviceResponse -> R.string.screen_session_verification_waiting_to_accept_title
|
||||
FlowStep.Ready, is FlowStep.Verifying, FlowStep.Completed -> R.string.screen_session_verification_compare_emojis_title
|
||||
}
|
||||
|
|
@ -190,7 +190,7 @@ internal fun BottomMenu(screenState: VerifySelfSessionState, goBack: () -> Unit)
|
|||
R.string.screen_session_verification_they_match
|
||||
}
|
||||
}
|
||||
FlowStep.Ready -> R.string.screen_session_verification_positive_button_ready
|
||||
FlowStep.Ready -> CommonStrings.action_start
|
||||
else -> null
|
||||
}
|
||||
val negativeButtonTitle = when (verificationViewState) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import android.os.Build
|
|||
import androidx.annotation.ChecksSdkIntAtLeast
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.composed
|
||||
import androidx.compose.ui.draw.BlurredEdgeTreatment
|
||||
import androidx.compose.ui.draw.blur
|
||||
import androidx.compose.ui.draw.drawBehind
|
||||
|
|
@ -94,8 +93,8 @@ fun Modifier.blurredShapeShadow(
|
|||
fun Modifier.blurCompat(
|
||||
radius: Dp,
|
||||
edgeTreatment: BlurredEdgeTreatment = BlurredEdgeTreatment.Rectangle
|
||||
): Modifier = composed {
|
||||
when {
|
||||
): Modifier {
|
||||
return when {
|
||||
radius.value == 0f -> this
|
||||
canUseBlur() -> blur(radius, edgeTreatment)
|
||||
else -> this // Added in case we find a way to make this work on older devices
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1ac3db25f807b871f7f40b0eeb791a010773f6f2463579d1cdf8cfb1373e3dc1
|
||||
size 38089
|
||||
oid sha256:20ed65388204495106f428d0445c3091bac5b953e46931d21d5ee73c5ae876cc
|
||||
size 37889
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1f93c5071a56654287b33b655cfe277e3b0ab93eec48adbde20c01359cce6661
|
||||
size 37677
|
||||
oid sha256:7bd91af47b7b336b5bd1abf52ebfcd588d29cb8b0bbb67115fbeaac8ba5bb469
|
||||
size 37473
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1f80b7138fad81e566cc490d97fb7ee6455fe7af93cc7137845b3f2937c64493
|
||||
size 37746
|
||||
oid sha256:40bddbf21b6ca1d3f2647ff5168bd7b620b36d5cf3c88f15bab148963c3426b7
|
||||
size 37530
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c70fad899a6aadac06ce2041223663381d7c9acfa20338c2f2031056e07fad6d
|
||||
size 35639
|
||||
oid sha256:21e918bf1bbc6f024099d7bb8a1f38eaa356a50a244a9348411489a678579afa
|
||||
size 35444
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c586177507ef9ea1f27b74b52a82f97c26d3795061baff4b3d67b8eb1a7ca36a
|
||||
size 35267
|
||||
oid sha256:c051bfc9f9eafd112ccc60eb77b7ffbc9d91c493f2b588fbf51476c2be39ab1a
|
||||
size 35069
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aa4483201413ada9f3e84851150074f0035a3fdc72ebab48a2cd8c435ea45688
|
||||
size 35372
|
||||
oid sha256:943800b5c6fbdda0c39569ab44375ec2e4487c54644663fc21417b077ce5b8e3
|
||||
size 35181
|
||||
|
|
|
|||
|
|
@ -124,4 +124,7 @@
|
|||
|
||||
<!-- DI -->
|
||||
<!-- issue id="JvmStaticProvidesInObjectDetector" severity="error" /-->
|
||||
|
||||
<!-- Compose -->
|
||||
<issue id="UnnecessaryComposedModifier" severity="error" />
|
||||
</lint>
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@
|
|||
{
|
||||
"name": ":features:preferences:impl",
|
||||
"includeRegex": [
|
||||
"screen_advanced_settings_.*",
|
||||
"screen_edit_profile_.*"
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue