added I18n for new strings
This commit is contained in:
@@ -59,6 +59,8 @@ import androidx.compose.ui.semantics.stateDescription
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.ui.stringRes
|
||||
import com.vitorpamplona.amethyst.ui.theme.DividerThickness
|
||||
import com.vitorpamplona.amethyst.ui.theme.Font14SP
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
@@ -125,6 +127,8 @@ private fun BaseTextSpinner(
|
||||
"Dropdown menu, $currentText selected"
|
||||
}
|
||||
|
||||
val openDropdownLabel = stringRes(R.string.open_dropdown_menu)
|
||||
|
||||
Box(
|
||||
modifier = modifier,
|
||||
contentAlignment = Alignment.Center,
|
||||
@@ -146,7 +150,7 @@ private fun BaseTextSpinner(
|
||||
}.semantics {
|
||||
role = Role.DropdownList
|
||||
stateDescription = accessibilityDescription
|
||||
onClick(label = "Open dropdown menu") {
|
||||
onClick(label = openDropdownLabel) {
|
||||
optionsShowing = true
|
||||
focusRequester.requestFocus()
|
||||
return@onClick true
|
||||
@@ -227,6 +231,7 @@ fun <T> SpinnerSelectionDialog(
|
||||
}
|
||||
}
|
||||
itemsIndexed(options) { index, item ->
|
||||
val optionsOfLabel = stringRes(R.string.option_of, index + 1, options.size)
|
||||
Row(
|
||||
modifier =
|
||||
Modifier
|
||||
@@ -235,7 +240,7 @@ fun <T> SpinnerSelectionDialog(
|
||||
.padding(16.dp, 16.dp)
|
||||
.semantics {
|
||||
role = Role.Button
|
||||
contentDescription = "Option ${index + 1} of ${options.size}"
|
||||
contentDescription = optionsOfLabel
|
||||
},
|
||||
) {
|
||||
Column { onRenderItem(item) }
|
||||
|
||||
+2
-2
@@ -120,9 +120,9 @@ fun FeedFilterSpinner(
|
||||
|
||||
val accessibilityDescription =
|
||||
if (selected != null) {
|
||||
"Feed filter, $currentText selected"
|
||||
stringRes(R.string.feed_filter_selected, currentText)
|
||||
} else {
|
||||
"Feed filter, $selectAnOption"
|
||||
stringRes(R.string.feed_filter_select_an_option, selectAnOption)
|
||||
}
|
||||
|
||||
Box(
|
||||
|
||||
@@ -1231,4 +1231,8 @@
|
||||
<string name="dont_translate_from_description">Languages shown here will not be translated. Select a language to remove it and have it translated again.</string>
|
||||
<string name="pause">Pause</string>
|
||||
<string name="play">Play</string>
|
||||
<string name="open_dropdown_menu">Open dropdown menu</string>
|
||||
<string name="option_of">Option %1$s of %2$s</string>
|
||||
<string name="feed_filter_selected">Feed filter, %1$s selected</string>
|
||||
<string name="feed_filter_select_an_option">Feed filter, %1$s</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user