diff --git a/app/src/androidTestKeyboards/kotlin/be/scri/ui/screens/settings/SettingsUtilTest.kt b/app/src/androidTestKeyboards/kotlin/be/scri/ui/screens/settings/SettingsUtilTest.kt index 35085f506..e5ccc3e46 100644 --- a/app/src/androidTestKeyboards/kotlin/be/scri/ui/screens/settings/SettingsUtilTest.kt +++ b/app/src/androidTestKeyboards/kotlin/be/scri/ui/screens/settings/SettingsUtilTest.kt @@ -133,6 +133,6 @@ class SettingsUtilTest { fun testGetLocalizedLanguageName_Undeclared() { val result = SettingsUtil.getLocalizedLanguageName("Yoruba") - assertEquals("Language", context.getString(result)) + assertEquals("App language", context.getString(result)) } } diff --git a/app/src/main/assets/i18n b/app/src/main/assets/i18n index fe9fa1901..ecbe24af0 160000 --- a/app/src/main/assets/i18n +++ b/app/src/main/assets/i18n @@ -1 +1 @@ -Subproject commit fe9fa1901a12a14d71fec283b0afe5e702398a28 +Subproject commit ecbe24af00a852eee15f4abd09bc8eef8ebe6d59 diff --git a/app/src/main/java/be/scri/helpers/AnnotationTextUtils.kt b/app/src/main/java/be/scri/helpers/AnnotationTextUtils.kt index f5915295b..1505386f5 100644 --- a/app/src/main/java/be/scri/helpers/AnnotationTextUtils.kt +++ b/app/src/main/java/be/scri/helpers/AnnotationTextUtils.kt @@ -37,7 +37,7 @@ object AnnotationTextUtils { "Prepositional case" to Pair(color, processValuesForPreposition(language, "Pre")), "Instrumental case" to Pair(color, processValuesForPreposition(language, "Ins")), ) - return suggestionMap[nounType] ?: Pair(R.color.transparent, context.getString(R.string.suggestion)) + return suggestionMap[nounType] ?: Pair(R.color.transparent, context.getString(R.string.i18n_app_keyboard_suggestion)) } /** @@ -61,7 +61,7 @@ object AnnotationTextUtils { "masculine" to Pair(R.color.annotateBlue, processValueForNouns(language, "M")), "feminine" to Pair(R.color.annotateRed, processValueForNouns(language, "F")), ) - return suggestionMap[nounType] ?: Pair(R.color.transparent, context.getString(R.string.suggestion)) + return suggestionMap[nounType] ?: Pair(R.color.transparent, context.getString(R.string.i18n_app_keyboard_suggestion)) } /** diff --git a/app/src/main/java/be/scri/ui/common/bottombar/BottomBarScreen.kt b/app/src/main/java/be/scri/ui/common/bottombar/BottomBarScreen.kt index 0ac945d4e..0a85eef5c 100644 --- a/app/src/main/java/be/scri/ui/common/bottombar/BottomBarScreen.kt +++ b/app/src/main/java/be/scri/ui/common/bottombar/BottomBarScreen.kt @@ -14,7 +14,8 @@ import be.scri.navigation.Screen sealed class BottomBarScreen( val route: String, @DrawableRes val icon: Int, - val label: String, + val labelRes: Int, + val altTextRes: Int, ) { /** * Represents the Installation screen and its associated route. @@ -22,7 +23,8 @@ sealed class BottomBarScreen( data object Installation : BottomBarScreen( Screen.Installation.route, R.drawable.material_keyboard, - "Installation", + R.string.i18n_app_installation_title, + R.string.i18n_app_installation_title_alt_text, ) /** @@ -31,7 +33,8 @@ sealed class BottomBarScreen( data object Conjugate : BottomBarScreen( Screen.Conjugate.route, R.drawable.material_keyboard, - "Conjugate", + R.string.i18n_app_conjugate_title, + R.string.i18n_app_conjugate_title_alt_text, ) /** @@ -40,7 +43,8 @@ sealed class BottomBarScreen( data object Settings : BottomBarScreen( Screen.Settings.route, R.drawable.material_settings, - "Settings", + R.string.i18n_app_settings_title, + R.string.i18n_app_settings_title_alt_text, ) /** @@ -49,7 +53,8 @@ sealed class BottomBarScreen( data object About : BottomBarScreen( Screen.About.route, R.drawable.material_info, - "About", + R.string.i18n_app_about_title, + R.string.i18n_app_about_title_alt_text, ) companion object { diff --git a/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt b/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt index 28cb39df4..0b52bfabe 100644 --- a/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt +++ b/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt @@ -23,6 +23,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.res.colorResource 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 be.scri.R @@ -65,13 +66,13 @@ fun ScribeBottomBar( id = item.icon, ), tint = color, - contentDescription = item.label, + contentDescription = stringResource(id = item.altTextRes), modifier = Modifier.size(iconSize), ) }, label = { Text( - text = item.label, + text = stringResource(id = item.labelRes), style = MaterialTheme.typography.labelSmall.copy( fontWeight = if (isSelected) FontWeight.ExtraBold else FontWeight.W600, diff --git a/app/src/main/java/be/scri/ui/common/components/AboutPageItemComp.kt b/app/src/main/java/be/scri/ui/common/components/AboutPageItemComp.kt index 754379f5c..4bc29fc63 100644 --- a/app/src/main/java/be/scri/ui/common/components/AboutPageItemComp.kt +++ b/app/src/main/java/be/scri/ui/common/components/AboutPageItemComp.kt @@ -21,6 +21,8 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.res.painterResource +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.dp import be.scri.R @@ -34,12 +36,19 @@ fun AboutPageItemComp( trailingIcon: Int, onClick: () -> Unit, modifier: Modifier = Modifier, + altText: String? = null, ) { + val semanticsModifier = + altText?.let { text -> + Modifier.semantics(mergeDescendants = true) { contentDescription = text } + } ?: Modifier + Box( modifier = modifier .fillMaxWidth() - .clickable(onClick = onClick), + .clickable(onClick = onClick) + .then(semanticsModifier), ) { Row( modifier = diff --git a/app/src/main/java/be/scri/ui/common/components/ClickableItemComp.kt b/app/src/main/java/be/scri/ui/common/components/ClickableItemComp.kt index 918818716..bc720fbe3 100644 --- a/app/src/main/java/be/scri/ui/common/components/ClickableItemComp.kt +++ b/app/src/main/java/be/scri/ui/common/components/ClickableItemComp.kt @@ -19,6 +19,9 @@ 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.semantics.contentDescription +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.dp import be.scri.R @@ -31,12 +34,19 @@ fun ClickableItemComp( onClick: () -> Unit, modifier: Modifier = Modifier, desc: String? = null, + altText: String? = null, ) { + val semanticsModifier = + altText?.let { text -> + Modifier.semantics(mergeDescendants = true) { contentDescription = text } + } ?: Modifier + Box( modifier = modifier .fillMaxWidth() - .clickable(onClick = onClick), + .clickable(onClick = onClick) + .then(semanticsModifier), ) { Column( modifier = @@ -64,7 +74,7 @@ fun ClickableItemComp( .padding(start = 6.dp) .size(17.dp), tint = MaterialTheme.colorScheme.onSurface, - contentDescription = "Right Arrow", + contentDescription = stringResource(R.string.i18n_app_accessibility_right_arrow), ) } diff --git a/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt b/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt index a92656c75..d92e4ab45 100644 --- a/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt +++ b/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt @@ -43,6 +43,7 @@ fun ItemsCardContainer( ClickableItemComp( title = stringResource(item.title), desc = item.desc?.let { stringResource(it) }, + altText = item.altText?.let { stringResource(it) }, onClick = item.action, ) } @@ -51,6 +52,7 @@ fun ItemsCardContainer( SwitchableItemComp( title = stringResource(item.title), desc = stringResource(item.desc), + altText = item.altText?.let { stringResource(it) }, isChecked = item.state, onCheckedChange = item.onToggle, ) @@ -62,6 +64,7 @@ fun ItemsCardContainer( is ScribeItem.ExternalLinkItem -> { AboutPageItemComp( title = stringResource(item.title), + altText = item.altText?.let { stringResource(it) }, leadingIcon = item.leadingIcon, trailingIcon = item.trailingIcon, onClick = item.onClick, diff --git a/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt b/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt index df2b02394..e785a8c52 100644 --- a/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt +++ b/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt @@ -21,6 +21,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.semantics.Role +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.unit.dp import be.scri.ui.screens.Alpha @@ -34,12 +36,18 @@ fun SwitchableItemComp( onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, desc: String? = null, + altText: String? = null, ) { val checkedThumbColor = MaterialTheme.colorScheme.primary val uncheckedThumbColor = MaterialTheme.colorScheme.tertiaryContainer val checkedTrackColor = MaterialTheme.colorScheme.tertiary val uncheckedTrackColor = MaterialTheme.colorScheme.outlineVariant + val semanticsModifier = + altText?.let { text -> + Modifier.semantics(mergeDescendants = true) { contentDescription = text } + } ?: Modifier + Column( modifier = modifier @@ -47,7 +55,8 @@ fun SwitchableItemComp( value = isChecked, onValueChange = onCheckedChange, role = Role.Switch, - ).padding(horizontal = 12.dp, vertical = 10.dp), + ).padding(horizontal = 12.dp, vertical = 10.dp) + .then(semanticsModifier), ) { Row( verticalAlignment = Alignment.CenterVertically, diff --git a/app/src/main/java/be/scri/ui/models/ScribeItem.kt b/app/src/main/java/be/scri/ui/models/ScribeItem.kt index 7b2b174b9..c52eaee9c 100644 --- a/app/src/main/java/be/scri/ui/models/ScribeItem.kt +++ b/app/src/main/java/be/scri/ui/models/ScribeItem.kt @@ -8,6 +8,7 @@ import androidx.annotation.DrawableRes sealed class ScribeItem( open val title: Int, open val desc: Int?, + open val altText: Int? = null, ) { /** * Represents a clickable item in the Scribe UI, typically used for actions like navigation or @@ -23,8 +24,9 @@ sealed class ScribeItem( data class ClickableItem( override val title: Int, override val desc: Int? = null, + override val altText: Int? = null, val action: () -> Unit, - ) : ScribeItem(title, desc) + ) : ScribeItem(title, desc, altText) /** * Represents a toggleable switch item in the Scribe UI. @@ -41,9 +43,10 @@ sealed class ScribeItem( data class SwitchItem( override val title: Int, override val desc: Int, + override val altText: Int? = null, val state: Boolean, val onToggle: (Boolean) -> Unit, - ) : ScribeItem(title, desc) + ) : ScribeItem(title, desc, altText) /** * Represents an external link item in the Scribe UI. @@ -61,11 +64,12 @@ sealed class ScribeItem( data class ExternalLinkItem( override val title: Int, override val desc: Int? = null, + override val altText: Int? = null, @DrawableRes val leadingIcon: Int, @DrawableRes val trailingIcon: Int, val url: String?, val onClick: () -> Unit, - ) : ScribeItem(title, desc) + ) : ScribeItem(title, desc, altText) /** * Represents a custom item in the Scribe UI. @@ -79,6 +83,7 @@ sealed class ScribeItem( data class CustomItem( override val title: Int, override val desc: Int, + override val altText: Int? = null, val customAction: (Any?) -> Unit, - ) : ScribeItem(title, desc) + ) : ScribeItem(title, desc, altText) } diff --git a/app/src/main/java/be/scri/ui/screens/ConjugateScreen.kt b/app/src/main/java/be/scri/ui/screens/ConjugateScreen.kt index 37a53ca74..f060ad94d 100644 --- a/app/src/main/java/be/scri/ui/screens/ConjugateScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/ConjugateScreen.kt @@ -143,7 +143,7 @@ fun ConjugateScreen( ) { Image( painter = painterResource(id = R.drawable.ic_search_vector), - contentDescription = "Search", + contentDescription = stringResource(R.string.i18n_app_accessibility_search), colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimary), modifier = Modifier.size(Dimensions.IconSize), ) @@ -183,7 +183,7 @@ fun ConjugateScreen( if (searchQuery.isNotEmpty()) { Image( painter = painterResource(id = R.drawable.close), - contentDescription = "Clear", + contentDescription = stringResource(R.string.i18n_app_accessibility_clear), colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimary), modifier = Modifier @@ -195,7 +195,7 @@ fun ConjugateScreen( Image( painter = painterResource(id = R.drawable.play_button), - contentDescription = "Play button", + contentDescription = stringResource(R.string.i18n_app_accessibility_play_button), colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimary), modifier = Modifier @@ -242,7 +242,7 @@ fun ConjugateScreen( ) Image( painter = painterResource(id = R.drawable.right_arrow), - contentDescription = "Right Arrow", + contentDescription = stringResource(R.string.i18n_app_accessibility_right_arrow), modifier = Modifier .size(Dimensions.IconSize) @@ -339,7 +339,7 @@ fun ConjugateScreen( ) Image( painter = painterResource(R.drawable.right_arrow), - contentDescription = "Right Arrow", + contentDescription = stringResource(R.string.i18n_app_accessibility_right_arrow), modifier = Modifier .size(Dimensions.IconSize) @@ -398,7 +398,7 @@ fun ConjugateScreen( ) Image( painter = painterResource(R.drawable.right_arrow), - contentDescription = "Right Arrow", + contentDescription = stringResource(R.string.i18n_app_accessibility_right_arrow), modifier = Modifier .size(Dimensions.IconSize) @@ -471,7 +471,7 @@ fun ConjugateScreen( ) Image( painter = painterResource(id = R.drawable.right_arrow), - contentDescription = "Right Arrow", + contentDescription = stringResource(R.string.i18n_app_accessibility_right_arrow), modifier = Modifier .size(Dimensions.IconSize) diff --git a/app/src/main/java/be/scri/ui/screens/ConjugationSelectionScreen.kt b/app/src/main/java/be/scri/ui/screens/ConjugationSelectionScreen.kt index c147713af..92a50c962 100644 --- a/app/src/main/java/be/scri/ui/screens/ConjugationSelectionScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/ConjugationSelectionScreen.kt @@ -187,7 +187,7 @@ fun ConjugationSelectionScreen( ) Image( painter = painterResource(id = R.drawable.ic_tab_rounded), - contentDescription = "Expand tenses", + contentDescription = stringResource(R.string.i18n_app_accessibility_expand_tenses), colorFilter = ColorFilter.tint(Color.Black), modifier = Modifier.size(18.dp), ) @@ -234,7 +234,7 @@ fun ConjugationSelectionScreen( contentAlignment = Alignment.Center, ) { Text( - text = "Data not present in Wikidata", + text = stringResource(R.string.i18n_app_conjugate_data_not_present_in_wikidata), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f), ) @@ -269,7 +269,7 @@ fun ConjugationSelectionScreen( contentAlignment = Alignment.Center, ) { Text( - text = "Loading conjugation tables...", + text = stringResource(R.string.i18n_app_conjugate_loading_tables), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f), ) @@ -467,7 +467,7 @@ private fun ConjugationCell( ) Image( painter = painterResource(id = R.drawable.ic_clipboard_vector), - contentDescription = "Copy conjugation", + contentDescription = stringResource(R.string.i18n_app_accessibility_copy_conjugation), colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface.copy(alpha = 0.4f)), modifier = Modifier diff --git a/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt b/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt index 898b6cac6..1b78091c3 100644 --- a/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt @@ -191,7 +191,7 @@ fun InstallationScreen( ) Image( painter = painterResource(resource), - contentDescription = "Select Keyboard", + contentDescription = stringResource(R.string.i18n_app_installation_select_keyboard_icon_description), modifier = Modifier .size(30.dp) @@ -289,7 +289,7 @@ fun InstallationScreen( ) Image( painter = painterResource(R.drawable.right_arrow), - contentDescription = "Right Arrow", + contentDescription = stringResource(R.string.i18n_app_accessibility_right_arrow), modifier = Modifier .size(Dimensions.IconSize) diff --git a/app/src/main/java/be/scri/ui/screens/WikimediaScreen.kt b/app/src/main/java/be/scri/ui/screens/WikimediaScreen.kt index aed46683e..6f238dbee 100644 --- a/app/src/main/java/be/scri/ui/screens/WikimediaScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/WikimediaScreen.kt @@ -52,12 +52,12 @@ fun WikimediaScreen( ) { Column(modifier = Modifier.padding(16.dp)) { Text( - text = stringResource(id = R.string.scribe_key), + text = stringResource(id = R.string.i18n_app_keyboard_scribe_key), style = MaterialTheme.typography.bodyMedium, ) Image( imageVector = ImageVector.vectorResource(R.drawable.wikidata_logo), - contentDescription = stringResource(R.string.wikimedia_logo), + contentDescription = stringResource(R.string.i18n_app_accessibility_wikimedia_logo), modifier = Modifier .align(Alignment.CenterHorizontally) @@ -72,7 +72,7 @@ fun WikimediaScreen( ) Image( imageVector = ImageVector.vectorResource(id = R.drawable.wikipedia_logo), - contentDescription = stringResource(R.string.wikimedia_logo), + contentDescription = stringResource(R.string.i18n_app_accessibility_wikimedia_logo), modifier = Modifier .align(Alignment.CenterHorizontally) diff --git a/app/src/main/java/be/scri/ui/screens/about/AboutUtil.kt b/app/src/main/java/be/scri/ui/screens/about/AboutUtil.kt index 46ebf7ba5..6eb6e342b 100644 --- a/app/src/main/java/be/scri/ui/screens/about/AboutUtil.kt +++ b/app/src/main/java/be/scri/ui/screens/about/AboutUtil.kt @@ -94,11 +94,13 @@ fun getLegalItemSpecs(): List = LegalItemSpec( icon = R.drawable.shield_lock, title = R.string.i18n__global_privacy_policy, + altText = R.string.i18n__global_privacy_policy, destination = Destination.PrivacyPolicy, ), LegalItemSpec( icon = R.drawable.license_icon, title = R.string.i18n_app_about_legal_third_party, + altText = R.string.i18n_app_about_legal_third_party, destination = Destination.ThirdPartyLicenses, ), ) @@ -191,6 +193,7 @@ fun feedbackAndSupportList( data class LegalItemSpec( val icon: Int, val title: Int, + val altText: Int, val destination: Destination, ) @@ -331,6 +334,7 @@ object AboutUtil { ScribeItem.ExternalLinkItem( leadingIcon = spec.icon, title = spec.title, + altText = spec.altText, trailingIcon = R.drawable.right_arrow, url = null, onClick = clickHandler, diff --git a/app/src/main/java/be/scri/ui/screens/settings/SettingsUtil.kt b/app/src/main/java/be/scri/ui/screens/settings/SettingsUtil.kt index b47eae150..5f31592e0 100644 --- a/app/src/main/java/be/scri/ui/screens/settings/SettingsUtil.kt +++ b/app/src/main/java/be/scri/ui/screens/settings/SettingsUtil.kt @@ -125,7 +125,7 @@ object SettingsUtil { "Russian" -> R.string.i18n_app__global_russian "Spanish" -> R.string.i18n_app__global_spanish "Swedish" -> R.string.i18n_app__global_swedish - else -> return R.string.language + else -> return R.string.i18n_app_settings_menu_app_language } } } diff --git a/app/src/main/java/be/scri/ui/screens/tutorial/TutorialHomeScreen.kt b/app/src/main/java/be/scri/ui/screens/tutorial/TutorialHomeScreen.kt index c566ab619..f92e4e42d 100644 --- a/app/src/main/java/be/scri/ui/screens/tutorial/TutorialHomeScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/tutorial/TutorialHomeScreen.kt @@ -83,7 +83,7 @@ fun TutorialHomeScreen( ) { Icon( imageVector = Icons.AutoMirrored.Filled.KeyboardArrowLeft, - contentDescription = "Back", + contentDescription = stringResource(R.string.i18n_app_accessibility_back), tint = MaterialTheme.colorScheme.onBackground, modifier = Modifier.size(24.dp), ) diff --git a/app/src/main/java/be/scri/ui/screens/tutorial/TutorialStepScreen.kt b/app/src/main/java/be/scri/ui/screens/tutorial/TutorialStepScreen.kt index 77cef7730..e70242a31 100644 --- a/app/src/main/java/be/scri/ui/screens/tutorial/TutorialStepScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/tutorial/TutorialStepScreen.kt @@ -205,7 +205,7 @@ fun TutorialStepScreen( ) { Icon( imageVector = Icons.AutoMirrored.Filled.KeyboardArrowLeft, - contentDescription = "Back", + contentDescription = stringResource(R.string.i18n_app_accessibility_back), tint = headerColor, modifier = Modifier.size(24.dp), ) diff --git a/app/src/main/java/be/scri/ui/screens/tutorial/WrongKeyboardScreen.kt b/app/src/main/java/be/scri/ui/screens/tutorial/WrongKeyboardScreen.kt index 894b9276f..03ba51359 100644 --- a/app/src/main/java/be/scri/ui/screens/tutorial/WrongKeyboardScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/tutorial/WrongKeyboardScreen.kt @@ -97,7 +97,7 @@ fun WrongKeyboardScreen( ) { Icon( imageVector = Icons.AutoMirrored.Filled.KeyboardArrowLeft, - contentDescription = "Back", + contentDescription = stringResource(R.string.i18n_app_accessibility_back), tint = headerColor, modifier = Modifier.size(24.dp), ) diff --git a/app/src/main/java/be/scri/views/KeyboardView.kt b/app/src/main/java/be/scri/views/KeyboardView.kt index 807c80fcb..8efcf3f7f 100644 --- a/app/src/main/java/be/scri/views/KeyboardView.kt +++ b/app/src/main/java/be/scri/views/KeyboardView.kt @@ -1345,10 +1345,10 @@ class KeyboardView onInitializeAccessibilityEvent(event) val text: String = when (code) { - KEYCODE_DELETE -> context.getString(R.string.keycode_delete) - KEYCODE_ENTER -> context.getString(R.string.keycode_enter) - KEYCODE_MODE_CHANGE -> context.getString(R.string.keycode_mode_change) - KEYCODE_SHIFT -> context.getString(R.string.keycode_shift) + KEYCODE_DELETE -> context.getString(R.string.i18n_app__global_delete) + KEYCODE_ENTER -> context.getString(R.string.i18n_app_keyboard_enter) + KEYCODE_MODE_CHANGE -> context.getString(R.string.i18n_app_keyboard_change_keyboard_type) + KEYCODE_SHIFT -> context.getString(R.string.i18n_app_keyboard_shift) else -> code.toChar().toString() } event.text.add(text) diff --git a/app/src/main/res/layout-land/keyboard_view_keyboard.xml b/app/src/main/res/layout-land/keyboard_view_keyboard.xml index a583d956b..85734c5e3 100644 --- a/app/src/main/res/layout-land/keyboard_view_keyboard.xml +++ b/app/src/main/res/layout-land/keyboard_view_keyboard.xml @@ -20,7 +20,7 @@ android:layout_height="36dp" android:layout_marginStart="@dimen/small_margin" android:background="@drawable/scribe_key_background_left_rounded" - android:contentDescription="@string/scribe_key" + android:contentDescription="@string/i18n.app.keyboard.scribe_key" android:foreground="@drawable/close" android:foregroundGravity="center" android:foregroundTint="@color/light_key_text_color" @@ -72,7 +72,7 @@ android:layout_height="match_parent" android:background="@android:color/transparent" android:backgroundTint="@null" - android:contentDescription="@string/command_bar" + android:contentDescription="@string/i18n.app.keyboard.command_bar" android:cursorVisible="true" android:inputType="text" android:paddingTop="4dp" diff --git a/app/src/main/res/layout/input_method_view.xml b/app/src/main/res/layout/input_method_view.xml index 475bc678a..c2a95e55b 100644 --- a/app/src/main/res/layout/input_method_view.xml +++ b/app/src/main/res/layout/input_method_view.xml @@ -118,7 +118,7 @@ GeneralKeyboardIME.kt android:layout_centerVertical="true" android:layout_marginEnd="@dimen/medium_margin" android:background="@drawable/keyboard_key_selector" - android:contentDescription="@string/delete" + android:contentDescription="@string/i18n.app._global.delete" android:src="@drawable/emoji_backspace" /> @@ -149,7 +149,7 @@ GeneralKeyboardIME.kt android:layout_marginStart="@dimen/small_margin" android:background="@drawable/cmd_key_background_rounded" android:backgroundTint="@color/theme_scribe_blue" - android:contentDescription="@string/scribe_key" + android:contentDescription="@string/i18n.app.keyboard.scribe_key" android:drawablePadding="100dp" android:foreground="@drawable/ic_scribe_icon_vector" android:foregroundGravity="center" @@ -180,7 +180,7 @@ GeneralKeyboardIME.kt android:layout_height="@dimen/command_button_height" android:layout_marginStart="4dp" android:background="@drawable/cmd_key_background_rounded" - android:contentDescription="@string/command_bar" + android:contentDescription="@string/i18n.app.keyboard.command_bar" android:textColor="@color/white" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/separator_2" @@ -206,7 +206,7 @@ GeneralKeyboardIME.kt android:layout_width="0dp" android:layout_height="@dimen/command_button_height" android:background="@drawable/cmd_key_background_rounded" - android:contentDescription="@string/command_bar" + android:contentDescription="@string/i18n.app.keyboard.command_bar" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/separator_3" app:layout_constraintStart_toEndOf="@+id/separator_2" @@ -232,7 +232,7 @@ GeneralKeyboardIME.kt android:layout_height="@dimen/command_button_height" android:layout_marginEnd="@dimen/tiny_margin" android:background="@drawable/cmd_key_background_rounded" - android:contentDescription="@string/command_bar" + android:contentDescription="@string/i18n.app.keyboard.command_bar" android:visibility="visible" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -452,7 +452,7 @@ GeneralKeyboardIME.kt android:layout_marginStart="@dimen/small_margin" android:background="@drawable/scribe_key_background_left_rounded" android:backgroundTint="@color/theme_scribe_blue" - android:contentDescription="@string/scribe_key" + android:contentDescription="@string/i18n.app.keyboard.scribe_key" android:foreground="@drawable/close" android:foregroundGravity="center" android:foregroundTint="@color/light_key_text_color" @@ -500,7 +500,7 @@ GeneralKeyboardIME.kt android:layout_height="match_parent" android:background="@android:color/transparent" android:backgroundTint="@null" - android:contentDescription="@string/command_bar" + android:contentDescription="@string/i18n.app.keyboard.command_bar" android:cursorVisible="false" android:inputType="text" android:paddingTop="4dp" @@ -552,7 +552,7 @@ GeneralKeyboardIME.kt android:layout_marginTop="4dp" android:background="@drawable/scribe_key_background_left_rounded" android:backgroundTint="@color/theme_scribe_blue" - android:contentDescription="@string/scribe_key" + android:contentDescription="@string/i18n.app.keyboard.scribe_key" android:foreground="@drawable/close" android:foregroundGravity="center" android:foregroundTint="@color/light_key_text_color" @@ -788,7 +788,7 @@ GeneralKeyboardIME.kt android:layout_centerVertical="true" android:layout_marginEnd="@dimen/medium_margin" android:background="?android:attr/selectableItemBackgroundBorderless" - android:contentDescription="@string/i18n.app.clipboard.clear_all" + android:contentDescription="@string/i18n.app._global.clear_all" android:padding="@dimen/small_margin" android:src="@drawable/ic_delete_vector" android:tint="#E53935" /> diff --git a/app/src/main/res/values-ml/string.xml b/app/src/main/res/values-ml/string.xml index 4a51beba7..d5290478c 100644 --- a/app/src/main/res/values-ml/string.xml +++ b/app/src/main/res/values-ml/string.xml @@ -1,10 +1,24 @@ കുറിച്ച് + ആൻഡ്രോയിഡ് മാറ്റങ്ങളുടെ ലോഗ് + ലഭ്യമായ ഡാറ്റ + ബ്ലോഗ് പോസ്റ്റുകൾ + മാറ്റങ്ങളുടെ ലോഗ് + കോൺജുഗേറ്റ് ആപ്പുകൾ ഇൻഫ്രാസ്ട്രക്ചർ + ഡാറ്റാ സെർവർ മുദ്ര + ഐ.ഒ.എസ് മാറ്റങ്ങളുടെ ലോഗ് + കീബോർഡ് ആപ്പുകൾ കൂടുതൽ അറിയുക + നിയമപരം + ഞങ്ങളുടെ സമൂഹം സ്വകാര്യതാ നയം പിന്തുണക്കാർ വ്യാപാരമുദ്ര നയം + പരിശോധിക്കുക + എല്ലാം മായ്‌ക്കുക + സ്ഥിരീകരണം + ഇല്ലാതാക്കുക diff --git a/app/src/main/res/values/string.xml b/app/src/main/res/values/string.xml index b1f24461c..8947637a4 100644 --- a/app/src/main/res/values/string.xml +++ b/app/src/main/res/values/string.xml @@ -18,10 +18,16 @@ Support Scribe Supporters Trademark Policy + Check + Clear all + Confirmation + Delete + Download Download data English French German + Hint Indonesian Italian Norwegian @@ -58,7 +64,17 @@ Simple Keyboard\n• Author: Simple Mobile Tools\n• License: GPL-3.0\n• Link: https://github.com/SimpleMobileTools/Simple-Keyboard/blob/main/LICENSE The Scribe developers (SCRIBE) built the iOS application "Scribe - Language Keyboards" (SERVICE) using third party code. All source code used in the creation of this SERVICE comes from sources that allow its full use in the manner done so by the SERVICE. This section lists the source code on which the SERVICE was based as well as the coinciding licenses of each.\n\nThe following is a list of all used source code, the main author or authors of the code, the license under which it was released at time of usage, and a link to the license. About - Clear all + Navigate to the About tab. + Back + Clear + Copy conjugation + Expand tenses + Leading icon + Play button + Right Arrow + Search + Trailing icon + Wikimedia Logo Clipboard is empty Close clipboard Copied to clipboard @@ -67,8 +83,11 @@ Download verb data with the menu below to start conjugating verbs. Select tense Choose a conjugation below + Data not present in Wikidata + Loading conjugation tables... Recently conjugated Conjugate + Navigate to the Conjugate tab. Data not in Wikidata Search for verbs Conjugate verbs @@ -78,9 +97,9 @@ Invalid server response Invalid URL Network error: {error} + No internet connection. Please connect and try again. Server error: {code} Download timed out - No internet connection. Please connect and try again. Add new data to Scribe Conjugate. Download verb data Download data to start conjugating! @@ -115,17 +134,32 @@ When typing, press to select keyboards Keyboard installation + the Select Keyboard icon Installation + Navigate to the Installation tab. + Change keyboard type + Command Bar + Enter + Scribe Key + Shift + Suggestion Tutorial chapters This quick tutorial will show you how to use Scribe to support writing in your second language.\nMake sure you select the desired Scribe keyboard by pressing 🌐 when typing. Finish tutorial Next + Non-Scribe Keyboard Not quite! Try writing {expected_word}. Noun annotation + Write the word "{mother_word}". Notice the word suggestions that appear on the keyboard\'s top bar.\n\nThen, press space. You will see the word\'s gender tag on the keyboard\'s top bar – in this case, "{mother_tag}" for {mother_gender}. + Now write the word "{father_word}" and then press space. The gender tag will be "{father_tag}", for {father_gender}. Noun plurals + Scribe can easily find the plural of any noun that Wikidata has. Tap the pencil-like Scribe key on the top-left corner of your keyboard, and select {plural}.\n\nThen write the noun you want the plural for, press ▶, and the plural will be returned to you. + Press the 🌐 button to select a Scribe keyboard. Start full tutorial Verb conjugation + Scribe can conjugate any verb on Wikidata! Tap the pencil-like Scribe key on the top-left corner of your keyboard, and select {conjugate}.\n\nWrite the verb you want to conjugate, press ▶, and your will see a table with all the verb tenses. Select the one you need and it will be inserted! Word translation + Let\'s translate with Wiktionary translations! Tap the pencil-like Scribe key on the top-left corner of your keyboard, and select {translate}.\n\nThen write the word you want to translate, press ▶, and the translation will be returned to you. Install keyboards Settings for the app\'s language and interface are found here. Annotate suggest/complete @@ -187,6 +221,7 @@ You are selecting a theme that goes against your system default. Are you sure you want to proceed? Theme override Settings + Navigate to the Settings tab. Translation Check out Scribe Conjugate! Share Scribe Conjugate via... diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 38134b505..f2d1d4114 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,16 +1,6 @@ - Scribe Key - Command Bar Scribe - Suggestion - Wikimedia Logo - Delete - Language - Shift - Enter - Delete - Change keyboard type