"leave {Closed|Open} Group" => "leave group"

pull/1306/head
Audric Ackermann 5 years ago
parent 66d3a2b86c
commit e008dbd0d5
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -927,10 +927,6 @@
"message": "Permanently delete the messages in this conversation?",
"description": "Confirmation dialog text that asks the user if they really wish to delete the conversation. Answer buttons use the strings 'ok' and 'cancel'. The deletion is permanent, i.e. it cannot be undone."
},
"leaveOpenGroupConfirmation": {
"message": "Leave this Open Group?",
"description": "Confirmation dialog text that tells the user what will happen if they leave the public channel."
},
"deleteAccount": {
"message": "Delete Account",
"description": "Text for button in settings view to delete account"
@ -1605,17 +1601,17 @@
"message": "Ban failed!",
"description": "Toast on unsuccesful user ban."
},
"leaveOpenGroup": {
"message": "Leave Open Group",
"leaveGroup": {
"message": "Leave Group",
"description": "Button action that the user can click to leave the group"
},
"leaveClosedGroup": {
"message": "Leave Closed Group",
"description": "Button action that the user can click to leave the group"
},
"leaveClosedGroupConfirmation": {
"message": "Leave this Closed Group?",
"description": "Confirmation dialog text that tells the user what will happen if they leave the closed group."
"leaveGroupConfirmation": {
"message": "Are you sure you want to leave this group?",
"description": "Confirmation dialog text that tells the user what will happen if they leave the group."
},
"noContactsForGroup": {
"message": "You don't have any contacts to start a group with."

@ -2302,12 +2302,15 @@
this.contactCollection.reset(contacts);
});
},
// returns true if this is a closed/medium or open group
isGroup() {
return this.get('type') === 'group';
},
copyPublicKey() {
clipboard.writeText(this.id);
const isGroup = this.getProps().type === 'group';
const copiedMessage = isGroup
const copiedMessage = this.isGroup()
? i18n('copiedChatId')
: i18n('copiedPublicKey');
@ -2330,12 +2333,9 @@
let title = i18n('deleteContact');
let message = i18n('deleteContactConfirmation');
if (this.isPublic()) {
title = i18n('leaveOpenGroup');
message = i18n('leaveOpenGroupConfirmation');
} else if (this.isClosedGroup()) {
title = i18n('leaveClosedGroup');
message = i18n('leaveClosedGroupConfirmation');
if (this.isGroup()) {
title = i18n('leaveGroup');
message = i18n('leaveGroupConfirmation');
}
window.confirmationDialog({

@ -237,12 +237,9 @@
let title = i18n('deleteContact');
let message = i18n('deleteContactConfirmation');
if (groupConvo.isPublic()) {
title = i18n('leaveOpenGroup');
message = i18n('leaveOpenGroupConfirmation');
} else if (groupConvo.isClosedGroup()) {
title = i18n('leaveClosedGroup');
message = i18n('leaveClosedGroupConfirmation');
if (groupConvo.isGroup()) {
title = i18n('leaveGroup');
message = i18n('leaveGroupConfirmation');
}
window.confirmationDialog({

@ -223,10 +223,10 @@ export class SessionGroupSettings extends React.Component<Props, any> {
const hasDisappearingMessages =
!isPublic && !isKickedFromGroup && !isBlocked;
const leaveGroupString = isPublic
? window.i18n('leaveOpenGroup')
? window.i18n('leaveGroup')
: isKickedFromGroup
? window.i18n('youGotKickedFromGroup')
: window.i18n('leaveClosedGroup');
: window.i18n('leaveGroup');
const disappearingMessagesOptions = timerOptions.map(option => {
return {

@ -135,7 +135,7 @@ export function getDeleteContactMenuItem(
)
) {
if (isPublic) {
return <MenuItem onClick={action}>{i18n('leaveOpenGroup')}</MenuItem>;
return <MenuItem onClick={action}>{i18n('leaveGroup')}</MenuItem>;
}
return <MenuItem onClick={action}>{i18n('deleteContact')}</MenuItem>;
}
@ -158,7 +158,7 @@ export function getLeaveGroupMenuItem(
Boolean(isRss)
)
) {
return <MenuItem onClick={action}>{i18n('leaveClosedGroup')}</MenuItem>;
return <MenuItem onClick={action}>{i18n('leaveGroup')}</MenuItem>;
}
return null;
}

Loading…
Cancel
Save