Update EUR-Lex.js - #3474
Conversation
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.
|
@dorjor, do you want to fix the linter warning over at line 211? You also want to update the @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 |
|
@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." |
|
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. |
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.