Skip to content

Update EUR-Lex.js - #3474

Open
dorjor wants to merge 2 commits into
zotero:masterfrom
dorjor:patch-2
Open

Update EUR-Lex.js#3474
dorjor wants to merge 2 commits into
zotero:masterfrom
dorjor:patch-2

Conversation

@dorjor

@dorjor dorjor commented Jul 16, 2025

Copy link
Copy Markdown

This commit improves the import of files as statutes, i.e. EU regulations. The "bill" file type in Zotero already has a field named "Legislative Body". The file type 'statute' does not. When importing a file of this type, the translator writes the file type in the 'Extra' field. You cannot have unofficial variables in the extra field if you want your style to be registered in the official Zotero style repository. The solution is to use the recognised file variables. The correct CSL field mapping for 'Legislative Body' is 'authority', so 'authority' must be imported into the 'Extra' field for statutes.

This commit improves the import of files as statutes, i.e. EU regulations. The "bill" file type in Zotero already has a field named "Legislative Body". The file type 'statute' does not. When importing a file of this type, the translator writes the file type in the 'Extra' field. You cannot have unofficial variables in the extra field if you want your style to be registered in the official Zotero style repository. The solution is to use the recognised file variables. The correct CSL field mapping for 'Legislative Body' is 'authority', so 'authority' must be imported into the 'Extra' field for statutes.
@alex-ter

alex-ter commented Jul 27, 2025

Copy link
Copy Markdown
Contributor

@dorjor, do you want to fix the linter warning over at line 211? You also want to update the lastUpdated field in the metadata, otherwise this won't work. Scaffold will do that for you.

@adam3smith, I have to admit, I'm not sure I understand the issue here and would appreciate your opinion, do you think the edit is a valid one? The mapping seems to be there, but I'm not 100% sure how that later translates into the citations and whether this could pose a problem, plus I think the original code putting it unconditionally into legislativeBody did have some reasoning behind.

@dorjor

dorjor commented Jul 27, 2025

Copy link
Copy Markdown
Author

@alex-ter, I have made the required changes. Thanks for pointing them out to me. Regarding my proposed change please think of the output the unmodified translator produces right now: visit https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32015R2283 and import the regulation into zotero. Watch the extra field: "Legislative Body: EP, CONSIL". It is to my understanding that "Legislative Body:" as is, can't be used by CSL. So it is there but can't be used without modifying it manually into "Authority:". If my style uses authority for "statute, bill .etc" my proposed modification just seems to work. It imports into the extra field "Authority: EP; CONSIL" and any citation style that cites authority just picks it up."

@alex-ter

Copy link
Copy Markdown
Contributor

Thanks. This makes sense to me, let's see if Sebastian has time to chime in, as there should have been some idea behind the current logic that I don't know of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants