From 736a62b632a90ef73243a0eacffa5ec93e540eb0 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Tue, 9 Jun 2020 14:12:52 -0400 Subject: [PATCH] Update strings related to message requests. --- .../messagerequests/MessageRequestsBottomView.java | 10 ++++++---- .../securesms/profiles/edit/EditProfileFragment.java | 5 +++++ app/src/main/res/layout/profile_create_fragment.xml | 2 +- app/src/main/res/values/strings.xml | 11 ++++++----- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java index 24a5e85359..f986db7d11 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/messagerequests/MessageRequestsBottomView.java @@ -57,9 +57,10 @@ public class MessageRequestsBottomView extends ConstraintLayout { public void setRecipient(@NonNull Recipient recipient) { if (recipient.isBlocked()) { if (recipient.isGroup()) { - question.setText(R.string.MessageRequestBottomView_unblock_to_allow_group_members_to_add_you_to_this_group_again); + question.setText(R.string.MessageRequestBottomView_unblock_this_group_and_share_your_name_and_photo_with_its_members); } else { - question.setText(HtmlCompat.fromHtml(getContext().getString(R.string.MessageRequestBottomView_unblock_s_to_message_and_call_each_other, HtmlUtil.bold(recipient.getDisplayName(getContext()))), 0)); + String name = recipient.getProfileName().isEmpty() ? recipient.getDisplayName(getContext()) : recipient.getProfileName().getGivenName(); + question.setText(HtmlCompat.fromHtml(getContext().getString(R.string.MessageRequestBottomView_do_you_want_to_let_s_message_you_wont_receive_any_messages_until_you_unblock_them, HtmlUtil.bold(name)), 0)); } normalButtons.setVisibility(GONE); blockedButtons.setVisibility(VISIBLE); @@ -68,10 +69,11 @@ public class MessageRequestsBottomView extends ConstraintLayout { if (recipient.isPushV2Group()) { question.setText(HtmlCompat.fromHtml(getContext().getString(R.string.MessageRequestBottomView_you_were_invited_to_join_the_group_s, HtmlUtil.bold(recipient.getDisplayName(getContext()))), 0)); } else { - question.setText(HtmlCompat.fromHtml(getContext().getString(R.string.MessageRequestBottomView_do_you_want_to_join_the_group_s_they_wont_know_youve_seen_their_messages_until_you_accept, HtmlUtil.bold(recipient.getDisplayName(getContext()))), 0)); + question.setText(R.string.MessageRequestBottomView_do_you_want_to_join_this_group_they_wont_know_youve_seen_their_messages_until_you_accept); } } else { - question.setText(HtmlCompat.fromHtml(getContext().getString(R.string.MessageRequestBottomView_do_you_want_to_let_s_message_you_they_wont_know_youve_seen_their_messages_until_you_accept, HtmlUtil.bold(recipient.getDisplayName(getContext()))), 0)); + String name = recipient.getProfileName().isEmpty() ? recipient.getDisplayName(getContext()) : recipient.getProfileName().getGivenName(); + question.setText(HtmlCompat.fromHtml(getContext().getString(R.string.MessageRequestBottomView_do_you_want_to_let_s_message_you_they_wont_know_youve_seen_their_messages_until_you_accept, HtmlUtil.bold(name)), 0)); } normalButtons.setVisibility(VISIBLE); blockedButtons.setVisibility(GONE); diff --git a/app/src/main/java/org/thoughtcrime/securesms/profiles/edit/EditProfileFragment.java b/app/src/main/java/org/thoughtcrime/securesms/profiles/edit/EditProfileFragment.java index f663c2e5b9..ca2402b676 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/profiles/edit/EditProfileFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/profiles/edit/EditProfileFragment.java @@ -45,10 +45,12 @@ import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.profiles.ProfileName; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.registration.RegistrationUtil; +import org.thoughtcrime.securesms.util.CommunicationActions; import org.thoughtcrime.securesms.util.FeatureFlags; import org.thoughtcrime.securesms.util.StringUtil; import org.thoughtcrime.securesms.util.concurrent.SimpleTask; import org.thoughtcrime.securesms.util.text.AfterTextChanged; +import org.thoughtcrime.securesms.util.views.LearnMoreTextView; import org.whispersystems.libsignal.util.guava.Optional; import java.io.IOException; @@ -252,6 +254,9 @@ public class EditProfileFragment extends Fragment { trimInPlace(s, false); viewModel.setFamilyName(s.toString()); })); + LearnMoreTextView descriptionText = view.findViewById(R.id.description_text); + descriptionText.setLearnMoreVisible(true); + descriptionText.setOnLinkClickListener(v -> CommunicationActions.openBrowserLink(requireContext(), getString(R.string.EditProfileFragment__support_link))); } this.finishButton.setOnClickListener(v -> { diff --git a/app/src/main/res/layout/profile_create_fragment.xml b/app/src/main/res/layout/profile_create_fragment.xml index cac039db8d..a72719c5cc 100644 --- a/app/src/main/res/layout/profile_create_fragment.xml +++ b/app/src/main/res/layout/profile_create_fragment.xml @@ -197,7 +197,7 @@ app:layout_constraintTop_toTopOf="@id/profile_overview_username" app:srcCompat="@drawable/ic_compose_solid_24" /> - Problem setting profile Profile photo Set up your profile - Signal profiles are end-to-end encrypted, and the Signal service never has access to this information. + Your profile is end-to-end encrypted. It will be visible to your contacts, when you initiate or accept new conversations, and when you join new groups. Set avatar @@ -826,11 +826,11 @@ Delete Block Unblock - Do you want to let %1$s message you? They won\'t know you\'ve seen their messages until you accept. - Do you want to join the group %1$s? They won\'t know you\'ve seen their messages until you accept. + Let %1$s message you and share your name and photo with them? They won\'t know you\'ve seen their message until you accept. + Let %1$s message you and share your name and photo with them? You won\'t receive any messages until you unblock them. + Join this group and share your name and photo with its members? They won\'t know you\'ve seen their messages until you accept. You were invited to join the group %1$s. Do you want to let members of this group message you? - Unblock %1$s to message and call each other. - Unblock to allow group members to add you to this group again. + Unblock this group and share your name and photo with its members? You won\'t receive any messages until you unblock them. Member of %1$s Member of %1$s and %2$s Member of %1$s, %2$s, and %3$s @@ -1625,6 +1625,7 @@ Edit group name and photo Group name + https://support.signal.org/hc/articles/360007459591 Shared media