mirror of
https://github.com/Steffo99/twom.git
synced 2024-11-21 15:44:26 +00:00
Cleanup related to strings
This commit is contained in:
parent
40bfd858ee
commit
9f82008b20
26 changed files with 151 additions and 142 deletions
|
@ -8,7 +8,9 @@ import androidx.compose.material3.Text
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import eu.steffo.twom.R
|
||||
|
||||
@Composable
|
||||
@Preview(name = "Regular", widthDp = 40, heightDp = 40)
|
||||
|
@ -28,7 +30,7 @@ fun AvatarEmpty(
|
|||
modifier = Modifier
|
||||
.align(Alignment.Center),
|
||||
color = MaterialTheme.colorScheme.onTertiary.copy(alpha = alpha),
|
||||
text = text ?: "?",
|
||||
text = text ?: stringResource(R.string.avatar_empty_placeholder),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ fun ConfigureRoomForm(
|
|||
|
||||
Column(modifier) {
|
||||
Row(Modifier.basePadding()) {
|
||||
val avatarContentDescription = stringResource(R.string.create_avatar_label)
|
||||
val avatarContentDescription = stringResource(R.string.configure_avatarpicker_label)
|
||||
AvatarPickerWrapbox(
|
||||
modifier = Modifier
|
||||
.size(60.dp)
|
||||
|
@ -87,7 +87,7 @@ fun ConfigureRoomForm(
|
|||
.fillMaxWidth(),
|
||||
singleLine = true,
|
||||
label = {
|
||||
Text(stringResource(R.string.create_name_label))
|
||||
Text(stringResource(R.string.configure_namepicker_label))
|
||||
},
|
||||
value = name,
|
||||
onValueChange = { name = it }
|
||||
|
@ -100,7 +100,7 @@ fun ConfigureRoomForm(
|
|||
.height(180.dp)
|
||||
.fillMaxWidth(),
|
||||
label = {
|
||||
Text(stringResource(R.string.create_description_label))
|
||||
Text(stringResource(R.string.configure_descriptionpicker_label))
|
||||
},
|
||||
value = description,
|
||||
onValueChange = { description = it }
|
||||
|
@ -127,7 +127,15 @@ fun ConfigureRoomForm(
|
|||
activity.finish()
|
||||
},
|
||||
) {
|
||||
Text(stringResource(R.string.create_complete_text))
|
||||
Text(
|
||||
stringResource(
|
||||
if (initialConfiguration != null) {
|
||||
R.string.configure_submit_label_update
|
||||
} else {
|
||||
R.string.configure_submit_label_create
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ fun ConfigureActivityTopBar(
|
|||
title = {
|
||||
Text(
|
||||
text = if (initialName == null) {
|
||||
stringResource(R.string.create_title)
|
||||
stringResource(R.string.configure_title_create)
|
||||
} else {
|
||||
stringResource(R.string.edit_title, initialName)
|
||||
stringResource(R.string.configure_title_edit, initialName)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import androidx.compose.runtime.rememberCoroutineScope
|
|||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import eu.steffo.twom.R
|
||||
import eu.steffo.twom.errorhandling.components.ErrorText
|
||||
|
@ -52,7 +52,7 @@ fun LoginForm(
|
|||
}
|
||||
)
|
||||
Row(Modifier.basePadding()) {
|
||||
Text(LocalContext.current.getString(R.string.login_text))
|
||||
Text(stringResource(R.string.login_intro_text))
|
||||
}
|
||||
Row(Modifier.basePadding()) {
|
||||
TextField(
|
||||
|
@ -61,13 +61,13 @@ fun LoginForm(
|
|||
value = username,
|
||||
onValueChange = { username = it },
|
||||
label = {
|
||||
Text(LocalContext.current.getString(R.string.login_username_label))
|
||||
Text(stringResource(R.string.login_username_label))
|
||||
},
|
||||
placeholder = {
|
||||
Text(LocalContext.current.getString(R.string.login_username_placeholder))
|
||||
Text(stringResource(R.string.login_username_placeholder))
|
||||
},
|
||||
supportingText = {
|
||||
Text(LocalContext.current.getString(R.string.login_username_supporting))
|
||||
Text(stringResource(R.string.login_username_supporting))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -77,13 +77,13 @@ fun LoginForm(
|
|||
value = password,
|
||||
onValueChange = { password = it },
|
||||
label = {
|
||||
Text(LocalContext.current.getString(R.string.login_password_label))
|
||||
Text(stringResource(R.string.login_password_label))
|
||||
},
|
||||
placeholder = {
|
||||
Text(LocalContext.current.getString(R.string.login_password_placeholder))
|
||||
Text(stringResource(R.string.login_password_placeholder))
|
||||
},
|
||||
supportingText = {
|
||||
Text(LocalContext.current.getString(R.string.login_password_supporting))
|
||||
Text(stringResource(R.string.login_password_supporting))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ fun LoginForm(
|
|||
}
|
||||
},
|
||||
) {
|
||||
Text(LocalContext.current.getString(R.string.login_complete_text))
|
||||
Text(stringResource(R.string.login_submit_text))
|
||||
}
|
||||
}
|
||||
manager.error.Display {
|
||||
|
|
|
@ -5,7 +5,7 @@ import androidx.compose.material3.Text
|
|||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import eu.steffo.twom.R
|
||||
import eu.steffo.twom.navigation.components.BackIconButton
|
||||
|
@ -19,6 +19,6 @@ fun LoginActivityTopBar(
|
|||
TopAppBar(
|
||||
modifier = modifier,
|
||||
navigationIcon = { BackIconButton() },
|
||||
title = { Text(LocalContext.current.getString(R.string.login_title)) }
|
||||
title = { Text(stringResource(R.string.login_title)) }
|
||||
)
|
||||
}
|
|
@ -12,7 +12,7 @@ import androidx.compose.runtime.mutableStateOf
|
|||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.text.input.VisualTransformation
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
|
@ -55,10 +55,10 @@ fun PasswordField(
|
|||
Icons.Outlined.RemoveRedEye
|
||||
},
|
||||
if(showPassword) {
|
||||
LocalContext.current.getString(R.string.password_hide)
|
||||
stringResource(R.string.password_hide)
|
||||
}
|
||||
else {
|
||||
LocalContext.current.getString(R.string.password_show)
|
||||
stringResource(R.string.password_show)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import androidx.compose.runtime.mutableStateOf
|
|||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import eu.steffo.twom.R
|
||||
|
@ -48,12 +47,12 @@ fun AccountIconButton(
|
|||
if (session == null) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.AccountCircle,
|
||||
contentDescription = LocalContext.current.getString(R.string.main_account_label),
|
||||
contentDescription = stringResource(R.string.accountmenu_label),
|
||||
)
|
||||
} else {
|
||||
AvatarUserId(
|
||||
userId = session.myUserId,
|
||||
contentDescription = LocalContext.current.getString(R.string.main_account_label),
|
||||
contentDescription = stringResource(R.string.accountmenu_label),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +63,7 @@ fun AccountIconButton(
|
|||
if (session == null) {
|
||||
DropdownMenuItem(
|
||||
text = {
|
||||
Text(stringResource(R.string.main_account_login_text))
|
||||
Text(stringResource(R.string.accountmenu_login_label))
|
||||
},
|
||||
onClick = {
|
||||
expanded = false
|
||||
|
@ -74,7 +73,7 @@ fun AccountIconButton(
|
|||
} else {
|
||||
DropdownMenuItem(
|
||||
text = {
|
||||
Text(stringResource(R.string.main_account_logout_text))
|
||||
Text(stringResource(R.string.accountmenu_logout_label))
|
||||
},
|
||||
onClick = {
|
||||
expanded = false
|
||||
|
|
|
@ -125,10 +125,7 @@ fun CreateRoomFAB(
|
|||
Log.i(TAG, "Creating room: ${createRoomParams.name}")
|
||||
val roomId = session.roomService().createRoom(createRoomParams)
|
||||
|
||||
Log.d(
|
||||
TAG,
|
||||
"Successfully created room: ${createRoomParams.name}"
|
||||
)
|
||||
Log.d(TAG, "Successfully created room: $roomId")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +139,7 @@ fun CreateRoomFAB(
|
|||
)
|
||||
},
|
||||
text = {
|
||||
Text(stringResource(R.string.main_efab_create_text))
|
||||
Text(stringResource(R.string.createroom_label))
|
||||
}
|
||||
)
|
||||
}
|
|
@ -43,7 +43,7 @@ fun MainContentLoggedIn(
|
|||
} else if (roomSummaries!!.isEmpty()) {
|
||||
Text(
|
||||
modifier = Modifier.basePadding(),
|
||||
text = stringResource(R.string.main_roomlist_empty_text)
|
||||
text = stringResource(R.string.main_empty_text)
|
||||
)
|
||||
} else {
|
||||
roomSummaries!!.forEach { RoomListItem(it) }
|
||||
|
|
|
@ -5,7 +5,7 @@ import androidx.compose.foundation.layout.Row
|
|||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import eu.steffo.twom.R
|
||||
import eu.steffo.twom.theme.utils.basePadding
|
||||
|
@ -17,10 +17,10 @@ fun MainContentNotLoggedIn(
|
|||
) {
|
||||
Column(modifier) {
|
||||
Row(Modifier.basePadding()) {
|
||||
Text(LocalContext.current.getString(R.string.main_notloggedin_text_1))
|
||||
Text(stringResource(R.string.main_notloggedin_intro_1))
|
||||
}
|
||||
Row(Modifier.basePadding()) {
|
||||
Text(LocalContext.current.getString(R.string.main_notloggedin_text_2))
|
||||
Text(stringResource(R.string.main_notloggedin_intro_2))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -136,9 +136,9 @@ fun RoomListItem(
|
|||
Text(
|
||||
text = stringResource(
|
||||
id = if (count != 1) {
|
||||
R.string.main_partecipants
|
||||
R.string.main_partecipantcount_text_plural
|
||||
} else {
|
||||
R.string.main_partecipant
|
||||
R.string.main_partecipantcount_text_singular
|
||||
},
|
||||
count,
|
||||
),
|
||||
|
|
|
@ -10,15 +10,15 @@ class TwoMRoomDisplayNameFallbackProvider(
|
|||
) : RoomDisplayNameFallbackProvider {
|
||||
|
||||
override fun getNameFor1member(name: String): String {
|
||||
return context.getString(R.string.room_name_fallback_members_1).format(name)
|
||||
return context.getString(R.string.matrix_fallback_members_1).format(name)
|
||||
}
|
||||
|
||||
override fun getNameFor2members(name1: String, name2: String): String {
|
||||
return context.getString(R.string.room_name_fallback_members_2).format(name1, name2)
|
||||
return context.getString(R.string.matrix_fallback_members_2).format(name1, name2)
|
||||
}
|
||||
|
||||
override fun getNameFor3members(name1: String, name2: String, name3: String): String {
|
||||
return context.getString(R.string.room_name_fallback_members_3).format(name1, name2, name3)
|
||||
return context.getString(R.string.matrix_fallback_members_3).format(name1, name2, name3)
|
||||
}
|
||||
|
||||
override fun getNameFor4members(
|
||||
|
@ -27,7 +27,8 @@ class TwoMRoomDisplayNameFallbackProvider(
|
|||
name3: String,
|
||||
name4: String
|
||||
): String {
|
||||
return context.getString(R.string.room_name_fallback_members_4).format(name1, name2, name3, name4)
|
||||
return context.getString(R.string.matrix_fallback_members_4)
|
||||
.format(name1, name2, name3, name4)
|
||||
}
|
||||
|
||||
override fun getNameFor4membersAndMore(
|
||||
|
@ -36,14 +37,15 @@ class TwoMRoomDisplayNameFallbackProvider(
|
|||
name3: String,
|
||||
remainingCount: Int
|
||||
): String {
|
||||
return context.getString(R.string.room_name_fallback_members_more).format(name1, name2, name3, remainingCount)
|
||||
return context.getString(R.string.matrix_fallback_members_more)
|
||||
.format(name1, name2, name3, remainingCount)
|
||||
}
|
||||
|
||||
override fun getNameForEmptyRoom(isDirect: Boolean, leftMemberNames: List<String>): String {
|
||||
return context.getString(R.string.room_name_fallback_members_0)
|
||||
return context.getString(R.string.matrix_fallback_members_0)
|
||||
}
|
||||
|
||||
override fun getNameForRoomInvite(): String {
|
||||
return context.getString(R.string.room_name_fallback_invite)
|
||||
return context.getString(R.string.matrix_fallback_invite)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import eu.steffo.twom.R
|
||||
import eu.steffo.twom.viewroom.effects.canIInvite
|
||||
import eu.steffo.twom.viewroom.effects.canCurrentSessionInviteHere
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
|
@ -18,7 +18,7 @@ fun InviteFAB(
|
|||
modifier: Modifier = Modifier,
|
||||
onClick: () -> Unit = {},
|
||||
) {
|
||||
if (!canIInvite()) {
|
||||
if (!canCurrentSessionInviteHere()) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ fun InviteFAB(
|
|||
)
|
||||
},
|
||||
text = {
|
||||
Text(stringResource(R.string.room_invite_button_label))
|
||||
Text(stringResource(R.string.invite_submit_label))
|
||||
}
|
||||
)
|
||||
}
|
|
@ -50,7 +50,7 @@ fun InviteSheet(
|
|||
modifier = Modifier
|
||||
.basePadding()
|
||||
.fillMaxWidth(),
|
||||
text = stringResource(R.string.room_invite_title),
|
||||
text = stringResource(R.string.invite_title),
|
||||
style = MaterialTheme.typography.headlineSmall,
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
|
|
|
@ -44,7 +44,7 @@ fun InviteUserForm(
|
|||
if (room == null) {
|
||||
ErrorText(
|
||||
modifier = Modifier.basePadding(),
|
||||
text = stringResource(R.string.room_error_room_notfound)
|
||||
text = stringResource(R.string.invite_error_room_notfound)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
@ -58,12 +58,12 @@ fun InviteUserForm(
|
|||
singleLine = true,
|
||||
label = {
|
||||
Text(
|
||||
text = stringResource(R.string.room_invite_username_label)
|
||||
text = stringResource(R.string.invite_username_label)
|
||||
)
|
||||
},
|
||||
placeholder = {
|
||||
Text(
|
||||
text = stringResource(R.string.room_invite_username_placeholder)
|
||||
text = stringResource(R.string.invite_username_placeholder)
|
||||
)
|
||||
},
|
||||
)
|
||||
|
@ -88,7 +88,7 @@ fun InviteUserForm(
|
|||
room.membershipService().invite(userId)
|
||||
} catch (e: Throwable) {
|
||||
Log.e("Room", "Failed to send invite to `$userId`: $error")
|
||||
error = LocalizableError(R.string.room_error_invite_generic, e)
|
||||
error = LocalizableError(R.string.invite_error_invite_generic, e)
|
||||
busy = false
|
||||
return@SendInvite
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ fun InviteUserForm(
|
|||
},
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.room_invite_button_label)
|
||||
text = stringResource(R.string.invite_submit_label)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import eu.steffo.twom.avatar.components.AvatarUser
|
|||
import eu.steffo.twom.errorhandling.components.ErrorText
|
||||
import eu.steffo.twom.matrix.complocals.LocalSession
|
||||
import eu.steffo.twom.viewroom.complocals.LocalRoom
|
||||
import eu.steffo.twom.viewroom.effects.canIKick
|
||||
import eu.steffo.twom.viewroom.effects.canCurrentSessionKickHere
|
||||
import eu.steffo.twom.viewroom.effects.observeRSVP
|
||||
import eu.steffo.twom.viewroom.effects.resolveUser
|
||||
import eu.steffo.twom.viewroom.utils.RSVPAnswer
|
||||
|
@ -61,14 +61,14 @@ fun MemberListItem(
|
|||
val room = roomRequest.getOrNull()
|
||||
if (room == null) {
|
||||
ErrorText(
|
||||
text = stringResource(R.string.room_error_room_notfound)
|
||||
text = stringResource(R.string.invite_error_room_notfound)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
// This might not be necessary; I'm not sure when the internal Matrix client resolves users
|
||||
val user = resolveUser(member.userId)
|
||||
val canKick = canIKick()
|
||||
val canKick = canCurrentSessionKickHere()
|
||||
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ fun RSVPChip(
|
|||
},
|
||||
label = {
|
||||
Text(
|
||||
text = representedAnswer.toLabel() ?: "[missing label]",
|
||||
text = representedAnswer.toLabel(),
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
)
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@ fun RSVPUpdateButton(
|
|||
)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.room_rsvp_update_label)
|
||||
text = stringResource(R.string.room_update_label)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ fun RoomIconButton(
|
|||
val room = roomRequest.getOrNull()
|
||||
if (room == null) {
|
||||
ErrorIconButton(
|
||||
message = stringResource(R.string.room_error_room_notfound)
|
||||
message = stringResource(R.string.invite_error_room_notfound)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ fun ViewRoomForm() {
|
|||
if (room == null) {
|
||||
Row(Modifier.basePadding()) {
|
||||
ErrorText(
|
||||
text = stringResource(R.string.room_error_room_notfound)
|
||||
text = stringResource(R.string.invite_error_room_notfound)
|
||||
)
|
||||
}
|
||||
return
|
||||
|
|
|
@ -37,7 +37,7 @@ fun ViewRoomMembers() {
|
|||
if (room == null) {
|
||||
Row(Modifier.basePadding()) {
|
||||
ErrorText(
|
||||
text = stringResource(R.string.room_error_room_notfound)
|
||||
text = stringResource(R.string.invite_error_room_notfound)
|
||||
)
|
||||
}
|
||||
return
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package eu.steffo.twom.viewroom.components
|
||||
|
||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Scaffold
|
||||
|
@ -20,7 +19,7 @@ import eu.steffo.twom.viewroom.complocals.LocalRoomSummary
|
|||
import org.matrix.android.sdk.api.session.Session
|
||||
import java.util.Optional
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun ViewRoomScaffold(
|
||||
session: Session,
|
||||
|
|
|
@ -6,7 +6,7 @@ import observePowerLevels
|
|||
import kotlin.jvm.optionals.getOrNull
|
||||
|
||||
@Composable
|
||||
fun canIInvite(): Boolean {
|
||||
fun canCurrentSessionInviteHere(): Boolean {
|
||||
val session = LocalSession.current ?: return false
|
||||
val powerLevelsRequest = observePowerLevels() ?: return false
|
||||
val powerLevels = powerLevelsRequest.getOrNull() ?: return false
|
|
@ -6,7 +6,7 @@ import observePowerLevels
|
|||
import kotlin.jvm.optionals.getOrNull
|
||||
|
||||
@Composable
|
||||
fun canIKick(): Boolean {
|
||||
fun canCurrentSessionKickHere(): Boolean {
|
||||
val session = LocalSession.current ?: return false
|
||||
val powerLevelsRequest = observePowerLevels() ?: return false
|
||||
val powerLevels = powerLevelsRequest.getOrNull() ?: return false
|
|
@ -34,15 +34,15 @@ enum class RSVPAnswer {
|
|||
|
||||
@Composable
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.room_rsvp_sure_label)
|
||||
stringResource(R.string.rsvp_sure_label)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_sure_response)
|
||||
stringResource(R.string.rsvp_sure_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_sure_placeholder)
|
||||
stringResource(R.string.rsvp_sure_placeholder)
|
||||
},
|
||||
|
||||
// Will be there, but later!
|
||||
|
@ -58,15 +58,15 @@ enum class RSVPAnswer {
|
|||
|
||||
@Composable
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.room_rsvp_later_label)
|
||||
stringResource(R.string.rsvp_later_label)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_later_response)
|
||||
stringResource(R.string.rsvp_later_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_later_placeholder)
|
||||
stringResource(R.string.rsvp_later_placeholder)
|
||||
},
|
||||
|
||||
// Might be there...
|
||||
|
@ -82,15 +82,15 @@ enum class RSVPAnswer {
|
|||
|
||||
@Composable
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.room_rsvp_maybe_label)
|
||||
stringResource(R.string.rsvp_maybe_label)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_maybe_response)
|
||||
stringResource(R.string.rsvp_maybe_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_maybe_placeholder)
|
||||
stringResource(R.string.rsvp_maybe_placeholder)
|
||||
},
|
||||
|
||||
// Won't be there.
|
||||
|
@ -106,15 +106,15 @@ enum class RSVPAnswer {
|
|||
|
||||
@Composable
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.room_rsvp_noway_label)
|
||||
stringResource(R.string.rsvp_noway_label)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_noway_response)
|
||||
stringResource(R.string.rsvp_noway_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_noway_placeholder)
|
||||
stringResource(R.string.rsvp_noway_placeholder)
|
||||
},
|
||||
|
||||
// An option differing from the previous ones.
|
||||
|
@ -129,16 +129,16 @@ enum class RSVPAnswer {
|
|||
get() = Icons.Outlined.BuildCircle
|
||||
|
||||
@Composable
|
||||
override fun toLabel(): String? =
|
||||
null
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.rsvp_nolabel)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_unknown_response)
|
||||
stringResource(R.string.rsvp_unknown_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_nullish_placeholder)
|
||||
stringResource(R.string.rsvp_nullish_placeholder)
|
||||
},
|
||||
|
||||
// The answer is still being loaded.
|
||||
|
@ -153,7 +153,8 @@ enum class RSVPAnswer {
|
|||
get() = Icons.Outlined.HourglassEmpty
|
||||
|
||||
@Composable
|
||||
override fun toLabel(): String? = null
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.rsvp_nolabel)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
|
@ -161,7 +162,7 @@ enum class RSVPAnswer {
|
|||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_nullish_placeholder)
|
||||
stringResource(R.string.rsvp_nullish_placeholder)
|
||||
},
|
||||
|
||||
// No answer has been provided yet.
|
||||
|
@ -176,16 +177,16 @@ enum class RSVPAnswer {
|
|||
get() = Icons.Outlined.Circle
|
||||
|
||||
@Composable
|
||||
override fun toLabel(): String? =
|
||||
null
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.rsvp_nolabel)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_none_response)
|
||||
stringResource(R.string.rsvp_none_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_nullish_placeholder)
|
||||
stringResource(R.string.rsvp_nullish_placeholder)
|
||||
},
|
||||
|
||||
// Has been invited, but has not accepted yet.
|
||||
|
@ -200,16 +201,16 @@ enum class RSVPAnswer {
|
|||
get() = Icons.Outlined.MoreHoriz
|
||||
|
||||
@Composable
|
||||
override fun toLabel(): String? =
|
||||
null
|
||||
override fun toLabel(): String =
|
||||
stringResource(R.string.rsvp_nolabel)
|
||||
|
||||
@Composable
|
||||
override fun toResponse(): String =
|
||||
stringResource(R.string.room_rsvp_pending_response)
|
||||
stringResource(R.string.rsvp_pending_response)
|
||||
|
||||
@Composable
|
||||
override fun toCommentPlaceholder(): String =
|
||||
stringResource(R.string.room_rsvp_nullish_placeholder)
|
||||
stringResource(R.string.rsvp_nullish_placeholder)
|
||||
};
|
||||
|
||||
abstract val value: String
|
||||
|
@ -217,7 +218,7 @@ enum class RSVPAnswer {
|
|||
abstract val icon: ImageVector
|
||||
|
||||
@Composable
|
||||
abstract fun toLabel(): String?
|
||||
abstract fun toLabel(): String
|
||||
|
||||
@Composable
|
||||
abstract fun toResponse(): String
|
||||
|
|
|
@ -1,68 +1,66 @@
|
|||
<resources>
|
||||
<string name="app_name">TwoM</string>
|
||||
<string name="room_name_fallback_members_0">A brand new party</string>
|
||||
<string name="room_name_fallback_members_1">Partying with %1$s</string>
|
||||
<string name="room_name_fallback_members_2">Partying with %1$s and %2$s</string>
|
||||
<string name="room_name_fallback_members_3">Partying with %1$s, %2$s, and %3$s</string>
|
||||
<string name="room_name_fallback_members_4">Partying with %1$s, %2$s, %3$s, and %4$s</string>
|
||||
<string name="room_name_fallback_members_more">Partying with %1$s, %2$s, %3$s and %4$d others</string>
|
||||
<string name="room_name_fallback_invite">Party invite</string>
|
||||
<string name="app_name" translatable="false">TwoM</string>
|
||||
<string name="matrix_fallback_members_0">A brand new party</string>
|
||||
<string name="matrix_fallback_members_1">Partying with %1$s</string>
|
||||
<string name="matrix_fallback_members_2">Partying with %1$s and %2$s</string>
|
||||
<string name="matrix_fallback_members_3">Partying with %1$s, %2$s, and %3$s</string>
|
||||
<string name="matrix_fallback_members_4">Partying with %1$s, %2$s, %3$s, and %4$s</string>
|
||||
<string name="matrix_fallback_members_more">Partying with %1$s, %2$s, %3$s and %4$d others</string>
|
||||
<string name="matrix_fallback_invite">Party invite</string>
|
||||
<string name="login_title">Log into Matrix</string>
|
||||
<string name="back">Go back</string>
|
||||
<string name="login_text">To use TwoM, you need to log into a Matrix homeserver. Currently, TwoM supports only username and password authentication.</string>
|
||||
<string name="login_complete_text">Log in</string>
|
||||
<string name="login_username_placeholder">\@steffo:candy.steffo.eu</string>
|
||||
<string name="login_intro_text">To use TwoM, you need to log into a Matrix homeserver. Currently, TwoM supports only username and password authentication.</string>
|
||||
<string name="login_submit_text">Log in</string>
|
||||
<string name="login_username_placeholder" translatable="false">\@steffo:candy.steffo.eu</string>
|
||||
<string name="login_username_supporting">The Matrix ID to login as, including the leading \"@\" and the trailing \":localpart\".</string>
|
||||
<string name="login_password_placeholder">p4ssw0rd!</string>
|
||||
<string name="login_password_placeholder" translatable="false">p4ssw0rd!</string>
|
||||
<string name="login_password_supporting">The password of the Matrix account.</string>
|
||||
<string name="login_username_label">Username</string>
|
||||
<string name="login_password_label">Password</string>
|
||||
<string name="password_show">Show password</string>
|
||||
<string name="password_hide">Hide password</string>
|
||||
<string name="main_notloggedin_text_1">To use TwoM, you need to select the Matrix account to use.</string>
|
||||
<string name="main_account_label">My account</string>
|
||||
<string name="main_account_logout_text">Logout</string>
|
||||
<string name="main_roomlist_empty_text">There are no rooms.</string>
|
||||
<string name="main_notloggedin_intro_1">To use TwoM, you need to select the Matrix account to use.</string>
|
||||
<string name="accountmenu_label">My account</string>
|
||||
<string name="accountmenu_logout_label">Logout</string>
|
||||
<string name="main_empty_text">There are no rooms.</string>
|
||||
<string name="loading">Loading…</string>
|
||||
<string name="main_efab_create_text">New</string>
|
||||
<string name="main_notloggedin_text_2">Log into your Matrix account by clicking the icon on the top right of the screen.</string>
|
||||
<string name="main_account_login_text">Login</string>
|
||||
<string name="create_title">Create a new happening</string>
|
||||
<string name="create_name_label">Name</string>
|
||||
<string name="create_avatar_label">Select happening avatar</string>
|
||||
<string name="create_description_label">Description</string>
|
||||
<string name="create_complete_text">Create</string>
|
||||
<string name="main_notloggedin_intro_2">Log into your Matrix account by clicking the icon on the top right of the screen.</string>
|
||||
<string name="accountmenu_login_label">Login</string>
|
||||
<string name="configure_title_create">Create a new happening</string>
|
||||
<string name="configure_namepicker_label">Name</string>
|
||||
<string name="configure_avatarpicker_label">Select happening avatar</string>
|
||||
<string name="configure_descriptionpicker_label">Description</string>
|
||||
<string name="configure_submit_label_create">Create</string>
|
||||
<string name="room_options_label">Room options</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="login_error_username_invalid">The entered username is not a valid Matrix ID.</string>
|
||||
<string name="login_error_wellknown_missing">Failed to detect well-known data for the specified Matrix homeserver. The server might not exist, be offline, or not be supporting well-known lookups.</string>
|
||||
<string name="room_invitees_title">Invitees</string>
|
||||
<string name="room_rsvp_title">Your reply</string>
|
||||
<string name="room_rsvp_sure_label">Sure!</string>
|
||||
<string name="room_rsvp_later_label">I\'ll be late…</string>
|
||||
<string name="room_rsvp_maybe_label">Maybe?</string>
|
||||
<string name="room_rsvp_noway_label">Nope.</string>
|
||||
<string name="rsvp_sure_label">Sure!</string>
|
||||
<string name="rsvp_later_label">I\'ll be late…</string>
|
||||
<string name="rsvp_maybe_label">Maybe?</string>
|
||||
<string name="rsvp_noway_label">Nope.</string>
|
||||
<string name="room_topic_title">About this party</string>
|
||||
<string name="user_unresolved_name">[unknown user]</string>
|
||||
<string name="room_rsvp_sure_response">Will be there</string>
|
||||
<string name="room_rsvp_later_response">Will arrive late</string>
|
||||
<string name="room_rsvp_maybe_response">Will maybe partecipate</string>
|
||||
<string name="room_rsvp_noway_response">Won\'t be there</string>
|
||||
<string name="room_rsvp_sure_placeholder">Anything to add?</string>
|
||||
<string name="room_rsvp_later_placeholder">Why will you be late?</string>
|
||||
<string name="room_rsvp_maybe_placeholder">What will determine your partecipation?</string>
|
||||
<string name="room_rsvp_noway_placeholder">Why won\'t you partecipate?</string>
|
||||
<string name="room_rsvp_update_label">Update</string>
|
||||
<string name="rsvp_sure_response">Will be there</string>
|
||||
<string name="rsvp_later_response">Will arrive late</string>
|
||||
<string name="rsvp_maybe_response">Will maybe partecipate</string>
|
||||
<string name="rsvp_noway_response">Won\'t be there</string>
|
||||
<string name="rsvp_sure_placeholder">Anything to add?</string>
|
||||
<string name="rsvp_later_placeholder">Why will you be late?</string>
|
||||
<string name="rsvp_maybe_placeholder">What will determine your partecipation?</string>
|
||||
<string name="rsvp_noway_placeholder">Why won\'t you partecipate?</string>
|
||||
<string name="error_session_missing">The Matrix session context has not been initialized.</string>
|
||||
<string name="room_error_room_notfound">Could not find the requested Matrix room.</string>
|
||||
<string name="invite_error_room_notfound">Could not find the requested Matrix room.</string>
|
||||
<string name="room_error_room_missing">The Matrix room context has not been initialized.</string>
|
||||
<string name="room_error_roomsummary_missing">The Matrix room summary context has not been initialized.</string>
|
||||
<string name="room_error_roomsummary_notfound">Could not find the requested Matrix room summary.</string>
|
||||
<string name="room_invite_username_placeholder">\@steffotwo:candy.steffo.eu</string>
|
||||
<string name="room_invite_username_label">User you want to invite</string>
|
||||
<string name="invite_username_placeholder" translatable="false">\@steffotwo:candy.steffo.eu</string>
|
||||
<string name="invite_username_label">User you want to invite</string>
|
||||
<string name="room_rsvp_comment_label">Reason</string>
|
||||
<string name="room_invite_button_label">Invite</string>
|
||||
<string name="room_invite_title">Send an invite</string>
|
||||
<string name="invite_submit_label">Invite</string>
|
||||
<string name="invite_title">Send an invite</string>
|
||||
<string name="room_rsvp_invited_label">Not opened</string>
|
||||
<string name="room_rsvp_invited_response">Hasn\'t opened the invite yet</string>
|
||||
<string name="main_room_leave_label">Leave party</string>
|
||||
|
@ -75,18 +73,21 @@
|
|||
<string name="room_options_edit_text">Edit party</string>
|
||||
<string name="room_options_zoom_text">Zoom on avatar</string>
|
||||
<string name="room_error_members_notfound">Could not retrieve the list of room members.</string>
|
||||
<string name="room_rsvp_nullish_placeholder">Leave a comment...</string>
|
||||
<string name="room_rsvp_unknown_response">Has given an unsupported response</string>
|
||||
<string name="room_rsvp_none_response">Hasn\'t responded yet</string>
|
||||
<string name="room_rsvp_pending_response">Hasn\'t opened the invite yet</string>
|
||||
<string name="rsvp_nullish_placeholder">Leave a comment...</string>
|
||||
<string name="rsvp_unknown_response">Has given an unsupported response</string>
|
||||
<string name="rsvp_none_response">Hasn\'t responded yet</string>
|
||||
<string name="rsvp_pending_response">Hasn\'t opened the invite yet</string>
|
||||
<string name="room_uninvite_label">Uninvite</string>
|
||||
<string name="room_error_publish_generic">Something went wrong while updating your RSVP: %1$s</string>
|
||||
<string name="room_error_redact_generic">Your response has been updated, but something went wrong while attempting to remove your previous one: %1$s</string>
|
||||
<string name="room_error_self_notfound">You have been removed from the room.</string>
|
||||
<string name="room_error_invite_generic">Something went wrong while sending the invite: %1$s</string>
|
||||
<string name="edit_title">Editing %1$s</string>
|
||||
<string name="main_partecipants">%1$d partecipants</string>
|
||||
<string name="main_partecipant">%1$d partecipant</string>
|
||||
<string name="invite_error_invite_generic">Something went wrong while sending the invite: %1$s</string>
|
||||
<string name="configure_title_edit">Editing %1$s</string>
|
||||
<string name="main_partecipantcount_text_plural">%1$d partecipants</string>
|
||||
<string name="main_partecipantcount_text_singular">%1$d partecipant</string>
|
||||
<string name="main_room_reject_label">Reject invite</string>
|
||||
<string name="main_error_join_generic">Something went wrong while opening the invite: %1$s</string>
|
||||
<string name="avatar_empty_placeholder" translatable="false">\?</string>
|
||||
<string name="rsvp_nolabel">[unlabeled]</string>
|
||||
<string name="configure_submit_label_update">Update</string>
|
||||
</resources>
|
Loading…
Reference in a new issue