Use a dedicated string for the Mute room notification mode

Two of the three modes on the room notification settings screen had
screen-scoped keys; the third reused common_mute, which also labels the Mute
action button on the room details screen. A translator could not fix one
occurrence without breaking the other.

Add screen_room_notification_settings_mode_mute and use it at both places on
that screen. The English value is unchanged, so nothing renders differently.
The action button keeps common_mute, which is the one context where the
generic verb is correct.
This commit is contained in:
hayaksi1
2026-08-09 15:09:33 +03:00
parent 044737a3a7
commit aff71cf1b9
3 changed files with 12 additions and 4 deletions
@@ -12,7 +12,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import io.element.android.features.roomdetails.impl.R
import io.element.android.libraries.matrix.api.room.RoomNotificationMode
import io.element.android.libraries.ui.strings.CommonStrings
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
@@ -36,7 +35,7 @@ fun roomNotificationSettingsItems(): ImmutableList<RoomNotificationSettingsItem>
)
RoomNotificationMode.MUTE -> RoomNotificationSettingsItem(
mode = it,
title = stringResource(CommonStrings.common_mute),
title = stringResource(R.string.screen_room_notification_settings_mode_mute),
)
}
}
@@ -34,7 +34,6 @@ import io.element.android.libraries.designsystem.text.buildAnnotatedStringWithSt
import io.element.android.libraries.designsystem.theme.components.Scaffold
import io.element.android.libraries.designsystem.theme.components.TopAppBar
import io.element.android.libraries.matrix.api.room.RoomNotificationMode
import io.element.android.libraries.ui.strings.CommonStrings
@Composable
fun RoomNotificationSettingsView(
@@ -118,7 +117,7 @@ private fun RoomSpecificNotificationSettingsView(
RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY -> {
stringResource(id = R.string.screen_room_notification_settings_mode_mentions_and_keywords)
}
RoomNotificationMode.MUTE -> stringResource(id = CommonStrings.common_mute)
RoomNotificationMode.MUTE -> stringResource(id = R.string.screen_room_notification_settings_mode_mute)
}
val displayMentionsOnlyDisclaimer = state.displayMentionsOnlyDisclaimer &&
state.defaultRoomNotificationMode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY
@@ -0,0 +1,10 @@
<?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="screen_room_notification_settings_mode_mute">Mute</string>
</resources>