mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
WIP
This commit is contained in:
parent
bc94cb78db
commit
6948d64fa8
@ -256,7 +256,7 @@ public class AttachmentManager {
|
|||||||
String needStoragePermissionTxt = Phrase.from(c, R.string.permissionsStorageSend)
|
String needStoragePermissionTxt = Phrase.from(c, R.string.permissionsStorageSend)
|
||||||
.put(APP_NAME_KEY, c.getString(R.string.sessionMessenger))
|
.put(APP_NAME_KEY, c.getString(R.string.sessionMessenger))
|
||||||
.format().toString();
|
.format().toString();
|
||||||
String storagePermissionDeniedTxt = Phrase.from(c, R.string.cameraGrantAccessStorageDenied)
|
String storagePermissionDeniedTxt = Phrase.from(c, R.string.permissionsStorageSaveDenied)
|
||||||
.put(APP_NAME_KEY, c.getString(R.string.sessionMessenger))
|
.put(APP_NAME_KEY, c.getString(R.string.sessionMessenger))
|
||||||
.format().toString();
|
.format().toString();
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
android:layout_marginTop="@dimen/large_spacing"
|
android:layout_marginTop="@dimen/large_spacing"
|
||||||
android:contentDescription="@string/AccessibilityId_account_id_input"
|
android:contentDescription="@string/AccessibilityId_account_id_input"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/accountIdEnterYourFriends"
|
android:hint="@string/accountIdOrOnsEnter"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:title="@string/messageCopy"
|
android:title="@string/copy"
|
||||||
android:id="@+id/menu_context_copy"
|
android:id="@+id/menu_context_copy"
|
||||||
android:icon="?menu_copy_icon"
|
android:icon="?menu_copy_icon"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
@ -42,10 +42,8 @@ object UpdateMessageBuilder {
|
|||||||
return when (updateData) {
|
return when (updateData) {
|
||||||
// --- Group created or joined ---
|
// --- Group created or joined ---
|
||||||
is UpdateMessageData.Kind.GroupCreation -> {
|
is UpdateMessageData.Kind.GroupCreation -> {
|
||||||
if (isOutgoing) context.getString(R.string.disappearingMessagesNewGroup)
|
if (!isOutgoing) context.getString(R.string.groupInviteYou)
|
||||||
else Phrase.from(context, R.string.disappearingMessagesAddedYou)
|
else "" // We no longer add a string like `disappearingMessagesNewGroup` ("You created a new group") and leave the group with its default empty state
|
||||||
.put(NAME_KEY, senderName)
|
|
||||||
.format().toString()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Group name changed ---
|
// --- Group name changed ---
|
||||||
@ -56,8 +54,7 @@ object UpdateMessageBuilder {
|
|||||||
.format().toString()
|
.format().toString()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Phrase.from(context, R.string.groupNameUpdatedBy)
|
Phrase.from(context, R.string.groupNameNew)
|
||||||
.put(NAME_KEY, senderName)
|
|
||||||
.put(GROUP_NAME_KEY, updateData.name)
|
.put(GROUP_NAME_KEY, updateData.name)
|
||||||
.format().toString()
|
.format().toString()
|
||||||
}
|
}
|
||||||
@ -65,21 +62,37 @@ object UpdateMessageBuilder {
|
|||||||
|
|
||||||
// --- Group member(s) were added ---
|
// --- Group member(s) were added ---
|
||||||
is UpdateMessageData.Kind.GroupMemberAdded -> {
|
is UpdateMessageData.Kind.GroupMemberAdded -> {
|
||||||
val members = updateData.updatedMembers.joinToString(", ", transform = ::getSenderName)
|
|
||||||
|
|
||||||
// You added these members
|
val newMemberCount = updateData.updatedMembers.size
|
||||||
if (isOutgoing) {
|
|
||||||
Phrase.from(context, R.string.groupYouAdded)
|
//val members = updateData.updatedMembers.joinToString(", ", transform = ::getSenderName)
|
||||||
.put(MEMBERS_KEY, members)
|
|
||||||
|
// We previously differentiated between members added by us Vs. members added by someone
|
||||||
|
// else via checking against `isOutgoing` - but now we use the same strings regardless.
|
||||||
|
when (newMemberCount) {
|
||||||
|
0 -> {
|
||||||
|
Log.w(TAG, "Somehow asked to add zero new members to group - this should never happen.")
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
Phrase.from(context, R.string.groupMemberNew)
|
||||||
|
.put(NAME_KEY, updateData.updatedMembers.elementAtOrNull(0))
|
||||||
.format().toString()
|
.format().toString()
|
||||||
}
|
}
|
||||||
// Someone else added these members
|
2 -> {
|
||||||
else {
|
Phrase.from(context, R.string.groupMemberTwoNew)
|
||||||
Phrase.from(context, R.string.groupNameAdded)
|
.put(NAME_KEY, updateData.updatedMembers.elementAtOrNull(0))
|
||||||
.put(NAME_KEY,senderName)
|
.put(OTHER_NAME_KEY, updateData.updatedMembers.elementAtOrNull(1))
|
||||||
.put(MEMBERS_KEY, members)
|
|
||||||
.format().toString()
|
.format().toString()
|
||||||
}
|
}
|
||||||
|
else -> {
|
||||||
|
val newMemberCountMinusOne = newMemberCount - 1
|
||||||
|
Phrase.from(context, R.string.groupMemberMoreNew)
|
||||||
|
.put(NAME_KEY, updateData.updatedMembers.elementAtOrNull(0))
|
||||||
|
.put(COUNT_KEY, newMemberCountMinusOne)
|
||||||
|
.format().toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Group member(s) removed ---
|
// --- Group member(s) removed ---
|
||||||
@ -217,7 +230,7 @@ object UpdateMessageBuilder {
|
|||||||
.format().toString()
|
.format().toString()
|
||||||
} else // 1-on-1 conversation
|
} else // 1-on-1 conversation
|
||||||
{
|
{
|
||||||
Phrase.from(context, R.string.disappearingMessagesUpdatedYours)
|
Phrase.from(context, R.string.disappearingMessagesSetYou)
|
||||||
.put(TIME_KEY, time)
|
.put(TIME_KEY, time)
|
||||||
.put(DISAPPEARING_MESSAGES_TYPE_KEY, action)
|
.put(DISAPPEARING_MESSAGES_TYPE_KEY, action)
|
||||||
.format().toString()
|
.format().toString()
|
||||||
|
@ -146,7 +146,7 @@ class RecipientProvider {
|
|||||||
return new RecipientDetails(title, avatarId, false, false, settings.orNull(), members);
|
return new RecipientDetails(title, avatarId, false, false, settings.orNull(), members);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RecipientDetails(context.getString(R.string.groupUnnamed), null, false, false, settings.orNull(), null);
|
return new RecipientDetails(context.getString(R.string.groupUnknown), null, false, false, settings.orNull(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
static class RecipientDetails {
|
static class RecipientDetails {
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- MessageRecord -->
|
<!-- MessageRecord -->
|
||||||
<string name="disappearingMessagesNewGroup">Vous avez créé un nouveau groupe.</string>
|
|
||||||
<string name="disappearingMessagesAddedYou">%1$s vous a ajouté·e dans le groupe.</string>
|
|
||||||
<string name="groupNameUpdatedBy">{name} a renommé le groupe en : {group_name}</string>
|
|
||||||
<string name="groupYouAdded">Vous avez ajouté {members} au groupe.</string>
|
|
||||||
<string name="groupNameAdded">%1$s a ajouté %2$s au groupe.</string>
|
|
||||||
<string name="you">Vous</string>
|
<string name="you">Vous</string>
|
||||||
|
|
||||||
<!-- RecipientProvider -->
|
<!-- RecipientProvider -->
|
||||||
<string name="groupUnnamed">Groupe sans nom</string>
|
|
||||||
|
|
||||||
<string name="yes">Oui</string>
|
<string name="yes">Oui</string>
|
||||||
<string name="no">Non</string>
|
<string name="no">Non</string>
|
||||||
<string name="delete">Supprimer</string>
|
<string name="delete">Supprimer</string>
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- MessageRecord -->
|
<!-- MessageRecord -->
|
||||||
<string name="disappearingMessagesNewGroup">Vous avez créé un nouveau groupe.</string>
|
|
||||||
<string name="disappearingMessagesAddedYou">%1$s vous a ajouté·e dans le groupe.</string>
|
|
||||||
<string name="groupNameUpdatedBy">{name} a renommé le groupe en : {group_name}</string>
|
|
||||||
<string name="groupYouAdded">Vous avez ajouté {members} au groupe.</string>
|
|
||||||
<string name="groupNameAdded">%1$s a ajouté %2$s au groupe.</string>
|
|
||||||
<string name="you">Vous</string>
|
<string name="you">Vous</string>
|
||||||
|
|
||||||
<!-- RecipientProvider -->
|
<!-- RecipientProvider -->
|
||||||
<string name="groupUnnamed">Groupe sans nom</string>
|
|
||||||
|
|
||||||
<string name="yes">Oui</string>
|
<string name="yes">Oui</string>
|
||||||
<string name="no">Non</string>
|
<string name="no">Non</string>
|
||||||
<string name="delete">Supprimer</string>
|
<string name="delete">Supprimer</string>
|
||||||
|
@ -72,7 +72,6 @@
|
|||||||
<string name="accept">Accept</string>
|
<string name="accept">Accept</string>
|
||||||
<string name="accountIdCopy">Copy Account ID</string>
|
<string name="accountIdCopy">Copy Account ID</string>
|
||||||
<string name="accountIdEnter">Enter Account ID</string>
|
<string name="accountIdEnter">Enter Account ID</string>
|
||||||
<string name="accountIdEnterYourFriends">Enter your friend\'s Account ID or ONS</string>
|
|
||||||
<string name="accountIdErrorInvalid">This Account ID is invalid. Please check and try again.</string>
|
<string name="accountIdErrorInvalid">This Account ID is invalid. Please check and try again.</string>
|
||||||
<string name="accountIdOrOnsEnter">Enter Account ID or ONS</string>
|
<string name="accountIdOrOnsEnter">Enter Account ID or ONS</string>
|
||||||
<string name="accountIdOrOnsInvite">Invite Account ID or ONS</string>
|
<string name="accountIdOrOnsInvite">Invite Account ID or ONS</string>
|
||||||
@ -208,7 +207,6 @@
|
|||||||
<string name="cameraGrantAccessDenied">{app_name} needs camera access to take photos and videos, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Camera\".</string>
|
<string name="cameraGrantAccessDenied">{app_name} needs camera access to take photos and videos, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Camera\".</string>
|
||||||
<string name="cameraGrantAccessDescription">{app_name} needs camera access to take photos and videos, or scan QR codes.</string>
|
<string name="cameraGrantAccessDescription">{app_name} needs camera access to take photos and videos, or scan QR codes.</string>
|
||||||
<string name="cameraGrantAccessQr">{app_name} needs camera access to scan QR codes</string>
|
<string name="cameraGrantAccessQr">{app_name} needs camera access to scan QR codes</string>
|
||||||
<string name="cameraGrantAccessStorageDenied">{app_name} needs storage access to send photos and videos, but it has been permanently denied. Please continue to app settings, select "Permissions", and enable "Storage".</string>
|
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
<string name="clear">Clear</string>
|
<string name="clear">Clear</string>
|
||||||
<string name="clearAll">Clear All</string>
|
<string name="clearAll">Clear All</string>
|
||||||
@ -307,7 +305,6 @@
|
|||||||
<string name="deleting">Deleting</string>
|
<string name="deleting">Deleting</string>
|
||||||
<string name="developerToolsToggle">Toggle Developer Tools</string>
|
<string name="developerToolsToggle">Toggle Developer Tools</string>
|
||||||
<string name="disappearingMessages">Disappearing Messages</string>
|
<string name="disappearingMessages">Disappearing Messages</string>
|
||||||
<string name="disappearingMessagesAddedYou">{name} added you to the group.</string>
|
|
||||||
<string name="disappearingMessagesCountdownBigMobile">Auto-deletes in {time_large}</string>
|
<string name="disappearingMessagesCountdownBigMobile">Auto-deletes in {time_large}</string>
|
||||||
<string name="disappearingMessagesCountdownBigSmallMobile">Auto-deletes in {time_large} {time_small}</string>
|
<string name="disappearingMessagesCountdownBigSmallMobile">Auto-deletes in {time_large} {time_small}</string>
|
||||||
<string name="disappearingMessagesDeleteType">Delete Type</string>
|
<string name="disappearingMessagesDeleteType">Delete Type</string>
|
||||||
@ -322,7 +319,6 @@
|
|||||||
<string name="disappearingMessagesFollowSettingOff">Set your messages to disappear <b>{time}</b> after they have been <b>{disappearing_messages_type}</b>?</string>
|
<string name="disappearingMessagesFollowSettingOff">Set your messages to disappear <b>{time}</b> after they have been <b>{disappearing_messages_type}</b>?</string>
|
||||||
<string name="disappearingMessagesFollowSettingOn">Set your messages to disappear <b>{time}</b> after they have been <b>{disappearing_messages_type}</b>?</string>
|
<string name="disappearingMessagesFollowSettingOn">Set your messages to disappear <b>{time}</b> after they have been <b>{disappearing_messages_type}</b>?</string>
|
||||||
<string name="disappearingMessagesLegacy">{name} is using an outdated client. Disappearing messages may not work as expected.</string>
|
<string name="disappearingMessagesLegacy">{name} is using an outdated client. Disappearing messages may not work as expected.</string>
|
||||||
<string name="disappearingMessagesNewGroup">You created a new group.</string>
|
|
||||||
<string name="disappearingMessagesOnlyAdmins">Only group admins can change this setting.</string>
|
<string name="disappearingMessagesOnlyAdmins">Only group admins can change this setting.</string>
|
||||||
<string name="disappearingMessagesSent">Sent</string>
|
<string name="disappearingMessagesSent">Sent</string>
|
||||||
<string name="disappearingMessagesSet"><b>{name}</b> has set messages to disappear {time} after they have been {disappearing_messages_type}.</string>
|
<string name="disappearingMessagesSet"><b>{name}</b> has set messages to disappear {time} after they have been {disappearing_messages_type}.</string>
|
||||||
@ -334,7 +330,6 @@
|
|||||||
<string name="disappearingMessagesTypeSent">sent</string>
|
<string name="disappearingMessagesTypeSent">sent</string>
|
||||||
<string name="disappearingMessagesUpdated"><b>{admin_name}</b> updated disappearing message settings.</string>
|
<string name="disappearingMessagesUpdated"><b>{admin_name}</b> updated disappearing message settings.</string>
|
||||||
<string name="disappearingMessagesUpdatedYou"><b>You</b> updated disappearing message settings.</string>
|
<string name="disappearingMessagesUpdatedYou"><b>You</b> updated disappearing message settings.</string>
|
||||||
<string name="disappearingMessagesUpdatedYours">You set your messages to disappear {time} after they have been {disappearing_messages_type}.</string>
|
|
||||||
<string name="dismiss">Dismiss</string>
|
<string name="dismiss">Dismiss</string>
|
||||||
<string name="displayNameDescription">It can be your real name, an alias, or anything else you like — and you can change it at any time.</string>
|
<string name="displayNameDescription">It can be your real name, an alias, or anything else you like — and you can change it at any time.</string>
|
||||||
<string name="displayNameEnter">Enter your display name</string>
|
<string name="displayNameEnter">Enter your display name</string>
|
||||||
@ -412,13 +407,11 @@
|
|||||||
<string name="groupMembers">Group Members</string>
|
<string name="groupMembers">Group Members</string>
|
||||||
<string name="groupMembersNone">There are no other members in this group.</string>
|
<string name="groupMembersNone">There are no other members in this group.</string>
|
||||||
<string name="groupName">Group Name</string>
|
<string name="groupName">Group Name</string>
|
||||||
<string name="groupNameAdded">{name} added {members} to the group.</string>
|
|
||||||
<string name="groupNameEnter">Enter a group name</string>
|
<string name="groupNameEnter">Enter a group name</string>
|
||||||
<string name="groupNameEnterPlease">Please enter a group name.</string>
|
<string name="groupNameEnterPlease">Please enter a group name.</string>
|
||||||
<string name="groupNameEnterShorter">Please enter a shorter group name.</string>
|
<string name="groupNameEnterShorter">Please enter a shorter group name.</string>
|
||||||
<string name="groupNameNew">Group name is now {group_name}.</string>
|
<string name="groupNameNew">Group name is now {group_name}.</string>
|
||||||
<string name="groupNameUpdated">Group name updated.</string>
|
<string name="groupNameUpdated">Group name updated.</string>
|
||||||
<string name="groupNameUpdatedBy">{name} renamed the group to: {group_name}</string>
|
|
||||||
<string name="groupNoMessages">You have no messages from <b>{group_name}</b>. Send a message to start the conversation!</string>
|
<string name="groupNoMessages">You have no messages from <b>{group_name}</b>. Send a message to start the conversation!</string>
|
||||||
<string name="groupOnlyAdmin">You are the only admin in <b>{group_name}</b>.\nGroup members and settings cannot be changed without an admin.</string>
|
<string name="groupOnlyAdmin">You are the only admin in <b>{group_name}</b>.\nGroup members and settings cannot be changed without an admin.</string>
|
||||||
<string name="groupPromotedYou"><b>You</b> were promoted to Admin.</string>
|
<string name="groupPromotedYou"><b>You</b> were promoted to Admin.</string>
|
||||||
@ -435,9 +428,7 @@
|
|||||||
<string name="groupRemovedYou">You were removed from <b>{group_name}</b>.</string>
|
<string name="groupRemovedYou">You were removed from <b>{group_name}</b>.</string>
|
||||||
<string name="groupSetDisplayPicture">Set Group Display Picture</string>
|
<string name="groupSetDisplayPicture">Set Group Display Picture</string>
|
||||||
<string name="groupUnknown">Unknown Group</string>
|
<string name="groupUnknown">Unknown Group</string>
|
||||||
<string name="groupUnnamed">Unnamed group</string>
|
|
||||||
<string name="groupUpdated">Group updated</string>
|
<string name="groupUpdated">Group updated</string>
|
||||||
<string name="groupYouAdded">You added {members} to the group.</string>
|
|
||||||
<string name="helpFAQ">FAQ</string>
|
<string name="helpFAQ">FAQ</string>
|
||||||
<string name="helpHelpUsTranslateSession">Help us translate {app_name}</string>
|
<string name="helpHelpUsTranslateSession">Help us translate {app_name}</string>
|
||||||
<string name="helpReportABug">Report a bug</string>
|
<string name="helpReportABug">Report a bug</string>
|
||||||
@ -491,7 +482,6 @@
|
|||||||
<string name="membersInviteShareTwoDescription">Would you like to share group message history with <b>{name}</b> and <b>{other_name}</b>?</string>
|
<string name="membersInviteShareTwoDescription">Would you like to share group message history with <b>{name}</b> and <b>{other_name}</b>?</string>
|
||||||
<string name="membersInviteTitle">Invite</string>
|
<string name="membersInviteTitle">Invite</string>
|
||||||
<string name="message">Message</string>
|
<string name="message">Message</string>
|
||||||
<string name="messageCopy">Copy message</string>
|
|
||||||
<string name="messageEmpty">This message is empty.</string>
|
<string name="messageEmpty">This message is empty.</string>
|
||||||
<string name="messageErrorDelivery">Message delivery failed</string>
|
<string name="messageErrorDelivery">Message delivery failed</string>
|
||||||
<string name="messageErrorLimit">Message limit reached</string>
|
<string name="messageErrorLimit">Message limit reached</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user