Skip to content

Commit 706e1d7

Browse files
Merge pull request #466 from PermanentOrg/PER-per-9070-replace-tag-with-keyword
replaced all tags with keywords
2 parents 231e276 + 0fe108e commit 706e1d7

File tree

16 files changed

+35
-35
lines changed

16 files changed

+35
-35
lines changed

constants/master_en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"private": "Private",
2424
"relation": "Relation",
2525
"share": "Share",
26-
"tag": "Tag",
26+
"tag": "Keyword",
2727
"task": "Task",
2828
"unit_test": "UnitTest"
2929
}
@@ -214,7 +214,7 @@
214214
"mysql": ""
215215
},
216216
"tag": {
217-
"lookup": "Tag not found"
217+
"lookup": "Keyword not found"
218218
},
219219
"task_singleton": {
220220
"lookup": "Data lookup failed (TS)"

src/app/core/components/archive-settings-dialog/archive-settings-dialog.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
(click)="setTab('manage-keywords')"
1414
[class.active]="activeTab === 'manage-keywords'"
1515
>
16-
Manage Tags
16+
Manage Keywords
1717
</div>
1818
<div
1919
class="dialog-tab"
@@ -40,15 +40,15 @@
4040
<div class="panel" #panel>
4141
<ng-container [ngSwitch]="activeTab">
4242
<ng-container *ngSwitchCase="'manage-keywords'">
43-
<div class="panel-title">Manage Tags</div>
43+
<div class="panel-title">Manage Keywords</div>
4444
<ng-container *ngIf="hasTagsAccess; else noAccess">
4545
<pr-manage-tags
4646
[tags]="tags"
4747
*ngIf="!loadingTags; else loadText"
4848
(refreshTags)="refreshTags()"
4949
>
5050
</pr-manage-tags>
51-
<ng-template #loadText> Loading Archive Tags... </ng-template>
51+
<ng-template #loadText> Loading Archive Keywords... </ng-template>
5252
</ng-container>
5353
<ng-template #noAccess>
5454
<p>

src/app/core/components/archive-settings-dialog/archive-settings-dialog.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class ArchiveSettingsDialogComponent implements OnInit {
6262
this.ngOnInit();
6363
} else {
6464
throw new Error(
65-
'Archive Settings: Maximum number of tag fetch attempts reached.',
65+
'Archive Settings: Maximum number of keyword fetch attempts reached.',
6666
);
6767
}
6868
}, 1000);

src/app/core/components/manage-tags/manage-tags.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div>
22
<div *ngIf="tags.length > 0; else noTags">
3-
<p>There are {{getTagCount()}} tags defined in the current archive.</p>
4-
<input type="text" class="filter" placeholder="Search Tags..." (change)="filter = $event.target.value" (keyup)="filter = $event.target.value" />
3+
<p>There are {{getTagCount()}} keywords defined in the current archive.</p>
4+
<input type="text" class="filter" placeholder="Search Keywords..." (change)="filter = $event.target.value" (keyup)="filter = $event.target.value" />
55
<div class="tagsList" *ngIf="getFilteredTags().length > 0; else noMatchedTags">
66
<ng-container *ngFor="let tag of getFilteredTags();">
77
<ng-container *ngIf="!isEditingTag(tag); else editMode">
@@ -27,10 +27,10 @@
2727
</ng-container>
2828
</div>
2929
<ng-template #noMatchedTags>
30-
<div>No tags match your search query.</div>
30+
<div>No keywords match your search query.</div>
3131
</ng-template>
3232
</div>
3333
<ng-template #noTags>
34-
There are no tags used in this Archive.
34+
There are no keywords used in this Archive.
3535
</ng-template>
3636
</div>

src/app/core/components/manage-tags/manage-tags.component.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ describe('ManageTagsComponent #manage-tags', () => {
106106
expect(find('.tag')[0].nativeElement.textContent).toContain('Potato');
107107
});
108108

109-
it('should have a delete button for each tag', async () => {
109+
it('should have a delete button for each keyword', async () => {
110110
const { find, outputs } = await defaultRender();
111111

112112
expect(find('.delete').length).toBeGreaterThan(0);
113113
expect(outputs.refreshTags.emit).not.toHaveBeenCalled();
114114
});
115115

116-
it('should be able to delete a tag', async () => {
116+
it('should be able to delete a keyword', async () => {
117117
const { find, fixture, outputs } = await defaultRender();
118118
find('.delete')[0].nativeElement.click();
119119
await fixture.whenStable();
@@ -125,7 +125,7 @@ describe('ManageTagsComponent #manage-tags', () => {
125125
expect(find('.tag').length).toBe(1);
126126
});
127127

128-
it('should not delete a tag if an error happens', async () => {
128+
it('should not delete a keyword if an error happens', async () => {
129129
const { element } = await defaultRender();
130130
throwError = true;
131131
try {
@@ -137,13 +137,13 @@ describe('ManageTagsComponent #manage-tags', () => {
137137
}
138138
});
139139

140-
it('should have edit buttons for each tag', async () => {
140+
it('should have edit buttons for each keyword', async () => {
141141
const { find } = await defaultRender();
142142

143143
expect(find('.edit').length).toBeGreaterThan(0);
144144
});
145145

146-
it('should be able to enter edit mode for a tag', async() => {
146+
it('should be able to enter edit mode for a keyword', async() => {
147147
const { find, fixture } = await defaultRender();
148148
find('.edit')[0].nativeElement.click();
149149
await fixture.detectChanges();
@@ -169,7 +169,7 @@ describe('ManageTagsComponent #manage-tags', () => {
169169
expect(outputs.refreshTags.emit).toHaveBeenCalled();
170170
});
171171

172-
it('can cancel out of renaming a tag', async () => {
172+
it('can cancel out of renaming a keyword', async () => {
173173
const { find, fixture } = await defaultRender();
174174
find('.edit')[0].nativeElement.click();
175175
await fixture.detectChanges();
@@ -189,7 +189,7 @@ describe('ManageTagsComponent #manage-tags', () => {
189189
expect(find('.tagList').length).toBe(0);
190190
});
191191

192-
describe('Tags filtering', () => {
192+
describe('Keywords filtering', () => {
193193
async function testValue(val: string, expectedCount: number) {
194194
const { find, fixture } = await defaultRender();
195195
find('input.filter').nativeElement.value = val;

src/app/core/components/manage-tags/manage-tags.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ManageTagsComponent {
5252
return this.prompt
5353
.confirm(
5454
'Delete',
55-
'Are you sure you want to delete this tag from all items in the current archive?',
55+
'Are you sure you want to delete this keyword from all items in the current archive?',
5656
)
5757
.then(async () => {
5858
this.tags = this.tags.filter((t) => t.tagId !== tag.tagId);
@@ -64,7 +64,7 @@ export class ManageTagsComponent {
6464
.catch(() => {
6565
// Let's add the tag back to UI to show it isn't deleted.
6666
this.tags.push(tag);
67-
throw new Error('Manage Tags: Error accessing delete endpoint');
67+
throw new Error('Manage Keywords: Error accessing delete endpoint');
6868
});
6969
})
7070
.catch((e: Error) => {

src/app/core/services/edit/edit.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const ItemActions: { [key: string]: PromptButton } = {
8787
},
8888
Tags: {
8989
buttonName: 'tags',
90-
buttonText: 'Tags',
90+
buttonText: 'Keywords',
9191
},
9292
};
9393

src/app/file-browser/components/edit-tags/edit-tags.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div *ngIf="newTagInputError" class="input-vertical-error">
3030
{{
3131
this.tagType === 'keyword'
32-
? "Tag cannot contain ':'"
32+
? "Keyword cannot contain ':'"
3333
: 'Format must be key:value'
3434
}}
3535
</div>
@@ -65,7 +65,7 @@
6565
</div>
6666
<p class="manage-tags-message" *ngIf="isEditing" @ngIfScaleAnimation>
6767
<span class="manage-tags-link" (click)="onManageTagsClick()">
68-
Manage {{ this.tagType === 'keyword' ? 'tags' : 'custom metadata' }}</span
68+
Manage {{ this.tagType === 'keyword' ? 'keywords' : 'custom metadata' }}</span
6969
>
7070
in archive settings.
7171
</p>
@@ -99,7 +99,7 @@
9999
<div *ngIf="newTagInputError" class="input-vertical-error">
100100
{{
101101
this.tagType === 'keyword'
102-
? "Tag cannot contain ':'"
102+
? "Keyword cannot contain ':'"
103103
: 'Format must be key:value'
104104
}}
105105
</div>
@@ -134,13 +134,13 @@
134134
</div>
135135
</div>
136136
<div class="edit-tag" *ngIf="!matchingTags.length">
137-
No existing tags found
137+
No existing keywords found
138138
</div>
139139
</div>
140140
<p class="manage-tags-message" *ngIf="isEditing" @ngIfScaleAnimation>
141141
<span class="manage-tags-link" (click)="onManageTagsClick()">
142142
Manage
143-
{{ this.tagType === 'keyword' ? 'tags' : 'custom metadata' }}</span
143+
{{ this.tagType === 'keyword' ? 'keywords' : 'custom metadata' }}</span
144144
>
145145
in archive settings.
146146
</p>

src/app/file-browser/components/edit-tags/edit-tags.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class EditTagsComponent
123123

124124
ngOnInit() {
125125
this.placeholderText =
126-
this.tagType === 'keyword' ? 'Add new tag' : 'Add new field:value';
126+
this.tagType === 'keyword' ? 'Add new keyword' : 'Add new field:value';
127127
this.allTags = this.filterTagsByType(this.tagsService.getTags());
128128
this.matchingTags = this.allTags;
129129

@@ -183,7 +183,7 @@ export class EditTagsComponent
183183
} catch (err) {
184184
if (err instanceof BaseResponse) {
185185
this.message.showError({
186-
message: 'There was a problem saving tags for this item.',
186+
message: 'There was a problem saving keywords for this item.',
187187
});
188188
}
189189
} finally {

src/app/file-browser/components/file-list-item/file-list-item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const ItemActions: { [key: string]: PromptButton } = {
117117
},
118118
Tags: {
119119
buttonName: 'tags',
120-
buttonText: 'Tags',
120+
buttonText: 'Keywords',
121121
},
122122
};
123123

src/app/file-browser/components/file-viewer/file-viewer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
</pr-inline-value-edit>
148148
<table class="metadata-table">
149149
<tr>
150-
<td class="title">Tags</td>
150+
<td class="title">Keywords</td>
151151
<td (click)="onTagsClick('keyword')">
152152
<pr-tags [tags]="keywords" [canEdit]="canEdit"></pr-tags>
153153
</td>

src/app/file-browser/components/sidebar/sidebar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
></pr-inline-value-edit>
8888
</div>
8989
<div class="sidebar-item">
90-
<label>Tags</label>
90+
<label>Keywords</label>
9191
<div class="sidebar-item-content">
9292
<pr-edit-tags
9393
[item]="selectedItem"

src/app/search/components/global-search-bar/global-search-bar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<i class="ion-md-search"></i>
55
<div class="search-results" *ngIf="showResults">
66
<div class="search-result-group" *ngIf="tagResults?.length">
7-
<div class="search-result-group-title">Tags</div>
7+
<div class="search-result-group-title">Keywords</div>
88
<div class="search-result-tags">
99
<div class="tag" *ngFor="let tag of tagResults" (click)="onTagResultClick(tag)">{{tag.name}}</div>
1010
</div>

src/app/search/components/global-search-results/global-search-results.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
</div>
66
<div class="results">
77
<div class="result-group" *ngIf="tagResults?.length">
8-
<label>Tags</label>
8+
<label>Keywords</label>
99
<div class="tag-results">
1010
<div class="tag" *ngFor="let tag of tagResults"
11-
(click)="onTagResultClick(tag)" ngbTooltip='Find items with tag "{{tag.name}}"'>
11+
(click)="onTagResultClick(tag)" ngbTooltip='Find items with keyword "{{tag.name}}"'>
1212
{{tag.name}}
1313
</div>
1414
</div>

src/app/shared/components/tags/tags.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</div>
55
<div class="tags">
66
<div class="empty" *ngIf="!tags?.length">
7-
{{ canEdit && !isEditing ? 'Click to add' : 'No tags' }}
7+
{{ canEdit && !isEditing ? 'Click to add' : 'No keywords' }}
88
</div>
99
<ng-container *ngIf="tags?.length">
1010
<div

src/app/shared/components/tags/tags.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ describe('TagsComponent', () => {
7979
fixture.detectChanges();
8080
const div = fixture.debugElement.query(By.css('.empty'));
8181

82-
expect(div.nativeElement.textContent.trim()).toBe('No tags');
82+
expect(div.nativeElement.textContent.trim()).toBe('No keywords');
8383
});
8484
});

0 commit comments

Comments
 (0)