Skip to content
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

feat(language): thêm đa ngôn ngữ màn tìm kiếm và màn học #91

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ fun SearchResult(
) {
var showFilterBottomSheet by remember { mutableStateOf(false) }
val tabTitles = listOf(
"All Result",
"Study Set",
"Folder",
"Class",
"User"
stringResource(R.string.txt_all_result),
stringResource(R.string.txt_study_set),
stringResource(R.string.txt_folder),
stringResource(R.string.txt_class),
stringResource(R.string.txt_user)
)
Scaffold(
containerColor = colorScheme.background,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import com.pwhs.quickmem.R
Expand All @@ -43,7 +44,7 @@ fun StudySetColorInput(
modifier = modifier.padding(top = 10.dp)
) {
Text(
text = "Color",
text = stringResource(R.string.txt_color),
style = typography.bodyMedium.copy(
fontWeight = FontWeight.Bold
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fun StudySetSubjectBottomSheet(
.fillMaxHeight(0.95f)
) {
Text(
"Subjects",
stringResource(R.string.txt_subjects),
style = typography.bodyMedium.copy(fontWeight = FontWeight.Bold)
)
OutlinedTextField(
Expand All @@ -70,7 +70,7 @@ fun StudySetSubjectBottomSheet(
value = searchSubjectQuery,
shape = RoundedCornerShape(10.dp),
onValueChange = onSearchQueryChange,
placeholder = { Text("Try Arts") },
placeholder = { Text(stringResource(R.string.txt_try_arts)) },
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 10.dp),
Expand Down Expand Up @@ -123,7 +123,7 @@ fun StudySetSubjectBottomSheet(
item {
if (filteredSubjects.isEmpty()) {
Text(
text = "No subjects found",
text = stringResource(R.string.txt_no_subjects_found),
style = typography.bodyMedium.copy(
color = colorScheme.onSurface,
fontWeight = FontWeight.Bold
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -597,4 +597,10 @@
<string name="txt_unlimited">Unlimited</string>
<string name="txt_add_study_set_to_class_successfully">Thêm bộ học vào lớp thành công</string>
<string name="txt_add_study_set_to_folder_successfully">Thêm bộ học vào thư mục thành công</string>
<string name="txt_all_result">Tất cả kết quả</string>
<string name="txt_user">Người dùng</string>
<string name="txt_color">Màu sắc</string>
<string name="txt_subjects">Môn học</string>
<string name="txt_try_arts">Thử môn Nghệ thuật</string>
<string name="txt_no_subjects_found">Không tìm thấy môn học nào</string>
</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -600,4 +600,10 @@
<string name="txt_unlimited">Unlimited</string>
<string name="txt_add_study_set_to_class_successfully">Add study set to class successfully</string>
<string name="txt_add_study_set_to_folder_successfully">Add study set to folder successfully</string>
<string name="txt_all_result">All Result</string>
<string name="txt_user">User</string>
<string name="txt_color">Color</string>
<string name="txt_subjects">Subjects</string>
<string name="txt_try_arts">Try Arts</string>
<string name="txt_no_subjects_found">No subjects found</string>
</resources>
Loading