Friends Screen + fix string resources format
continuous-integration/drone/push Build is passing Details

pull/5/head
avalin 9 months ago
parent 4612f88c69
commit e29c5d7152

@ -11,8 +11,8 @@ import fr.iut.alldev.allin.data.model.bet.BetFilter.PUBLIC
@StringRes
fun BetFilter.textId() =
when (this) {
PUBLIC -> R.string.Public
INVITATION -> R.string.Invitation
IN_PROGRESS -> R.string.Current
FINISHED -> R.string.Finished
PUBLIC -> R.string.bet_public
INVITATION -> R.string.bet_invitation
IN_PROGRESS -> R.string.bet_current
FINISHED -> R.string.bet_finished
}

@ -23,16 +23,16 @@ fun BetStatus.getTitleId(): Int {
@StringRes
fun BetStatus.getDateStartLabelId(): Int {
return when (this) {
BetStatus.CLOSING, BetStatus.FINISHED, BetStatus.CANCELLED -> R.string.Started
else -> R.string.Starting
BetStatus.CLOSING, BetStatus.FINISHED, BetStatus.CANCELLED -> R.string.bet_started
else -> R.string.bet_starting
}
}
@StringRes
fun BetStatus.getDateEndLabelId(): Int {
return when (this) {
BetStatus.CLOSING, BetStatus.FINISHED, BetStatus.CANCELLED -> R.string.Ended
else -> R.string.Ends
BetStatus.CLOSING, BetStatus.FINISHED, BetStatus.CANCELLED -> R.string.bet_ended
else -> R.string.bet_ends
}
}

@ -12,9 +12,9 @@ import fr.iut.alldev.allin.data.model.bet.BetType
@StringRes
fun BetType.getTitleId(): Int {
return when (this) {
BetType.BINARY -> R.string.yes_no
BetType.MATCH -> R.string.sport_match
BetType.CUSTOM -> R.string.custom_answers
BetType.BINARY -> R.string.bet_type_binary
BetType.MATCH -> R.string.bet_type_match
BetType.CUSTOM -> R.string.bet_type_custom
}
}

@ -14,28 +14,28 @@ sealed class FieldErrorState(
) {
data object NoError : FieldErrorState()
data object Mandatory : FieldErrorState(R.string.FieldError_Mandatory)
data object Mandatory : FieldErrorState(R.string.field_error_mandatory)
data class TooShort(val fieldName: String, val minChar: Int) :
FieldErrorState(R.string.FieldError_TooShort, fieldName, minChar)
FieldErrorState(R.string.field_error_too_short, fieldName, minChar)
data class BadFormat(val fieldName: String, val format: String) :
FieldErrorState(R.string.FieldError_BadFormat, fieldName, format)
FieldErrorState(R.string.field_error_bad_format, fieldName, format)
data object NotIdentical : FieldErrorState(R.string.FieldError_NotIdentical)
data object NotIdentical : FieldErrorState(R.string.field_error_not_identical)
data class NoSpecialCharacter(val fieldName: String, val characters: String = ALLOWED_SYMBOLS) :
FieldErrorState(R.string.FieldError_NoSpecialCharacter, fieldName, characters)
FieldErrorState(R.string.field_error_no_special_character, fieldName, characters)
data class AlreadyUsed(val value: String) :
FieldErrorState(R.string.FieldError_AlreadyUsed, value)
FieldErrorState(R.string.field_error_already_used, value)
data class PastDate(val fieldName: String) :
FieldErrorState(R.string.FieldError_PastDate, fieldName)
FieldErrorState(R.string.field_error_past_date, fieldName)
data class DateOrder(val fieldName1: String, val fieldName2: String) :
FieldErrorState(R.string.FieldError_DateOrder, fieldName1, fieldName2)
FieldErrorState(R.string.field_error_date_order, fieldName1, fieldName2)
@Composable

@ -55,7 +55,7 @@ fun BetScreenCard(
modifier = Modifier.fillMaxWidth()
)
Spacer(modifier = Modifier.height(11.dp))
BetDateTimeRow(label = stringResource(id = R.string.Starting), date = date, time = time)
BetDateTimeRow(label = stringResource(id = R.string.bet_starting), date = date, time = time)
}
HorizontalDivider(
thickness = 1.dp,
@ -75,7 +75,7 @@ fun BetScreenCard(
Spacer(modifier = Modifier.width(12.dp))
Text(
text = pluralStringResource(
id = R.plurals.n_players_waiting,
id = R.plurals.bet_players_waiting_format,
players.size,
players.size
),
@ -85,7 +85,7 @@ fun BetScreenCard(
}
RainbowButton(
modifier = Modifier.padding(6.dp),
text = stringResource(id = R.string.Participate),
text = stringResource(id = R.string.bet_participate),
onClick = onClickParticipate
)
}

@ -75,7 +75,7 @@ fun BetScreenPopularCard(
)
Spacer(modifier = Modifier.width(3.dp))
Text(
text = stringResource(id = R.string.Popular),
text = stringResource(id = R.string.bet_popular),
color = AllInColorToken.allInPink,
fontSize = 17.sp,
style = AllInTheme.typography.h2
@ -91,7 +91,7 @@ fun BetScreenPopularCard(
Row(modifier = Modifier.align(alignment = Alignment.CenterHorizontally)) {
HighlightedText(
text = pluralStringResource(
id = R.plurals.n_players,
id = R.plurals.bet_players_format,
nbPlayers,
nbPlayers
),
@ -117,7 +117,7 @@ fun BetScreenPopularCard(
}
HighlightedText(
text = pluralStringResource(
id = R.plurals.n_points_at_stake,
id = R.plurals.bet_points_at_stake_format,
if (pointUnit.isEmpty()) ceil(points).toInt() else 2,
pointsText
),

@ -245,7 +245,7 @@ fun BetConfirmationBottomSheetContent(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = stringResource(id = R.string.Finished),
text = stringResource(id = R.string.bet_finished),
color = AllInColorToken.white,
style = AllInTheme.typography.h1,
fontSize = 24.sp
@ -276,11 +276,13 @@ fun BetConfirmationBottomSheetContent(
if (selectedAnswer != null) {
AllInButton(
color = AllInColorToken.allInPurple,
text = stringResource(id = R.string.Validate),
text = stringResource(id = R.string.generic_validate),
textColor = AllInColorToken.white,
radius = 5.dp,
onClick = { selectedAnswer?.let(onConfirm) },
modifier = Modifier.align(Alignment.BottomCenter)
modifier = Modifier
.fillMaxWidth()
.align(Alignment.BottomCenter)
)
}
}

@ -61,8 +61,8 @@ fun BetCreationScreen(
var selectionElements by remember { mutableStateOf(listOf<SelectionElement>()) }
var selectedBetTypeElement by remember { mutableStateOf<SelectionElement?>(null) }
val themeFieldName = stringResource(id = R.string.Theme)
val phraseFieldName = stringResource(id = R.string.Bet_Phrase)
val themeFieldName = stringResource(id = R.string.bet_creation_theme)
val phraseFieldName = stringResource(id = R.string.bet_creation_bet_phrase)
LaunchedEffect(key1 = betTypes) {
selectionElements = betTypes.map {

@ -62,7 +62,7 @@ fun BetCreationScreenContent(
onLoadSection = { focus.clearFocus() },
modifier = Modifier.align(Alignment.TopCenter),
sections = listOf(
SectionElement(stringResource(id = R.string.Question)) {
SectionElement(stringResource(id = R.string.bet_creation_question)) {
BetCreationScreenQuestionTab(
isPublic = isPublic,
setIsPublic = setIsPublic,
@ -85,7 +85,7 @@ fun BetCreationScreenContent(
betDateError = betDateError
)
},
SectionElement(stringResource(id = R.string.Answer)) {
SectionElement(stringResource(id = R.string.bet_creation_answer)) {
BetCreationScreenAnswerTab(
selectedBetType = selectedBetType,
selected = selectedBetTypeElement,
@ -107,7 +107,7 @@ fun BetCreationScreenContent(
),
) {
RainbowButton(
text = stringResource(id = R.string.Publish),
text = stringResource(id = R.string.bet_creation_publish),
modifier = Modifier
.padding(bottom = 14.dp)
.padding(horizontal = 20.dp)

@ -50,8 +50,8 @@ fun BetCreationScreenAnswerTab(
modifier = Modifier.padding(vertical = 20.dp),
verticalArrangement = Arrangement.spacedBy(17.dp)
) {
BetCreationScreenBottomText(text = stringResource(id = R.string.yes_no_bottom_text_1))
BetCreationScreenBottomText(text = stringResource(id = R.string.yes_no_bottom_text_2))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_yes_no_bottom_text_1))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_yes_no_bottom_text_2))
}
}

@ -17,10 +17,10 @@ import fr.iut.alldev.allin.ui.core.AllInTitleInfo
@Composable
internal fun QuestionTabDateTimeSection(
setRegisterDateDialog: (Boolean)->Unit,
setEndDateDialog: (Boolean)->Unit,
setRegisterTimeDialog: (Boolean)->Unit,
setEndTimeDialog: (Boolean)->Unit,
setRegisterDateDialog: (Boolean) -> Unit,
setEndDateDialog: (Boolean) -> Unit,
setRegisterTimeDialog: (Boolean) -> Unit,
setEndTimeDialog: (Boolean) -> Unit,
registerDateError: String?,
betDateError: String?,
registerDate: String,
@ -30,10 +30,10 @@ internal fun QuestionTabDateTimeSection(
interactionSource: MutableInteractionSource
) {
AllInTitleInfo(
text = stringResource(id = R.string.End_registration_date),
text = stringResource(id = R.string.bet_creation_end_registration_date),
icon = Icons.AutoMirrored.Outlined.HelpOutline,
modifier = Modifier.padding(start = 11.dp, bottom = 8.dp),
tooltipText = stringResource(id = R.string.Register_tooltip),
tooltipText = stringResource(id = R.string.bet_creation_register_end_date_tooltip),
interactionSource = interactionSource
)
BetCreationScreenDateTimeRow(
@ -42,15 +42,15 @@ internal fun QuestionTabDateTimeSection(
onClickDate = { setRegisterDateDialog(true) },
onClickTime = { setRegisterTimeDialog(true) },
)
registerDateError?.let{
registerDateError?.let {
AllInErrorLine(text = it)
}
Spacer(modifier = Modifier.height(12.dp))
AllInTitleInfo(
text = stringResource(id = R.string.End_bet_date),
text = stringResource(id = R.string.bet_creation_end_bet_date),
icon = Icons.AutoMirrored.Outlined.HelpOutline,
modifier = Modifier.padding(start = 11.dp, bottom = 8.dp),
tooltipText = stringResource(id = R.string.BetEnd_tooltip),
tooltipText = stringResource(id = R.string.bet_creation_bet_end_date_tooltip),
interactionSource = interactionSource
)
BetCreationScreenDateTimeRow(
@ -59,7 +59,7 @@ internal fun QuestionTabDateTimeSection(
onClickDate = { setEndDateDialog(true) },
onClickTime = { setEndTimeDialog(true) },
)
betDateError?.let{
betDateError?.let {
AllInErrorLine(text = it)
}
}

@ -44,10 +44,10 @@ fun QuestionTabPrivacySection(
interactionSource: MutableInteractionSource,
) {
AllInTitleInfo(
text = stringResource(id = R.string.Bet_privacy),
text = stringResource(id = R.string.bet_creation_bet_privacy),
icon = Icons.AutoMirrored.Outlined.HelpOutline,
modifier = Modifier.padding(start = 11.dp, bottom = 8.dp),
tooltipText = stringResource(id = R.string.Privacy_tooltip),
tooltipText = stringResource(id = R.string.bet_creation_privacy_tooltip),
interactionSource = interactionSource
)
Row(
@ -55,7 +55,7 @@ fun QuestionTabPrivacySection(
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
AllInIconChip(
text = stringResource(id = R.string.Public),
text = stringResource(id = R.string.bet_public),
leadingIcon = Icons.Default.Public,
onClick = {
setIsPublic(true)
@ -63,7 +63,7 @@ fun QuestionTabPrivacySection(
isSelected = isPublic
)
AllInIconChip(
text = stringResource(id = R.string.Private),
text = stringResource(id = R.string.bet_private),
leadingIcon = Icons.Default.Lock,
onClick = {
setIsPublic(false)
@ -84,13 +84,13 @@ fun QuestionTabPrivacySection(
modifier = Modifier.padding(vertical = 20.dp),
verticalArrangement = Arrangement.spacedBy(17.dp)
) {
BetCreationScreenBottomText(text = stringResource(id = R.string.public_bottom_text_1))
BetCreationScreenBottomText(text = stringResource(id = R.string.public_bottom_text_2))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_public_bottom_text_1))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_public_bottom_text_2))
}
} else {
AllInRetractableCard(
text = pluralStringResource(
id = R.plurals.n_friends_available,
id = R.plurals.bet_creation_friends_available_format,
friends.size,
friends.size
),
@ -137,9 +137,9 @@ fun QuestionTabPrivacySection(
modifier = Modifier.padding(vertical = 20.dp),
verticalArrangement = Arrangement.spacedBy(17.dp)
) {
BetCreationScreenBottomText(text = stringResource(id = R.string.private_bottom_text_1))
BetCreationScreenBottomText(text = stringResource(id = R.string.private_bottom_text_2))
BetCreationScreenBottomText(text = stringResource(id = R.string.private_bottom_text_3))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_private_bottom_text_1))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_private_bottom_text_2))
BetCreationScreenBottomText(text = stringResource(id = R.string.bet_creation_private_bottom_text_3))
}
}
}

@ -30,14 +30,14 @@ internal fun QuestionTabThemePhraseSection(
interactionSource: MutableInteractionSource
) {
AllInTitleInfo(
text = stringResource(id = R.string.Theme),
text = stringResource(id = R.string.bet_creation_theme),
icon = Icons.AutoMirrored.Outlined.HelpOutline,
modifier = Modifier.padding(start = 11.dp, bottom = 8.dp),
tooltipText = stringResource(id = R.string.Theme_tooltip),
tooltipText = stringResource(id = R.string.bet_creation_theme_tooltip),
interactionSource = interactionSource
)
AllInTextField(
placeholder = stringResource(id = R.string.Theme_placeholder),
placeholder = stringResource(id = R.string.bet_creation_theme_placeholder),
value = betTheme,
modifier = Modifier.fillMaxWidth(),
maxChar = 20,
@ -48,14 +48,14 @@ internal fun QuestionTabThemePhraseSection(
)
Spacer(modifier = Modifier.height(10.dp))
AllInTitleInfo(
text = stringResource(id = R.string.Bet_Phrase),
text = stringResource(id = R.string.bet_creation_bet_phrase),
icon = Icons.AutoMirrored.Outlined.HelpOutline,
modifier = Modifier.padding(start = 11.dp, bottom = 8.dp),
tooltipText = stringResource(id = R.string.Phrase_tooltip),
tooltipText = stringResource(id = R.string.bet_creation_phrase_tooltip),
interactionSource = interactionSource
)
AllInTextField(
placeholder = stringResource(id = R.string.Bet_Phrase_placeholder),
placeholder = stringResource(id = R.string.bet_creation_bet_phrase_placeholder),
value = betPhrase,
modifier = Modifier
.fillMaxWidth()

@ -112,7 +112,7 @@ private fun BetStatusParticipationBottomSheetContent(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = stringResource(id = R.string.place_your_bets),
text = stringResource(id = R.string.bet_status_place_your_bets),
style = AllInTheme.typography.h2,
color = AllInTheme.colors.onMainSurface,
fontSize = 20.sp,
@ -173,7 +173,7 @@ private fun BetStatusParticipationBottomSheetContent(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = stringResource(id = R.string.Possible_winnings),
text = stringResource(id = R.string.participation_possible_winnings),
style = AllInTheme.typography.p1,
color = AllInTheme.colors.onBackground
)
@ -185,11 +185,11 @@ private fun BetStatusParticipationBottomSheetContent(
AllInButton(
enabled = enabled,
color = AllInColorToken.allInPurple,
text = stringResource(id = R.string.Participate),
text = stringResource(id = R.string.bet_participate),
textColor = AllInColorToken.white,
radius = 5.dp,
onClick = onButtonClick,
modifier = Modifier
modifier = Modifier.fillMaxWidth()
)
Spacer(modifier = Modifier.padding(bottomSheetNavigationBarsPadding()))

@ -202,7 +202,7 @@ class BetStatusBottomSheetBetDisplayer(
)
)
.padding(bottomSheetNavigationBarsInsets().asPaddingValues(7.dp)),
text = stringResource(id = R.string.Participate),
text = stringResource(id = R.string.bet_participate),
enabled = betDetail.bet.betStatus == BetStatus.IN_PROGRESS,
onClick = openParticipateSheet
)
@ -308,8 +308,8 @@ class BetStatusBottomSheetBetDisplayer(
betDetail = betDetail,
response1 = YES_VALUE,
response2 = NO_VALUE,
response1Display = { stringResource(id = R.string.Yes).uppercase() },
response2Display = { stringResource(id = R.string.No).uppercase() },
response1Display = { stringResource(id = R.string.generic_yes).uppercase() },
response2Display = { stringResource(id = R.string.generic_no).uppercase() },
)
}
}

@ -17,7 +17,7 @@ fun AllInAlertDialog(
enabled: Boolean = true,
title: String,
text: String,
confirmText: String = stringResource(id = R.string.Ok),
confirmText: String = stringResource(id = R.string.generic_ok),
onDismiss: () -> Unit,
onConfirm: () -> Unit = onDismiss,
) {

@ -1,11 +1,13 @@
package fr.iut.alldev.allin.ui.core
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
@ -13,33 +15,37 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import fr.iut.alldev.allin.theme.AllInColorToken
import fr.iut.alldev.allin.theme.AllInTheme
import racra.compose.smooth_corner_rect_library.AbsoluteSmoothCornerShape
@Composable
fun AllInButton(
modifier: Modifier = Modifier,
enabled: Boolean = true,
color: Color,
text: String,
textColor: Color,
radius: Dp = 15.dp,
onClick: () -> Unit,
modifier: Modifier = Modifier,
textStyle: TextStyle = AllInTheme.typography.h2,
enabled: Boolean = true,
isSmall: Boolean = false,
radius: Dp = 10.dp,
) {
AllInCard(
onClick = onClick,
Button(
shape = AbsoluteSmoothCornerShape(radius, smoothnessAsPercent = 100),
colors = ButtonDefaults.buttonColors(
containerColor = color,
disabledContainerColor = AllInTheme.colors.disabled
),
modifier = modifier,
radius = radius,
backgroundColor = color,
enabled = enabled
enabled = enabled,
onClick = onClick
) {
Text(
text = text,
textAlign = TextAlign.Center,
style = AllInTheme.typography.h2,
style = textStyle,
color = if (enabled) textColor else AllInTheme.colors.disabledBorder,
fontSize = 20.sp,
modifier = Modifier
.padding(vertical = 15.dp)
.fillMaxWidth(),
fontSize = if (isSmall) 15.sp else 20.sp,
modifier = Modifier.padding(vertical = if (isSmall) 0.dp else 8.dp)
)
}
}
@ -51,10 +57,9 @@ private fun AllInButtonPreview() {
AllInButton(
color = AllInColorToken.allInLoginPurple,
text = "Connexion",
textColor = Color.White
) {
}
textColor = Color.White,
onClick = { }
)
}
}
@ -66,9 +71,37 @@ private fun AllInButtonDisabledPreview() {
color = AllInColorToken.allInLoginPurple,
text = "Connexion",
textColor = Color.White,
enabled = false
) {
enabled = false,
onClick = {}
)
}
}
}
@Preview
@Composable
private fun AllInButtonSmallPreview() {
AllInTheme {
AllInButton(
color = AllInColorToken.allInLoginPurple,
text = "Connexion",
textColor = Color.White,
isSmall = true,
onClick = { }
)
}
}
@Preview
@Composable
private fun AllInButtonDisabledSmallPreview() {
AllInTheme {
AllInButton(
color = AllInColorToken.allInLoginPurple,
text = "Connexion",
textColor = Color.White,
enabled = false,
isSmall = true,
onClick = {}
)
}
}

@ -40,7 +40,7 @@ fun AllInDatePicker(
}
) {
Text(
text = stringResource(id = R.string.Validate),
text = stringResource(id = R.string.generic_validate),
style = AllInTheme.typography.h1.copy(
brush = AllInColorToken.allInMainGradient
)
@ -50,7 +50,7 @@ fun AllInDatePicker(
dismissButton = {
TextButton(onClick = onDismiss) {
Text(
text = stringResource(id = R.string.Cancel),
text = stringResource(id = R.string.generic_cancel),
color = AllInTheme.colors.onBackground2,
style = AllInTheme.typography.sm1
)

@ -32,7 +32,7 @@ import fr.iut.alldev.allin.theme.AllInTheme
@Composable
fun AllInDetailsDrawer(
text: String = stringResource(id = R.string.Details),
text: String = stringResource(id = R.string.bet_status_details_drawer),
textColor: Color = AllInTheme.colors.onBackground2,
content: @Composable ColumnScope.() -> Unit,
) {

@ -150,9 +150,9 @@ fun AllInSelectionBox(
private fun AllInSelectionBoxClosedPreview() {
AllInTheme {
val elements = listOf(
SelectionElement(R.string.yes_no, Icons.AutoMirrored.Default.HelpOutline),
SelectionElement(R.string.sport_match, Icons.Default.SportsFootball),
SelectionElement(R.string.custom_answers, Icons.Default.PinEnd)
SelectionElement(R.string.bet_type_binary, Icons.AutoMirrored.Default.HelpOutline),
SelectionElement(R.string.bet_type_match, Icons.Default.SportsFootball),
SelectionElement(R.string.bet_type_custom, Icons.Default.PinEnd)
)
AllInSelectionBox(
isOpen = false,
@ -248,9 +248,9 @@ fun AllInSelectionBox(
private fun AllInSelectionBoxOpenPreview() {
AllInTheme {
val elements = listOf(
SelectionElement(R.string.yes_no, Icons.AutoMirrored.Default.HelpOutline),
SelectionElement(R.string.sport_match, Icons.Default.SportsFootball),
SelectionElement(R.string.custom_answers, Icons.Default.Edit)
SelectionElement(R.string.bet_type_binary, Icons.AutoMirrored.Default.HelpOutline),
SelectionElement(R.string.bet_type_match, Icons.Default.SportsFootball),
SelectionElement(R.string.bet_type_custom, Icons.Default.Edit)
)
AllInSelectionBox(
isOpen = true,

@ -8,13 +8,20 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Visibility
import androidx.compose.material.icons.filled.VisibilityOff
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.*
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.TextUnit
@ -38,6 +45,9 @@ fun AllInTextField(
placeholder: String? = null,
maxChar: Int? = null,
enabled: Boolean = true,
leadingIcon: Painter? = null,
leadingIconColor: Color? = null,
leadingContent: @Composable (() -> Unit)? = null,
trailingIcon: Painter? = null,
trailingIconColor: Color? = null,
trailingContent: @Composable (() -> Unit)? = null,
@ -89,6 +99,15 @@ fun AllInTextField(
)
}
},
leadingIcon = leadingContent ?: leadingIcon?.let {
@Composable {
Icon(
painter = it,
contentDescription = null,
tint = leadingIconColor ?: AllInColorToken.allInLightGrey300
)
}
},
textStyle = textStyle,
enabled = enabled,
keyboardOptions = KeyboardOptions(keyboardType = keyboardType, imeAction = imeAction),

@ -35,7 +35,7 @@ fun AllInTimePicker(
}
) {
Text(
text = stringResource(id = R.string.Validate),
text = stringResource(id = R.string.generic_validate),
style = AllInTheme.typography.h1.copy(
brush = AllInColorToken.allInMainGradient
)
@ -45,7 +45,7 @@ fun AllInTimePicker(
dismissButton = {
TextButton(onClick = onDismiss) {
Text(
text = stringResource(id = R.string.Cancel),
text = stringResource(id = R.string.generic_cancel),
color = AllInTheme.colors.onBackground2,
style = AllInTheme.typography.sm1
)

@ -31,7 +31,7 @@ fun BetTitleHeader(
Modifier.align(Alignment.End)
) {
HighlightedText(
text = stringResource(id = R.string.Proposed_by_x, creator),
text = stringResource(id = R.string.bet_Proposed_by_format, creator),
query = creator,
highlightStyle = SpanStyle(
fontWeight = FontWeight.Bold,

@ -0,0 +1,48 @@
package fr.iut.alldev.allin.ui.friends
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.hilt.navigation.compose.hiltViewModel
import fr.iut.alldev.allin.data.model.User
import fr.iut.alldev.allin.ui.core.AllInLoading
import fr.iut.alldev.allin.ui.friends.components.FriendsScreenContent
@Composable
fun FriendsScreen(
viewModel: FriendsScreenViewModel = hiltViewModel()
) {
var search by remember { viewModel.search }
val state by remember { viewModel.state }
when (val s = state) {
is FriendsScreenViewModel.State.Loaded -> {
var deleted by remember { mutableStateOf(emptyList<User>()) }
val filteredFriends = remember(search) {
s.friends.filter {
it.username.contains(search, ignoreCase = true)
}
}
FriendsScreenContent(
friends = filteredFriends,
deleted = deleted,
search = search,
setSearch = { search = it },
onToggleDeleteFriend = {
deleted = if (deleted.contains(it)) {
deleted - it
} else {
deleted + it
}
}
)
}
FriendsScreenViewModel.State.Loading -> {
AllInLoading(visible = true)
}
}
}

@ -0,0 +1,154 @@
package fr.iut.alldev.allin.ui.friends
import androidx.compose.runtime.mutableStateOf
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
import fr.iut.alldev.allin.data.model.User
import kotlinx.coroutines.launch
import javax.inject.Inject
@HiltViewModel
class FriendsScreenViewModel @Inject constructor(
) : ViewModel() {
val search by lazy { mutableStateOf("") }
val state by lazy { mutableStateOf<State>(State.Loading) }
init {
viewModelScope.launch {
state.value = State.Loaded(mockFriends)
}
}
sealed class State {
data object Loading: State()
data class Loaded(val friends: List<User>): State()
}
}
private val mockFriends by lazy {
listOf(
User(
id = "1",
username = "Owen",
email = "",
coins = 8533
),
User(
id = "2",
username = "Dave",
email = "",
coins = 6942
),
User(
id = "3",
username = "Lucas",
email = "",
coins = 3333
),
User(
id = "4",
username = "Louison",
email = "",
coins = 1970
),
User(
id = "5",
username = "Imri",
email = "",
coins = 1
),
User(
id = "12",
username = "Owen",
email = "",
coins = 8533
),
User(
id = "22",
username = "Dave",
email = "",
coins = 6942
),
User(
id = "32",
username = "Lucas",
email = "",
coins = 3333
),
User(
id = "42",
username = "Louison",
email = "",
coins = 1970
),
User(
id = "52",
username = "Imri",
email = "",
coins = 1
),
User(
id = "13",
username = "Owen",
email = "",
coins = 8533
),
User(
id = "23",
username = "Dave",
email = "",
coins = 6942
),
User(
id = "33",
username = "Lucas",
email = "",
coins = 3333
),
User(
id = "43",
username = "Louison",
email = "",
coins = 1970
),
User(
id = "53",
username = "Imri",
email = "",
coins = 1
),
User(
id = "14",
username = "Owen",
email = "",
coins = 8533
),
User(
id = "24",
username = "Dave",
email = "",
coins = 6942
),
User(
id = "34",
username = "Lucas",
email = "",
coins = 3333
),
User(
id = "44",
username = "Louison",
email = "",
coins = 1970
),
User(
id = "54",
username = "Imri",
email = "",
coins = 1
)
)
}

@ -0,0 +1,96 @@
package fr.iut.alldev.allin.ui.friends.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import fr.iut.alldev.allin.R
import fr.iut.alldev.allin.data.model.User
import fr.iut.alldev.allin.ext.asPaddingValues
import fr.iut.alldev.allin.theme.AllInColorToken
import fr.iut.alldev.allin.theme.AllInTheme
import fr.iut.alldev.allin.ui.core.AllInTextField
@Composable
fun FriendsScreenContent(
friends: List<User>,
deleted: List<User>,
search: String,
onToggleDeleteFriend: (User) -> Unit,
setSearch: (String) -> Unit,
) {
LazyColumn(
modifier = Modifier.fillMaxSize(),
contentPadding = WindowInsets.navigationBars.asPaddingValues(start = 24.dp, end = 24.dp, top = 18.dp),
verticalArrangement = Arrangement.spacedBy(11.dp),
) {
item {
Text(
text = stringResource(id = R.string.friends_title),
style = AllInTheme.typography.h1,
color = AllInColorToken.allInGrey,
fontSize = 24.sp,
textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth()
)
}
stickyHeader {
AllInTextField(
value = search,
onValueChange = setSearch,
leadingIcon = rememberVectorPainter(image = Icons.Default.Search),
modifier = Modifier
.background(
Brush.verticalGradient(
0.5f to AllInTheme.colors.mainSurface,
1f to Color.Transparent
)
)
.fillMaxWidth()
.padding(vertical = 8.dp)
)
}
items(friends) {
FriendsScreenLine(
username = it.username,
isFriend = it !in deleted,
toggleIsFriend = { onToggleDeleteFriend(it) }
)
}
}
}
@Preview
@Composable
private fun FriendsScreenContentPreview() {
AllInTheme {
FriendsScreenContent(
friends = emptyList(),
deleted = emptyList(),
search = "",
setSearch = {},
onToggleDeleteFriend = {}
)
}
}

@ -0,0 +1,93 @@
package fr.iut.alldev.allin.ui.friends.components
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
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.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import fr.iut.alldev.allin.R
import fr.iut.alldev.allin.theme.AllInColorToken
import fr.iut.alldev.allin.theme.AllInTheme
import fr.iut.alldev.allin.ui.core.AllInButton
import fr.iut.alldev.allin.ui.core.ProfilePicture
@Composable
fun FriendsScreenLine(
username: String,
isFriend: Boolean,
toggleIsFriend: () -> Unit,
modifier: Modifier = Modifier
) {
Row(
modifier = modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
ProfilePicture(
size = 50.dp
)
Text(
text = username,
color = AllInTheme.colors.onBackground2,
style = AllInTheme.typography.sm2,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
fontSize = 15.sp,
modifier = Modifier.weight(1f)
)
AllInButton(
color = if (isFriend) {
AllInTheme.colors.background
} else {
AllInColorToken.allInPurple
},
text = if (isFriend) {
stringResource(id = R.string.generic_delete)
} else {
stringResource(id = R.string.generic_add)
},
textColor = if (isFriend) {
AllInTheme.colors.onBackground
} else {
AllInColorToken.white
},
isSmall = true,
textStyle = AllInTheme.typography.sm2,
onClick = toggleIsFriend,
modifier = Modifier.weight(.5f)
)
}
}
@Preview
@Composable
private fun FriendsScreenLinePreview() {
AllInTheme {
FriendsScreenLine(
username = "Random",
isFriend = false,
toggleIsFriend = { }
)
}
}
@Preview
@Composable
private fun FriendsScreenLineIsFriendPreview() {
AllInTheme {
FriendsScreenLine(
username = "Random",
isFriend = true,
toggleIsFriend = { }
)
}
}

@ -81,7 +81,7 @@ fun LoginScreen(
) {
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(id = R.string.Login_title),
text = stringResource(id = R.string.login_title),
color = AllInTheme.colors.onMainSurface,
style = AllInTheme.typography.sm1,
textAlign = TextAlign.Center,
@ -90,7 +90,7 @@ fun LoginScreen(
Spacer(modifier = Modifier.height(23.dp))
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(id = R.string.Login_subtitle),
text = stringResource(id = R.string.login_subtitle),
color = AllInTheme.colors.onMainSurface,
style = AllInTheme.typography.p1,
textAlign = TextAlign.Center,
@ -101,7 +101,7 @@ fun LoginScreen(
verticalArrangement = Arrangement.spacedBy(20.dp)
) {
AllInTextField(
placeholder = stringResource(id = R.string.username),
placeholder = stringResource(id = R.string.generic_username),
value = username,
modifier = Modifier.fillMaxWidth(),
onValueChange = setUsername,
@ -109,7 +109,7 @@ fun LoginScreen(
keyboardActions = keyboardActions
)
AllInPasswordField(
placeholder = stringResource(id = R.string.password),
placeholder = stringResource(id = R.string.generic_password),
value = password,
modifier = Modifier.fillMaxWidth(),
keyboardType = KeyboardType.Password,
@ -119,7 +119,7 @@ fun LoginScreen(
)
}
ClickableText(
text = AnnotatedString(stringResource(id = R.string.forgot_password)),
text = AnnotatedString(stringResource(id = R.string.login_forgot_password)),
style = AllInTheme.typography.sm2.copy(
color = AllInTheme.colors.onMainSurface,
fontSize = 15.sp,
@ -138,7 +138,7 @@ fun LoginScreen(
.padding(bottom = 32.dp)
) {
AllInGradientButton(
text = stringResource(id = R.string.Login),
text = stringResource(id = R.string.generic_login),
onClick = {
loginViewModel.onLogin(navigateToDashboard)
},
@ -151,14 +151,14 @@ fun LoginScreen(
.fillMaxWidth()
) {
Text(
text = stringResource(id = R.string.no_account),
text = stringResource(id = R.string.login_no_account),
color = AllInTheme.colors.onMainSurface,
fontSize = 15.sp,
style = AllInTheme.typography.p1,
modifier = Modifier.padding(end = 5.dp)
)
ClickableText(
text = AnnotatedString(stringResource(id = R.string.Register)),
text = AnnotatedString(stringResource(id = R.string.generic_register)),
style = AllInTheme.typography.p1.copy(
color = AllInColorToken.allInPurple,
fontSize = 15.sp,
@ -175,8 +175,8 @@ fun LoginScreen(
AllInAlertDialog(
enabled = hasLoginError,
title = stringResource(id = R.string.Login_Error_Title),
text = stringResource(id = R.string.Login_Error_Content),
title = stringResource(id = R.string.login_error_title),
text = stringResource(id = R.string.login_error_content),
onDismiss = { hasLoginError = false }
)
}

@ -25,6 +25,7 @@ import fr.iut.alldev.allin.ui.betCreation.BetCreationScreen
import fr.iut.alldev.allin.ui.betHistory.BetCurrentScreen
import fr.iut.alldev.allin.ui.betHistory.BetHistoryScreen
import fr.iut.alldev.allin.ui.core.snackbar.SnackbarType
import fr.iut.alldev.allin.ui.friends.FriendsScreen
import fr.iut.alldev.allin.ui.login.LoginScreen
import fr.iut.alldev.allin.ui.main.MainScreen
import fr.iut.alldev.allin.ui.main.MainViewModel
@ -111,7 +112,6 @@ internal fun AllInDrawerNavHost(
enterTransition = { EnterTransition.None },
exitTransition = { ExitTransition.None }
) {
composable(route = Routes.PUBLIC_BETS) {
backHandlers()
BetScreen(
@ -148,6 +148,13 @@ internal fun AllInDrawerNavHost(
RankingScreen()
}
composable(
route = Routes.FRIENDS
) {
backHandlers()
FriendsScreen()
}
composable(
route = Routes.BET_CURRENT
) {

@ -10,43 +10,43 @@ sealed class TopLevelDestination(
) {
data object PublicBets : TopLevelDestination(
route = Routes.PUBLIC_BETS,
title = R.string.public_bets,
subtitle = R.string.public_bets_subtitle,
title = R.string.drawer_public_bets,
subtitle = R.string.drawer_public_bets_subtitle,
emoji = R.drawable.globe
)
data object BetCreation : TopLevelDestination(
route = Routes.BET_CREATION,
title = R.string.create_a_bet,
subtitle = R.string.create_a_bet_subtitle,
title = R.string.drawer_create_bet,
subtitle = R.string.drawer_create_bet_subtitle,
emoji = R.drawable.video_game
)
data object BetHistory : TopLevelDestination(
route = Routes.BET_HISTORY,
title = R.string.bet_history,
subtitle = R.string.bet_history_subtitle,
title = R.string.drawer_bet_history,
subtitle = R.string.drawer_bet_history_subtitle,
emoji = R.drawable.eyes
)
data object Friends : TopLevelDestination(
route = Routes.FRIENDS,
title = R.string.friends,
subtitle = R.string.friends_subtitle,
title = R.string.drawer_friends,
subtitle = R.string.drawer_friends_subtitle,
emoji = R.drawable.holding_hands
)
data object CurrentBets : TopLevelDestination(
route = Routes.BET_CURRENT,
title = R.string.current_bets,
subtitle = R.string.current_bets_subtitle,
title = R.string.drawer_current_bets,
subtitle = R.string.drawer_current_bets_subtitle,
emoji = R.drawable.money_with_wings
)
data object Ranking : TopLevelDestination(
route = Routes.RANKING,
title = R.string.ranking,
subtitle = R.string.ranking_subtitle,
title = R.string.drawer_ranking,
subtitle = R.string.drawer_ranking_subtitle,
emoji = R.drawable.ranking
)
}

@ -74,7 +74,7 @@ fun AllInDrawer(
modifier = Modifier.align(Alignment.CenterHorizontally)
) {
Text(
text = stringResource(id = R.string.Logout),
text = stringResource(id = R.string.generic_logout),
style = AllInTheme.typography.sm1,
color = AllInColorToken.allInDarkGrey50,
fontSize = 16.sp

@ -51,9 +51,9 @@ fun DrawerHeader(
.padding(horizontal = 69.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
DrawerHeaderStat(label = stringResource(id = R.string.bets), value = nbBets)
DrawerHeaderStat(label = stringResource(id = R.string.best_win), value = bestWin)
DrawerHeaderStat(label = stringResource(id = R.string.friends), value = nbFriends)
DrawerHeaderStat(label = stringResource(id = R.string.drawer_bets), value = nbBets)
DrawerHeaderStat(label = stringResource(id = R.string.drawer_best_win), value = bestWin)
DrawerHeaderStat(label = stringResource(id = R.string.drawer_friends), value = nbFriends)
}
}
}

@ -36,9 +36,9 @@ fun RegisterScreen(
val (password, setPassword) = remember { registerViewModel.password }
val (passwordValidation, setPasswordValidation) = remember { registerViewModel.passwordValidation }
val usernameFieldName = stringResource(id = R.string.username)
val emailFieldName = stringResource(id = R.string.email)
val passwordFieldName = stringResource(id = R.string.password)
val usernameFieldName = stringResource(id = R.string.generic_username)
val emailFieldName = stringResource(id = R.string.generic_email)
val passwordFieldName = stringResource(id = R.string.generic_password)
val keyboardActions = remember {
KeyboardActions(

@ -77,7 +77,7 @@ fun RegisterScreenContent(
modifier = Modifier
.padding(top = 16.dp)
.fillMaxWidth(),
text = stringResource(id = R.string.Hello_x, username),
text = stringResource(id = R.string.register_hello_format, username),
color = AllInTheme.colors.onMainSurface,
style = AllInTheme.typography.sm1,
textAlign = TextAlign.Center,
@ -87,7 +87,7 @@ fun RegisterScreenContent(
)
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(id = R.string.Register_title),
text = stringResource(id = R.string.register_title),
color = AllInTheme.colors.onMainSurface,
style = AllInTheme.typography.sm1,
textAlign = TextAlign.Center,
@ -96,7 +96,7 @@ fun RegisterScreenContent(
Spacer(modifier = Modifier.height(23.dp))
Text(
modifier = Modifier.fillMaxWidth(),
text = stringResource(id = R.string.Register_subtitle),
text = stringResource(id = R.string.register_subtitle),
color = AllInTheme.colors.onMainSurface,
style = AllInTheme.typography.p1,
textAlign = TextAlign.Center,
@ -137,7 +137,7 @@ fun RegisterScreenContent(
onValueChange = setPassword
)
AllInPasswordField(
placeholder = stringResource(id = R.string.confirm_password),
placeholder = stringResource(id = R.string.register_confirm_password),
value = passwordValidation,
modifier = Modifier.fillMaxWidth(),
imeAction = ImeAction.Done,
@ -163,7 +163,7 @@ fun RegisterScreenContent(
.navigationBarsPadding()
) {
AllInGradientButton(
text = stringResource(id = R.string.Register),
text = stringResource(id = R.string.generic_register),
onClick = onRegister
)
Spacer(modifier = Modifier.height(30.dp))
@ -172,14 +172,14 @@ fun RegisterScreenContent(
modifier = Modifier.fillMaxWidth()
) {
Text(
text = stringResource(id = R.string.already_have_account),
text = stringResource(id = R.string.register_already_have_account),
color = AllInTheme.colors.onMainSurface,
fontSize = 15.sp,
style = AllInTheme.typography.p1,
modifier = Modifier.padding(end = 5.dp)
)
ClickableText(
text = AnnotatedString(stringResource(id = R.string.Login)),
text = AnnotatedString(stringResource(id = R.string.generic_login)),
style = AllInTheme.typography.p1.copy(
color = AllInColorToken.allInPurple,
fontSize = 15.sp,

@ -83,10 +83,12 @@ fun WelcomeScreenContent(
AllInButton(
color = AllInTheme.colors.tint1,
text = stringResource(id = R.string.join),
text = stringResource(id = R.string.welcome_join_text),
textColor = AllInTheme.colors.background,
onClick = navigateToRegister,
modifier = Modifier.padding(bottom = 13.dp)
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 13.dp)
)
Row(
@ -94,14 +96,14 @@ fun WelcomeScreenContent(
modifier = Modifier.fillMaxWidth()
) {
Text(
text = stringResource(id = R.string.already_have_account),
text = stringResource(id = R.string.register_already_have_account),
color = AllInTheme.colors.tint1,
fontSize = 15.sp,
style = AllInTheme.typography.p1,
modifier = Modifier.padding(end = 5.dp)
)
ClickableText(
text = AnnotatedString(stringResource(id = R.string.Login)),
text = AnnotatedString(stringResource(id = R.string.generic_login)),
style = AllInTheme.typography.p1.copy(
color = AllInTheme.colors.tint1,
fontSize = 15.sp,

@ -1,122 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--Core-->
<string name="username">Pseudo</string>
<string name="email">Email</string>
<string name="password">Mot de passe</string>
<string name="confirm_password">Confirmation du mot de passe</string>
<string name="Login">Se connecter</string>
<string name="Logout">Déconnexion</string>
<string name="already_have_account">Tu as déjà un compte ?</string>
<string name="forgot_password">Mot de passe oublié ?</string>
<string name="no_account">Pas encore inscrit ?</string>
<string name="Register">S\'inscrire</string>
<string name="Validate">Valider</string>
<string name="Cancel">Annuler</string>
<string name="Ok">OK</string>
<string name="FieldError_Mandatory">Ce champ est obligatoire.</string>
<string name="FieldError_TooShort">Le %s doit contenir au moins %d caractères.</string>
<string name="FieldError_BadFormat">Le %s a un mauvais format : %s.</string>
<string name="FieldError_NotIdentical">Les champs ne sont pas identiques.</string>
<string name="FieldError_NoSpecialCharacter">Le %s doit contenir au moins un caractère spécial : %s.</string>
<string name="FieldError_AlreadyUsed">%s est déjà utilisé.</string>
<string name="FieldError_PastDate">La %s doit être dans le futur.</string>
<string name="FieldError_DateOrder">La %s doit venir après %s.</string>
<string name="Yes">Oui</string>
<string name="No">Non</string>
<string name="Details">Détails</string>
<string name="Stake">Mise</string>
<string name="Possible_winnings">Gains possibles</string>
<string name="generic_username">Pseudo</string>
<string name="generic_email">Email</string>
<string name="generic_password">Mot de passe</string>
<string name="generic_login">Se connecter</string>
<string name="generic_logout">Déconnexion</string>
<string name="generic_register">S\'inscrire</string>
<string name="generic_validate">Valider</string>
<string name="generic_cancel">Annuler</string>
<string name="generic_ok">OK</string>
<string name="generic_yes">Oui</string>
<string name="generic_no">Non</string>
<string name="generic_search">Rechercher</string>
<string name="generic_add">Ajouter</string>
<string name="generic_delete">Supprimer</string>
<string name="generic_stake">Mise</string>
<string name="generic_error">Erreur</string>
<string name="network_error">Une erreur est survenue</string>
<string name="network_error_text">Assurez-vous d\'être bien connecté au réseau puis réessayez.</string>
<!--Bet type-->
<string name="bet_type_binary">Oui / Non</string>
<string name="bet_type_match">Match sportif</string>
<string name="bet_type_custom">Réponses personnalisées</string>
<!--Field error-->
<string name="field_error_mandatory">Ce champ est obligatoire.</string>
<string name="field_error_too_short">Le %s doit contenir au moins %d caractères.</string>
<string name="field_error_bad_format">Le %s a un mauvais format : %s.</string>
<string name="field_error_not_identical">Les champs ne sont pas identiques.</string>
<string name="field_error_no_special_character">Le %s doit contenir au moins un caractère spécial : %s.</string>
<string name="field_error_already_used">%s est déjà utilisé.</string>
<string name="field_error_past_date">La %s doit être dans le futur.</string>
<string name="field_error_date_order">La %s doit venir après %s.</string>
<!--Drawer-->
<string name="bets">Bets</string>
<string name="best_win">Meilleur gain</string>
<string name="friends">Amis</string>
<string name="public_bets">Bets publiques</string>
<string name="public_bets_subtitle">Parcourez les bets les plus populaires du moment.</string>
<string name="create_a_bet">Créer un bet</string>
<string name="create_a_bet_subtitle">Créez un nouveau bet et faites participer vos amis.</string>
<string name="bet_history">Historique des bets</string>
<string name="bet_history_subtitle">Consultez vos paris en cours et terminés.</string>
<string name="friends_subtitle">Défiez vos porches en les ajoutant en amis.</string>
<string name="current_bets">Bets en cours</string>
<string name="current_bets_subtitle">Gérez vos bets et récompensez les gagnants.</string>
<string name="ranking">Classement</string>
<string name="ranking_subtitle">Consultez votre classement parmi vos amis.</string>
<string name="drawer_bets">Bets</string>
<string name="drawer_best_win">Meilleur gain</string>
<string name="drawer_friends">Amis</string>
<string name="drawer_friends_subtitle">Défiez vos proches en les ajoutant en amis.</string>
<string name="drawer_public_bets">Bets publiques</string>
<string name="drawer_public_bets_subtitle">Parcourez les bets les plus populaires du moment.</string>
<string name="drawer_create_bet">Créer un bet</string>
<string name="drawer_create_bet_subtitle">Créez un nouveau bet et faites participer vos amis.</string>
<string name="drawer_bet_history">Historique des bets</string>
<string name="drawer_bet_history_subtitle">Consultez vos paris en cours et terminés.</string>
<string name="drawer_current_bets">Bets en cours</string>
<string name="drawer_current_bets_subtitle">Gérez vos bets et récompensez les gagnants.</string>
<string name="drawer_ranking">Classement</string>
<string name="drawer_ranking_subtitle">Consultez votre classement parmi vos amis.</string>
<!--Welcome Page-->
<string name="welcome_title">Bienvenue sur</string>
<string name="welcome_subtitle">Récupère tes Allcoins et viens parier avec tes amis pour prouver qui est le meilleur.</string>
<string name="join">Rejoindre</string>
<string name="welcome_join_text">Rejoindre</string>
<!--Register Page-->
<string name="Hello_x">Bonjour, %s</string>
<string name="Register_title">On a besoins de ça!</string>
<string name="Register_subtitle">Promis c\'est rapide.</string>
<string name="register_hello_format">Bonjour, %s</string>
<string name="register_title">On a besoins de ça!</string>
<string name="register_subtitle">Promis c\'est rapide.</string>
<string name="register_confirm_password">Confirmation du mot de passe</string>
<string name="register_already_have_account">Tu as déjà un compte ?</string>
<!--Login Page-->
<string name="Login_title">Te revoilà !</string>
<string name="Login_subtitle">Bon retour parmis nous tu nous as manqué !</string>
<string name="Login_Error_Title">Erreur de connexion</string>
<string name="Login_Error_Content">La connexion a échoué\nVeuillez réessayer.</string>
<string name="login_title">Te revoilà !</string>
<string name="login_subtitle">Bon retour parmis nous tu nous as manqué !</string>
<string name="login_error_title">Erreur de connexion</string>
<string name="login_error_content">La connexion a échoué\nVeuillez réessayer.</string>
<string name="login_no_account">Pas encore inscrit ?</string>
<string name="login_forgot_password">Mot de passe oublié ?</string>
<!--Bet Creation Page-->
<string name="Theme_tooltip">Le sujet du bet.</string>
<string name="Phrase_tooltip">Généralement la question à laquelle les participants devront répondre.</string>
<string name="Register_tooltip">Après cette date, plus personne ne pourra s\'inscrire.</string>
<string name="BetEnd_tooltip">Après cette date, les résultats seront annoncés.</string>
<string name="Privacy_tooltip">Détermine qui pourra voir le bet.</string>
<string name="Question">Question</string>
<string name="Answer">Réponse</string>
<string name="Publish">Publier le bet</string>
<string name="Theme">Thème</string>
<string name="Theme_placeholder">Études, sport, soirée…</string>
<string name="Bet_Phrase">Phrase du bet</string>
<string name="Bet_Phrase_placeholder">David sera-il absent lundi matin en cours ?</string>
<string name="End_registration_date">Date de fin des inscriptions</string>
<string name="End_bet_date">Date de fin du BET</string>
<string name="Bet_privacy">Confidentialité du bet</string>
<plurals name="n_friends_available">
<string name="bet_creation_theme_tooltip">Le sujet du bet.</string>
<string name="bet_creation_phrase_tooltip">Généralement la question à laquelle les participants devront répondre.</string>
<string name="bet_creation_register_end_date_tooltip">Après cette date, plus personne ne pourra s\'inscrire.</string>
<string name="bet_creation_bet_end_date_tooltip">Après cette date, les résultats seront annoncés.</string>
<string name="bet_creation_privacy_tooltip">Détermine qui pourra voir le bet.</string>
<string name="bet_creation_question">Question</string>
<string name="bet_creation_answer">Réponse</string>
<string name="bet_creation_publish">Publier le bet</string>
<string name="bet_creation_theme">Thème</string>
<string name="bet_creation_theme_placeholder">Études, sport, soirée…</string>
<string name="bet_creation_bet_phrase">Phrase du bet</string>
<string name="bet_creation_bet_phrase_placeholder">David sera-il absent lundi matin en cours ?</string>
<string name="bet_creation_end_registration_date">Date de fin des inscriptions</string>
<string name="bet_creation_end_bet_date">Date de fin du BET</string>
<string name="bet_creation_bet_privacy">Confidentialité du bet</string>
<plurals name="bet_creation_friends_available_format">
<item quantity="one">%d ami disponibles</item>
<item quantity="other">%d amis disponibles</item>
<item quantity="many">%d amis disponibles</item>
</plurals>
<string name="public_bottom_text_1">Votre bet sera visible par tous les utilisateurs.</string>
<string name="public_bottom_text_2">Tout le monde pourra rejoindre le BET.</string>
<string name="private_bottom_text_1">Votre bet sera visible uniquement par vos amis.</string>
<string name="private_bottom_text_2">Seulement vos amis pourront rejoindre le bet.</string>
<string name="private_bottom_text_3">Vous pourrez inviter des amis à tout moment pendant la période dinscription.</string>
<string name="yes_no">Oui / Non</string>
<string name="sport_match">Match sportif</string>
<string name="yes_no_bottom_text_1">Les utilisateurs devront répondre au pari avec OUI ou NON.</string>
<string name="yes_no_bottom_text_2">Aucune autre réponse ne sera acceptée.</string>
<string name="custom_answers">Réponses personnalisées</string>
<string name="bet_creation_public_bottom_text_1">Votre bet sera visible par tous les utilisateurs.</string>
<string name="bet_creation_public_bottom_text_2">Tout le monde pourra rejoindre le BET.</string>
<string name="bet_creation_private_bottom_text_1">Votre bet sera visible uniquement par vos amis.</string>
<string name="bet_creation_private_bottom_text_2">Seulement vos amis pourront rejoindre le bet.</string>
<string name="bet_creation_private_bottom_text_3">Vous pourrez inviter des amis à tout moment pendant la période dinscription.</string>
<string name="bet_creation_yes_no_bottom_text_1">Les utilisateurs devront répondre au pari avec OUI ou NON.</string>
<string name="bet_creation_yes_no_bottom_text_2">Aucune autre réponse ne sera acceptée.</string>
<string name="bet_creation_error">Erreur lors de la création du bet, veuillez rééssayer.</string>
<string name="bet_creation_success_message">Bet créé !</string>
<!--Bet Page-->
<string name="Popular">Populaire</string>
<string name="Public">Public</string>
<string name="Private">Privé</string>
<string name="Invitation">Invitation</string>
<string name="Current">En cours</string>
<string name="Finished">Terminés</string>
<string name="Starting">Commence le</string>
<string name="Started">A commencé le</string>
<string name="Ends">Prend fin le</string>
<string name="Ended">A pris fin le</string>
<string name="Participate">Participer</string>
<string name="Proposed_by_x">Proposé par %1$s</string>
<plurals name="n_players_waiting">
<string name="bet_popular">Populaire</string>
<string name="bet_public">Public</string>
<string name="bet_private">Privé</string>
<string name="bet_invitation">Invitation</string>
<string name="bet_current">En cours</string>
<string name="bet_finished">Terminés</string>
<string name="bet_starting">Commence le</string>
<string name="bet_started">A commencé le</string>
<string name="bet_ends">Prend fin le</string>
<string name="bet_ended">A pris fin le</string>
<string name="bet_participate">Participer</string>
<string name="bet_Proposed_by_format">Proposé par %1$s</string>
<plurals name="bet_players_waiting_format">
<item quantity="one">%d joueur en attente</item>
<item quantity="other">%d joueurs en attente</item>
<item quantity="many">%d joueurs en attente</item>
</plurals>
<plurals name="n_players">
<plurals name="bet_players_format">
<item quantity="one">%d joueur</item>
<item quantity="other">%d joueurs</item>
<item quantity="many">%d joueurs</item>
</plurals>
<plurals name="n_points_at_stake">
<plurals name="bet_points_at_stake_format">
<item quantity="one">%s point en jeu</item>
<item quantity="other">%s points en jeu</item>
<item quantity="many">%s points en jeu</item>
@ -128,8 +137,12 @@
<string name="bet_status_waiting">En attente…</string>
<string name="bet_status_closing">Fermeture…</string>
<string name="bet_status_cancelled">Annulé</string>
<string name="place_your_bets">Faites vos paris</string>
<string name="bet_status_place_your_bets">Faites vos paris</string>
<string name="bet_status_participants_list">Liste des participants</string>
<string name="bet_status_details_drawer">Détails</string>
<!--Bet participation-->
<string name="participation_possible_winnings">Gains possibles</string>
<!--Bet history-->
<string name="bet_history_current_title">En cours</string>
@ -152,6 +165,9 @@
<!--Ranking-->
<string name="ranking_title">Classement</string>
<!--Friends-->
<string name="friends_title">Amis</string>
<!--Daily reward-->
<string name="daily_reward_title">Récompense quotidienne</string>
<string name="daily_reward_subtitle">Votre récompense quotidienne est débloquée tous les jours à 00:00 UTC et vous permets dobtenir entre 10 et 150 Allcoins.</string>

@ -3,120 +3,129 @@
<string name="app_name" translatable="false">Allin</string>
<string name="float_and_unit" translatable="false">%.2g%s</string>
<string name="int_and_unit" translatable="false">%d%s</string>
<string name="username">Username</string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="confirm_password">Confirm password</string>
<string name="Login">Login</string>
<string name="Logout">Logout</string>
<string name="already_have_account">Already have an account ?</string>
<string name="forgot_password">Forgot password ?</string>
<string name="no_account">Don\'t have an account ?</string>
<string name="Register">Register</string>
<string name="Validate">Validate</string>
<string name="Cancel">Cancel</string>
<string name="Ok">OK</string>
<string name="FieldError_Mandatory">This field is mandatory.</string>
<string name="FieldError_TooShort">The %s must contain at least %d characters.</string>
<string name="FieldError_BadFormat">The %s has bad format : %s.</string>
<string name="FieldError_NotIdentical">The fields are not identical.</string>
<string name="FieldError_NoSpecialCharacter">The %s must contain at least one special character : %s.</string>
<string name="FieldError_AlreadyUsed">%s is already used.</string>
<string name="FieldError_PastDate">The %s should be in the future.</string>
<string name="FieldError_DateOrder">The %s should come after the %s.</string>
<string name="Yes">Yes</string>
<string name="No">No</string>
<string name="Details">Details</string>
<string name="Stake">Stake</string>
<string name="Possible_winnings">Possible winnings</string>
<string name="generic_username">Username</string>
<string name="generic_email">Email</string>
<string name="generic_password">Password</string>
<string name="generic_login">Login</string>
<string name="generic_logout">Logout</string>
<string name="generic_register">Register</string>
<string name="generic_validate">Validate</string>
<string name="generic_cancel">Cancel</string>
<string name="generic_ok">OK</string>
<string name="generic_yes">Yes</string>
<string name="generic_no">No</string>
<string name="generic_search">Search</string>
<string name="generic_add">Add</string>
<string name="generic_delete">Delete</string>
<string name="generic_stake">Stake</string>
<string name="generic_error">Error</string>
<string name="network_error">An error occurred</string>
<string name="network_error_text">Make sure to be properly connected to the network then try again.</string>
<!--Bet type-->
<string name="bet_type_binary">Yes / No</string>
<string name="bet_type_match">Sport match</string>
<string name="bet_type_custom">Custom answers</string>
<!--Field error-->
<string name="field_error_mandatory">This field is mandatory.</string>
<string name="field_error_too_short">The %s must contain at least %d characters.</string>
<string name="field_error_bad_format">The %s has bad format : %s.</string>
<string name="field_error_not_identical">The fields are not identical.</string>
<string name="field_error_no_special_character">The %s must contain at least one special character : %s.</string>
<string name="field_error_already_used">%s is already used.</string>
<string name="field_error_past_date">The %s should be in the future.</string>
<string name="field_error_date_order">The %s should come after the %s.</string>
<!--Drawer-->
<string name="bets">Bets</string>
<string name="best_win">Best win</string>
<string name="friends">Friends</string>
<string name="public_bets">Public bets</string>
<string name="public_bets_subtitle">Browse the most popular bets of the moment.</string>
<string name="create_a_bet">Create a bet</string>
<string name="create_a_bet_subtitle">Create a net bet and get your friends participating.</string>
<string name="bet_history">Bet history</string>
<string name="bet_history_subtitle">View your current and finished bets.</string>
<string name="friends_subtitle">Challenge your folks by adding them as friends.</string>
<string name="current_bets">Current bets</string>
<string name="current_bets_subtitle">Manage your bets and reward the winners.</string>
<string name="ranking">Ranking</string>
<string name="ranking_subtitle">Browse your ranking with your friends.</string>
<string name="drawer_bets">Bets</string>
<string name="drawer_best_win">Best win</string>
<string name="drawer_friends">Friends</string>
<string name="drawer_public_bets">Public bets</string>
<string name="drawer_public_bets_subtitle">Browse the most popular bets of the moment.</string>
<string name="drawer_create_bet">Create a bet</string>
<string name="drawer_create_bet_subtitle">Create a net bet and get your friends participating.</string>
<string name="drawer_bet_history">Bet history</string>
<string name="drawer_bet_history_subtitle">View your current and finished bets.</string>
<string name="drawer_friends_subtitle">Challenge your folks by adding them as friends.</string>
<string name="drawer_current_bets">Current bets</string>
<string name="drawer_current_bets_subtitle">Manage your bets and reward the winners.</string>
<string name="drawer_ranking">Ranking</string>
<string name="drawer_ranking_subtitle">Browse your ranking with your friends.</string>
<!--Welcome Page-->
<string name="welcome_title">Welcome to</string>
<string name="welcome_appname" translatable="false">Allin.</string>
<string name="welcome_subtitle">Collect your Allcoins and come bet with your friend to prove who\'s best.</string>
<string name="join">Join</string>
<string name="welcome_join_text">Join</string>
<!--Register Page-->
<string name="Hello_x">Hello, %s</string>
<string name="Register_title">We need this!</string>
<string name="Register_subtitle">Don\'t worry it\'s fast.</string>
<string name="register_hello_format">Hello, %s</string>
<string name="register_title">We need this!</string>
<string name="register_subtitle">Don\'t worry it\'s fast.</string>
<string name="register_confirm_password">Confirm password</string>
<string name="register_already_have_account">Already have an account ?</string>
<!--Login Page-->
<string name="Login_title">Welcome back !</string>
<string name="Login_subtitle">We missed you.</string>
<string name="Login_Error_Title">Connection error</string>
<string name="Login_Error_Content">Failed to login\nPlease try again.</string>
<string name="login_title">Welcome back !</string>
<string name="login_subtitle">We missed you.</string>
<string name="login_error_title">Connection error</string>
<string name="login_error_content">Failed to login\nPlease try again.</string>
<string name="login_forgot_password">Forgot password ?</string>
<string name="login_no_account">Don\'t have an account ?</string>
<!--Bet Creation Page-->
<string name="Question">Question</string>
<string name="Answer">Answer</string>
<string name="Publish">Publish the bet</string>
<string name="Theme_tooltip">The subject of the bet.</string>
<string name="Phrase_tooltip">Generally the question the participants will answer to.</string>
<string name="Register_tooltip">After this date, nobody will be able to register anymore.</string>
<string name="BetEnd_tooltip">After this date, the result will be announced.</string>
<string name="Privacy_tooltip">Determines who will be able to see the bet.</string>
<string name="Theme">Theme</string>
<string name="Theme_placeholder">Studies, sports, party…</string>
<string name="Bet_Phrase">Bet phrase</string>
<string name="Bet_Phrase_placeholder">Will David be missing this Monday in class ?</string>
<string name="End_registration_date">Registration end date</string>
<string name="End_bet_date">Bet end date</string>
<string name="Bet_privacy">Bet privacy</string>
<plurals name="n_friends_available">
<string name="bet_creation_question">Question</string>
<string name="bet_creation_answer">Answer</string>
<string name="bet_creation_publish">Publish the bet</string>
<string name="bet_creation_theme_tooltip">The subject of the bet.</string>
<string name="bet_creation_phrase_tooltip">Generally the question the participants will answer to.</string>
<string name="bet_creation_register_end_date_tooltip">After this date, nobody will be able to register anymore.</string>
<string name="bet_creation_bet_end_date_tooltip">After this date, the result will be announced.</string>
<string name="bet_creation_privacy_tooltip">Determines who will be able to see the bet.</string>
<string name="bet_creation_theme">Theme</string>
<string name="bet_creation_theme_placeholder">Studies, sports, party…</string>
<string name="bet_creation_bet_phrase">Bet phrase</string>
<string name="bet_creation_bet_phrase_placeholder">Will David be missing this Monday in class ?</string>
<string name="bet_creation_end_registration_date">Registration end date</string>
<string name="bet_creation_end_bet_date">Bet end date</string>
<string name="bet_creation_bet_privacy">Bet privacy</string>
<plurals name="bet_creation_friends_available_format">
<item quantity="one">%d friend available</item>
<item quantity="other">%d friends available</item>
</plurals>
<string name="public_bottom_text_1">Your bet will be visible by all the users.</string>
<string name="public_bottom_text_2">Everyone will be able to join the bet.</string>
<string name="private_bottom_text_1">Your bet will only be visible by your friends.</string>
<string name="private_bottom_text_2">Only your friends will be able to join the bet.</string>
<string name="private_bottom_text_3">You can invite friends at any moment during the registration period.</string>
<string name="yes_no">Yes / No</string>
<string name="yes_no_bottom_text_1">The participants will have to respond with either YES or NO.</string>
<string name="yes_no_bottom_text_2">No other answer will be accepted.</string>
<string name="sport_match">Sport match</string>
<string name="custom_answers">Custom answers</string>
<string name="bet_creation_public_bottom_text_1">Your bet will be visible by all the users.</string>
<string name="bet_creation_public_bottom_text_2">Everyone will be able to join the bet.</string>
<string name="bet_creation_private_bottom_text_1">Your bet will only be visible by your friends.</string>
<string name="bet_creation_private_bottom_text_2">Only your friends will be able to join the bet.</string>
<string name="bet_creation_private_bottom_text_3">You can invite friends at any moment during the registration period.</string>
<string name="bet_creation_yes_no_bottom_text_1">The participants will have to respond with either YES or NO.</string>
<string name="bet_creation_yes_no_bottom_text_2">No other answer will be accepted.</string>
<string name="bet_creation_error">Error while creating the bet. Please try again.</string>
<string name="bet_creation_success_message">Bet created !</string>
<!--Bet Page-->
<string name="Popular">Popular</string>
<string name="Public">Public</string>
<string name="Private">Private</string>
<string name="Invitation">Invitation</string>
<string name="Current">Current</string>
<string name="Finished">Finished</string>
<string name="Starting">Starting on</string>
<string name="Started">Started on</string>
<string name="Ends">Ends on</string>
<string name="Ended">Ended on</string>
<string name="Participate">Participate</string>
<string name="Proposed_by_x">Proposed by %1$s</string>
<plurals name="n_players_waiting">
<string name="bet_popular">Popular</string>
<string name="bet_public">Public</string>
<string name="bet_private">Private</string>
<string name="bet_invitation">Invitation</string>
<string name="bet_current">Current</string>
<string name="bet_finished">Finished</string>
<string name="bet_starting">Starting on</string>
<string name="bet_started">Started on</string>
<string name="bet_ends">Ends on</string>
<string name="bet_ended">Ended on</string>
<string name="bet_participate">Participate</string>
<string name="bet_Proposed_by_format">Proposed by %1$s</string>
<plurals name="bet_players_waiting_format">
<item quantity="one">%d player waiting</item>
<item quantity="other">%d players waiting</item>
</plurals>
<plurals name="n_players">
<plurals name="bet_players_format">
<item quantity="one">%d player</item>
<item quantity="other">%d players</item>
</plurals>
<plurals name="n_points_at_stake">
<plurals name="bet_points_at_stake_format">
<item quantity="one">%s point at stake</item>
<item quantity="other">%s points at stake</item>
</plurals>
@ -127,8 +136,10 @@
<string name="bet_status_waiting">Waiting…</string>
<string name="bet_status_closing">Closing…</string>
<string name="bet_status_cancelled">Cancelled</string>
<string name="place_your_bets">Place your bets</string>
<string name="bet_status_place_your_bets">Place your bets</string>
<string name="bet_status_participants_list">Participants</string>
<string name="bet_status_details_drawer">Details</string>
<string name="participation_possible_winnings">Possible winnings</string>
<!--Bet history-->
<string name="bet_history_current_title">Current</string>
@ -151,6 +162,9 @@
<!--Ranking-->
<string name="ranking_title">Ranking</string>
<!--Friends-->
<string name="friends_title">Friends</string>
<!--Daily reward-->
<string name="daily_reward_title">Daily reward</string>
<string name="daily_reward_subtitle">Your daily reward is unlocked every day at 00:00 UTC and allows you to get between 10 and 150 Allcoins.</string>

Loading…
Cancel
Save