Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EU.INT courts broken in German UI #114

Open
georgd opened this issue Jan 29, 2021 · 26 comments
Open

EU.INT courts broken in German UI #114

georgd opened this issue Jan 29, 2021 · 26 comments

Comments

@georgd
Copy link

georgd commented Jan 29, 2021

When entering a CJEU case with German UI, Juris-M shows entries with yellow background in fields Jurisdiction and Court:

image

As a consequence, the citations in Word are broken (this is with the IBFD style, abbreviations should be in English):

image

This doesn’t happen with Canadian cases in French UI.

I could verify this with Juris-M 5.0.93m18 on Windows 10 and Mac OS, on different machines.

@fbennett
Copy link

fbennett commented Jan 30, 2021 via email

@fbennett
Copy link

I've traced this to a return value from the Firefox autosearch controller, but I haven't reached the ultimate cause yet. What's happening is fairly clear: the German and English names for "European Union" differ in length by four characters. To build the base of the jurisdiction name when flipping from the country- to country-plus-subjurisdiction forms, the leading full name of the country is clipped off. Code somewhere it using the length of one string, but chopping a string in the other language. That yields "NT|xxxx" instead of "EU.INT|xxxx", and since that's not a valid jurisdiction, everything turns yellow.

I know that there is code in Jurism that performs this truncate operation, but what's looking bizarre is that the corrupted return value is coming from the Firefox native search controller, yet the search itself produces a clean result when run directly in SQL. It has me stumped at the moment, but I'll give it a rest for the day, come back for a look tomorrow, and we'll see how soon we can get to the bottom of it.

@fbennett
Copy link

Okay, found the source. It's caching the jurisdiction names in English. The function that needs fixing is this.setJurisdictionByIdOrName in chrome/content/zotero/xpcom/data/cachedJurisdictionData`. It looks like court names are properly cached using the locale setting, so something similar needs to happen on this jurisdiction setter. Will try to do some work on it tomorrow.

@georgd
Copy link
Author

georgd commented Jan 30, 2021 via email

@fbennett
Copy link

Will do. Thanks for the reminder.

@georgd
Copy link
Author

georgd commented Feb 1, 2021

Thank you!

I just tried the new beta and it works nicely now :) (I just had to restart Juris-M after upgrading).

@fbennett
Copy link

fbennett commented Feb 1, 2021 via email

@georgd
Copy link
Author

georgd commented Feb 1, 2021

Great, thank you! May I ask you to also have a look at #113?

@georgd
Copy link
Author

georgd commented Apr 1, 2021

When trying again today in the beta, it’s a bit differentiated: In the English interface in a legal case, when I choose the jurisdiction "European Union" and then choose a court, the jurisdiction switches automatically to EU.INT|Court of Justice. In the German interface, it doesn’t. I have to manually choose EU.INT|Gerichtshof der Europäischen Union from the dropdown, which will be displayed in English in the jurisdiction field.

image

@fbennett
Copy link

fbennett commented Apr 1, 2021 via email

@georgd
Copy link
Author

georgd commented Apr 1, 2021 via email

@georgd
Copy link
Author

georgd commented Apr 13, 2023

@fbennett may I remind you of this issue, please? As it is, it leads to inherently broken entries when using the German interface (and it might happen in other languages too).

@fbennett
Copy link

I just tried this in the version I have poised for release, and it seems to be working correctly. If you have trouble after this 6.0.22m3 release, let me know and we'll dig deeper.

@georgd
Copy link
Author

georgd commented Apr 17, 2023

Thank you very much. Sadly, I have to report that the behviour hasn’t changed. There are multiple entries for the EU in the jurisdiction dropdown, one of which is the subjurisdiction of theEuropean Court of Justice. When I choose the top level jurisdiction and then choose the ECJ entry from the court list, it looks like here:

image

For comparison, in the English interface it’s like this:

image

As you can see, in German the subjurisdiction name isn’t parsed correctly. This is also visible in the result:

image

This appears to be exactly like what you analysed in #114 (comment).

@fbennett
Copy link

fbennett commented Apr 17, 2023 via email

@fbennett
Copy link

fbennett commented Apr 17, 2023

I've been so far unable to reproduce this. The platforms I've tried are:

  • Linux (Ubuntu 22)
  • Mac OSX (Catalina 10.15.7)
  • Windows 11

Possibly we are setting up the German interface differently. In my case, the OS is running in English, and I am setting the Jurism interface to German by selecting "Deutsch" in Preferences->Advanced. In your case, is the OS possibly in German, and the language menu in Preferences->Advanced possibly set to "Automatic"?

@georgd
Copy link
Author

georgd commented Apr 18, 2023

Thanks for following up! It must have been a frustrating couple of years after reaching the threshold of a fix. I understand the failure now. I'll first confirm the failure across platforms, then finish the hunt for the cause.

It’s not that bad. I knew how to navigate around them.

@georgd
Copy link
Author

georgd commented Apr 18, 2023

I've been so far unable to reproduce this. The platforms I've tried are:

  • Linux (Ubuntu 22)
  • Mac OSX (Catalina 10.15.7)
  • Windows 11

Possibly we are setting up the German interface differently. In my case, the OS is running in English, and I am setting the Jurism interface to German by selecting "Deutsch" in Preferences->Advanced. In your case, is the OS possibly in German, and the language menu in Preferences->Advanced possibly set to "Automatic"?

It doesn’t make a difference if I set it to "Automatic" or to "German" explicitly. BUT when I change the Windows language to English and there choose "German" as interface language in Jurism things look different:

The courts dropdown still shows the chopped off jurisdiction code (NT|):

image

But the court gets added correctly and the jurisdiction, too. So yes, the system language seems to play an important role here.

@fbennett
Copy link

fbennett commented Apr 18, 2023 via email

@georgd
Copy link
Author

georgd commented Apr 18, 2023

I was shouting hooray already when I restarted (twice) after removing the Jurism folder and everything worked well in the German UI as well. But after a while (about 15minblater) it returned to the previous behaviour. So no real change. The only thing that happened during that "while", AFAICT, was the synchronisation with my Zotero account. I explicitly switched off the BBT add-on to make sure it doesn't interfere. I could reproduce this three times.

@fbennett
Copy link

Well, that's weird. Progress, but weird. Was it sync that forced the reversion on each occasion?

@fbennett
Copy link

So ... this makes me curious whether Jurism is storing jurisdiction values as codes (correct) or as strings (fragile). I may have some SQL probing for you to try later.

@georgd
Copy link
Author

georgd commented Apr 18, 2023

I don't know if sync itself caused it. At least I don't think it does so directly. It only happens when I add new cases. All existing ones are not affected.

@fbennett
Copy link

fbennett commented Apr 18, 2023

Aha. As I thought, Jurism was (or maybe is) saving jurisdiction values in a form tied to a specific language. I need to investigate further, but I think this may be the current behavior. In either case, as my own DB content shows, the two forms can be mixed up in there. The system can be made to work reliably with either, but the records absolutely need to have a consistent format. I'll need some time to sort through this, but we're at last on the road to a solution.
Screenshot from 2023-04-19 06-40-08

@fbennett
Copy link

I tried corrupting some of the long-form entries in my own database, but the result, even after lengthening or shortening the country name, was to force the database record to the correct jurisdiction code upon editing of any affected item. So although these (presumably old) records are anomalous, and I'm still unable to reproduce the error at this end. I can prepare some JS code to expose court and jurisdiction codes at database level in affected items on your system. Could we take up the conversation on Discord for that work? We can return here after we've pinned down the issue and found a solution.

@georgd
Copy link
Author

georgd commented Apr 27, 2023

Thank you. Yes, we can continue on discord. By the way, I’m unable to break an existing record. I only can reproduce the issue when adding new ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants