diff --git a/amethyst/build.gradle.kts b/amethyst/build.gradle.kts index 63cf319a46..05fb30ef20 100644 --- a/amethyst/build.gradle.kts +++ b/amethyst/build.gradle.kts @@ -391,6 +391,10 @@ dependencies { implementation(project(":commons")) implementation(project(":nestsClient")) implementation(project(":nappletHost")) + // Compose Multiplatform resources runtime, so app-side screens that share a + // string with a commons renderer can read commons' generated `Res` directly + // instead of duplicating the key in the Android res tree. + implementation(libs.jetbrains.compose.components.resources) implementation(libs.androidx.core.ktx) implementation(libs.androidx.activity.compose) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/authoring/V4VSplitEditor.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/authoring/V4VSplitEditor.kt index 7a9c5648ba..087bc4368b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/authoring/V4VSplitEditor.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/podcasts/authoring/V4VSplitEditor.kt @@ -54,6 +54,8 @@ import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols import com.vitorpamplona.amethyst.commons.podcasts.RecipientDraft import com.vitorpamplona.amethyst.commons.podcasts.V4VSplitEditorState +import com.vitorpamplona.amethyst.commons.resources.Res +import com.vitorpamplona.amethyst.commons.resources.podcast_value_split_percent import com.vitorpamplona.amethyst.ui.note.BaseUserPicture import com.vitorpamplona.amethyst.ui.note.UsernameDisplay import com.vitorpamplona.amethyst.ui.note.creators.userSuggestions.ShowUserSuggestionList @@ -63,6 +65,7 @@ import com.vitorpamplona.amethyst.ui.stringRes import com.vitorpamplona.amethyst.ui.theme.Size40dp import com.vitorpamplona.amethyst.ui.theme.SuggestionListDefaultHeightPage import com.vitorpamplona.amethyst.ui.theme.grayText +import org.jetbrains.compose.resources.stringResource /** * Editor for a Podcasting-2.0 value-for-value split. Recipients are added the Amethyst-native way — @@ -186,7 +189,7 @@ private fun RecipientShell( Row(verticalAlignment = Alignment.CenterVertically) { content() Text( - text = stringRes(R.string.podcast_value_split_percent, percent), + text = stringResource(Res.string.podcast_value_split_percent, percent), style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.primary, @@ -254,7 +257,7 @@ private fun ManualRecipientCard( Row(verticalAlignment = Alignment.CenterVertically) { Text( - text = stringRes(R.string.podcast_value_split_percent, percent), + text = stringResource(Res.string.podcast_value_split_percent, percent), style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.primary, diff --git a/amethyst/src/main/res/values-cs/strings.xml b/amethyst/src/main/res/values-cs/strings.xml index ec234d7ecc..6a4e9ee93d 100644 --- a/amethyst/src/main/res/values-cs/strings.xml +++ b/amethyst/src/main/res/values-cs/strings.xml @@ -1222,7 +1222,6 @@ Přepis Kapitoly Value-for-Value - %1$d%% Moderátoři a hosté Nejlepší podporovatelé diff --git a/amethyst/src/main/res/values-fr-rFR/strings.xml b/amethyst/src/main/res/values-fr-rFR/strings.xml index 8de7a17d03..60163eccee 100644 --- a/amethyst/src/main/res/values-fr-rFR/strings.xml +++ b/amethyst/src/main/res/values-fr-rFR/strings.xml @@ -955,7 +955,6 @@ Transcription Chapitres Valeur-pour-valeur - %1$d%% Hôtes & invités Meilleurs supporters diff --git a/amethyst/src/main/res/values-hi-rIN/strings.xml b/amethyst/src/main/res/values-hi-rIN/strings.xml index 8d1959b5b3..d4e9185561 100644 --- a/amethyst/src/main/res/values-hi-rIN/strings.xml +++ b/amethyst/src/main/res/values-hi-rIN/strings.xml @@ -1099,7 +1099,6 @@ प्रतिलिपि अध्याय मूल्य के लिए मूल्य - %1$d प्रतिशतप्रतिशत निमन्त्रक तथा अभ्यागत ऊर्ध्वतम समर्थक diff --git a/amethyst/src/main/res/values-hu-rHU/strings.xml b/amethyst/src/main/res/values-hu-rHU/strings.xml index 8dad983e11..d9409d0e5e 100644 --- a/amethyst/src/main/res/values-hu-rHU/strings.xml +++ b/amethyst/src/main/res/values-hu-rHU/strings.xml @@ -1099,7 +1099,6 @@ Átírás Fejezetek Értéket az értékért - %1$d%% Házigazdák és vendégek Legfőbb támogatók diff --git a/amethyst/src/main/res/values-nl-rNL/strings.xml b/amethyst/src/main/res/values-nl-rNL/strings.xml index ba6ae4ee60..df99381a55 100644 --- a/amethyst/src/main/res/values-nl-rNL/strings.xml +++ b/amethyst/src/main/res/values-nl-rNL/strings.xml @@ -962,7 +962,6 @@ Transcript Hoofdstukken Value-for-Value - %1$d%% Hosts & gasten Topsupporters diff --git a/amethyst/src/main/res/values-pl-rPL/strings.xml b/amethyst/src/main/res/values-pl-rPL/strings.xml index dcecead7d6..9ceb3974e7 100644 --- a/amethyst/src/main/res/values-pl-rPL/strings.xml +++ b/amethyst/src/main/res/values-pl-rPL/strings.xml @@ -1222,7 +1222,6 @@ Zaplanowane posty z innych kont nie zostaną opublikowane, dopóki to konto jest Transkrypcja Rozdziały Wartość-za-wartość - %1$d%% Gospodarze & Goście Najwięksi darczyńcy diff --git a/amethyst/src/main/res/values-sl-rSI/strings.xml b/amethyst/src/main/res/values-sl-rSI/strings.xml index a9e52323a6..f14eca3ad3 100644 --- a/amethyst/src/main/res/values-sl-rSI/strings.xml +++ b/amethyst/src/main/res/values-sl-rSI/strings.xml @@ -1042,7 +1042,6 @@ Za podpisovanje se je potrebno prijaviti s privatnim ključem Prepis Poglavja Vrednost za vrednost - %1$d%% Gostitelji in Gostje Naj podporniki diff --git a/amethyst/src/main/res/values-zh-rCN/strings.xml b/amethyst/src/main/res/values-zh-rCN/strings.xml index 859d3f1468..8c8dcab42d 100644 --- a/amethyst/src/main/res/values-zh-rCN/strings.xml +++ b/amethyst/src/main/res/values-zh-rCN/strings.xml @@ -1085,7 +1085,6 @@ 文稿 章节 Value-for-Value - %1$d%% 主播 & 客串 顶级支持者 diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index 58cdfcaae8..858859eff6 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -1224,7 +1224,6 @@ Transcript Chapters Value-for-Value - %1$d%% Hosts & Guests Top Supporters