[Juris-M] Translator coding questions
Hello,
First of all, I'd like to state up front that I have no idea what I'm doing and that everything I've done so far has been the result of a long series of trial and errors.
I have a problem with a translator I've been working on for canlii.org .
I'm trying to use it to send to Juris-M cases from that website. Almost everything works, but I still have a few problems.
While most of my problems are Juris-M specific (court names not being right and not knowing how to import into the alternate language fields), there is one problem I have which is closer to the base Zotero functions, which is why I'm here to ask for help.
Simply put, I cannot get two items linked by "seeAlso" in the translator to show up as "related" in the actual Juris-M interface.
In order to conform to how Juris-M handles parallel citations, the translator I've working on creates two items for any cases that require the use of parallel citations. I've got it working to output two items, but I cannot get "seeAlso" to link them in the actual Juris-M interface. In Scaffold, when I run tests, they will show up with a correct value of "seeAlso", but once I try to use it to bring things into Juris-M itself, the "related" tab is always empty.
If anyone wants a peak at the mess of a translator that I code, here it is : https://github.com/Droitslinguistiques/translators/blob/master/CanLII.js
I'm warning you though. I don't know what I'm doing. The translator mostly works right now, but I am certain that anyone more experienced than me might have a hernia looking at my terrible messy code.
Thank you.
First of all, I'd like to state up front that I have no idea what I'm doing and that everything I've done so far has been the result of a long series of trial and errors.
I have a problem with a translator I've been working on for canlii.org .
I'm trying to use it to send to Juris-M cases from that website. Almost everything works, but I still have a few problems.
While most of my problems are Juris-M specific (court names not being right and not knowing how to import into the alternate language fields), there is one problem I have which is closer to the base Zotero functions, which is why I'm here to ask for help.
Simply put, I cannot get two items linked by "seeAlso" in the translator to show up as "related" in the actual Juris-M interface.
In order to conform to how Juris-M handles parallel citations, the translator I've working on creates two items for any cases that require the use of parallel citations. I've got it working to output two items, but I cannot get "seeAlso" to link them in the actual Juris-M interface. In Scaffold, when I run tests, they will show up with a correct value of "seeAlso", but once I try to use it to bring things into Juris-M itself, the "related" tab is always empty.
If anyone wants a peak at the mess of a translator that I code, here it is : https://github.com/Droitslinguistiques/translators/blob/master/CanLII.js
I'm warning you though. I don't know what I'm doing. The translator mostly works right now, but I am certain that anyone more experienced than me might have a hernia looking at my terrible messy code.
Thank you.
I did just realize that I made a mistake. For some reason, my code hasn't uploaded to github, and the file I linked had a very old version of the translator on it.
It should be better now. I'll work on it tomorrow and try and see if I can use your code to guide me on how to do this.
The portion of the code for seeAlso is beyond my ability to understand right now.
However, the neutral court code identifier thing at the top is wonderful. That is definitely something I'll see if I can use to solve the court name vs LRR name problem I've been having with courts.
The other problem I'll have left is to find a way to scrape the info of the other language (if I'm scraping a french decision, get the english version, and vice-versa) and add that info the Juris-M multilingual fields.
One problem at a time though. For now, I just want to make sure that I can get parallel citations to import correctly through seeAlso. I'll save the rest of my ambition for once I've solved that puzzle.
At this point, I'm wondering if that's a Juris-M issue, or a Zotero one.
I tested a few different Zotero translators who have a seeAlso code, but none of them linked the items correctly.
At this point, I'll try to raise an issue in Zotero's GitHub and hope for an answer there.
Edit 1 : The translator runs fine in Scaffold, but from my browser, it doesn't detect a case or run properly.
Edit 2 : I've replicated this problem in both Edge and Chrome. I'll test on another computer and see if the issue might just be my own computer or something else.
I'm still learning as I go, so a lot of times, I'm not sure if an issue is worth bugging Frank over, since it might be a bug or might be my own lack of coding knowledge that is the problem, or if Frank is even the right person to ask. That dev mailing list looks to be a perfect solution to that problem!