From b5291077a95228e15907f4fdfb2724d556bfbd75 Mon Sep 17 00:00:00 2001 From: Hikari-no-Tenshi Date: Tue, 13 Jun 2023 07:51:03 +0300 Subject: [PATCH] manager: Make more strings translatable (#622) Co-authored-by: weishu --- .../ui/component/profile/RootProfileConfig.kt | 12 ++++++------ manager/app/src/main/res/values-uk/strings.xml | 3 +++ manager/app/src/main/res/values/strings.xml | 3 +++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt b/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt index 4c9a3263..fa9764ac 100644 --- a/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt +++ b/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt @@ -176,7 +176,7 @@ fun RootProfileConfig( val keyboardController = LocalSoftwareKeyboardController.current OutlinedTextField( modifier = Modifier.fillMaxWidth(), - label = { Text("SELinux context") }, + label = { Text(text = stringResource(R.string.profile_selinux_context)) }, value = profile.context, keyboardOptions = KeyboardOptions( keyboardType = KeyboardType.Ascii, @@ -219,7 +219,7 @@ fun GroupsPanel(selected: List, closeSelection: (selection: Set) showDialog = false }), header = Header.Default( - title = "Groups", + title = stringResource(R.string.profile_groups), ), selection = ListSelection.Multiple( showCheckBoxes = true, @@ -244,7 +244,7 @@ fun GroupsPanel(selected: List, closeSelection: (selection: Set) }) { Column(modifier = Modifier.padding(16.dp)) { - Text("groups") + Text(stringResource(R.string.profile_groups)) FlowRow { selected.forEach { group -> AssistChip( @@ -285,7 +285,7 @@ fun CapsPanel( showDialog = false }), header = Header.Default( - title = "Capabilities", + title = stringResource(R.string.profile_capabilities), ), selection = ListSelection.Multiple( showCheckBoxes = true, @@ -309,7 +309,7 @@ fun CapsPanel( }) { Column(modifier = Modifier.padding(16.dp)) { - Text("Capabilities") + Text(stringResource(R.string.profile_capabilities)) FlowRow { selected.forEach { group -> AssistChip( @@ -379,4 +379,4 @@ private fun RootProfileConfigPreview() { private fun isTextValidUid(text: String): Boolean { return text.isNotEmpty() && text.isDigitsOnly() && text.toInt() >= 0 && text.toInt() <= Int.MAX_VALUE -} \ No newline at end of file +} diff --git a/manager/app/src/main/res/values-uk/strings.xml b/manager/app/src/main/res/values-uk/strings.xml index d217e63b..6525ec03 100644 --- a/manager/app/src/main/res/values-uk/strings.xml +++ b/manager/app/src/main/res/values-uk/strings.xml @@ -65,6 +65,9 @@ Наслідуваний Глобальний Індивідуальний + Групи + Можливості + Контекст SELinux Розмонтувати модулі Не вдалося оновити профіль додатка для %s Поточна версія ядра %d занизька для належної роботи менджера. Будь ласка, оновіть до версії %d або вище! diff --git a/manager/app/src/main/res/values/strings.xml b/manager/app/src/main/res/values/strings.xml index ce80030f..8ceb6cc8 100644 --- a/manager/app/src/main/res/values/strings.xml +++ b/manager/app/src/main/res/values/strings.xml @@ -65,6 +65,9 @@ Inherited Global Individual + Groups + Capabilities + SELinux context Umount modules Failed to update App Profile for %s The current kernel version %d is too low for the manager to function properly. Please upgrade to version %d or higher!