diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/AddStudySetToFolderScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/AddStudySetToFolderScreen.kt index 5f65508a..8a776da9 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/AddStudySetToFolderScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/AddStudySetToFolderScreen.kt @@ -16,6 +16,7 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState 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 androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel @@ -28,6 +29,7 @@ import com.ramcosta.composedestinations.annotation.RootGraph import com.ramcosta.composedestinations.generated.destinations.CreateStudySetScreenDestination import com.ramcosta.composedestinations.navigation.DestinationsNavigator import com.ramcosta.composedestinations.result.ResultBackNavigator +import com.pwhs.quickmem.R @Destination( navArgs = AddStudySetToFolderArgs::class @@ -103,7 +105,7 @@ fun AddStudySetToFolder( AddStudySetToFolderTopAppBar( onDoneClick = onDoneClick, onNavigateCancel = onNavigateCancel, - title = "Add Study Set" + title = stringResource(id = R.string.txt_add_study_set) ) }, floatingActionButton = { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderList.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderList.kt index a7e5ab56..b3d9d653 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderList.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderList.kt @@ -24,12 +24,14 @@ import androidx.compose.ui.Alignment.Companion.CenterHorizontally import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight 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 coil.compose.AsyncImage +import com.pwhs.quickmem.R import com.pwhs.quickmem.domain.model.color.ColorModel import com.pwhs.quickmem.domain.model.study_set.GetStudySetResponseModel import com.pwhs.quickmem.domain.model.subject.SubjectModel @@ -87,7 +89,7 @@ fun AddStudySetToFolderList( color = colorScheme.onSurface.copy(alpha = 0.1f), ) Text( - text = "There are no owned study sets, create one to get started!", + text = stringResource(id = R.string.txt_there_are_no_owned_study_sets_create_one_to_get_started), textAlign = TextAlign.Center, style = typography.bodyMedium.copy( color = colorScheme.onSurface.copy(alpha = 0.6f), @@ -107,7 +109,7 @@ fun AddStudySetToFolderList( SearchTextField( searchQuery = searchQuery, onSearchQueryChange = { searchQuery = it }, - placeholder = "Search study sets" + placeholder = stringResource(id = R.string.txt_search_study_sets), ) } @@ -120,7 +122,7 @@ fun AddStudySetToFolderList( horizontalAlignment = CenterHorizontally ) { Text( - text = "No study set fold found", + text = stringResource(id = R.string.txt_no_study_set_fold_found), style = typography.bodyLarge, textAlign = TextAlign.Center ) diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderTopAppBar.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderTopAppBar.kt index ec63cc84..72f4042f 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderTopAppBar.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/add_study_set/component/AddStudySetToFolderTopAppBar.kt @@ -14,10 +14,12 @@ import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.sp import com.pwhs.quickmem.ui.theme.QuickMemTheme +import com.pwhs.quickmem.R @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -50,7 +52,7 @@ fun AddStudySetToFolderTopAppBar( ) ) { Text( - text = "Done", + text = stringResource(id = R.string.txt_done), style = typography.titleMedium.copy( fontWeight = FontWeight.Bold, color = colorScheme.onSurface, @@ -67,7 +69,7 @@ fun AddStudySetToFolderTopAppBar( ) ) { Text( - text = "Cancel", + text = stringResource(id = R.string.txt_cancel), style = typography.titleMedium.copy( fontWeight = FontWeight.Bold, color = colorScheme.onSurface, diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt index 82f7a78e..75a7b95e 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt @@ -12,9 +12,11 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue 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 androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel +import com.pwhs.quickmem.R import com.pwhs.quickmem.presentation.component.CreateTextField import com.pwhs.quickmem.presentation.component.CreateTopAppBar import com.pwhs.quickmem.presentation.component.LoadingOverlay @@ -93,7 +95,7 @@ fun CreateFolder( CreateTopAppBar( onNavigateBack = onNavigateBack, onDoneClick = onDoneClick, - title = "Create new folder" + title = stringResource(id = R.string.txt_create_folder) ) } ) { innerPadding -> @@ -105,20 +107,20 @@ fun CreateFolder( ) { CreateTextField( value = title, - title = "Folder Title", + title = stringResource(id = R.string.txt_folder_title), valueError = titleError, onValueChange = onTitleChange, - placeholder = "Enter Folder Title" + placeholder = stringResource(id = R.string.txt_enter_folder_title) ) CreateTextField( value = description, - title = "Description (Optional)", + title = stringResource(id = R.string.txt_description_optional), valueError = descriptionError, onValueChange = onDescriptionChange, - placeholder = "Enter Description" + placeholder = stringResource(id = R.string.txt_enter_description) ) SwitchContainer( - text = "When you make a folder public, anyone can see it and use it.", + text = stringResource(R.string.txt_when_you_make_a_folder_public_anyone_can_see_it_and_use_it), checked = isPublic, onCheckedChange = onIsPublicChange ) diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/edit/EditFolderScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/edit/EditFolderScreen.kt index 1f640284..23ce6e24 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/edit/EditFolderScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/edit/EditFolderScreen.kt @@ -12,9 +12,11 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue 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 androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel +import com.pwhs.quickmem.R import com.pwhs.quickmem.presentation.component.CreateTextField import com.pwhs.quickmem.presentation.component.CreateTopAppBar import com.pwhs.quickmem.presentation.component.LoadingOverlay @@ -93,7 +95,7 @@ fun EditFolder( CreateTopAppBar( onNavigateBack = onNavigateBack, onDoneClick = onDoneClick, - title = "Edit folder" + title = stringResource(R.string.txt_edit_folder) ) } ) { innerPadding -> @@ -105,20 +107,20 @@ fun EditFolder( ) { CreateTextField( value = title, - title = "Folder Title", + title = stringResource(R.string.txt_folder_title), valueError = titleError, onValueChange = onTitleChange, - placeholder = "Enter Folder Title" + placeholder = stringResource(R.string.txt_enter_folder_title) ) CreateTextField( value = description, - title = "Description (Optional)", + title = stringResource(R.string.txt_description_optional), valueError = descriptionError, onValueChange = onDescriptionChange, - placeholder = "Enter Description" + placeholder = stringResource(R.string.txt_enter_description ) ) SwitchContainer( - text = "When you make a folder public, anyone can see it and use it.", + text = stringResource(R.string.txt_when_you_make_a_folder_public_anyone_can_see_it_and_use_it), checked = isPublic, onCheckedChange = onIsPublicChange ) diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index e90cd00b..e0266a4a 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -343,4 +343,5 @@ Vẽ Hủy và quay lại Độ rộng nét vẽ + Khi bạn công khai một thư mục, bất kỳ ai cũng có thể xem và sử dụng nó. \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f22947d2..986bbb0f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -346,4 +346,5 @@ Draw Cancel and back Stroke Width + When you make a folder public, anyone can see it and use it. \ No newline at end of file