mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Sync user status strings with Localazy and tidy formatting
# Conflicts: # libraries/ui-strings/src/main/res/values/temporary.xml
This commit is contained in:
+1
-1
@@ -64,8 +64,8 @@ import io.element.android.libraries.designsystem.theme.unreadIndicator
|
||||
import io.element.android.libraries.matrix.api.notification.CallIntent
|
||||
import io.element.android.libraries.matrix.api.room.RoomNotificationMode
|
||||
import io.element.android.libraries.matrix.api.user.DisplayedStatus
|
||||
import io.element.android.libraries.matrix.ui.components.InviteSenderView
|
||||
import io.element.android.libraries.matrix.ui.components.DisplayNameWithStatus
|
||||
import io.element.android.libraries.matrix.ui.components.InviteSenderView
|
||||
import io.element.android.libraries.matrix.ui.model.InviteSender
|
||||
import io.element.android.libraries.matrix.ui.model.toEmojiText
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
|
||||
+12
-2
@@ -315,7 +315,12 @@ private fun inReplyToInvalidContent(): InReplyToDetails.Ready = InReplyToDetails
|
||||
)
|
||||
),
|
||||
textContent = "A text content",
|
||||
senderProfile = ProfileDetails.Ready(displayName = "Sender", displayNameAmbiguous = false, avatarUrl = null)
|
||||
senderProfile = ProfileDetails.Ready(
|
||||
displayName = "Sender",
|
||||
displayNameAmbiguous = false,
|
||||
avatarUrl = null,
|
||||
displayedStatus = null
|
||||
)
|
||||
)
|
||||
|
||||
private fun inReplyToTextContent(): InReplyToDetails.Ready = InReplyToDetails.Ready(
|
||||
@@ -332,5 +337,10 @@ private fun inReplyToTextContent(): InReplyToDetails.Ready = InReplyToDetails.Re
|
||||
)
|
||||
),
|
||||
textContent = "A text content",
|
||||
senderProfile = ProfileDetails.Ready(displayName = "Sender", displayNameAmbiguous = false, avatarUrl = null)
|
||||
senderProfile = ProfileDetails.Ready(
|
||||
displayName = "Sender",
|
||||
displayNameAmbiguous = false,
|
||||
avatarUrl = null,
|
||||
displayedStatus = null
|
||||
)
|
||||
)
|
||||
|
||||
+5
-5
@@ -32,9 +32,9 @@ sealed interface UserStatusPickerState {
|
||||
}
|
||||
|
||||
enum class PredefinedUserStatus(val emoji: String, @StringRes val labelRes: Int) {
|
||||
IN_A_MEETING("💬", R.string.common_user_status_in_a_meeting),
|
||||
FOCUS_TIME("💡", R.string.common_user_status_focus_time),
|
||||
ON_THE_ROAD("🚙", R.string.common_user_status_on_the_road),
|
||||
BE_RIGHT_BACK("☕", R.string.common_user_status_be_right_back),
|
||||
AWAY("🌴", R.string.common_user_status_away),
|
||||
IN_A_MEETING("💬", R.string.screen_settings_user_status_in_a_meeting),
|
||||
FOCUS_TIME("💡", R.string.screen_settings_user_status_focus_time),
|
||||
ON_THE_ROAD("🚙", R.string.screen_settings_user_status_on_the_road),
|
||||
BE_RIGHT_BACK("☕", R.string.screen_settings_user_status_be_right_back),
|
||||
AWAY("🌴", R.string.screen_settings_user_status_away),
|
||||
}
|
||||
|
||||
+4
-4
@@ -117,7 +117,7 @@ private fun EmptyStatusRow(
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
Text(
|
||||
text = stringResource(R.string.screen_preferences_user_status_placeholder),
|
||||
text = stringResource(R.string.screen_settings_user_status_placeholder),
|
||||
modifier = Modifier.padding(vertical = 16.dp),
|
||||
)
|
||||
},
|
||||
@@ -135,7 +135,7 @@ private fun CurrentStatusRow(
|
||||
) {
|
||||
val (emoji, text) = when (displayedStatus) {
|
||||
is DisplayedStatus.UserSet -> displayedStatus.status.emoji to displayedStatus.status.text
|
||||
is DisplayedStatus.InCall -> "🎧" to stringResource(R.string.common_user_status_on_a_call)
|
||||
is DisplayedStatus.InCall -> "🎧" to stringResource(CommonStrings.common_on_a_call)
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = { Text(text = text, modifier = Modifier.padding(vertical = 16.dp)) },
|
||||
@@ -210,7 +210,7 @@ private fun UserStatusPickerBottomSheet(
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
Text(text = stringResource(R.string.common_user_status_custom))
|
||||
Text(text = stringResource(R.string.screen_settings_user_status_custom))
|
||||
},
|
||||
leadingContent = ListItemContent.Custom { EmojiText("✏️") },
|
||||
onClick = {
|
||||
@@ -249,7 +249,7 @@ private fun CustomStatusInputRow(
|
||||
TextField(
|
||||
modifier = Modifier.focusRequester(focusRequester),
|
||||
state = textFieldState,
|
||||
placeholder = stringResource(R.string.screen_preferences_user_status_custom_hint),
|
||||
placeholder = stringResource(R.string.screen_settings_user_status_custom_hint),
|
||||
inputTransformation = InputTransformation.maxLength(CUSTOM_STATUS_TEXT_MAX_LENGTH),
|
||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
|
||||
onKeyboardAction = { if (hasChanges) onConfirm() },
|
||||
|
||||
@@ -101,6 +101,14 @@ If you proceed, some of your settings may change."</string>
|
||||
<string name="screen_notification_settings_system_notifications_action_required_content_link">"system settings"</string>
|
||||
<string name="screen_notification_settings_system_notifications_turned_off">"System notifications turned off"</string>
|
||||
<string name="screen_notification_settings_title">"Notifications"</string>
|
||||
<string name="screen_settings_user_status_away">"Away"</string>
|
||||
<string name="screen_settings_user_status_be_right_back">"Be right back"</string>
|
||||
<string name="screen_settings_user_status_custom">"Custom…"</string>
|
||||
<string name="screen_settings_user_status_custom_hint">"Custom status…"</string>
|
||||
<string name="screen_settings_user_status_focus_time">"Focus time"</string>
|
||||
<string name="screen_settings_user_status_in_a_meeting">"In a meeting"</string>
|
||||
<string name="screen_settings_user_status_on_the_road">"On the road"</string>
|
||||
<string name="screen_settings_user_status_placeholder">"What\'s your status?"</string>
|
||||
<string name="theme_black">"Black"</string>
|
||||
<string name="theme_dark">"Dark"</string>
|
||||
<string name="theme_light">"Light"</string>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2026 Element Creations Ltd.
|
||||
~
|
||||
~ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
~ Please see LICENSE files in the repository root for full details.
|
||||
-->
|
||||
<resources>
|
||||
<string name="common_user_status_in_a_meeting">In a meeting</string>
|
||||
<string name="common_user_status_focus_time">Focus time</string>
|
||||
<string name="common_user_status_on_the_road">On the road</string>
|
||||
<string name="common_user_status_be_right_back">Be right back</string>
|
||||
<string name="common_user_status_away">Away</string>
|
||||
<string name="common_user_status_on_a_call">On a call</string>
|
||||
<string name="common_user_status_custom">Custom…</string>
|
||||
<string name="screen_preferences_user_status_placeholder">What\'s your status?</string>
|
||||
<string name="screen_preferences_user_status_custom_hint">Custom status…</string>
|
||||
</resources>
|
||||
+1
-1
@@ -552,7 +552,7 @@ private fun DmHeaderSection(
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
val userStatus = otherMember.displayedStatus?.toText()
|
||||
if(userStatus != null){
|
||||
if (userStatus != null) {
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Text(
|
||||
text = userStatus,
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ private fun RoomMemberActionsBottomSheet(
|
||||
.fillMaxWidth()
|
||||
)
|
||||
val userStatus = user.displayedStatus?.toText()
|
||||
if(userStatus != null){
|
||||
if (userStatus != null) {
|
||||
Text(
|
||||
text = userStatus,
|
||||
style = ElementTheme.typography.fontBodyLgMedium,
|
||||
|
||||
Reference in New Issue
Block a user