edit group editing title to match Android

pull/1306/head
Audric Ackermann 5 years ago
parent 1f228fe6ee
commit 5739d78ada
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1645,25 +1645,22 @@
"message": "Select message",
"description": "Button action that the user can click to select the message"
},
"copiedMessage": {
"message": "Message text copied",
"description": "A toast message telling the user that the message text was copied"
},
"editGroupNameOrPicture": {
"message": "Edit group name or picture",
"description": "Button action that the user can click to edit a group name (open)"
"editGroup": {
"message": "Edit group",
"description": "Button action that the user can click to edit a group name (open)",
"androidKey": "conversation__menu_edit_group"
},
"editGroupName": {
"message": "Edit group name",
"description": "Button action that the user can click to edit a group name (closed)"
},
"updateGroupDialogTitle": {
"message": "Updating a Closed Group",
"description": "Title for the dialog box used to update an existing private group"
},
"updatePublicGroupDialogTitle": {
"message": "Updating a open group Channel",
"description": "Title for the dialog box used to update an existing open group channel"
"message": "Updating $name$...",
"description": "Title for the dialog box used to update an existing private group",
"androidKey": "GroupCreateActivity_updating_group",
"androidReplace": {
"%1$s": "$name$"
}
},
"showRecoveryPhrase": {
"message": "Show Recovery Phrase",

@ -12,7 +12,8 @@
this.groupName = groupConvo.get('name');
this.conversation = groupConvo;
this.titleText = i18n('updateGroupDialogTitle');
this.titleText = i18n('updateGroupDialogTitle', this.groupName);
this.close = this.close.bind(this);
this.onSubmit = this.onSubmit.bind(this);
this.isPublic = groupConvo.isPublic();
@ -27,9 +28,7 @@
// public chat settings overrides
if (this.isPublic) {
// fix the title
this.titleText = `${i18n('updatePublicGroupDialogTitle')}: ${
this.groupName
}`;
this.titleText = i18n('updateGroupDialogTitle', this.groupName);
// I'd much prefer to integrate mods with groupAdmins
// but lets discuss first...
this.isAdmin = groupConvo.isModerator(
@ -88,9 +87,7 @@
this.avatarPath = groupConvo.getAvatarPath();
if (this.isPublic) {
this.titleText = `${i18n('updatePublicGroupDialogTitle')}: ${
this.groupName
}`;
this.titleText = i18n('updateGroupDialogTitle', this.groupName);
// I'd much prefer to integrate mods with groupAdmins
// but lets discuss first...
this.isAdmin = groupConvo.isModerator(
@ -100,7 +97,7 @@
this.contactsAndMembers = [];
this.existingMembers = [];
} else {
this.titleText = i18n('updateGroupDialogTitle');
this.titleText = i18n('updateGroupDialogTitle', this.groupName);
this.isAdmin = groupConvo.get('groupAdmins').includes(ourPK);
const convos = window.getConversations().models.filter(d => !!d);

@ -50,8 +50,6 @@
let message = '';
let instructions = '';
let hasInterruption = false;
let action = null;
let buttonClass = null;
const socketStatus = this.getSocketStatus();
switch (socketStatus) {
@ -106,20 +104,14 @@
hasInterruption = true;
message = i18n('offline');
instructions = i18n('checkNetworkConnection');
} else if (!Whisper.Registration.isDone()) {
hasInterruption = true;
message = i18n('unlinked');
instructions = i18n('unlinkedWarning');
action = i18n('relink');
buttonClass = 'openInstaller';
}
return {
message,
instructions,
hasInterruption,
action,
buttonClass,
action: null,
buttonClass: null,
};
},
update() {

@ -267,9 +267,7 @@ export class SessionGroupSettings extends React.Component<Props, any> {
role="button"
onClick={this.props.onUpdateGroupName}
>
{isPublic
? window.i18n('editGroupNameOrPicture')
: window.i18n('editGroupName')}
{isPublic ? window.i18n('editGroup') : window.i18n('editGroupName')}
</div>
)}
{showUpdateGroupMembersButton && (

@ -174,9 +174,7 @@ export function getUpdateGroupNameMenuItem(
i18n: LocalizerType
): JSX.Element | null {
if (showUpdateGroupName(Boolean(amMod), Boolean(isKickedFromGroup))) {
return (
<MenuItem onClick={action}>{i18n('editGroupNameOrPicture')}</MenuItem>
);
return <MenuItem onClick={action}>{i18n('editGroup')}</MenuItem>;
}
return null;
}

Loading…
Cancel
Save