-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat/#293] 영어 버전 앱 국제화를 진행합니다. #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
2bb738f
cebeb74
e804505
ea1f2aa
0a30154
b5b3321
43159c8
c8d3f83
44ed476
b610910
1640a59
fdbe733
535375a
eb7a018
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| package com.sopt.clody.presentation.ui.auth.component.button | ||
|
|
||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.layout.width | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Button | ||
| import androidx.compose.material3.ButtonDefaults | ||
| 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.painterResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.sopt.clody.R | ||
| import com.sopt.clody.ui.theme.ClodyTheme | ||
|
|
||
| @Composable | ||
| fun GoogleButton( | ||
| text: String, | ||
| onClick: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Button( | ||
| onClick = onClick, | ||
| colors = ButtonDefaults.buttonColors(containerColor = ClodyTheme.colors.gray08), | ||
| shape = RoundedCornerShape(10.dp), | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .height(48.dp) | ||
| .padding(horizontal = 24.dp), | ||
| ) { | ||
| Row( | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| horizontalArrangement = Arrangement.Center, | ||
| modifier = Modifier.fillMaxSize(), | ||
| ) { | ||
| Image( | ||
| painter = painterResource(id = R.drawable.img_google_button_logo), | ||
| contentDescription = null, | ||
| modifier = Modifier.size(24.dp), | ||
| ) | ||
| Spacer(modifier = Modifier.width(10.dp)) | ||
| Text( | ||
| text = text, | ||
| style = ClodyTheme.typography.body2SemiBold, | ||
| color = ClodyTheme.colors.gray01, | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun GoogleButtonPreview() { | ||
| GoogleButton( | ||
| text = "Sign Up With Google", | ||
| onClick = { /*TODO*/ }, | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ fun DailyDiaryListItem( | |
| ) | ||
| Text( | ||
| text = stringResource( | ||
| id = R.string.daily_diary_day_of_week_format, | ||
| id = R.string.home_daily_diary_day_of_week, | ||
| dayOfWeek.toKoreanShortLabel(), | ||
| ), | ||
| style = ClodyTheme.typography.body2Medium, | ||
|
Comment on lines
56
to
60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion
Options:
Either way, avoid hard-coding Korean when the app runs in EN. 🤖 Prompt for AI Agents |
||
|
|
@@ -80,7 +80,7 @@ fun DailyDiaryListItem( | |
| .padding(vertical = 44.dp), | ||
| ) { | ||
| Text( | ||
| text = stringResource(R.string.daily_diary_draft_message), | ||
| text = stringResource(R.string.home_daily_diary_draft_message), | ||
| style = ClodyTheme.typography.body3Regular, | ||
| color = ClodyTheme.colors.gray05, | ||
| textAlign = TextAlign.Center, | ||
|
|
@@ -96,7 +96,7 @@ fun DailyDiaryListItem( | |
| .padding(vertical = 44.dp), | ||
| ) { | ||
| Text( | ||
| text = stringResource(R.string.daily_diary_empty_message), | ||
| text = stringResource(R.string.home_daily_diary_empty_message), | ||
| style = ClodyTheme.typography.body3Regular, | ||
| color = ClodyTheme.colors.gray05, | ||
| textAlign = TextAlign.Center, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P5
없애도 똑같지 않을까염?
그리고 만약 내부여백이 필요하면
contentPadding = PaddingValues(horizontal = 24.dp)요게 더 좋을 것 같습니다잉