Skip to content

Commit 84cd96f

Browse files
committed
Some tweaks to the ELAR project fields.
1 parent f9f63b6 commit 84cd96f

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

archive-configurations/ELAR/fields.json5

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
multilingual: false,
1212
tipOnUsingThisField: "Key + Grant Id. E.g. 0793-SG0123"
1313
},
14+
{
15+
// 22 mar 2026 "Grant: to avoid confusion the Funding project title field should either be filled out with the same information as in Project > Title or be deleted:"
16+
key: "fundingProjectTitle",
17+
visibility: "never"
18+
},
1419
{
1520
key: "collectionSteward",
1621
visibility: "always",

archive-configurations/lameta/fields.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
englishLabel: "Title",
132132
form: "project",
133133
tabIndex: 0,
134+
tipOnUsingThisField: "This is the funded project title.",
134135
description: 'The funded project title, e.g. "New speakers of Edolo"',
135136
imdiComment: "Corpus/Title, Project/Title" // ELAR doesn't actually use the Corpus/Title field from lameta, they make their own corpus for imdi. But we put this in there for completeness.
136137
},
@@ -142,6 +143,7 @@
142143
multipleLines: true,
143144
form: "project",
144145
visibility: "always",
146+
tipOnUsingThisField: "This is a brief summary of your project",
145147
imdiComment: "Corpus/Description[@Name='short_description']",
146148
tabIndex: 2
147149
},

src/model/field/ConfiguredFieldDefinitions.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe("computeMergedCatalog", () => {
3030
imdiComment: "Corpus/Title, Project/Title",
3131

3232
tabIndex: 99, // configuration changed
33+
tipOnUsingThisField: "This is the funded project title.",
3334
tooltip: "My special tooltip", // configuration added this
3435
xmlTag: "Title", // configuration added this
3536
multilingual: true // configuration added this
@@ -72,6 +73,17 @@ describe("prepareFieldDefinitionCatalog", () => {
7273
expect(catalog.person.find((f) => f.key == "howToContact")).toBeDefined();
7374
});
7475

76+
it("default project title and description include help text", () => {
77+
const catalog = makeFieldDefinitionCatalog("default");
78+
expect(catalog.project.find((f) => f.key == "title")!.tipOnUsingThisField).toBe(
79+
"This is the funded project title."
80+
);
81+
expect(
82+
catalog.project.find((f) => f.key == "projectDescription")!
83+
.tipOnUsingThisField
84+
).toBe("This is a brief summary of your project");
85+
});
86+
7587
it("desfault session description is monolingual", () => {
7688
const catalog = makeFieldDefinitionCatalog("default");
7789
expect(
@@ -81,6 +93,16 @@ describe("prepareFieldDefinitionCatalog", () => {
8193
});
8294

8395
describe("ELAR archive configuration", () => {
96+
it("hides funding project title in project fields", () => {
97+
const catalog = makeFieldDefinitionCatalog("ELAR");
98+
const fundingProjectTitle = catalog.project.find(
99+
(f) => f.key === "fundingProjectTitle"
100+
);
101+
102+
expect(fundingProjectTitle).toBeDefined();
103+
expect(fundingProjectTitle!.visibility).toBe("never");
104+
});
105+
84106
it("marks genre as multilingual in session fields", () => {
85107
const catalog = makeFieldDefinitionCatalog("ELAR");
86108
const genreField = catalog.session.find((f) => f.key === "genre");

0 commit comments

Comments
 (0)