Skip to content

Commit 146247c

Browse files
Merge remote-tracking branch 'origin/main' into transifex
2 parents 92a0462 + 30154fa commit 146247c

19 files changed

Lines changed: 487 additions & 907 deletions

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
## v2.135.13 - 2026-06-18
2+
3+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.12...v2.135.13)
4+
5+
- [#2866](https://github.com/ORCID/orcid-angular/pull/2866): PD-000 fix-print-view-translations-wont-get-deleted-when-not-use
6+
7+
## v2.135.12 - 2026-06-18
8+
9+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.11...v2.135.12)
10+
11+
## v2.135.11 - 2026-06-17
12+
13+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.10...v2.135.11)
14+
15+
- [#2864](https://github.com/ORCID/orcid-angular/pull/2864): {PD-5754} {PD-5756} {PD-5755} Amontenegro/pd 5754
16+
17+
## v2.135.10 - 2026-06-17
18+
19+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.9...v2.135.10)
20+
21+
- [#2863](https://github.com/ORCID/orcid-angular/pull/2863): PD-5389, PD-5402
22+
23+
## v2.135.9 - 2026-06-16
24+
25+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.8...v2.135.9)
26+
27+
## v2.135.8 - 2026-06-16
28+
29+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.7...v2.135.8)
30+
31+
## v2.135.7 - 2026-06-16
32+
33+
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.6...v2.135.7)
34+
135
## v2.135.6 - 2026-06-12
236

337
[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.135.5...v2.135.6)

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
{
129129
"glob": "**/*",
130130
"input": "src/assets/print-view/",
131-
"ignore": ["fetch-orcid.js", "**/*.spec.ts"],
131+
"ignore": ["**/*.spec.ts"],
132132
"output": "/print-view/"
133133
},
134134
{

projects/orcid-ui/src/lib/components/record-header/record-header.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@
325325
min-width: 0;
326326
flex: 1; // Grow to fill space
327327

328+
// Keep Copy/Print actions close to the ORCID iD on desktop non-compact mode.
329+
.desktop:not(.compact) & {
330+
flex: 0 0 auto;
331+
}
332+
328333
.id-content {
329334
display: flex;
330335
align-items: center;

scripts/normalize-xlf.prebuild.ts

Lines changed: 45 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,43 @@ const TEST_LANGUAGES = [
77
{ code: 'rl', target: 'RL' },
88
]
99

10+
// Path to the standalone print-view script. Its $localize strings are NOT
11+
// picked up by `ng extract-i18n` (the file is a plain asset, not part of the
12+
// Angular compilation), so we parse them out here and inject them into the
13+
// XLF. Parsing the file directly keeps fetch-orcid.js as the single source of
14+
// truth: strings added/removed there propagate automatically, with no
15+
// hardcoded list to drift out of sync.
16+
const PRINT_VIEW_SOURCE_FILE = './src/assets/print-view/fetch-orcid.js'
17+
18+
interface PrintViewUnit {
19+
id: string
20+
source: string
21+
}
22+
23+
function parsePrintViewUnits(path: string): PrintViewUnit[] {
24+
const js = fs.readFileSync(path, 'utf8')
25+
// Matches $localize tagged templates of the form `:@@printView.someId:Source text`
26+
const re = /:@@(printView\.[A-Za-z0-9_]+):([^`]*)`/g
27+
const units: PrintViewUnit[] = []
28+
const seen = new Set<string>()
29+
let match: RegExpExecArray | null
30+
while ((match = re.exec(js)) !== null) {
31+
const [, id, rawSource] = match
32+
if (seen.has(id)) {
33+
continue
34+
}
35+
seen.add(id)
36+
// Convert $localize template placeholders `${expression}:NAME:` into the
37+
// canonical $localize message form `{$NAME}` so the XLF source matches the
38+
// runtime message and stays stable regardless of the JS expression.
39+
const source = normalizeText(
40+
rawSource.replace(/\$\{[^}]*\}:([A-Z0-9_]+):/g, '{$$$1}')
41+
)
42+
units.push({ id, source })
43+
}
44+
return units
45+
}
46+
1047
function normalizeText(input: string): string {
1148
return input
1249
.replace(/\r/g, '')
@@ -85,103 +122,19 @@ function normalizeXlf12Sources(path: string) {
85122
}
86123
})
87124

88-
// Inject @@printView.* source-only trans-units so the test-language
89-
// generator (generateTestingLanguages) will also stamp X / LR / RL for
90-
// these strings, and so Transifex can discover them for real locales.
91-
// We use a stable @@-prefixed id so $localize can match by explicit id.
92-
const PRINT_VIEW_UNITS = [
93-
'printView.unnamedProfile',
94-
'printView.orcidIdAlt',
95-
'printView.biography',
96-
'printView.personalInformation',
97-
'printView.emails',
98-
'printView.websitesSocialLinks',
99-
'printView.otherIds',
100-
'printView.keywords',
101-
'printView.countries',
102-
'printView.activities',
103-
'printView.employments',
104-
'printView.educationAndQualifications',
105-
'printView.professionalActivities',
106-
'printView.fundings',
107-
'printView.researchResources',
108-
'printView.works',
109-
'printView.organization',
110-
'printView.organizationAddress',
111-
'printView.startDate',
112-
'printView.endDate',
113-
'printView.publicationDate',
114-
'printView.journal',
115-
'printView.roleTitle',
116-
'printView.department',
117-
'printView.type',
118-
'printView.url',
119-
'printView.untitled',
120-
'printView.identifier',
121-
'printView.enterOrcidId',
122-
'printView.orcidIdHelp',
123-
'printView.loadProfile',
124-
'printView.invalidOrcidId',
125-
'printView.loadingRecord',
126-
'printView.recordNotFound',
127-
'printView.redirectingToPrimary',
128-
'printView.fetchFailed',
129-
'printView.couldNotLoad',
130-
'printView.activityGroupHeading',
131-
'printView.peerReviewHeading',
132-
]
133-
const PRINT_VIEW_SOURCES: Record<string, string> = {
134-
'printView.unnamedProfile': 'Unnamed ORCID profile',
135-
'printView.orcidIdAlt': 'ORCID iD',
136-
'printView.biography': 'Biography',
137-
'printView.personalInformation': 'Personal information',
138-
'printView.emails': 'Emails',
139-
'printView.websitesSocialLinks': 'Websites & social links',
140-
'printView.otherIds': 'Other IDs',
141-
'printView.keywords': 'Keywords',
142-
'printView.countries': 'Countries',
143-
'printView.activities': 'Activities',
144-
'printView.employments': 'Employments',
145-
'printView.educationAndQualifications': 'Education and qualifications',
146-
'printView.professionalActivities': 'Professional activities',
147-
'printView.fundings': 'Fundings',
148-
'printView.researchResources': 'Research Resources',
149-
'printView.works': 'Works',
150-
'printView.organization': 'Organization',
151-
'printView.organizationAddress': 'Organization address',
152-
'printView.startDate': 'Start date',
153-
'printView.endDate': 'End date',
154-
'printView.publicationDate': 'Publication date',
155-
'printView.journal': 'Journal',
156-
'printView.roleTitle': 'Role title',
157-
'printView.department': 'Department',
158-
'printView.type': 'Type',
159-
'printView.url': 'URL',
160-
'printView.untitled': 'Untitled',
161-
'printView.identifier': 'Identifier',
162-
'printView.enterOrcidId': 'Enter an ORCID iD',
163-
'printView.orcidIdHelp':
164-
'Add an ORCID iD to the URL or use the form below.',
165-
'printView.loadProfile': 'Load profile',
166-
'printView.invalidOrcidId':
167-
'Enter a valid ORCID iD (format: 0000-0000-0000-0000).',
168-
'printView.loadingRecord': 'Loading ORCID record...',
169-
'printView.recordNotFound':
170-
'Record data was not found in ORCID response.',
171-
'printView.redirectingToPrimary':
172-
'Redirecting to primary ORCID record\u2026',
173-
'printView.fetchFailed': 'Failed to fetch ORCID record',
174-
'printView.couldNotLoad': 'Could not load',
175-
'printView.activityGroupHeading': 'Activity group heading',
176-
'printView.peerReviewHeading': 'Peer review heading',
177-
}
125+
// Inject @@printView.* source-only trans-units parsed from the standalone
126+
// print-view script so the test-language generator (generateTestingLanguages)
127+
// will also stamp X / LR / RL for these strings, and so Transifex can
128+
// discover them for real locales. We use a stable @@-prefixed id so
129+
// $localize can match by explicit id.
130+
const printViewUnits = parsePrintViewUnits(PRINT_VIEW_SOURCE_FILE)
178131
const existingIds = new Set(transUnits.map((tu: any) => tu?.$?.id))
179132
const printViewBody = fileNode?.body?.[0]
180-
PRINT_VIEW_UNITS.forEach((id) => {
133+
printViewUnits.forEach(({ id, source }) => {
181134
if (!existingIds.has(id)) {
182135
printViewBody['trans-unit'].push({
183136
$: { id, datatype: 'html', resname: id },
184-
source: [PRINT_VIEW_SOURCES[id] ?? id],
137+
source: [source],
185138
})
186139
}
187140
})

src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h4 title i18n>What happens when you remove a duplicate ORCID account?</h4>
5353
</ul>
5454
</app-alert-message>
5555
@if (authenticated) {
56-
<form [formGroup]="form" (ngSubmit)="onSubmit()">
56+
<form [formGroup]="form" (ngSubmit)="onSubmit()" autocomplete="off">
5757
<h3 i18n class="mb-2 mt-0">You are removing this duplicate account</h3>
5858
@if (data.deprecatingAccountName) {
5959
<p class="leading-5.25">{{ data.deprecatingAccountName }}</p>
@@ -82,7 +82,7 @@ <h3 i18n class="mb-2 mt-0">You are removing this duplicate account</h3>
8282
</button>
8383
</form>
8484
} @else {
85-
<form [formGroup]="form" (ngSubmit)="submitVerify()">
85+
<form [formGroup]="form" (ngSubmit)="submitVerify()" autocomplete="off">
8686
<h3 i18n class="mt-0 mb-2">Which account do you want to remove?</h3>
8787
<p i18n class="mb-8!">
8888
You will need to verify your sign in details for the duplicate account
@@ -108,7 +108,7 @@ <h3 i18n class="mt-0 mb-2">Which account do you want to remove?</h3>
108108
formControlName="deprecatingOrcidOrEmail"
109109
type="text"
110110
matInput
111-
autocomplete="email"
111+
autocomplete="off"
112112
[errorStateMatcher]="errorMatcher"
113113
id="cy-duplicate-rercod-email"
114114
/>
@@ -132,7 +132,7 @@ <h3 i18n class="mt-0 mb-2">Which account do you want to remove?</h3>
132132
formControlName="password"
133133
type="password"
134134
matInput
135-
autocomplete="password"
135+
autocomplete="new-password"
136136
[errorStateMatcher]="errorMatcher"
137137
id="cy-duplicate-rercod-email"
138138
/>

src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
1+
import {
2+
Component,
3+
EventEmitter,
4+
Input,
5+
OnDestroy,
6+
OnInit,
7+
Output,
8+
} from '@angular/core'
29
import {
310
FormGroupDirective,
411
NgForm,
@@ -37,7 +44,7 @@ export class NeverShowErrorMatcher implements ErrorStateMatcher {
3744
preserveWhitespaces: true,
3845
standalone: false,
3946
})
40-
export class SettingsActionsDuplicatedComponent implements OnInit {
47+
export class SettingsActionsDuplicatedComponent implements OnInit, OnDestroy {
4148
errorMatcher = new NeverShowErrorMatcher()
4249
userSession: UserSession
4350
constructor(
@@ -121,7 +128,7 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
121128
document.activeElement.blur()
122129
}
123130
this.loadingVerify = false
124-
this.form.reset()
131+
this.resetFormState()
125132
if (success) {
126133
this.authenticated = true
127134
} else {
@@ -169,7 +176,7 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
169176

170177
if (data.success) {
171178
this.errors = []
172-
this.form.reset()
179+
this.resetFormState()
173180
this.success = true
174181
}
175182
if (data.errors?.length || !data.twoFactorToken) {
@@ -179,9 +186,17 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
179186
},
180187
error: () => {
181188
this.cancelAuthentication = true
182-
this.form.reset()
189+
this.resetFormState()
183190
this.loading.next(false)
184191
},
185192
})
186193
}
194+
195+
ngOnDestroy(): void {
196+
this.resetFormState()
197+
}
198+
199+
private resetFormState(): void {
200+
this.form?.reset()
201+
}
187202
}

src/app/account-settings/components/settings-security-password/settings-security-password.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<app-settings-panels-data *ngIf="form">
2-
<form [formGroup]="form">
2+
<form [formGroup]="form" autocomplete="off">
33
@if (success) {
44
<app-alert-message type="success" class="mb-8">
55
<div content class="mt-0.5" i18n>
@@ -33,6 +33,7 @@
3333
matInput
3434
formControlName="oldPassword"
3535
type="password"
36+
autocomplete="new-password"
3637
[errorStateMatcher]="errorMatcher"
3738
[ngClass]="{
3839
error:

src/app/account-settings/components/settings-security-password/settings-security-password.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export class SettingsSecurityPasswordComponent implements OnInit, OnDestroy {
193193
return status
194194
}
195195
ngOnDestroy(): void {
196+
this.form?.reset()
196197
this.$destroy.next()
197198
this.$destroy.complete()
198199
}

src/app/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export const ApplicationRoutesLabels = {
137137
[ApplicationRoutes.resetPasswordEmail]: $localize`:@@share.resetPasswordEmail:Reset password - ORCID`,
138138
[ApplicationRoutes.selfService]: $localize`:@@share.selfService:Self Service - ORCID`,
139139
[ApplicationRoutes.developerTools]: $localize`:@@share.developerTools:Developer tools - ORCID`,
140-
[ApplicationRoutes.smsPoc]: $localize`:@@share.smsPoc:SMS POC - ORCID`,
140+
[ApplicationRoutes.smsPoc]: 'SMS POC - ORCID',
141141
}
142142

143143
export const ApplicationDynamicRoutesLabels = {

0 commit comments

Comments
 (0)