diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducer.java b/app/src/main/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducer.java index 614c23fd2..9f6fd22f3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducer.java @@ -158,7 +158,7 @@ final class GroupsV2UpdateMessageProducer { if (editorIsYou) { if (newMemberIsYou) { - updates.add(0, updateDescription(context.getString(R.string.MessageRecord_you_joined_the_group_via_the_sharable_group_link))); + updates.add(0, updateDescription(context.getString(R.string.MessageRecord_you_joined_the_group_via_the_group_link))); } else { updates.add(updateDescription(member.getUuid(), added -> context.getString(R.string.MessageRecord_you_added_s, added))); } @@ -167,7 +167,7 @@ final class GroupsV2UpdateMessageProducer { updates.add(0, updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_added_you, editor))); } else { if (member.getUuid().equals(change.getEditor())) { - updates.add(updateDescription(member.getUuid(), newMember -> context.getString(R.string.MessageRecord_s_joined_the_group_via_the_sharable_group_link, newMember))); + updates.add(updateDescription(member.getUuid(), newMember -> context.getString(R.string.MessageRecord_s_joined_the_group_via_the_group_link, newMember))); } else { updates.add(updateDescription(change.getEditor(), member.getUuid(), (editor, newMember) -> context.getString(R.string.MessageRecord_s_added_s, editor, newMember))); } @@ -516,33 +516,33 @@ final class GroupsV2UpdateMessageProducer { case ANY: groupLinkEnabled = true; if (editorIsYou) { - updates.add(updateDescription(context.getString(R.string.MessageRecord_you_turned_on_the_sharable_group_link))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_you_turned_on_the_group_link_with_admin_approval_off))); } else { - updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_turned_on_the_sharable_group_link, editor))); + updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_turned_on_the_group_link_with_admin_approval_off, editor))); } break; case ADMINISTRATOR: groupLinkEnabled = true; if (editorIsYou) { - updates.add(updateDescription(context.getString(R.string.MessageRecord_you_turned_on_the_sharable_group_link_with_admin_approval))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_you_turned_on_the_group_link_with_admin_approval_on))); } else { - updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_turned_on_the_sharable_group_link_with_admin_approval, editor))); + updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_turned_on_the_group_link_with_admin_approval_on, editor))); } break; case UNSATISFIABLE: if (editorIsYou) { - updates.add(updateDescription(context.getString(R.string.MessageRecord_you_turned_off_the_sharable_group_link))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_you_turned_off_the_group_link))); } else { - updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_turned_off_the_sharable_group_link, editor))); + updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_turned_off_the_group_link, editor))); } break; } if (!groupLinkEnabled && change.getNewInviteLinkPassword().size() > 0) { if (editorIsYou) { - updates.add(updateDescription(context.getString(R.string.MessageRecord_you_reset_the_sharable_group_link))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_you_reset_the_group_link))); } else { - updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_reset_the_sharable_group_link, editor))); + updates.add(updateDescription(change.getEditor(), editor -> context.getString(R.string.MessageRecord_s_reset_the_group_link, editor))); } } } @@ -550,18 +550,18 @@ final class GroupsV2UpdateMessageProducer { private void describeUnknownEditorNewGroupInviteLinkAccess(@NonNull DecryptedGroupChange change, @NonNull List updates) { switch (change.getNewInviteLinkAccess()) { case ANY: - updates.add(updateDescription(context.getString(R.string.MessageRecord_the_sharable_group_link_has_been_turned_on))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_the_group_link_has_been_turned_on_with_admin_approval_off))); break; case ADMINISTRATOR: - updates.add(updateDescription(context.getString(R.string.MessageRecord_the_sharable_group_link_has_been_turned_on_with_admin_approval))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_the_group_link_has_been_turned_on_with_admin_approval_on))); break; case UNSATISFIABLE: - updates.add(updateDescription(context.getString(R.string.MessageRecord_the_sharable_group_link_has_been_turned_off))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_the_group_link_has_been_turned_off))); break; } if (change.getNewInviteLinkPassword().size() > 0) { - updates.add(updateDescription(context.getString(R.string.MessageRecord_the_sharable_group_link_has_been_reset))); + updates.add(updateDescription(context.getString(R.string.MessageRecord_the_group_link_has_been_reset))); } } @@ -572,7 +572,7 @@ final class GroupsV2UpdateMessageProducer { if (requestingMemberIsYou) { updates.add(updateDescription(context.getString(R.string.MessageRecord_you_sent_a_request_to_join_the_group))); } else { - updates.add(updateDescription(member.getUuid(), requesting -> context.getString(R.string.MessageRecord_s_requested_to_join_via_the_sharable_group_link, requesting))); + updates.add(updateDescription(member.getUuid(), requesting -> context.getString(R.string.MessageRecord_s_requested_to_join_via_the_group_link, requesting))); } } } diff --git a/app/src/main/res/layout/group_manage_fragment.xml b/app/src/main/res/layout/group_manage_fragment.xml index 5da6d4f6d..e3ef23d12 100644 --- a/app/src/main/res/layout/group_manage_fragment.xml +++ b/app/src/main/res/layout/group_manage_fragment.xml @@ -573,7 +573,7 @@ android:gravity="center_vertical|start" android:paddingStart="@dimen/group_manage_fragment_row_horizontal_padding" android:paddingEnd="@dimen/group_manage_fragment_row_horizontal_padding" - android:text="@string/ManageGroupActivity_sharable_group_link" + android:text="@string/ManageGroupActivity_group_link" android:textAlignment="viewStart" android:textAppearance="@style/Signal.Text.Body" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2a7a0bdaa..d932da524 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -531,7 +531,7 @@ Pending member requests No member requests to show. - People on this list are attempting to join this group via the sharable group link. + People on this list are attempting to join this group via the group link. Added "%1$s" Denied "%1$s" @@ -577,7 +577,7 @@ Edit group info Choose who can edit the group name, avatar, and disappearing messages. Choose who can add or invite new members. - Sharable group link + Group link Block group Unblock group Leave group @@ -710,7 +710,7 @@ Group links coming soon Update Signal to use group links Joining a group via a link is not yet supported by Signal. This feature will be released in an upcoming update. - The version of Signal you’re using does not support sharable group links. Update to the latest version to join this group via link. + The version of Signal you’re using does not support group links. Update to the latest version to join this group via link. Update Signal Group link is not valid @@ -983,28 +983,28 @@ Who can edit group membership has been changed to \"%1$s\". - You turned on the sharable group link. - You turned on the sharable group link with admin approval. - You turned off the sharable group link. - %1$s turned on the sharable group link. - %1$s turned on the sharable group link with admin approval. - %1$s turned off the sharable group link. - The sharable group link has been turned on. - The sharable group link has been turned on with admin approval. - The sharable group link has been turned off. + You turned on the group link with admin approval off. + You turned on the group link with admin approval on. + You turned off the group link. + %1$s turned on the group link with admin approval off. + %1$s turned on the group link with admin approval on. + %1$s turned off the group link. + The group link has been turned on with admin approval off. + The group link has been turned on with admin approval on. + The group link has been turned off. - You reset the sharable group link. - %1$s reset the sharable group link. - The sharable group link has been reset. + You reset the group link. + %1$s reset the group link. + The group link has been reset. - You joined the group via the sharable group link. - %1$s joined the group via the sharable group link. + You joined the group via the group link. + %1$s joined the group via the group link. You sent a request to join the group. - %1$s requested to join via the sharable group link. + %1$s requested to join via the group link. %1$s approved your request to join the group. diff --git a/app/src/test/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducerTest.java b/app/src/test/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducerTest.java index a05020807..95ca387d3 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducerTest.java +++ b/app/src/test/java/org/thoughtcrime/securesms/database/model/GroupsV2UpdateMessageProducerTest.java @@ -143,7 +143,7 @@ public final class GroupsV2UpdateMessageProducerTest { .addMember(you) .build(); - assertThat(describeChange(change), is(singletonList("You joined the group via the sharable group link."))); + assertThat(describeChange(change), is(singletonList("You joined the group via the group link."))); } @Test @@ -152,7 +152,7 @@ public final class GroupsV2UpdateMessageProducerTest { .addMember(bob) .build(); - assertThat(describeChange(change), is(singletonList("Bob joined the group via the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Bob joined the group via the group link."))); } @Test @@ -209,7 +209,7 @@ public final class GroupsV2UpdateMessageProducerTest { .addMember(you) .build(); - assertThat(describeChange(change), is(Arrays.asList("You joined the group via the sharable group link.", "You added Alice."))); + assertThat(describeChange(change), is(Arrays.asList("You joined the group via the group link.", "You added Alice."))); } // Member removals @@ -846,7 +846,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.ANY) .build(); - assertThat(describeChange(change), is(singletonList("You turned on the sharable group link."))); + assertThat(describeChange(change), is(singletonList("You turned on the group link with admin approval off."))); } @Test @@ -855,7 +855,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.ADMINISTRATOR) .build(); - assertThat(describeChange(change), is(singletonList("You turned on the sharable group link with admin approval."))); + assertThat(describeChange(change), is(singletonList("You turned on the group link with admin approval on."))); } @Test @@ -864,7 +864,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.UNSATISFIABLE) .build(); - assertThat(describeChange(change), is(singletonList("You turned off the sharable group link."))); + assertThat(describeChange(change), is(singletonList("You turned off the group link."))); } @Test @@ -873,7 +873,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.ANY) .build(); - assertThat(describeChange(change), is(singletonList("Alice turned on the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Alice turned on the group link with admin approval off."))); } @Test @@ -882,7 +882,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.ADMINISTRATOR) .build(); - assertThat(describeChange(change), is(singletonList("Bob turned on the sharable group link with admin approval."))); + assertThat(describeChange(change), is(singletonList("Bob turned on the group link with admin approval on."))); } @Test @@ -891,7 +891,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.UNSATISFIABLE) .build(); - assertThat(describeChange(change), is(singletonList("Alice turned off the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Alice turned off the group link."))); } @Test @@ -900,7 +900,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.ANY) .build(); - assertThat(describeChange(change), is(singletonList("The sharable group link has been turned on."))); + assertThat(describeChange(change), is(singletonList("The group link has been turned on with admin approval off."))); } @Test @@ -909,7 +909,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.ADMINISTRATOR) .build(); - assertThat(describeChange(change), is(singletonList("The sharable group link has been turned on with admin approval."))); + assertThat(describeChange(change), is(singletonList("The group link has been turned on with admin approval on."))); } @Test @@ -918,7 +918,7 @@ public final class GroupsV2UpdateMessageProducerTest { .inviteLinkAccess(AccessControl.AccessRequired.UNSATISFIABLE) .build(); - assertThat(describeChange(change), is(singletonList("The sharable group link has been turned off."))); + assertThat(describeChange(change), is(singletonList("The group link has been turned off."))); } // Group link reset @@ -929,7 +929,7 @@ public final class GroupsV2UpdateMessageProducerTest { .resetGroupLink() .build(); - assertThat(describeChange(change), is(singletonList("You reset the sharable group link."))); + assertThat(describeChange(change), is(singletonList("You reset the group link."))); } @Test @@ -938,7 +938,7 @@ public final class GroupsV2UpdateMessageProducerTest { .resetGroupLink() .build(); - assertThat(describeChange(change), is(singletonList("Alice reset the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Alice reset the group link."))); } @Test @@ -947,7 +947,7 @@ public final class GroupsV2UpdateMessageProducerTest { .resetGroupLink() .build(); - assertThat(describeChange(change), is(singletonList("The sharable group link has been reset."))); + assertThat(describeChange(change), is(singletonList("The group link has been reset."))); } /** @@ -961,7 +961,7 @@ public final class GroupsV2UpdateMessageProducerTest { .resetGroupLink() .build(); - assertThat(describeChange(change), is(singletonList("Alice turned on the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Alice turned on the group link with admin approval off."))); } /** @@ -975,7 +975,7 @@ public final class GroupsV2UpdateMessageProducerTest { .resetGroupLink() .build(); - assertThat(describeChange(change), is(singletonList("You turned on the sharable group link with admin approval."))); + assertThat(describeChange(change), is(singletonList("You turned on the group link with admin approval on."))); } @Test @@ -985,7 +985,7 @@ public final class GroupsV2UpdateMessageProducerTest { .resetGroupLink() .build(); - assertThat(describeChange(change), is(Arrays.asList("You turned off the sharable group link.", "You reset the sharable group link."))); + assertThat(describeChange(change), is(Arrays.asList("You turned off the group link.", "You reset the group link."))); } // Group link request @@ -1005,7 +1005,7 @@ public final class GroupsV2UpdateMessageProducerTest { .requestJoin() .build(); - assertThat(describeChange(change), is(singletonList("Bob requested to join via the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Bob requested to join via the group link."))); } @Test @@ -1014,7 +1014,7 @@ public final class GroupsV2UpdateMessageProducerTest { .requestJoin(alice) .build(); - assertThat(describeChange(change), is(singletonList("Alice requested to join via the sharable group link."))); + assertThat(describeChange(change), is(singletonList("Alice requested to join via the group link."))); } @Test