revert usage of THING translations

This commit is contained in:
Kyle Spearrin 2018-07-10 08:39:05 -04:00
parent a6bd9ecfa3
commit 5ade229cb9
7 changed files with 102 additions and 94 deletions

View File

@ -82,8 +82,7 @@ export class EntityUsersComponent implements OnInit {
this.analytics.eventTrack.next({ action: 'Removed User From Collection' });
}
this.toasterService.popAsync('success', null,
this.i18nService.t('removedThing', this.i18nService.t('user').toLocaleLowerCase(), user.email));
this.toasterService.popAsync('success', null, this.i18nService.t('removedUserId', user.email));
this.onRemovedUser.emit();
const index = this.users.indexOf(user);
if (index > -1) {

View File

@ -99,6 +99,7 @@ export class EventsComponent implements OnInit {
userEmail: user != null ? user.email : '',
date: r.date,
ip: r.ipAddress,
type: r.type,
};
});

View File

@ -18,7 +18,7 @@
<div class="form-group">
<label for="externalId">{{'externalId' | i18n}}</label>
<input id="externalId" class="form-control" type="text" name="ExternalId" [(ngModel)]="externalId">
<small class="form-text text-muted">{{'externalIdDesc' | i18n : ('group' | i18n).toLocaleLowerCase()}}</small>
<small class="form-text text-muted">{{'externalIdGroupDesc' | i18n}}</small>
</div>
<h3 class="mt-4">{{'accessControl' | i18n}}</h3>
<div class="form-group">
@ -51,7 +51,7 @@
<thead>
<tr>
<th>&nbsp;</th>
<th>{{'collection' | i18n}}</th>
<th>{{'collections' | i18n}}</th>
<th width="100" class="text-center">{{'readOnly' | i18n}}</th>
</tr>
</thead>

View File

@ -111,8 +111,7 @@ export class GroupAddEditComponent implements OnInit {
await this.formPromise;
this.analytics.eventTrack.next({ action: this.editMode ? 'Edited Group' : 'Created Group' });
this.toasterService.popAsync('success', null,
this.i18nService.t(this.editMode ? 'editedThing' : 'createdThing',
this.i18nService.t('group').toLocaleLowerCase(), this.name));
this.i18nService.t(this.editMode ? 'editedGroupId' : 'createdGroupId', this.name));
this.onSavedGroup.emit();
} catch { }
}
@ -133,8 +132,7 @@ export class GroupAddEditComponent implements OnInit {
this.deletePromise = this.apiService.deleteGroup(this.organizationId, this.groupId);
await this.deletePromise;
this.analytics.eventTrack.next({ action: 'Deleted Group' });
this.toasterService.popAsync('success', null,
this.i18nService.t('deletedThing', this.i18nService.t('group').toLocaleLowerCase(), this.name));
this.toasterService.popAsync('success', null, this.i18nService.t('deletedGroupId', this.name));
this.onDeletedGroup.emit();
} catch { }
}

View File

@ -98,8 +98,7 @@ export class GroupsComponent implements OnInit {
try {
await this.apiService.deleteGroup(this.organizationId, group.id);
this.analytics.eventTrack.next({ action: 'Deleted Group' });
this.toasterService.popAsync('success', null,
this.i18nService.t('deletedThing', this.i18nService.t('group').toLocaleLowerCase(), group.name));
this.toasterService.popAsync('success', null, this.i18nService.t('deletedGroupId', group.name));
const index = this.groups.indexOf(group);
if (index > -1) {
this.groups.splice(index, 1);

View File

@ -64,16 +64,13 @@ export class EventService {
break;
// Cipher
case EventType.Cipher_Created:
msg = this.i18nService.t('createdThing', this.i18nService.t('item').toLocaleLowerCase(),
this.formatCipherId(ev, options));
msg = this.i18nService.t('createdItemId', this.formatCipherId(ev, options));
break;
case EventType.Cipher_Updated:
msg = this.i18nService.t('editedThing', this.i18nService.t('item').toLocaleLowerCase(),
this.formatCipherId(ev, options));
msg = this.i18nService.t('editedItemId', this.formatCipherId(ev, options));
break;
case EventType.Cipher_Deleted:
msg = this.i18nService.t('deletedThing', this.i18nService.t('item').toLocaleLowerCase(),
this.formatCipherId(ev, options));
msg = this.i18nService.t('deletedItemId', this.formatCipherId(ev, options));
break;
case EventType.Cipher_AttachmentCreated:
msg = this.i18nService.t('createdAttachmentForItem', this.formatCipherId(ev, options));
@ -82,37 +79,30 @@ export class EventService {
msg = this.i18nService.t('deletedAttachmentForItem', this.formatCipherId(ev, options));
break;
case EventType.Cipher_Shared:
msg = this.i18nService.t('sharedThing', this.i18nService.t('item').toLocaleLowerCase(),
this.formatCipherId(ev, options));
msg = this.i18nService.t('sharedItemId', this.formatCipherId(ev, options));
break;
case EventType.Cipher_UpdatedCollections:
msg = this.i18nService.t('editedCollectionsForItem', this.formatCipherId(ev, options));
break;
// Collection
case EventType.Collection_Created:
msg = this.i18nService.t('createdThing', this.i18nService.t('collection').toLocaleLowerCase(),
this.formatCollectionId(ev));
msg = this.i18nService.t('createdCollectionId', this.formatCollectionId(ev));
break;
case EventType.Collection_Updated:
msg = this.i18nService.t('editedThing', this.i18nService.t('collection').toLocaleLowerCase(),
this.formatCollectionId(ev));
msg = this.i18nService.t('editedCollectionId', this.formatCollectionId(ev));
break;
case EventType.Collection_Deleted:
msg = this.i18nService.t('deletedThing', this.i18nService.t('collection').toLocaleLowerCase(),
this.formatCollectionId(ev));
msg = this.i18nService.t('deletedCollectionId', this.formatCollectionId(ev));
break;
// Group
case EventType.Group_Created:
msg = this.i18nService.t('createdThing', this.i18nService.t('group').toLocaleLowerCase(),
this.formatGroupId(ev));
msg = this.i18nService.t('createdGroupId', this.formatGroupId(ev));
break;
case EventType.Group_Updated:
msg = this.i18nService.t('editedThing', this.i18nService.t('group').toLocaleLowerCase(),
this.formatGroupId(ev));
msg = this.i18nService.t('editedGroupId', this.formatGroupId(ev));
break;
case EventType.Group_Deleted:
msg = this.i18nService.t('deletedThing', this.i18nService.t('group').toLocaleLowerCase(),
this.formatGroupId(ev));
msg = this.i18nService.t('deletedGroupId', this.formatGroupId(ev));
break;
// Org user
case EventType.OrganizationUser_Invited:
@ -122,12 +112,10 @@ export class EventService {
msg = this.i18nService.t('confirmedUser', this.formatOrgUserId(ev));
break;
case EventType.OrganizationUser_Updated:
msg = this.i18nService.t('editedThing', this.i18nService.t('user').toLocaleLowerCase(),
this.formatOrgUserId(ev));
msg = this.i18nService.t('editedUserId', this.formatOrgUserId(ev));
break;
case EventType.OrganizationUser_Removed:
msg = this.i18nService.t('removedThing', this.i18nService.t('user').toLocaleLowerCase(),
this.formatOrgUserId(ev));
msg = this.i18nService.t('removedUserId', this.formatOrgUserId(ev));
break;
case EventType.OrganizationUser_UpdatedGroups:
msg = this.i18nService.t('editedGroupsForUser', this.formatOrgUserId(ev));

View File

@ -1727,14 +1727,8 @@
"externalId": {
"message": "External Id"
},
"externalIdDesc": {
"message": "The external id is used to link this $THING$ to an external system such as a directory.",
"placeholders": {
"thing": {
"content": "$1",
"example": "group"
}
}
"externalIdGroupDesc": {
"message": "The external id is used to link this group to an external system such as a user directory."
},
"accessControl": {
"message": "Access Control"
@ -1844,73 +1838,102 @@
"editedOrgSettings": {
"message": "Edited organization settings."
},
"createdThing": {
"message": "Created $THING$ $ID$.",
"description": "Created item 'Google'.",
"createdItemId": {
"message": "Created item $ID$.",
"placeholders": {
"thing": {
"content": "$1",
"example": "item"
},
"id": {
"content": "$2",
"content": "$1",
"example": "Google"
}
}
},
"editedThing": {
"message": "Edited $THING$ $ID$.",
"description": "Edited item 'Google'.",
"editedItemId": {
"message": "Edited item $ID$.",
"placeholders": {
"thing": {
"content": "$1",
"example": "item"
},
"id": {
"content": "$2",
"content": "$1",
"example": "Google"
}
}
},
"deletedThing": {
"message": "Deleted $THING$ $ID$.",
"description": "Deleted item 'Google'.",
"deletedItemId": {
"message": "Deleted item $ID$.",
"placeholders": {
"thing": {
"content": "$1",
"example": "item"
},
"id": {
"content": "$2",
"content": "$1",
"example": "Google"
}
}
},
"sharedThing": {
"message": "Shared $THING$ $ID$.",
"description": "Shared item 'Google'.",
"sharedItemId": {
"message": "Shared item $ID$.",
"placeholders": {
"thing": {
"content": "$1",
"example": "item"
},
"id": {
"content": "$2",
"content": "$1",
"example": "'Google'"
}
}
},
"removedThing": {
"message": "Removed $THING$ $ID$.",
"description": "Shared item 'Google'.",
"createdCollectionId": {
"message": "Created collection $ID$.",
"placeholders": {
"thing": {
"content": "$1",
"example": "item"
},
"id": {
"content": "$2",
"example": "Google"
"content": "$1",
"example": "Server Passwords"
}
}
},
"editedCollectionId": {
"message": "Edited collection $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "Server Passwords"
}
}
},
"deletedCollectionId": {
"message": "Deleted collection $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "Server Passwords"
}
}
},
"createdGroupId": {
"message": "Created group $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "Developers"
}
}
},
"editedGroupId": {
"message": "Edited group $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "Developers"
}
}
},
"deletedGroupId": {
"message": "Deleted group $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "Developers"
}
}
},
"removedUserId": {
"message": "Removed user $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "John Smith"
}
}
},
@ -1941,7 +1964,7 @@
}
}
},
"invitedUser": {
"invitedUserId": {
"message": "Invited user $ID$.",
"placeholders": {
"id": {
@ -1950,7 +1973,7 @@
}
}
},
"confirmedUser": {
"confirmedUserId": {
"message": "Confirmed user $ID$.",
"placeholders": {
"id": {
@ -1959,6 +1982,15 @@
}
}
},
"editedUserId": {
"message": "Edited user $ID$.",
"placeholders": {
"id": {
"content": "$1",
"example": "John Smith"
}
}
},
"editedGroupsForUser": {
"message": "Edited groups for user $ID$.",
"placeholders": {
@ -1968,15 +2000,6 @@
}
}
},
"item": {
"message": "Item"
},
"collection": {
"message": "Collection"
},
"group": {
"message": "Group"
},
"device": {
"message": "Device"
},