Update badge copy with new strings.

fork-5.53.8
Alex Hart 2021-10-28 15:49:25 -03:00 zatwierdzone przez Greyson Parrelli
rodzic 755ec672c0
commit 6c7d837964
21 zmienionych plików z 273 dodań i 43 usunięć

Wyświetl plik

@ -36,7 +36,7 @@ data class Badge(
val visible: Boolean,
) : Parcelable, Key {
fun isExpired(): Boolean = expirationTimestamp < System.currentTimeMillis()
fun isExpired(): Boolean = expirationTimestamp < System.currentTimeMillis() && expirationTimestamp > 0
fun isBoost(): Boolean = id == BOOST_BADGE_ID
override fun updateDiskCacheKey(messageDigest: MessageDigest) {

Wyświetl plik

@ -35,7 +35,7 @@ class ExpiredBadgeBottomSheetDialogFragment : DSLSettingsBottomSheetFragment(
if (badge.isBoost()) {
R.string.ExpiredBadgeBottomSheetDialogFragment__your_badge_has_expired
} else {
R.string.ExpiredBadgeBottomSheetDialogFragment__your_subscription_was_cancelled
R.string.ExpiredBadgeBottomSheetDialogFragment__subscription_cancelled
}
)
@ -44,9 +44,9 @@ class ExpiredBadgeBottomSheetDialogFragment : DSLSettingsBottomSheetFragment(
noPadTextPref(
DSLSettingsText.from(
if (badge.isBoost()) {
getString(R.string.ExpiredBadgeBottomSheetDialogFragment__your_s_badge_has_expired, badge.name)
R.string.ExpiredBadgeBottomSheetDialogFragment__your_boost_badge_has_expired
} else {
getString(R.string.ExpiredBadgeBottomSheetDialogFragment__because)
R.string.ExpiredBadgeBottomSheetDialogFragment__your_sustainer
},
DSLSettingsText.CenterModifier
)
@ -57,9 +57,9 @@ class ExpiredBadgeBottomSheetDialogFragment : DSLSettingsBottomSheetFragment(
noPadTextPref(
DSLSettingsText.from(
if (badge.isBoost()) {
R.string.ExpiredBadgeBottomSheetDialogFragment__to_continue_supporting
R.string.ExpiredBadgeBottomSheetDialogFragment__to_continue_supporting_technology
} else {
R.string.ExpiredBadgeBottomSheetDialogFragment__to_continue_supporting_signal
R.string.ExpiredBadgeBottomSheetDialogFragment__you_can
},
DSLSettingsText.CenterModifier
)
@ -70,7 +70,7 @@ class ExpiredBadgeBottomSheetDialogFragment : DSLSettingsBottomSheetFragment(
primaryButton(
text = DSLSettingsText.from(
if (badge.isBoost()) {
R.string.ExpiredBadgeBottomSheetDialogFragment__become_a_subscriber
R.string.ExpiredBadgeBottomSheetDialogFragment__become_a_sustainer
} else {
R.string.ExpiredBadgeBottomSheetDialogFragment__renew_subscription
}

Wyświetl plik

@ -62,7 +62,6 @@ sealed class DSLSettingsText {
}
object Title2BoldModifier : TextAppearanceModifier(R.style.TextAppearance_Signal_Title2_Bold)
object Body1Modifier : TextAppearanceModifier(R.style.Signal_Text_Body)
object Body1BoldModifier : TextAppearanceModifier(R.style.TextAppearance_Signal_Body1_Bold)
open class TextAppearanceModifier(@StyleRes private val textAppearance: Int) : Modifier {

Wyświetl plik

@ -147,7 +147,13 @@ class AppSettingsFragment : DSLSettingsFragment(R.string.text_secure_normal__men
if (FeatureFlags.donorBadges() && PlayServicesUtil.getPlayServicesStatus(requireContext()) == PlayServicesUtil.PlayServicesStatus.SUCCESS) {
customPref(
SubscriptionPreference(
title = DSLSettingsText.from(R.string.preferences__subscription),
title = DSLSettingsText.from(
if (state.hasActiveSubscription) {
R.string.preferences__subscription
} else {
R.string.preferences__become_a_signal_sustainer
}
),
icon = DSLSettingsIcon.from(R.drawable.ic_heart_24),
isActive = state.hasActiveSubscription,
onClick = { isActive ->
@ -159,10 +165,9 @@ class AppSettingsFragment : DSLSettingsFragment(R.string.text_secure_normal__men
}
)
)
// TODO [alex] -- clap
clickPref(
title = DSLSettingsText.from(R.string.preferences__signal_boost),
icon = DSLSettingsIcon.from(R.drawable.ic_heart_24),
icon = DSLSettingsIcon.from(R.drawable.ic_boost_24),
onClick = {
findNavController().navigate(R.id.action_appSettingsFragment_to_boostsFragment)
}
@ -199,6 +204,7 @@ class AppSettingsFragment : DSLSettingsFragment(R.string.text_secure_normal__men
override fun areItemsTheSame(newItem: SubscriptionPreference): Boolean {
return true
}
override fun areContentsTheSame(newItem: SubscriptionPreference): Boolean {
return super.areContentsTheSame(newItem) && isActive == newItem.isActive
}

Wyświetl plik

@ -31,7 +31,6 @@ class SubscriptionsRepository(private val donationsService: DonationsService) {
subscriptionLevels.levels.map { (code, level) ->
Subscription(
id = code,
title = level.badge.name,
badge = Badges.fromServiceBadge(level.badge),
price = FiatMoney(level.currencies[currency.currencyCode]!!, currency),
level = code.toInt()

Wyświetl plik

@ -139,7 +139,7 @@ data class Boost(
class MoneyFilter(val currency: Currency, private val onCustomAmountChanged: (String) -> Unit = {}) : DigitsKeyListener(), TextWatcher {
val separatorCount = min(1, currency.defaultFractionDigits)
val prefix: String = "${currency.getSymbol(Locale.getDefault())} "
val prefix: String = currency.getSymbol(Locale.getDefault())
val pattern: Pattern = "[0-9]*([.,]){0,$separatorCount}[0-9]{0,${currency.defaultFractionDigits}}".toPattern()
override fun filter(

Wyświetl plik

@ -45,7 +45,7 @@ object ActiveSubscriptionPreference {
override fun bind(model: Model) {
badge.setBadge(model.subscription.badge)
title.text = model.subscription.title
title.text = model.subscription.getTitle(context)
price.text = context.getString(
R.string.MySupportPreference__s_per_month,

Wyświetl plik

@ -24,12 +24,11 @@ import org.thoughtcrime.securesms.components.settings.app.subscription.DonationE
import org.thoughtcrime.securesms.components.settings.app.subscription.models.CurrencySelection
import org.thoughtcrime.securesms.components.settings.app.subscription.models.GooglePayButton
import org.thoughtcrime.securesms.components.settings.configure
import org.thoughtcrime.securesms.payments.FiatMoneyUtil
import org.thoughtcrime.securesms.subscription.Subscription
import org.thoughtcrime.securesms.util.DateUtils
import org.thoughtcrime.securesms.util.LifecycleDisposable
import org.thoughtcrime.securesms.util.SpanUtil
import java.util.Calendar
import java.util.Locale
import java.util.concurrent.TimeUnit
/**
@ -44,10 +43,10 @@ class SubscribeFragment : DSLSettingsFragment(
private val lifecycleDisposable = LifecycleDisposable()
private val supportTechSummary: CharSequence by lazy {
SpannableStringBuilder(requireContext().getString(R.string.SubscribeFragment__support_technology_that_is_built_for_you))
SpannableStringBuilder(requireContext().getString(R.string.SubscribeFragment__support_technology_that_is_built_for_you_not))
.append(" ")
.append(
SpanUtil.learnMore(requireContext(), ContextCompat.getColor(requireContext(), R.color.signal_accent_primary)) {
SpanUtil.readMore(requireContext(), ContextCompat.getColor(requireContext(), R.color.signal_accent_primary)) {
findNavController().navigate(SubscribeFragmentDirections.actionSubscribeFragmentToSubscribeLearnMoreBottomSheetDialog())
}
)
@ -152,14 +151,20 @@ class SubscribeFragment : DSLSettingsFragment(
text = DSLSettingsText.from(R.string.SubscribeFragment__update_subscription),
isEnabled = areFieldsEnabled && (!activeAndSameLevel || isExpiring),
onClick = {
val price = viewModel.state.value?.selectedSubscription?.price ?: return@primaryButton
val calendar = Calendar.getInstance()
calendar.add(Calendar.MONTH, 1)
MaterialAlertDialogBuilder(requireContext())
.setTitle(R.string.SubscribeFragment__update_subscription_question)
.setMessage(
getString(
R.string.SubscribeFragment__you_will_be_charged_the_full_amount,
DateUtils.formatDateWithYear(Locale.getDefault(), calendar.timeInMillis)
R.string.SubscribeFragment__you_will_be_charged_the_full_amount_s_of,
FiatMoneyUtil.format(
requireContext().resources,
price,
FiatMoneyUtil.formatOptions().trimZerosAfterDecimal()
)
)
)
.setPositiveButton(R.string.SubscribeFragment__update) { dialog, _ ->
@ -214,7 +219,7 @@ class SubscribeFragment : DSLSettingsFragment(
}
private fun onGooglePayButtonClicked() {
viewModel.requestTokenFromGooglePay()
viewModel.requestTokenFromGooglePay(requireContext())
}
private fun onPaymentConfirmed(badge: Badge) {

Wyświetl plik

@ -1,5 +1,6 @@
package org.thoughtcrime.securesms.components.settings.app.subscription.subscribe
import android.content.Context
import android.content.Intent
import androidx.lifecycle.LiveData
import androidx.lifecycle.ViewModel
@ -170,7 +171,7 @@ class SubscribeViewModel(
)
}
fun requestTokenFromGooglePay() {
fun requestTokenFromGooglePay(context: Context) {
val snapshot = store.state
if (snapshot.selectedSubscription == null) {
return
@ -179,7 +180,7 @@ class SubscribeViewModel(
store.update { it.copy(stage = SubscribeState.Stage.TOKEN_REQUEST) }
subscriptionToPurchase = snapshot.selectedSubscription
donationPaymentRepository.requestTokenFromGooglePay(snapshot.selectedSubscription.price, snapshot.selectedSubscription.title, fetchTokenRequestCode)
donationPaymentRepository.requestTokenFromGooglePay(snapshot.selectedSubscription.price, snapshot.selectedSubscription.getTitle(context), fetchTokenRequestCode)
}
fun setSelectedSubscription(subscription: Subscription) {

Wyświetl plik

@ -3,10 +3,12 @@ package org.thoughtcrime.securesms.components.settings.app.subscription.thanks
import android.animation.Animator
import android.content.DialogInterface
import android.os.Bundle
import android.text.SpannableStringBuilder
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.navigation.fragment.findNavController
import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieDrawable
@ -19,6 +21,7 @@ import org.thoughtcrime.securesms.badges.BadgeRepository
import org.thoughtcrime.securesms.components.FixedRoundedCornerBottomSheetDialogFragment
import org.thoughtcrime.securesms.components.settings.app.AppSettingsActivity
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.util.SpanUtil
import org.thoughtcrime.securesms.util.visible
class ThanksForYourSupportBottomSheetDialogFragment : FixedRoundedCornerBottomSheetDialogFragment() {
@ -49,6 +52,7 @@ class ThanksForYourSupportBottomSheetDialogFragment : FixedRoundedCornerBottomSh
val done: MaterialButton = view.findViewById(R.id.thanks_bottom_sheet_done)
val controlText: TextView = view.findViewById(R.id.thanks_bottom_sheet_control_text)
val controlNote: View = view.findViewById(R.id.thanks_bottom_sheet_featured_note)
val subhead: TextView = view.findViewById(R.id.thanks_bottom_sheet_subhead)
heading = view.findViewById(R.id.thanks_bottom_sheet_heading)
switch = view.findViewById(R.id.thanks_bottom_sheet_switch)
@ -58,6 +62,27 @@ class ThanksForYourSupportBottomSheetDialogFragment : FixedRoundedCornerBottomSh
badgeView.setBadge(args.badge)
badgeName.text = args.badge.name
if (args.badge.isBoost()) {
if (Recipient.self().badges.any { !it.isBoost() }) {
subhead.setText(R.string.SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_boost_badge_help_signal)
} else {
subhead.text = SpannableStringBuilder(getString(R.string.SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_boost_badge_help_signal))
.append(" ")
.append(getString(R.string.SubscribeThanksForYourSupportBottomSheetDialogFragment__you_can_also))
.append(
SpanUtil.clickable(
getString(R.string.SubscribeThanksForYourSupportBottomSheetDialogFragment__become_a_montly_sustainer),
ContextCompat.getColor(requireContext(), R.color.signal_accent_primary),
) {
requireActivity().finish()
requireActivity().startActivity(AppSettingsActivity.subscriptions(requireContext()))
}
)
}
} else {
subhead.text = getString(R.string.SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_s_badge_help_signal, args.badge.name)
}
val otherBadges = Recipient.self().badges.filterNot { it.id == args.badge.id }
val hasOtherBadges = otherBadges.isNotEmpty()
val displayingBadges = otherBadges.all { it.visible }

Wyświetl plik

@ -488,6 +488,12 @@ class ConversationSettingsFragment : DSLSettingsFragment(
sectionHeaderPref(R.string.ManageProfileFragment_badges)
displayBadges(requireContext(), state.recipient.badges)
textPref(
summary = DSLSettingsText.from(
R.string.ConversationSettingsFragment__get_badges
)
)
}
if (recipientSettingsState.selfHasGroups) {

Wyświetl plik

@ -348,7 +348,7 @@ public final class Megaphones {
.setTitle(R.string.BecomeASustainerMegaphone__become_a_sustainer)
.setImage(R.drawable.ic_become_a_sustainer_megaphone)
.setBody(R.string.BecomeASustainerMegaphone__signal_is_powered)
.setActionButton(R.string.BecomeASustainerMegaphone__donate, (megaphone, listener) -> {
.setActionButton(R.string.BecomeASustainerMegaphone__contribute, (megaphone, listener) -> {
listener.onMegaphoneNavigationRequested(AppSettingsActivity.subscriptions(context));
listener.onMegaphoneCompleted(Event.BECOME_A_SUSTAINER);
})

Wyświetl plik

@ -1,5 +1,6 @@
package org.thoughtcrime.securesms.subscription
import android.content.Context
import android.view.View
import android.widget.ImageView
import android.widget.TextView
@ -20,12 +21,20 @@ import java.util.Locale
*/
data class Subscription(
val id: String,
val title: String,
val badge: Badge,
val price: FiatMoney,
val level: Int,
) {
fun getTitle(context: Context): String {
return when (level) {
500 -> context.getString(R.string.SubscribeFragment__sustainer_i)
1000 -> context.getString(R.string.SubscribeFragment__sustainer_ii)
2000 -> context.getString(R.string.SubscribeFragment__sustainer_iii)
else -> ""
}
}
companion object {
fun register(adapter: MappingAdapter) {
adapter.registerFactory(Model::class.java, MappingAdapter.LayoutFactory({ ViewHolder(it) }, R.layout.subscription_preference))
@ -81,7 +90,7 @@ data class Subscription(
badge.setBadge(model.subscription.badge)
}
title.text = model.subscription.title
title.text = model.subscription.getTitle(context)
tagline.text = context.getString(R.string.Subscription__earn_a_s_badge, model.subscription.badge.name)
val formattedPrice = FiatMoneyUtil.format(

Wyświetl plik

@ -136,6 +136,21 @@ public final class SpanUtil {
return clickSubstring(learnMore, learnMore, onLearnMoreClicked, color);
}
public static CharSequence readMore(@NonNull Context context,
@ColorInt int color,
@NonNull View.OnClickListener onLearnMoreClicked)
{
String readMore = context.getString(R.string.SpanUtil__read_more);
return clickSubstring(readMore, readMore, onLearnMoreClicked, color);
}
public static CharSequence clickable(@NonNull CharSequence text,
@ColorInt int color,
@NonNull View.OnClickListener onLearnMoreClicked)
{
return clickSubstring(text, text, onLearnMoreClicked, color);
}
/**
* Takes two resources:
* - one resource that has a single string placeholder

Wyświetl plik

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M17.87,15.92c-0.09,0.07 -0.17,0.15 -0.26,0.21 -3.23,2.34 -4.86,3.08 -6.21,3.14l0.34,2.2a1.16,1.16 0,0 0,2 0.7c1.39,-1.68 3.23,-3.91 3.9,-4.79a1.59,1.59 0,0 0,0.27 -1.31C17.9,16 17.88,16 17.87,15.92Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M8.06,6.27 L8,6.24a1.59,1.59 0,0 0,-1.31 0.27c-0.88,0.67 -3.11,2.51 -4.79,3.9a1.17,1.17 0,0 0,0.7 2l2.2,0.33c0,-1.36 0.74,-3 3.13,-6.3Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M20.9,3.15a10.37,10.37 0,0 0,-2.7 -0.35A11.52,11.52 0,0 0,9.31 7.11h0c-0.06,0.08 -0.14,0.15 -0.2,0.24l-0.65,0.92 -0.17,0.25 -0.41,0.62 -0.13,0.2c-0.16,0.24 -0.3,0.48 -0.43,0.7l0,0.05c-0.12,0.2 -0.22,0.38 -0.31,0.56a0.61,0.61 0,0 0,-0.07 0.14c-0.08,0.15 -0.15,0.29 -0.21,0.43a0.2,0.2 0,0 0,0 0.08q-0.11,0.24 -0.18,0.45v0a3.42,3.42 0,0 0,-0.11 0.35v0.07a1.88,1.88 0,0 0,-0.06 0.31h0a2.41,2.41 0,0 0,0.06 1,5 5,0 0,0 1.54,2.7 5,5 0,0 0,2.69 1.53,2.42 2.42,0 0,0 1.1,0h0a4.31,4.31 0,0 0,0.74 -0.21l0.06,0a3.89,3.89 0,0 0,0.38 -0.16l0.11,-0.05 0.45,-0.23 0.07,0 0.61,-0.34 0.13,-0.08 0.55,-0.34 0.23,-0.15 0.56,-0.38 0.25,-0.17c0.29,-0.19 0.58,-0.4 0.9,-0.63A11.36,11.36 0,0 0,20.9 3.15ZM16.72,10.68a2.75,2.75 0,0 1,-5 0.61,2.75 2.75,0 0,1 2.4,-4.1 2.64,2.64 0,0 1,0.74 0.1A2.76,2.76 0,0 1,16.72 10.68Z"/>
</vector>

Wyświetl plik

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M18.3,14.77a1.77,1.77 0,0 1,-0.06 -0.17,12 12,0 0,0 3.26,-12 10.87,10.87 0,0 0,-3.3 -0.5A12.27,12.27 0,0 0,9.38 5.89l-0.1,0c-0.34,-0.11 -0.76,-0.25 -1.13,-0.34a2.35,2.35 0,0 0,-1.93 0.41c-0.89,0.66 -3.11,2.5 -4.82,3.92a1.8,1.8 0,0 0,-0.57 1.89,2 2,0 0,0 1.64,1.43l1.33,0.2c0.73,0.11 1.35,0.2 1.81,0.25h0A5.77,5.77 0,0 0,7.35 16.7a5.77,5.77 0,0 0,3.08 1.74l0.11,0c0.05,0.46 0.14,1.07 0.25,1.79 0.07,0.43 0.14,0.88 0.2,1.33a2,2 0,0 0,1.43 1.64,1.86 1.86,0 0,0 0.52,0.07 1.8,1.8 0,0 0,1.37 -0.64c1.42,-1.71 3.26,-3.93 3.93,-4.82a2.38,2.38 0,0 0,0.4 -1.93C18.55,15.53 18.41,15.11 18.3,14.77ZM2.68,11.67a0.48,0.48 0,0 1,-0.41 -0.35A0.29,0.29 0,0 1,2.36 11c1.7,-1.41 3.9,-3.23 4.76,-3.88A0.85,0.85 0,0 1,7.82 7a3.87,3.87 0,0 1,0.53 0.15c-1.82,2.53 -2.53,4 -2.75,5L4,11.88ZM8.42,15.67a4.26,4.26 0,0 1,-1.34 -2.32c-0.13,-0.66 -0.3,-1.47 2.63,-5.52A10.87,10.87 0,0 1,18.2 3.55a10.27,10.27 0,0 1,2.08 0.22,10.62 10.62,0 0,1 -4,10.55C13.72,16.17 12.12,17 11.23,17a2.67,2.67 0,0 1,-0.5 -0.06A4.24,4.24 0,0 1,8.42 15.64ZM17,16.93c-0.65,0.86 -2.47,3.06 -3.88,4.76a0.29,0.29 0,0 1,-0.33 0.09,0.49 0.49,0 0,1 -0.35,-0.41c-0.07,-0.46 -0.14,-0.92 -0.2,-1.35 -0.1,-0.61 -0.19,-1.18 -0.23,-1.6 1,-0.24 2.45,-1 5,-2.78 0.06,0.2 0.12,0.4 0.16,0.59A0.85,0.85 0,0 1,17 16.93Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M13.13,13.31a3.38,3.38 0,0 0,0.94 0.13,3.51 3.51,0 1,0 -0.94,-0.13ZM12.13,9.4A2,2 0,0 1,14.61 8,2 2,0 0,1 16,10.48a2,2 0,0 1,-1.93 1.46,2.5 2.5,0 0,1 -0.54,-0.07 2,2 0,0 1,-1.2 -0.95A2,2 0,0 1,12.14 9.4Z"/>
</vector>

Wyświetl plik

@ -0,0 +1,125 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="76dp"
android:height="74dp"
android:viewportWidth="76"
android:viewportHeight="74">
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M22.361,3.639c2.035,-0.029 4.062,0.263 6.004,0.866l1.545,-3.329c-2.431,-0.813 -4.984,-1.21 -7.55,-1.173c-1.479,0.005 -2.954,0.173 -4.396,0.499l0.798,3.539C19.942,3.779 21.15,3.644 22.361,3.639z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M6.363,12.943l-3.136,-1.877C1.239,14.33 0.128,18.043 0,21.852L3.678,21.9C3.8,18.739 4.723,15.658 6.363,12.943z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M15.7,4.989l-1.148,-3.437c-3.608,1.444 -6.8,3.745 -9.296,6.699l2.955,2.138C10.24,8.027 12.807,6.177 15.7,4.989z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M38.001,10.859l2.394,-2.028c1.312,-1.148 2.737,-2.163 4.254,-3.03l-1.847,-3.151c-1.709,0.981 -3.317,2.125 -4.801,3.416c-1.484,-1.291 -3.092,-2.436 -4.802,-3.418l-1.849,3.151c1.516,0.867 2.941,1.883 4.254,3.03L38.001,10.859z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M14.59,47.645l-3.025,2.089c2.12,2.662 4.385,5.187 6.666,7.531l2.882,-2.288C18.963,52.782 16.723,50.314 14.59,47.645z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M20.742,59.773c2.624,2.545 5.202,4.824 7.538,6.778l2.648,-2.556c-2.315,-1.929 -4.891,-4.2 -7.508,-6.73L20.742,59.773z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M3.785,25.157l-3.674,0.236c0.38,3.482 1.286,6.888 2.688,10.104l3.394,-1.419C4.951,31.238 4.14,28.232 3.785,25.157z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M7.579,37.031l-3.27,1.683c1.488,2.858 3.195,5.599 5.105,8.2l3.197,-1.854C10.724,42.518 9.041,39.833 7.579,37.031z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M53.639,3.639c1.211,0.004 2.417,0.138 3.599,0.399l0.798,-3.539C56.593,0.173 55.119,0.006 53.639,0c-2.566,-0.036 -5.119,0.36 -7.55,1.173l1.546,3.332C49.577,3.903 51.604,3.611 53.639,3.639z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M72.322,21.9L76,21.852c-0.128,-3.809 -1.239,-7.522 -3.227,-10.787l-3.136,1.877C71.277,15.658 72.2,18.739 72.322,21.9z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M67.788,10.39l2.955,-2.138c-2.496,-2.955 -5.689,-5.256 -9.298,-6.7l-1.148,3.437C63.192,6.177 65.76,8.028 67.788,10.39z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M53.179,7.278c-5.977,0 -12.726,4.641 -15.178,9.705c-2.454,-5.067 -9.2,-9.702 -15.179,-9.702c-8.739,0 -15.485,7.176 -15.485,15.468c-0.001,20.47 30.664,42.153 30.664,42.153s30.664,-21.684 30.664,-42.153C68.664,14.455 61.918,7.278 53.179,7.278z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M38.001,69.525c-1.145,-0.834 -2.711,-2.011 -4.539,-3.465l-2.417,2.753C35.165,72.098 38.001,74 38.001,74s2.836,-1.902 6.956,-5.187l-2.417,-2.753C40.711,67.515 39.144,68.692 38.001,69.525z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M54.89,54.977l2.882,2.288c2.281,-2.344 4.545,-4.869 6.666,-7.531l-3.027,-2.089C59.278,50.314 57.037,52.782 54.89,54.977z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M45.076,63.996l2.648,2.556c2.332,-1.953 4.91,-4.234 7.538,-6.778l-2.675,-2.508C49.967,59.796 47.391,62.067 45.076,63.996z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M69.808,34.079l3.394,1.419c1.402,-3.216 2.308,-6.622 2.688,-10.104l-3.674,-0.236C71.86,28.232 71.049,31.238 69.808,34.079z"
android:fillColor="#CC1F3F"/>
</group>
<group>
<clip-path
android:pathData="M0,0h76v74h-76z"/>
<path
android:pathData="M63.391,45.06l3.197,1.854c1.91,-2.601 3.617,-5.342 5.104,-8.2l-3.27,-1.683C66.961,39.833 65.278,42.518 63.391,45.06z"
android:fillColor="#CC1F3F"/>
</group>
</vector>

Wyświetl plik

@ -15,13 +15,13 @@
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/bottom_sheet_handle" />
<!-- TODO [alex] - need final asset -->
<ImageView
android:id="@+id/subscribe_bottom_sheet_heart"
android:layout_width="76dp"
android:layout_height="74dp"
android:layout_marginTop="36dp"
android:importantForAccessibility="no"
app:srcCompat="@drawable/ic_sustainer_heart"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/subscribe_bottom_sheet_handle" />
@ -72,7 +72,7 @@
android:layout_marginStart="@dimen/dsl_settings_gutter"
android:layout_marginTop="16dp"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:text="@string/SubscribeLearnMoreBottomSheetDialogFragment__the_team_at_signal_is_committed"
android:text="@string/SubscribeLearnMoreBottomSheetDialogFragment__signal_is_a_non_profit_with_no"
android:textAppearance="@style/Signal.Text.Body"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -86,7 +86,7 @@
android:layout_marginTop="24dp"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:paddingBottom="36dp"
android:text="@string/SubscribeLearnMoreBottomSheetDialogFragment__your_contribution_helps_pay"
android:text="@string/SubscribeLearnMoreBottomSheetDialogFragment__your_contribution"
android:textAppearance="@style/Signal.Text.Body"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

Wyświetl plik

@ -42,7 +42,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/thanks_bottom_sheet_heading"
tools:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_s_badge" />
tools:text="@string/SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_s_badge_help_signal" />
<org.thoughtcrime.securesms.badges.BadgeImageView
android:id="@+id/thanks_bottom_sheet_badge"

Wyświetl plik

@ -934,6 +934,8 @@
<!-- LearnMoreTextView -->
<string name="LearnMoreTextView_learn_more">Learn more</string>
<string name="SpanUtil__read_more">Read more</string>
<!-- LongMessageActivity -->
<string name="LongMessageActivity_unable_to_find_message">Unable to find message</string>
<string name="LongMessageActivity_message_from_s">Message from %1$s</string>
@ -2404,6 +2406,7 @@
<string name="preferences__advanced">Advanced</string>
<string name="preferences__donate_to_signal">Donate to Signal</string>
<string name="preferences__subscription">Subscription</string>
<string name="preferences__become_a_signal_sustainer">Become a Signal Sustainer</string>
<string name="preferences__signal_boost">Signal Boost</string>
<string name="preferences__privacy">Privacy</string>
<string name="preferences__mms_user_agent">MMS User Agent</string>
@ -3724,9 +3727,9 @@
<!-- BecomeASustainerMegaphone -->
<string name="BecomeASustainerMegaphone__become_a_sustainer">Become a Sustainer</string>
<string name="BecomeASustainerMegaphone__signal_is_powered">Signal is powered by people like you. Donate and receive a profile badge.</string>
<string name="BecomeASustainerMegaphone__signal_is_powered">Signal is powered by people like you. Contribute and receive a profile badge.</string>
<string name="BecomeASustainerMegaphone__no_thanks">No thanks</string>
<string name="BecomeASustainerMegaphone__donate">Donate</string>
<string name="BecomeASustainerMegaphone__contribute">Contribute</string>
<!-- KeyboardPagerFragment -->
<string name="KeyboardPagerFragment_emoji">Emoji</string>
@ -3779,6 +3782,7 @@
<string name="ConversationSettingsFragment__conversation_muted_forever">Conversation muted forever</string>
<string name="ConversationSettingsFragment__copied_phone_number_to_clipboard">Copied phone number to clipboard.</string>
<string name="ConversationSettingsFragment__phone_number">Phone number</string>
<string name="ConversationSettingsFragment__get_badges">Get badges for your profile by supporting Signal. Tap on a badge to learn more.</string>
<!-- PermissionsSettingsFragment -->
<string name="PermissionsSettingsFragment__add_members">Add members</string>
@ -3927,6 +3931,7 @@
<string name="SubscribeFragment__signal_is_powered_by_people_like_you">Signal is powered by people like you.</string>
<string name="SubscribeFragment__support_technology_that_is_built_for_you">Support technology that is built for you—not for your data—by joining the community of people that sustain it.</string>
<string name="SubscribeFragment__support_technology_that_is_built_for_you_not">Support technology that is built for you, not for your data, by joining the community that sustains Signal.</string>
<string name="SubscribeFragment__donation_amount">Donation amount</string>
<string name="SubscribeFragment__more_payment_options">More Payment Options</string>
<string name="SubscribeFragment__cancel_subscription">Cancel Subscription</string>
@ -3939,6 +3944,10 @@
<string name="SubscribeFragment__update_subscription_question">Update subscription?</string>
<string name="SubscribeFragment__update">Update</string>
<string name="SubscribeFragment__you_will_be_charged_the_full_amount">You will be charged the full amount of the new subscription price today. Your subscription will renew %1$s.</string>
<string name="SubscribeFragment__you_will_be_charged_the_full_amount_s_of">You will be charged the full amount (%1$s) of the new subscription price today. Your subscription will renew monthly.</string>
<string name="SubscribeFragment__sustainer_i">Sustainer I</string>
<string name="SubscribeFragment__sustainer_ii">Sustainer II</string>
<string name="SubscribeFragment__sustainer_iii">Sustainer III</string>
<string name="Subscription__s_per_month">%s/month</string>
<string name="Subscription__s_per_month_dot_renews_s">%1$s/month · Renews %2$s</string>
@ -3946,12 +3955,15 @@
<string name="SubscribeLearnMoreBottomSheetDialogFragment__signal_is_a_non_profit_with_no">Signal is a non-profit with no advertisers or investors, sustained only by the people who use and value it. Make a recurring monthly contribution and receive a profile badge to share your support.</string>
<string name="SubscribeLearnMoreBottomSheetDialogFragment__why_contribute">Why Contribute?</string>
<string name="SubscribeLearnMoreBottomSheetDialogFragment__the_team_at_signal_is_committed">The team at Signal is committed to the mission of developing open source privacy technology that protects free expression and enables secure global communication. Your contribution fuels this cause. No ads. No trackers. No kidding.</string>
<string name="SubscribeLearnMoreBottomSheetDialogFragment__your_contribution_helps_pay">Your contribution helps pay for the development, servers, and bandwidth of an app used by millions around the world for private and instantaneous communication.</string>
<string name="SubscribeLearnMoreBottomSheetDialogFragment__signal_is">Signal is committed to developing open source privacy technology that protects free expression and enables secure global communication.</string>
<string name="SubscribeLearnMoreBottomSheetDialogFragment__your_contribution">Your contribution fuels this cause and pays for the development and operations of an app used by millions for private communication. No ads. No trackers. No kidding.</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__thanks_for_your_support">Thanks for your Support!</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__thanks_for_the_boost">Thanks for the Boost!</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_s_badge">You\'ve earned a %s badge! Displaying your badge will show people you chat with that you support Signal.</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_s_badge_help_signal">You\'ve earned %s badge! Help Signal build awareness by displaying this badge on your profile.</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__youve_earned_a_boost_badge_help_signal">You\'ve earned a Boost badge! Help Signal build awareness by displaying this badge on your profile.</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__you_can_also">You can also</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__become_a_montly_sustainer">become a monthly Sustainer.</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__display_on_profile">Display on Profile</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__make_featured_badge">Make featured badge</string>
<string name="SubscribeThanksForYourSupportBottomSheetDialogFragment__done">Done</string>
@ -3974,13 +3986,14 @@
<string name="MySupportPreference__renews_s">Renews %1$s</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__your_badge_has_expired">Your Badge has Expired</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__your_s_badge_has_expired">Your %1$s badge has expired, and is no longer visible to others on your profile.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__to_continue_supporting">To continue supporting technology that is built for you—not for your data—please consider becoming a monthly subscriber.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__become_a_subscriber">Become a subscriber</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__badge_expired">Badge expired</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__subscription_cancelled">Subscription cancelled</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__your_boost_badge_has_expired">Your Boost badge has expired, and is no longer visible to others on your profile.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__to_continue_supporting_technology">To continue supporting technology that is built for you, please consider becoming a monthly Sustainer.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__become_a_sustainer">Become a sustainer</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__not_now">Not now</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__your_subscription_was_cancelled">Your subscription was cancelled.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__because">Because you were inactive for more than 45 days, your subscription to Signal has been automatically cancelled.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__to_continue_supporting_signal">To continue supporting Signal and to reactivate your badge, renew now.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__your_sustainer">Your Sustainer subscription was automatically cancelled because you were inactive for too long. Your %1$s badge is no longer visible on your profile.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__you_can">You can keep using Signal but to support the app and reactivate your badge, renew now.</string>
<string name="ExpiredBadgeBottomSheetDialogFragment__renew_subscription">Renew subscription</string>
<string name="Subscription__verification_failed">Subscription Verification Failed</string>

Wyświetl plik

@ -33,7 +33,7 @@ class BoostTest__MoneyFilter {
testSubject.afterTextChanged(editable)
assertEquals("$ 5", editable.toString())
assertEquals("$5", editable.toString())
}
@Test
@ -92,7 +92,7 @@ class BoostTest__MoneyFilter {
testSubject.afterTextChanged(editable)
assertEquals("¥ 5", editable.toString())
assertEquals("¥5", editable.toString())
}
@Test