Skip to content

Commit 84b87f8

Browse files
committed
Add Thunderbird website hyperlink on contribution screen
1 parent cc5cb25 commit 84b87f8

File tree

30 files changed

+109
-77
lines changed

30 files changed

+109
-77
lines changed

app-k9mail/src/main/res/values/constants.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
<string name="user_forum_url" translatable="false">https://forum.k9mail.app/</string>
55
<string name="funding_url" translatable="false">https://www.thunderbird.net/donate/mobile/?form=k9mail&amp;utm_source=%s&amp;utm_medium=android_app&amp;utm_campaign=inapp_appeal_v2</string>
66
<string name="message_header_mua" translatable="false">K-9 Mail for Android</string>
7+
<string name="thunderbird_website_domain" translatable="false">www.thunderbird.net</string>
8+
<string name="thunderbird_website_url" translatable="false">https://www.thunderbird.net</string>
79
</resources>

app-k9mail/src/main/res/values/funding_strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<string name="funding_googleplay_contribution_header_title">Support K-9 Mail</string>
66
<string name="funding_googleplay_contribution_header_description">We never show ads or sell your data. We are entirely funded by individual contributions from users like you. If you’re enjoying K-9 Mail, please help support it. We can’t do this without you!</string>
77
<string name="funding_googleplay_contribution_header_thank_you_message">Your contribution furthers the development of secure, private and open-source email. We are truly grateful to have you with us!</string>
8-
<string name="funding_googleplay_contribution_list_empty_message">K-9 Mail is developed by Thunderbird.\nVisit www.thunderbird.net for more ways to support our work.</string>
8+
<string name="funding_googleplay_contribution_list_empty_message">K-9 Mail is developed by Thunderbird.\nVisit <xliff:g id="link_text">%s</xliff:g> for more ways to support our work.</string>
99
<string name="funding_googleplay_contribution_reminder_title">Support K-9 Mail</string>
1010
<string name="funding_googleplay_contribution_reminder_statement">K-9 Mail is free and open source.</string>
1111
</resources>

feature/funding/googleplay/src/main/kotlin/app/k9mail/feature/funding/googleplay/ui/contribution/ContributionList.kt

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ import androidx.compose.runtime.remember
1515
import androidx.compose.ui.Alignment
1616
import androidx.compose.ui.Modifier
1717
import androidx.compose.ui.res.stringResource
18+
import androidx.compose.ui.text.LinkAnnotation
1819
import androidx.compose.ui.text.SpanStyle
1920
import androidx.compose.ui.text.buildAnnotatedString
2021
import androidx.compose.ui.text.font.FontStyle
22+
import androidx.compose.ui.text.style.TextDecoration
23+
import androidx.compose.ui.text.withLink
2124
import androidx.compose.ui.text.withStyle
25+
import app.k9mail.core.ui.compose.common.resources.annotatedStringResource
2226
import app.k9mail.core.ui.compose.designsystem.atom.Surface
2327
import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonText
2428
import app.k9mail.core.ui.compose.designsystem.atom.icon.Icon
@@ -205,13 +209,32 @@ private fun ListEmptyView(
205209
verticalArrangement = Arrangement.spacedBy(MainTheme.spacings.double),
206210
modifier = modifier.padding(vertical = MainTheme.spacings.double),
207211
) {
212+
val annotatedString = annotatedStringResource(
213+
id = R.string.funding_googleplay_contribution_list_empty_message,
214+
argument = buildAnnotatedString {
215+
withStyle(
216+
style = SpanStyle(
217+
color = MainTheme.colors.primary,
218+
textDecoration = TextDecoration.Underline,
219+
),
220+
) {
221+
withLink(
222+
LinkAnnotation.Url(
223+
url = stringResource(R.string.funding_googleplay_thunderbird_website_url),
224+
),
225+
) {
226+
append(stringResource(R.string.funding_googleplay_thunderbird_website_domain))
227+
}
228+
}
229+
},
230+
)
231+
208232
TextBodyMedium(
209233
text = stringResource(R.string.funding_googleplay_contribution_list_empty_title),
210234
)
211235

212-
// TODO The link needs to be clickable
213236
TextBodyMedium(
214-
text = stringResource(R.string.funding_googleplay_contribution_list_empty_message),
237+
text = annotatedString,
215238
)
216239
}
217240
}

feature/funding/googleplay/src/main/res/values-ca/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="funding_googleplay_contribution_list_title">Contribució segura</string>
44
<string name="funding_googleplay_contribution_title">Dóna suport a Thunderbird</string>
55
<string name="funding_googleplay_contribution_list_type_one_time">Donació única</string>
@@ -11,7 +11,7 @@
1111
<string name="funding_googleplay_contribution_list_type_none_available">Cap disponible</string>
1212
<string name="funding_googleplay_contribution_list_disclaimer">Les contribucions no són deduïbles fiscalment com a donacions benèfiques.</string>
1313
<string name="funding_googleplay_contribution_footer_manage_button">Modifica el pagament mensual</string>
14-
<string name="funding_googleplay_contribution_list_empty_message">Visiteu www.thunderbird.net per obtenir més maneres de donar suport al Thunderbird</string>
14+
<string name="funding_googleplay_contribution_list_empty_message">Visiteu <xliff:g id="link_text">%s</xliff:g> per obtenir més maneres de donar suport al Thunderbird.</string>
1515
<string name="funding_googleplay_contribution_list_empty_title">Actualment, les contribucions des de l\'aplicació no estan disponibles.</string>
1616
<string name="funding_googleplay_contribution_error_show_more">Mostra més detalls</string>
1717
<string name="funding_googleplay_contribution_error_unknown">Error desconegut</string>
@@ -28,4 +28,4 @@
2828
<string name="funding_googleplay_contribution_footer_payment_unavailable_button">El pagament no està disponible en aquests moments</string>
2929
<string name="funding_googleplay_contribution_error_dismiss_button">Ignora l\'error</string>
3030
<string name="funding_googleplay_contribution_tfa_onetime_xs_description">El vostre suport ens fa avançar! Fins i tot les contribucions més petites generen un canvi, i estem molt agraïts de tenir-vos a bord.</string>
31-
</resources>
31+
</resources>

feature/funding/googleplay/src/main/res/values-co/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="funding_googleplay_contribution_header_title">Sustene Thunderbird</string>
44
<string name="funding_googleplay_contribution_list_title">Cuntribuzione assicurata</string>
55
<string name="funding_googleplay_contribution_list_type_one_time">Dà una volta</string>
@@ -8,7 +8,7 @@
88
<string name="funding_googleplay_contribution_footer_payment_button">Cuntinuà u pagamentu</string>
99
<string name="funding_googleplay_contribution_title">Sustene Thunderbird</string>
1010
<string name="funding_googleplay_contribution_list_empty_title">Ora, e cuntribuzioni ùn sò micca dispunibule via l’appiecazione.</string>
11-
<string name="funding_googleplay_contribution_list_empty_message">Visitate u situ www.thunderbird.net per cunnosce parechje manere di sustene Thunderbird</string>
11+
<string name="funding_googleplay_contribution_list_empty_message">Visitate u situ <xliff:g id="link_text">%s</xliff:g> per cunnosce parechje manere di sustene Thunderbird.</string>
1212
<string name="funding_googleplay_contribution_list_error_retry_button">Pruvà torna</string>
1313
<string name="funding_googleplay_contribution_footer_payment_unavailable_button">Pagamentu indispunibule attualmente</string>
1414
<string name="funding_googleplay_contribution_footer_manage_button">Mudificà u pagamentu misincu</string>
@@ -20,4 +20,4 @@
2020
<string name="funding_googleplay_contribution_error_service_disconnected">Ora, e cuntribuzioni ùn sò micca dispunibule.</string>
2121
<string name="funding_googleplay_contribution_header_description">Ùn affissemu alcuna publicità è un vindemu mai i vostri dati. Simu finanziati sanu sanu grazia à e cuntribuzioni da i nostri utilizatori. S’è Thunderbird vi piace, aiutateci à sustenelu. Ùn pudemu fà què senza voi !</string>
2222
<string name="funding_googleplay_contribution_list_disclaimer">E cuntribuzioni ùn ponu micca esse scuntate da l’impositi cum’è e dunazioni.</string>
23-
</resources>
23+
</resources>

feature/funding/googleplay/src/main/res/values-cs/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="funding_googleplay_contribution_list_title">Bezpečné přispění</string>
44
<string name="funding_googleplay_contribution_list_type_one_time">Jednou</string>
55
<string name="funding_googleplay_contribution_footer_payment_button">Pokračovat k platbě</string>
@@ -17,7 +17,7 @@
1717
<string name="funding_googleplay_contribution_error_show_more">Zobrazit další podrobnosti</string>
1818
<string name="funding_googleplay_contribution_error_dismiss_button">Zavřít chybu</string>
1919
<string name="funding_googleplay_contribution_tfa_recurring_xxl_title">Výjimečný měsíční dar</string>
20-
<string name="funding_googleplay_contribution_list_empty_message">Navštivte www.thunderbird.net pro další způsoby, jak podpořit Thunderbird</string>
20+
<string name="funding_googleplay_contribution_list_empty_message">Navštivte <xliff:g id="link_text">%s</xliff:g> pro další způsoby, jak podpořit Thunderbird.</string>
2121
<string name="funding_googleplay_contribution_error_purchase_failed">Nákup se nezdařil.</string>
2222
<string name="funding_googleplay_contribution_tfa_onetime_xs_title">Podstatný dar</string>
2323
<string name="funding_googleplay_contribution_error_service_disconnected">Dary nejsou v tuto chvíli dostupné.</string>
@@ -54,4 +54,4 @@
5454
<string name="funding_googleplay_contribution_reminder_statement">Thunderbird je zdarma a open-source.</string>
5555
<string name="funding_googleplay_contribution_reminder_statement_point_1">Nezobrazujeme reklamy.</string>
5656
<string name="funding_googleplay_contribution_reminder_statement_point_2">Neprodáváme vaše data.</string>
57-
</resources>
57+
</resources>

feature/funding/googleplay/src/main/res/values-de/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="funding_googleplay_contribution_list_title">Sicher spenden</string>
44
<string name="funding_googleplay_contribution_header_title">Thunderbird unterstützen</string>
55
<string name="funding_googleplay_contribution_list_type_recurring">Monatlich</string>
@@ -31,7 +31,7 @@
3131
<string name="funding_googleplay_contribution_tfa_recurring_xxl_description">Du hilfst uns, große Träume zu verwirklichen! Deine Unterstützung befähigt uns, außergewöhnliche Dinge zu erreichen.</string>
3232
<string name="funding_googleplay_contribution_header_description">Wir zeigen keine Werbung und verkaufen deine Daten nicht. Wir finanzieren uns vollständig durch finanzielle Beiträge unserer Nutzer. Wenn dir Thunderbird gefällt, hilf uns bitte, es zu unterhalten. Wir können das nicht ohne dich tun!</string>
3333
<string name="funding_googleplay_contribution_list_empty_title">In-App-Spenden sind derzeit nicht verfügbar.</string>
34-
<string name="funding_googleplay_contribution_list_empty_message">Besuche www.thunderbird.net für weitere Möglichkeiten zur Unterstützung von Thunderbird</string>
34+
<string name="funding_googleplay_contribution_list_empty_message">Besuche <xliff:g id="link_text">%s</xliff:g> für weitere Möglichkeiten zur Unterstützung von Thunderbird.</string>
3535
<string name="funding_googleplay_contribution_error_service_disconnected">Spenden sind derzeit nicht verfügbar.</string>
3636
<string name="funding_googleplay_contribution_tfa_onetime_xs_title">Grundlegende Spende</string>
3737
<string name="funding_googleplay_contribution_tfa_onetime_s_title">Wertvolle Spende</string>
@@ -49,4 +49,4 @@
4949
<string name="funding_googleplay_contribution_reminder_message">Unser Ziel ist es, eine sichere, private und kostenlose Open-Source-E-Mail-App für Nutzer auf der ganzen Welt bereitzustellen. Deine Spende unterstützt diese Arbeit. Möchtest du heute spenden?</string>
5050
<string name="funding_googleplay_contribution_reminder_negative_button">Jetzt nicht</string>
5151
<string name="funding_googleplay_contribution_header_thank_you_message">Vielen Dank für deine großzügige Spende! Deine Unterstützung stärkt Thunderbird direkt, und wir sind dankbar, dich auf diesem Weg an unserer Seite zu haben.</string>
52-
</resources>
52+
</resources>

feature/funding/googleplay/src/main/res/values-es/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="funding_googleplay_contribution_header_description">Nunca mostramos anuncios ni vendemos tus datos. Nos financiamos completamente con contribuciones financieras de nuestros usuarios. Si disfrutas de Thunderbird, por favor, ayúdanos a mantenerlo. ¡No podemos hacer esto sin ti!</string>
44
<string name="funding_googleplay_contribution_footer_payment_button">Continuar con el pago</string>
55
<string name="funding_googleplay_contribution_list_type_recurring">Mensual</string>
@@ -19,7 +19,7 @@
1919
<string name="funding_googleplay_contribution_error_purchase_failed">Compra fallida.</string>
2020
<string name="funding_googleplay_contribution_error_service_disconnected">Actualmente, las colaboraciones no están disponibles.</string>
2121
<string name="funding_googleplay_contribution_list_empty_title">Las colaboraciones dentro de la aplicación no están disponibles actualmente.</string>
22-
<string name="funding_googleplay_contribution_list_empty_message">Visite www.thunderbird.net para conocer más formas de apoyar a Thunderbird</string>
22+
<string name="funding_googleplay_contribution_list_empty_message">Visite <xliff:g id="link_text">%s</xliff:g> para conocer más formas de apoyar a Thunderbird.</string>
2323
<string name="funding_googleplay_contribution_tfa_onetime_l_title">Gran contribución</string>
2424
<string name="funding_googleplay_contribution_tfa_onetime_xxl_title">Aporte excepcional</string>
2525
<string name="funding_googleplay_contribution_tfa_onetime_m_description">¡Tu colaboración realmente brilla! Está desempeñando un papel importante en el avance de nuestra misión, ayudándonos a alcanzar hitos importantes y lograr un mayor impacto.</string>
@@ -53,4 +53,4 @@
5353
<string name="funding_googleplay_contribution_reminder_statement_point_2">No vendemos tus datos.</string>
5454
<string name="funding_googleplay_contribution_reminder_statement">Thunderbird es gratuito y de código abierto.</string>
5555
<string name="funding_googleplay_contribution_reminder_statement_point_1">No mostramos anuncios.</string>
56-
</resources>
56+
</resources>

feature/funding/googleplay/src/main/res/values-et/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="funding_googleplay_contribution_header_title">Toeta Thunderbirdi</string>
44
<string name="funding_googleplay_contribution_list_title">Turvaline rahaline toetus</string>
55
<string name="funding_googleplay_contribution_list_type_recurring">Iga kuu</string>
@@ -12,7 +12,7 @@
1212
<string name="funding_googleplay_contribution_footer_show_contribution_list_button">Anna veel üks mõjus panus</string>
1313
<string name="funding_googleplay_contribution_footer_manage_button">Muuda igakuist makset</string>
1414
<string name="funding_googleplay_contribution_list_empty_title">Rakenduse-sisene annetamise võimalus hetkel puudub.</string>
15-
<string name="funding_googleplay_contribution_list_empty_message">Meie saidist www.thunderbird.net leiad veel võimalusi Thunderbirdi toetamiseks</string>
15+
<string name="funding_googleplay_contribution_list_empty_message">Meie saidist <xliff:g id="link_text">%s</xliff:g> leiad veel võimalusi Thunderbirdi toetamiseks.</string>
1616
<string name="funding_googleplay_contribution_list_error_retry_button">Proovi uuesti</string>
1717
<string name="funding_googleplay_contribution_footer_payment_unavailable_button">Maksmisvõimalus pole hetkel saadaval</string>
1818
<string name="funding_googleplay_contribution_error_show_more">Näita lisateavet</string>
@@ -49,4 +49,4 @@
4949
<string name="funding_googleplay_contribution_reminder_title">Toeta Thunderbirdi</string>
5050
<string name="funding_googleplay_contribution_reminder_message">Meie eesmärgiks on pakkuda avatud lähtekoodil põhinevat e-postiklienti, mis on turvaline, privaatne ja vaba kõikidele kasutajatele üle maailma. Sinu rahaline toetus aitab seda tööd korraldada. Mis summaga sina täna lööd kaasa?</string>
5151
<string name="funding_googleplay_contribution_header_thank_you_message">Täname sind suuremeelse annetuse eest! Sinu toetus tugevdab otseselt Thunderbirdi ja me oleme tänulikud, et oled meie kõrval sellel teekonnal.</string>
52-
</resources>
52+
</resources>

feature/funding/googleplay/src/main/res/values-eu/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
<string name="funding_googleplay_contribution_error_dismiss_button">Baztertu errorea</string>
1010
<string name="funding_googleplay_contribution_reminder_positive_button">Bai</string>
1111
<string name="funding_googleplay_contribution_reminder_negative_button">Orain ez</string>
12-
</resources>
12+
</resources>

0 commit comments

Comments
 (0)