Skip to content

Commit

Permalink
lang: thêm đa ngôn ngữ một số màn còn thiếu (#90)
Browse files Browse the repository at this point in the history
Co-authored-by: Daocon <[email protected]>
  • Loading branch information
VawnDao and VawnDao authored Dec 7, 2024
1 parent 3eaf1fe commit a70ac6d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ private fun WelCome(

item {
val color = colorScheme.onSurface
val textPart1 = stringResource(R.string.txt_all_the_tools_for_learning_success)
val textPart2 = stringResource(R.string.txt_in_one_app)
Text(
buildAnnotatedString {
withStyle(
Expand All @@ -201,13 +203,13 @@ private fun WelCome(
fontWeight = FontWeight.Black
)
) {
append("All the tools for \nlearning success.\n")
append(textPart1)
withStyle(
style = SpanStyle(
color = premiumColor,
)
) {
append("In one app.")
append(textPart2)
}
}
}
Expand All @@ -233,7 +235,7 @@ private fun WelCome(
textColor = colorScheme.primary
)
}

item {
Spacer(modifier = Modifier.padding(20.dp))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.pwhs.quickmem.R
import com.pwhs.quickmem.domain.model.study_time.StudyTimeModel
import ir.ehsannarmani.compose_charts.ColumnChart
import ir.ehsannarmani.compose_charts.models.Bars
Expand All @@ -41,7 +43,7 @@ fun LearningBars(
.padding(16.dp),
data = listOf(
Bars(
label = "Flip",
label = stringResource(R.string.txt_flip),
values = listOf(
Bars.Data(
value = (studyTime?.flip?.toDouble() ?: 0.0) / 1000,
Expand All @@ -55,7 +57,7 @@ fun LearningBars(
)
),
Bars(
label = "Quiz",
label = stringResource(R.string.txt_quiz),
values = listOf(
Bars.Data(
value = (studyTime?.quiz?.toDouble() ?: 0.0) / 1000,
Expand All @@ -69,7 +71,7 @@ fun LearningBars(
)
),
Bars(
label = "True/False",
label = stringResource(R.string.txt_true_false),
values = listOf(
Bars.Data(
value = (studyTime?.trueFalse?.toDouble() ?: 0.0) / 1000,
Expand All @@ -83,7 +85,7 @@ fun LearningBars(
)
),
Bars(
label = "Write",
label = stringResource(R.string.txt_write),
values = listOf(
Bars.Data(
value = (studyTime?.write?.toDouble() ?: 0.0) / 1000,
Expand Down Expand Up @@ -154,7 +156,7 @@ fun LearningBars(
)
Spacer(modifier = Modifier.padding(vertical = 20.dp))
Text(
text = "Time spent on each learning type",
text = stringResource(R.string.txt_time_spent_on_each_learning_type),
style = typography.titleMedium.copy(
fontWeight = FontWeight.Bold
)
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -456,5 +456,8 @@
<string name="txt_set_inappropriate">Nội dung không phù hợp</string>
<string name="txt_set_cheating">Bộ học liệu này đang được sử dụng để gian lận</string>
<string name="txt_set_ip_violation">Bộ học liệu này vi phạm quyền sở hữu trí tuệ của tôi</string>

<string name="txt_flip">Lật</string>
<string name="txt_time_spent_on_each_learning_type">Thời gian dành cho mỗi kiểu học</string>
<string name="txt_in_one_app">Trong một ứng dụng.</string>
<string name="txt_all_the_tools_for_learning_success">Tất cả các công cụ để\nthành công trong học tập.\n</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,8 @@
<string name="txt_set_inappropriate">It is inappropriate</string>
<string name="txt_set_cheating">It is being used to cheat</string>
<string name="txt_set_ip_violation">It violates my intellectual property rights</string>
<string name="txt_flip">Flip</string>
<string name="txt_time_spent_on_each_learning_type">Time spent on each learning type</string>
<string name="txt_in_one_app">In one app.</string>
<string name="txt_all_the_tools_for_learning_success">All the tools for \nlearning success.\n</string>
</resources>

0 comments on commit a70ac6d

Please sign in to comment.