mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 08:36:26 +00:00
clearly show when a subtype is custom in languages & layouts
This commit is contained in:
parent
27e2a6f584
commit
999c900f7f
2 changed files with 8 additions and 3 deletions
|
@ -89,9 +89,12 @@ fun LanguageScreen(
|
|||
var showNoDictDialog by remember { mutableStateOf(false) }
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(item.displayName(ctx), style = MaterialTheme.typography.bodyLarge)
|
||||
val description = item.getExtraValueOf(ExtraValue.SECONDARY_LOCALES)?.split(Separators.KV)
|
||||
?.joinToString(", ") { it.constructLocale().localizedDisplayName(ctx) }
|
||||
if (description != null) // todo: description should clarify when it's a default subtype that can't be changed / will be cloned
|
||||
val description = if (SubtypeSettings.isAdditionalSubtype(item)) {
|
||||
val secondaryLocales = item.getExtraValueOf(ExtraValue.SECONDARY_LOCALES)?.split(Separators.KV)
|
||||
?.joinToString(", ") { it.constructLocale().localizedDisplayName(ctx) }
|
||||
stringResource(R.string.custom_subtype) + (secondaryLocales?.let { "\n$it" } ?: "")
|
||||
} else null
|
||||
if (description != null)
|
||||
Text(
|
||||
text = description,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
|
|
|
@ -1005,4 +1005,6 @@ New dictionary:
|
|||
<string name="delete_confirmation">Really delete %s?</string>
|
||||
<!-- Message when chosen name is invalid (empty or already taken) -->
|
||||
<string name="name_invalid">Invalid name</string>
|
||||
<!-- Description indicating a subtype in Locales & Layouts has customizations -->
|
||||
<string name="custom_subtype">Custom subtype</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Reference in a new issue