From 1a13ce3ad4903e63fcb29bc5713723c7b8043b48 Mon Sep 17 00:00:00 2001 From: davotoula Date: Fri, 8 May 2026 08:43:30 +0200 Subject: [PATCH] Convert scheduled-posts logout strings to --- .../drawer/AccountSwitchBottomSheet.kt | 18 ++++++++++++++++-- .../src/main/res/values-cs-rCZ/strings.xml | 14 ++++++++++++-- .../src/main/res/values-de-rDE/strings.xml | 10 ++++++++-- .../src/main/res/values-pt-rBR/strings.xml | 12 ++++++++++-- .../src/main/res/values-sv-rSE/strings.xml | 10 ++++++++-- amethyst/src/main/res/values/strings.xml | 10 ++++++++-- 6 files changed, 62 insertions(+), 12 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/AccountSwitchBottomSheet.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/AccountSwitchBottomSheet.kt index cd818fcd8..a91a29a47 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/AccountSwitchBottomSheet.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/AccountSwitchBottomSheet.kt @@ -47,6 +47,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp @@ -64,6 +65,7 @@ import com.vitorpamplona.amethyst.service.scheduledposts.ScheduledPostStatus import com.vitorpamplona.amethyst.ui.components.CreateTextWithEmoji import com.vitorpamplona.amethyst.ui.components.RobohashFallbackAsyncImage import com.vitorpamplona.amethyst.ui.note.toShortDisplay +import com.vitorpamplona.amethyst.ui.pluralStringRes import com.vitorpamplona.amethyst.ui.screen.AccountSessionManager import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedOff.AddAccountDialog @@ -289,7 +291,14 @@ private fun LogoutButton( title = { Text(text = stringRes(R.string.log_out)) }, text = { if (unpublishedCount > 0) { - Text(text = stringRes(R.string.scheduled_posts_logout_warning, unpublishedCount)) + Text( + text = + pluralStringResource( + id = R.plurals.scheduled_posts_logout_warning, + count = unpublishedCount, + unpublishedCount, + ), + ) } else { Text(text = stringRes(R.string.are_you_sure_you_want_to_log_out)) } @@ -309,7 +318,12 @@ private fun LogoutButton( accountSessionManager.logOff(acc) val toastMessage = if (confirmedCount > 0) { - stringRes(context, R.string.scheduled_posts_logout_toast, confirmedCount) + pluralStringRes( + context, + R.plurals.scheduled_posts_logout_toast, + confirmedCount, + confirmedCount, + ) } else { stringRes(context, R.string.scheduled_posts_logout_toast_zero) } diff --git a/amethyst/src/main/res/values-cs-rCZ/strings.xml b/amethyst/src/main/res/values-cs-rCZ/strings.xml index 49102e5fb..6cdb16d26 100644 --- a/amethyst/src/main/res/values-cs-rCZ/strings.xml +++ b/amethyst/src/main/res/values-cs-rCZ/strings.xml @@ -421,7 +421,12 @@ %1$s · před %2$s Zítra Odhlášeno - Odhlášeno · smazáno %1$d naplánovaných příspěvků + + Odhlášeno · smazán %d naplánovaný příspěvek + Odhlášeno · smazány %d naplánované příspěvky + Odhlášeno · smazáno %d naplánovaných příspěvků + Odhlášeno · smazáno %d naplánovaných příspěvků + Naplánovaný příspěvek publikován Naplánovaný příspěvek selhal Naplánované příspěvky @@ -435,7 +440,12 @@ Selhalo Odesláno Zrušeno - Máte %1$d naplánovaných příspěvků, které ještě nebyly publikovány. Odhlášením budou trvale smazány. + + Máte %d naplánovaný příspěvek, který ještě nebyl publikován. Odhlášením bude trvale smazán. + Máte %d naplánované příspěvky, které ještě nebyly publikovány. Odhlášením budou trvale smazány. + Máte %d naplánovaných příspěvků, které ještě nebyly publikovány. Odhlášením budou trvale smazány. + Máte %d naplánovaných příspěvků, které ještě nebyly publikovány. Odhlášením budou trvale smazány. + %d ve frontě %d ve frontě diff --git a/amethyst/src/main/res/values-de-rDE/strings.xml b/amethyst/src/main/res/values-de-rDE/strings.xml index efb889fe8..b8216e617 100644 --- a/amethyst/src/main/res/values-de-rDE/strings.xml +++ b/amethyst/src/main/res/values-de-rDE/strings.xml @@ -426,7 +426,10 @@ anz der Bedingungen ist erforderlich %1$s · vor %2$s Morgen Abgemeldet - Abgemeldet · %1$d geplante(n) Beitrag/Beiträge gelöscht + + Abgemeldet · %d geplanter Beitrag gelöscht + Abgemeldet · %d geplante Beiträge gelöscht + Geplanter Beitrag veröffentlicht Geplanter Beitrag fehlgeschlagen Geplante Beiträge @@ -440,7 +443,10 @@ anz der Bedingungen ist erforderlich Fehlgeschlagen Gesendet Abgebrochen - Du hast %1$d geplante(n) Beitrag/Beiträge, der/die noch nicht veröffentlicht wurden. Beim Abmelden werden sie dauerhaft gelöscht. + + Du hast %d geplanten Beitrag, der noch nicht veröffentlicht wurde. Beim Abmelden wird er dauerhaft gelöscht. + Du hast %d geplante Beiträge, die noch nicht veröffentlicht wurden. Beim Abmelden werden sie dauerhaft gelöscht. + %d in Warteschlange %d in Warteschlange diff --git a/amethyst/src/main/res/values-pt-rBR/strings.xml b/amethyst/src/main/res/values-pt-rBR/strings.xml index 03f91fa12..346f79584 100644 --- a/amethyst/src/main/res/values-pt-rBR/strings.xml +++ b/amethyst/src/main/res/values-pt-rBR/strings.xml @@ -421,7 +421,11 @@ %1$s · há %2$s Amanhã Desconectado - Desconectado · %1$d post(s) agendado(s) excluído(s) + + Desconectado · %d post agendado excluído + Desconectado · %d posts agendados excluídos + Desconectado · %d posts agendados excluídos + Post agendado publicado Post agendado falhou Posts agendados @@ -435,7 +439,11 @@ Falhou Enviado Cancelado - Você tem %1$d post(s) agendado(s) que ainda não foram publicados. Sair excluirá esses posts permanentemente. + + Você tem %d post agendado que ainda não foi publicado. Sair excluirá esse post permanentemente. + Você tem %d posts agendados que ainda não foram publicados. Sair excluirá esses posts permanentemente. + Você tem %d posts agendados que ainda não foram publicados. Sair excluirá esses posts permanentemente. + %d na fila %d na fila diff --git a/amethyst/src/main/res/values-sv-rSE/strings.xml b/amethyst/src/main/res/values-sv-rSE/strings.xml index 80a512213..bdf9bb78b 100644 --- a/amethyst/src/main/res/values-sv-rSE/strings.xml +++ b/amethyst/src/main/res/values-sv-rSE/strings.xml @@ -421,7 +421,10 @@ %1$s · för %2$s sedan Imorgon Utloggad - Utloggad · %1$d schemalagda inlägg raderade + + Utloggad · %d schemalagt inlägg raderat + Utloggad · %d schemalagda inlägg raderade + Schemalagt inlägg publicerat Schemalagt inlägg misslyckades Schemalagda inlägg @@ -435,7 +438,10 @@ Misslyckades Skickat Avbrutet - Du har %1$d schemalagda inlägg som inte har publicerats än. Att logga ut raderar dem permanent. + + Du har %d schemalagt inlägg som inte har publicerats än. Att logga ut raderar det permanent. + Du har %d schemalagda inlägg som inte har publicerats än. Att logga ut raderar dem permanent. + %d i kö %d i kö diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index 8d6f0b293..f5bc69a87 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -453,7 +453,10 @@ %1$s · %2$s ago Tomorrow Logged out - Logged out · %1$d scheduled post(s) deleted + + Logged out · %d scheduled post deleted + Logged out · %d scheduled posts deleted + Scheduled post published Scheduled post failed ScheduledPostsID @@ -468,7 +471,10 @@ Failed Sent Cancelled - You have %1$d scheduled post(s) that haven\'t been published yet. Logging out will permanently delete them. + + You have %d scheduled post that hasn\'t been published yet. Logging out will permanently delete it. + You have %d scheduled posts that haven\'t been published yet. Logging out will permanently delete them. + %d queued %d queued