Skip to content

Commit

Permalink
Merge pull request #1904 from CSCfi/qa
Browse files Browse the repository at this point in the history
Qa
  • Loading branch information
konolak authored Dec 30, 2024
2 parents 9280b67 + dd388c8 commit 0501b52
Show file tree
Hide file tree
Showing 27 changed files with 450 additions and 590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { FiltersConfig } from '@mydata/constants';
import { getUniqueSources, filterData } from '@mydata/utils';
import { AppSettingsService } from '@shared/services/app-settings.service';
import { Subscription } from 'rxjs';
import { Subscription } from 'rxjs';
import { FiltersComponent } from '../../../../../portal/components/results/filters/filters.component';

@Component({
selector: 'app-data-sources-filters',
templateUrl: './data-sources-filters.component.html',
styleUrls: ['./data-sources-filters.component.scss'],
standalone: true,
imports: [FiltersComponent],
@Component({
selector: 'app-data-sources-filters',
templateUrl: './data-sources-filters.component.html',
styleUrls: ['./data-sources-filters.component.scss'],
standalone: true,
imports: [FiltersComponent],
})

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@
<ng-template mat-tab-label *ngIf="this.dialogData.data.id !== 'activitiesAndRewards'">
<fa-icon [icon]="faSearch" class="pe-3"></fa-icon>
<ng-container i18n="@@searchForOther">Hae muita</ng-container>
{{ addFromPortalTabString.toLowerCase() }}
<div>&nbsp;</div>
<span *ngIf="this.dialogData.data.id === 'funding'">
<span i18n="@@grantedFunding">rahoitusmyöntöjä</span>
</span>
<span *ngIf="this.dialogData.data.id !== 'funding'">
{{ addFromPortalTabString.toLowerCase() }}
</span>
<ng-container
*ngIf="disabledSearchPortalModalIds.indexOf(editorData.id) > -1"
>(<span i18n="@@comingSoon">Tulossa</span>)</ng-container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ export class EditorModalComponent implements OnInit {
break;
}
case 'funding': {
this.addFromPortalTabString = $localize`:@@fundings:hankkeita`;
this.selectItemsTabLabel = $localize`:@@selectProjects:Valitse hankkeet`;
this.portalItemGroupStringPlural = $localize`:@@fundings:hankkeet`;
this.addFromPortalTabString = $localize`:@@fundings:rahoitusmyöntöjä`;
this.selectItemsTabLabel = $localize`:@@selectGrantedFunding:Valitse myönnetty rahoitus`;
this.portalItemGroupStringPlural = $localize`:@@fundings:rahoitusmyönnöt`;
this.tableColumns = FundingColumns;
this.tabInfoText = $localize`:@@myDataEditorModalFundingTabInfo:Tiedejatutkimus.fi-palvelusta löytyvät hankkeet, joissa on ORCID-tunnuksesi, lisätään tietoihisi automaattisesti. hankkeita, joihin ei ole liitetty ORCID-tunnustasi, voit lisätä "Hae muita hankkeita" -toiminnolla.`;
this.tabInfoText = $localize`:@@myDataEditorModalFundingTabInfo:Tiedejatutkimus.fi-palvelusta löytyvät rahoitusmyönnöt, joissa on ORCID-tunnuksesi, lisätään tietoihisi automaattisesti. Myönnettyä rahoitusta, joihin ei ole liitetty ORCID-tunnustasi, voit lisätä "Hae muita myönnetyjä rahoituksia" -toiminnolla.`;
break;
}
case 'activitiesAndRewards': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<ng-container [ngSwitch]="data.id">
<u *ngSwitchCase="'publication'" i18n="@@publicationItem">julkaisu</u>
<u *ngSwitchCase="'dataset'" i18n="@@datasetItem">tutkimusaineisto</u>
<u *ngSwitchCase="'funding'" i18n="@@fundingItem">hanke</u>
<u *ngSwitchCase="'funding'" i18n="@@fundingItem">myönnetty rahoitus</u>
</ng-container>
<ng-container i18n="@@fromYourData"> tiedoistasi?</ng-container>
</u>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h3 class="col-8 col-md-6 col-lg-4 align-self-center fw-bold order-1 font-size-n
[data]="field"
[fieldType]="fieldTypes.activityFunding"
sortField="startYear"
showMoreLabel="hankkeet"
showMoreLabel="rahoitusmyönnöt"
i18n-showMoreLabel="@@fundings"
></app-summary-portal-items>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,38 @@ import { GroupTypes, PortalGroups } from '@mydata/constants/groupTypes';
import { CommonStrings } from '@mydata/constants/strings';
import { DatasetsService } from '@mydata/services/datasets.service';
import { FundingsService } from '@mydata/services/fundings.service';
import { Subscription } from 'rxjs';
import { HasSelectedItemsPipe } from '../../../pipes/has-selected-items.pipe';
import { JoinItemsPipe } from '../../../../shared/pipes/join-items.pipe';
import { EditorModalComponent } from '../editor-modal/editor-modal.component';
import { PanelArrayItemComponent } from '../profile-panel/panel-array-item/panel-array-item.component';
import { SummaryDividerComponent } from './summary-divider/summary-divider.component';
import { SummaryPortalItemsComponent } from './summary-portal-items/summary-portal-items.component';
import { SummaryAffiliationsComponent } from './summary-affiliations/summary-affiliation.component';
import { SecondaryButtonComponent } from '../../../../shared/components/buttons/secondary-button/secondary-button.component';
import { Subscription } from 'rxjs';
import { HasSelectedItemsPipe } from '../../../pipes/has-selected-items.pipe';
import { JoinItemsPipe } from '../../../../shared/pipes/join-items.pipe';
import { EditorModalComponent } from '../editor-modal/editor-modal.component';
import { PanelArrayItemComponent } from '../profile-panel/panel-array-item/panel-array-item.component';
import { SummaryDividerComponent } from './summary-divider/summary-divider.component';
import { SummaryPortalItemsComponent } from './summary-portal-items/summary-portal-items.component';
import { SummaryAffiliationsComponent } from './summary-affiliations/summary-affiliation.component';
import { SecondaryButtonComponent } from '../../../../shared/components/buttons/secondary-button/secondary-button.component';
import { NgFor, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';

@Component({
selector: 'app-profile-summary',
templateUrl: './profile-summary.component.html',
styleUrls: ['./profile-summary.component.scss'],
encapsulation: ViewEncapsulation.None,
standalone: true,
imports: [
NgFor,
NgIf,
SecondaryButtonComponent,
NgSwitch,
NgSwitchCase,
SummaryAffiliationsComponent,
SummaryPortalItemsComponent,
NgSwitchDefault,
SummaryDividerComponent,
PanelArrayItemComponent,
EditorModalComponent,
JoinItemsPipe,
HasSelectedItemsPipe,
],
@Component({
selector: 'app-profile-summary',
templateUrl: './profile-summary.component.html',
styleUrls: ['./profile-summary.component.scss'],
encapsulation: ViewEncapsulation.None,
standalone: true,
imports: [
NgFor,
NgIf,
SecondaryButtonComponent,
NgSwitch,
NgSwitchCase,
SummaryAffiliationsComponent,
SummaryPortalItemsComponent,
NgSwitchDefault,
SummaryDividerComponent,
PanelArrayItemComponent,
EditorModalComponent,
JoinItemsPipe,
HasSelectedItemsPipe,
],
})
export class ProfileSummaryComponent implements OnInit, OnDestroy, OnChanges {
@Input() profileData: any;
Expand Down Expand Up @@ -110,7 +110,6 @@ export class ProfileSummaryComponent implements OnInit, OnDestroy, OnChanges {

ngOnChanges(): void {
this.displayData = cloneDeep(this.profileData);

// Clear imported items
this.profileData.forEach((group) => {
if (group.fields.find((field) => field.id === 'imported')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
>tutkimusaineisto</ng-container
>
<ng-container *ngSwitchCase="'funding'" i18n="@@fundingItem"
>hanke</ng-container
>rahoitusmyöntö</ng-container
>
</ng-container>
<ng-container i18n="@@fromYourData"> tiedoistasi?</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,32 @@ import { FieldTypes } from '@mydata/constants/fieldTypes';
import { SearchPortalService } from '@mydata/services/search-portal.service';
import { GroupTypes } from '@mydata/constants/groupTypes';
import { Subscription } from 'rxjs';
import { Sort } from '@angular/material/sort';
import { ThousandSeparatorPipe } from '../../../../shared/pipes/thousand-separator.pipe';
import { SearchPortalResultsComponent } from './search-portal-results/search-portal-results.component';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
import { SearchComponent } from '../../../../shared/components/search/search.component';
import { NgSwitch, NgSwitchCase, NgIf, NgSwitchDefault, NgClass } from '@angular/common';
import { Sort } from '@angular/material/sort';
import { ThousandSeparatorPipe } from '../../../../shared/pipes/thousand-separator.pipe';
import { SearchPortalResultsComponent } from './search-portal-results/search-portal-results.component';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
import { SearchComponent } from '../../../../shared/components/search/search.component';
import { NgSwitch, NgSwitchCase, NgIf, NgSwitchDefault, NgClass } from '@angular/common';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

@Component({
selector: 'app-search-portal',
templateUrl: './search-portal.component.html',
styleUrls: ['./search-portal.component.scss'],
encapsulation: ViewEncapsulation.None,
standalone: true,
imports: [
FontAwesomeModule,
NgSwitch,
NgSwitchCase,
SearchComponent,
NgIf,
NgSwitchDefault,
NgClass,
MatProgressSpinner,
SearchPortalResultsComponent,
ThousandSeparatorPipe,
],
@Component({
selector: 'app-search-portal',
templateUrl: './search-portal.component.html',
styleUrls: ['./search-portal.component.scss'],
encapsulation: ViewEncapsulation.None,
standalone: true,
imports: [
FontAwesomeModule,
NgSwitch,
NgSwitchCase,
SearchComponent,
NgIf,
NgSwitchDefault,
NgClass,
MatProgressSpinner,
SearchPortalResultsComponent,
ThousandSeparatorPipe,
],
})
export class SearchPortalComponent implements OnInit, OnDestroy {
@Input() data: any;
Expand Down Expand Up @@ -125,7 +125,7 @@ export class SearchPortalComponent implements OnInit, OnDestroy {
case GroupTypes.funding: {
this.searchHelpText = this.searchForFundingsWithName;
this.searchPlaceholder = this.fundingSearchPlaceholder;
this.infoText = $localize`:@@searchForOtherFundingsFromPortal:Hae muita hankkeita Tiedejatutkimus.fi:stä hankkeen sisältämien tietojen perusteella ja liitä ne profiiliisi.`;
this.infoText = $localize`:@@searchForOtherFundingsFromPortal:Hae muita rahoitusmyöntöjä Tiedejatutkimus.fi:stä myönnetyn rahoituksen sisältämien tietojen perusteella ja liitä ne profiiliisi.`;
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/mydata/models/funding.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class FundingFieldsAdapter implements Adapter<FundingFields> {
item,
'funding',
'fundingDecisions',
$localize`:@@publications:Hankkeet`
$localize`:@@funding:Myönnetty rahoitus`
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/mydata/models/profile.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ProfileAdapter implements Adapter<Profile> {
},
{
id: GroupTypes.funding,
label: $localize`:@@fundings:Hankkeet`,
label: $localize`:@@fundings:Myönnetty rahoitus`,
fields: mapModel(this.fundingFieldsAdapter, data.activity),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ <h3 style='font-size: 1.4rem; margin: 0'>Rajaa hakua</h3>
</ng-container>

<div style='display: flex'>
<app-filter-limit-button [(value)]='filterLimits.year' [step]='10' [min]='10' [max]='yearFilters.length'>
<app-filter-limit-button [(value)]='filterLimits.year' [step]='10' [min]='10' [max]='yearFilters.length'i18n="@@showMore">
Näytä enemmän
</app-filter-limit-button>

<app-filter-limit-button [(value)]='filterLimits.year' [step]='-10' [min]='10' [max]='yearFilters.length'>
<app-filter-limit-button [(value)]='filterLimits.year' [step]='-10' [min]='10' [max]='yearFilters.length' i18n="@@showLess">
Näytä vähemmän
</app-filter-limit-button>
</div>
Expand Down Expand Up @@ -322,11 +322,11 @@ <h3 style='font-size: 1.4rem; margin: 0'>Rajaa hakua</h3>
</ng-container>

<div style='display: flex'>
<app-filter-limit-button [(value)]='filterLimits.language' [step]='10' [min]='10' [max]='languageCodeFilters.length'>
<app-filter-limit-button [(value)]='filterLimits.language' [step]='10' [min]='10' [max]='languageCodeFilters.length' i18n="@@showMore">
Näytä enemmän
</app-filter-limit-button>

<app-filter-limit-button [(value)]='filterLimits.language' [step]='-10' [min]='10' [max]='languageCodeFilters.length'>
<app-filter-limit-button [(value)]='filterLimits.language' [step]='-10' [min]='10' [max]='languageCodeFilters.length' i18n="@@showLess">
Näytä vähemmän
</app-filter-limit-button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/portal/components/results/results.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ <h2 i18n="@@maxResults1">Tuloksia näytetään enintään 10 000</h2>
"
i18n="@@asCountFunding"
>
Hankkeiden määrä
Rahoitusmyöntöjen määrä
</button>
<button
class="col-6 vis-style-toggle ttv-button"
Expand All @@ -383,7 +383,7 @@ <h2 i18n="@@maxResults1">Tuloksia näytetään enintään 10 000</h2>
"
i18n="@@asPercentFunding"
>
% hankkeiden määrästä
% rahoitusmyöntöjen määrästä
</button>
<button
class="col-6 vis-style-toggle ttv-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class SearchBarComponent implements OnInit, AfterViewInit, OnDestroy {
translations = {
publication: $localize`:@@publications:julkaisut`,
person: $localize`:@@authors:tutkijat`,
funding: $localize`:@@fundings:rahoitetut hankkeet`,
funding: $localize`:@@fundings:rahoitusmyönnöt`,
dataset: $localize`:@@datasets:aineistot`,
infrastructure: $localize`:@@infrastructures:infrastruktuurit`,
organization: $localize`:@@organizations:tutkimusorganisaatiot`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class RelatedLinksComponent implements OnInit, OnDestroy {
disabled: true,
},
{ label: $localize`:@@authors:Tutkijat`, tab: 'persons', disabled: true },
{ label: $localize`:@@fundings:Hankkeet`, tab: 'fundings', disabled: true },
{ label: $localize`:@@fundings:Rahoitusmyönnöt`, tab: 'fundings', disabled: true },
{
label: $localize`:@@datasets:Aineistot`,
tab: 'datasets',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ <h2 class="col-12 col-sm-4 col-lg-3 th">
<!-- Normal funding -->
<ng-container *ngIf="!item.euFunding; else euCallProgramme">
<div class="col-12 col-sm-8 col-lg-9 td">
<a [routerLink]="'/results/funding-calls/' + item.funder.callProgrammeName">{{ item.funder.callProgrammeName }}</a>
<!-- If funder is Research council of Finland, directly link to single funding call with id, otherwise link to search page -->
<a [routerLink]="item.funder.callProgrammeId && (item.funder.funderOrganizationId === '02458939' || item.funder.funderOrganizationId === '605001') ? '/results/funding-call/' + item.funder.callProgrammeId : '/results/funding-calls/' + item.funder.callProgrammeName">{{ item.funder.callProgrammeName }}</a>
</div>
</ng-container>

Expand Down Expand Up @@ -548,7 +549,7 @@ <h2>
<div class="inner">
<mat-card-title>
<h2>
<ng-container i18n='@@relatedFundings'>Hae hankkeeseen liittyvät (tulossa)</ng-container>
<ng-container i18n='@@relatedFundings'>Hae rahoitukseen liittyvät (tulossa)</ng-container>
</h2>
</mat-card-title>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class SingleFundingComponent implements OnInit, OnDestroy {
{
label: $localize`:@@frameworkProgramme:Puiteohjelma`,
field: 'frameworkProgramme',
tooltip: 'Puiteohjelma',
tooltip: $localize`:@@typeOfFundingTooltip:Puiteohjelma`,
},
];

Expand All @@ -122,7 +122,7 @@ export class SingleFundingComponent implements OnInit, OnDestroy {
{
label: $localize`Tutkimusalat`,
field: 'fieldsOfResearch',
tooltip: $localize`:@@fieldsOfResearchTooltip:Suomen Akatemian luokittelee hankkeensa myös oman tutkimusalaluokittelunsa mukaisesti.`,
tooltip: $localize`:@@fieldsOfResearchTooltip:Suomen Akatemia luokittelee rahoitusmyöntönsä myös oman tutkimusalaluokittelunsa mukaisesti.`,
},
{ label: $localize`Teema-alat`, field: 'fieldsOfTheme' },
{ label: $localize`:@@fundingHomePage:Myöntöön liittyvä verkkosivu`, field: '?' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h3 class='p-0'>{{ publicationsCaption }} ({{ person.publications.length }})</h3
<app-person-group
*ngIf='person.fundings?.length'
class='content'
label='Hankkeet'
label='Rahoitusmyönnöt'
i18n-label='@@fundings'
[data]='person.fundings'
[fields]='fundingFields'
Expand Down
2 changes: 1 addition & 1 deletion src/app/portal/components/sitemap/sitemap.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="pb-4" i18n="@@sitemapHeader">Sivukartta</h1>
<a routerLink="/results/persons" i18n="@@authors">Tutkijat</a>
</li>
<li>
<a routerLink="/results/fundings" i18n="@@fundings">Hankkeet</a>
<a routerLink="/results/fundings" i18n="@@fundings">Rahoitusmyönnöt</a>
</li>
<li>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
<ng-container *ngIf='(moreThan1200$ | async) === false'>
<ng-container *ngIf='(showAll$ | async) === false'>
<div class="expand-text" (click)='toggleAll()'>
<div style='margin-right: 0.25rem'>Näytä lisää</div>
<div style='margin-right: 0.25rem' i18n="@@showMore">Näytä lisää</div>
<i class='fa-solid fa-caret-down'></i>
</div>
</ng-container>

<ng-container *ngIf='(showAll$ | async) === true'>
<div class='expand-text' (click)='toggleAll()'>
<div style='margin-right: 0.25rem'>Näytä vähemmän</div>
<div style='margin-right: 0.25rem' i18n="@@showLess">Näytä vähemmän</div>
<i class='fa-solid fa-caret-up'></i>
</div>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class BarComponent implements OnChanges {
case 'fundings':
visualisationData = this.data.fundingData;
this.categories = this.funding;
ylabel = 'Hankkeiden määrä';
ylabel = 'Rahoitusmyöntöjen määrä';
break;

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class PieComponent implements OnInit, OnChanges {
case 'fundings':
visualisationData = this.data.fundingData;
this.categories = this.funding;
ylabel = 'Hankkeiden määrä';
ylabel = 'Rahoitusmyöntöjen määrä';
break;

default:
Expand Down
Loading

0 comments on commit 0501b52

Please sign in to comment.