Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<div class="grid flex-column w-full">
<div class="flex items-center align-items-start gap-2 font-medium">
<osf-icon iconClass="fas fa-triangle-exclamation"></osf-icon>
{{ 'toast.cookie-consent.message' | translate }}
{{ 'toast.cookieConsent.message' | translate }}
</div>
<div class="row-fixed flex justify-content-end">
<p-button
class="btn-link-dark-blue"
link
[label]="'toast.cookie-consent.accept' | translate"
[label]="'toast.cookieConsent.accept' | translate"
(onClick)="acceptCookies()"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<osf-icon iconClass="fas fa-triangle-exclamation"></osf-icon>

<span class="font-medium">
{{ 'toast.tos-consent.message' | translate }}
{{ 'toast.tosConsent.message' | translate }}
<a class="font-bold" [routerLink]="['/terms-of-use']" target="_blank">
{{ 'toast.tos-consent.termsOfUse' | translate }}
{{ 'toast.tosConsent.termsOfUse' | translate }}
</a>
{{ 'toast.tos-consent.and' | translate }}
{{ 'toast.tosConsent.and' | translate }}
<a class="font-bold" [routerLink]="['/privacy-policy']" target="_blank">
{{ 'toast.tos-consent.privacyPolicy' | translate }}
{{ 'toast.tosConsent.privacyPolicy' | translate }}
</a>
</span>
</div>
Expand All @@ -29,13 +29,13 @@
</p-checkbox>

<label for="terms" class="m-0 cursor-pointer">
{{ 'toast.tos-consent.haveReadAndAgree' | translate }}
{{ 'toast.tosConsent.haveReadAndAgree' | translate }}
</label>
</div>

<p-button
link
[label]="'toast.tos-consent.continue' | translate"
[label]="'common.buttons.continue' | translate"
[disabled]="!acceptedTermsOfService()"
(onClick)="onContinue()"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const defaultDateFormat = 'MMM d, y';
export const preprintsTableColumns: TableColumn[] = [
{
field: 'title',
header: 'adminInstitutions.projects.title',
header: 'common.labels.title',
isLink: true,
linkTarget: '_blank',
},
Expand All @@ -17,13 +17,13 @@ export const preprintsTableColumns: TableColumn[] = [
},
{
field: 'dateCreated',
header: 'adminInstitutions.projects.dateCreated',
header: 'common.labels.dateCreated',
sortable: true,
dateFormat: defaultDateFormat,
},
{
field: 'dateModified',
header: 'adminInstitutions.projects.dateModified',
header: 'common.labels.dateModified',
sortable: true,
dateFormat: defaultDateFormat,
},
Expand All @@ -35,7 +35,7 @@ export const preprintsTableColumns: TableColumn[] = [
},
{
field: 'license',
header: 'adminInstitutions.projects.license',
header: 'common.labels.license',
},
{
field: 'creator',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const defaultDateFormat = 'MMM d, y';
export const projectTableColumns: TableColumn[] = [
{
field: 'title',
header: 'adminInstitutions.projects.title',
header: 'common.labels.title',
isLink: true,
linkTarget: '_blank',
},
Expand All @@ -17,13 +17,13 @@ export const projectTableColumns: TableColumn[] = [
},
{
field: 'dateCreated',
header: 'adminInstitutions.projects.dateCreated',
header: 'common.labels.dateCreated',
sortable: true,
dateFormat: defaultDateFormat,
},
{
field: 'dateModified',
header: 'adminInstitutions.projects.dateModified',
header: 'common.labels.dateModified',
sortable: true,
dateFormat: defaultDateFormat,
},
Expand Down Expand Up @@ -67,7 +67,7 @@ export const projectTableColumns: TableColumn[] = [
},
{
field: 'license',
header: 'adminInstitutions.projects.license',
header: 'common.labels.license',
sortable: false,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const defaultDateFormat = 'MMM d, y';
export const registrationTableColumns: TableColumn[] = [
{
field: 'title',
header: 'adminInstitutions.projects.title',
header: 'common.labels.title',
isLink: true,
linkTarget: '_blank',
},
Expand All @@ -17,13 +17,13 @@ export const registrationTableColumns: TableColumn[] = [
},
{
field: 'dateCreated',
header: 'adminInstitutions.projects.dateCreated',
header: 'common.labels.dateCreated',
sortable: true,
dateFormat: defaultDateFormat,
},
{
field: 'dateModified',
header: 'adminInstitutions.projects.dateModified',
header: 'common.labels.dateModified',
sortable: true,
dateFormat: defaultDateFormat,
},
Expand Down Expand Up @@ -62,7 +62,7 @@ export const registrationTableColumns: TableColumn[] = [
},
{
field: 'license',
header: 'adminInstitutions.projects.license',
header: 'common.labels.license',
},
{
field: 'funderName',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function mapCreators(project: ResourceModel, currentInstitutionId: string
?.filter((creator) => creator.affiliationsAbsoluteUrl.includes(currentInstitutionId))
?.map((creator) => {
const name = creator.name.trim();
const role = creatorsRoles.find((cr) => cr.id === creator.absoluteUrl)!.role;
const role = creatorsRoles.find((cr) => cr.id === creator.absoluteUrl)?.role;
return {
text: `${name} (${role})`,
url: creator.absoluteUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class ViewDuplicatesComponent {
resourceId,
},
{
label: 'project.overview.actions.delete',
label: 'common.labels.delete',
action: 'delete',
resourceId,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ <h2 class="text-center">{{ 'auth.forgotPassword.title' | translate }}</h2>
<form [formGroup]="forgotPasswordForm" (ngSubmit)="onSubmit()">
<osf-text-input
[control]="forgotPasswordForm.controls['email']"
[label]="'auth.common.email'"
[placeholder]="'auth.common.emailPlaceholder'"
[label]="'common.labels.email'"
[placeholder]="'common.labels.emailPlaceholder'"
type="email"
[maxLength]="emailLimit"
></osf-text-input>

<p-button
class="btn-full-width block mt-6"
type="submit"
[label]="'auth.forgotPassword.submit' | translate"
[label]="'auth.common.resetPassword' | translate"
[disabled]="!forgotPasswordForm.valid"
></p-button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 class="text-center">{{ 'auth.resetPassword.title' | translate }}</h2>
<p-button
class="btn-full-width block mt-6"
type="submit"
[label]="'auth.resetPassword.submit' | translate"
[label]="'auth.common.resetPassword' | translate"
[disabled]="resetPasswordForm.invalid"
></p-button>
</form>
Expand Down
6 changes: 3 additions & 3 deletions src/app/features/auth/pages/sign-up/sign-up.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ <h2 class="text-center">{{ 'auth.signUp.title' | translate }}</h2>
<div class="flex flex-column">
<osf-text-input
[control]="signUpForm.controls['email1']"
[label]="'auth.common.email'"
[placeholder]="'auth.common.emailPlaceholder'"
[label]="'common.labels.email'"
[placeholder]="'common.labels.emailPlaceholder'"
type="email"
[maxLength]="inputLimits.email.maxLength"
></osf-text-input>
Expand All @@ -71,7 +71,7 @@ <h2 class="text-center">{{ 'auth.signUp.title' | translate }}</h2>
<osf-text-input
[control]="signUpForm.controls['email2']"
[label]="'auth.common.confirmEmail'"
[placeholder]="'auth.common.emailPlaceholder'"
[placeholder]="'common.labels.emailPlaceholder'"
type="email"
[maxLength]="inputLimits.email.maxLength"
></osf-text-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<h3>{{ 'collections.addToCollection.resourceMetadata' | translate }}</h3>
@if (!isDisabled() && stepperActiveValue() !== targetStepValue()) {
<div>
<p class="font-bold">{{ 'collections.addToCollection.form.title' | translate }}</p>
<p class="font-bold">{{ 'common.labels.title' | translate }}</p>
<p class="mt-2">{{ selectedProject()?.title }}</p>
</div>
<div>
<p class="font-bold">{{ 'collections.addToCollection.form.description' | translate }}</p>
<p class="font-bold">{{ 'common.labels.description' | translate }}</p>
<p class="mt-2">
{{ selectedProject()?.description || 'collections.addToCollection.noDescription' | translate }}
{{ selectedProject()?.description || 'common.labels.noDescription' | translate }}
</p>
</div>
<div>
Expand All @@ -26,7 +26,7 @@ <h3>{{ 'collections.addToCollection.resourceMetadata' | translate }}</h3>
</p>
</div>
<div>
<p class="font-bold">{{ 'collections.addToCollection.form.tags' | translate }}</p>
<p class="font-bold">{{ 'shared.tags.title' | translate }}</p>
<div class="flex mt-2 gap-2">
@if (projectTags().length) {
@for (tag of projectTags(); track tag) {
Expand All @@ -53,14 +53,14 @@ <h3>{{ 'collections.addToCollection.resourceMetadata' | translate }}</h3>
<p class="pt-3">{{ 'collections.addToCollection.projectMetadataMessage' | translate }}</p>
<form [formGroup]="projectMetadataForm" class="flex flex-column gap-4 mt-4">
<osf-text-input
label="collections.addToCollection.form.title"
label="common.labels.title"
[control]="projectMetadataForm.controls[ProjectMetadataFormControls.Title]"
[maxLength]="inputLimits.fullName.maxLength"
/>

<div class="flex flex-column gap-1">
<label for="description">
{{ 'collections.addToCollection.form.description' | translate }}
{{ 'common.labels.description' | translate }}
</label>
<textarea
pTextarea
Expand Down Expand Up @@ -125,7 +125,7 @@ <h3>{{ 'collections.addToCollection.resourceMetadata' | translate }}</h3>

<div class="flex flex-column gap-1">
<label for="tags">
{{ 'collections.addToCollection.form.tags' | translate }}
{{ 'shared.tags.title' | translate }}
</label>
<osf-tags-input
[required]="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3>{{ 'collections.addToCollection.selectProject' | translate }}</h3>

@if (selectedProject() && stepperActiveValue() !== targetStepValue()) {
<p class="font-normal">
{{ 'collections.addToCollection.project' | translate }}:
{{ 'common.labels.project' | translate }}:
<span class="font-bold">{{ selectedProject()?.title }}</span>
</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
} @else {
<h2 class="text-center">
{{ 'collections.searchResults.noResultsFound' | translate }}
{{ 'common.search.noResultsFound' | translate }}
</h2>
<p class="text-center">{{ 'collections.searchResults.noResultsFoundMessage' | translate }}</p>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
styleClass="w-full"
(onClick)="dialogRef.close()"
severity="info"
[label]="'project.contributors.addDialog.cancel' | translate"
[label]="'common.buttons.cancel' | translate"
></p-button>

<p-button
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/contributors/contributors.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2>{{ 'project.contributors.viewOnly' | translate }}</h2>

<p-button
class="w-10rem"
[label]="'project.contributors.createButton' | translate"
[label]="'common.buttons.create' | translate"
[disabled]="!canCreateViewLink()"
(onClick)="createViewLink()"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<form [formGroup]="fileMetadataForm" (ngSubmit)="setFileMetadata()" class="flex flex-column gap-3">
<div class="flex flex-column gap-1">
<p>{{ 'files.detail.fileMetadata.fields.title' | translate }}</p>
<p>{{ 'common.labels.title' | translate }}</p>
<input pInputText id="title" [formControl]="titleControl" />
</div>

<div class="flex flex-column gap-1">
<p>{{ 'files.detail.fileMetadata.fields.description' | translate }}</p>
<p>{{ 'common.labels.description' | translate }}</p>
<input pInputText id="description" [formControl]="descriptionControl" />
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h2>{{ 'files.detail.fileMetadata.title' | translate }}</h2>
<p-button
severity="secondary"
(onClick)="openEditFileMetadataDialog()"
[label]="'files.detail.fileMetadata.edit' | translate"
[label]="'common.buttons.edit' | translate"
></p-button>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('FileMetadataComponent', () => {
component.openEditFileMetadataDialog();

expect(customDialogService.open).toHaveBeenCalledWith(expect.any(Function), {
header: 'files.detail.fileMetadata.edit',
header: 'common.labels.edit',
width: '448px',
data: mockFileMetadata,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class FileMetadataComponent {
openEditFileMetadataDialog() {
this.customDialogService
.open(EditFileMetadataDialogComponent, {
header: 'files.detail.fileMetadata.edit',
header: 'common.labels.edit',
width: '448px',
data: this.fileMetadata(),
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ <h4>{{ 'files.detail.resourceMetadata.fields.awardUri' | translate }}</h4>
}

<div class="flex flex-column gap-2">
<h4>{{ 'files.detail.resourceMetadata.fields.title' | translate }}</h4>
<h4>{{ 'common.labels.title' | translate }}</h4>

<span>{{ resourceMetadata()?.title }}</span>
</div>

@if (resourceMetadata()?.description) {
<div class="flex flex-column gap-2">
<h4>{{ 'files.detail.resourceMetadata.fields.description' | translate }}</h4>
<h4>{{ 'common.labels.description' | translate }}</h4>

<div>
{{ resourceMetadata()?.description }}
Expand Down Expand Up @@ -76,7 +76,7 @@ <h4>{{ 'files.detail.resourceMetadata.fields.resourceLanguage' | translate }}</h

@if (resourceMetadata()?.dateCreated) {
<div class="flex flex-column gap-2">
<h4>{{ 'files.detail.resourceMetadata.fields.dateCreated' | translate }}</h4>
<h4>{{ 'common.labels.dateCreated' | translate }}</h4>

<div>
{{ resourceMetadata()?.dateCreated | date: 'MMMM d, y' }}
Expand All @@ -86,7 +86,7 @@ <h4>{{ 'files.detail.resourceMetadata.fields.dateCreated' | translate }}</h4>

@if (resourceMetadata()?.dateModified) {
<div class="flex flex-column gap-2">
<h4>{{ 'files.detail.resourceMetadata.fields.dateModified' | translate }}</h4>
<h4>{{ 'common.labels.dateModified' | translate }}</h4>

<div>
{{ resourceMetadata()?.dateModified | date: 'MMMM d, y' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2>{{ 'files.detail.revisions.title' | translate }}</h2>
<p-button
icon="fas fa-download"
variant="text"
[label]="'files.detail.revisions.actions.download' | translate"
[label]="'common.buttons.download' | translate"
(onClick)="onDownloadRevision(item.version)"
></p-button>

Expand Down
Loading
Loading