Juris-M / legal-resource-registry

Jurisdiction ID and abbreviation data files for using with Jurism and other projects.
MIT License
31 stars 37 forks source link

Unable to set jurisdiction specific court name #28

Closed sam-gagnon closed 3 years ago

sam-gagnon commented 3 years ago

Let's say that the "court" object has a name of "Supreme Court", but if that object is called for a specific jurisdiction, I want the UI to display "Supreme Court of Alberta.

I have tried to have the general court name be "Supreme Court", and then under the jurisdiction, do the following:

"ca:ab" : { courts: { "supreme.court": { "name": "Supreme Court of Alberta" } } }

However, that does not seem to add a modified name to that court when called for that jurisdiction. Instead, the "name" specificied under the jurisdiction overwrites the "abbrev" of the court object, so that the "abbrev" will now be "Supreme Court of Alberta", but will still display as "Supreme Court" in the UI.

This is honestly not a big deal, but I thought I'd bring it up, in case it is an unintended bug and not a deliberate choice.

fbennett commented 3 years ago

Ah, I understand. It's both a bug and a deliberate choice. I hadn't anticipated that case, but I think it shouldn't be necessary. I think. My first thought, at least, is that the redefinition of the jurisdiction+court "name" within the variant should probably throw an error in the compiler.

In the UI, with Jurisdiction set to "Canada|CA", a down-arrow in the empty Court field will show a listing of courts, with (some of the) subordinate courts prefixed with their jurisdiction, as "Alberta: Supreme Court". When selected, that yields "CA|Alberta" in the Jurisdiction field, and "Supreme Court" as the Court. In both views (before and after selection), the "of Alberta" element would be redundant. So I think there is no need to provide for (jurisdiction+court)-specific UI names, at least in this case. Will that work for your users?

sam-gagnon commented 3 years ago

Right, I understand.

It honestly isn't a problem. The only reason I tried it is because some courts have "Court of Appeal" as the official name, while some other provinces have the official name as "Court of Appeal of Manitoba".

However, that is very irrelevant. As long as the base name is accurate, I think it's fine.


From: Frank Bennett notifications@github.com Sent: Sunday, October 11, 2020 7:35:01 PM To: Juris-M/legal-resource-registry legal-resource-registry@noreply.github.com Cc: Droitslinguistiques adjoint@droitslinguistiques.ca; Author author@noreply.github.com Subject: Re: [Juris-M/legal-resource-registry] Unable to set jurisdiction specific court name (#28)

Ah, I understand. It's both a bug and a deliberate choice. I hadn't anticipated that case, and it shouldn't be necessary. I think. My first thought, at least, is that the redefinition of the jurisdiction+court "name" within the variant should probably throw an error in the compiler.

In the UI, with Jurisdiction set to "Canada|CA", a down-arrow will show a listing of courts, with (some of the) subordinate courts prefixed with their jurisdiction, as "Alberta: Supreme Court". When selected, that yields "CA|Alberta" in the Jurisdiction field, and "Supreme Court" as the Court. In both views (before and after selection), the "of Alberta" element would be redundant. So I think there is no need to provide for (jurisdiction+court)-specific UI names, at least in this case. Will that work for your users?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Juris-M/legal-resource-registry/issues/28#issuecomment-706778076, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQQZZZBJ63I2C7CIJDVQXHDSKIXJLANCNFSM4SMADUXQ.

sam-gagnon commented 3 years ago

The abbrevs are always the same, with the jurisdiction name before the Court name. Even the ones where the jurisdiction isn't part of the official court name.

At least according to the McGill guide anyways.


From: Samuel Gagnon adjoint@droitslinguistiques.ca Sent: Sunday, October 11, 2020 9:38:52 PM To: Juris-M/legal-resource-registry legal-resource-registry@noreply.github.com; Juris-M/legal-resource-registry reply@reply.github.com Cc: Author author@noreply.github.com Subject: Re: [Juris-M/legal-resource-registry] Unable to set jurisdiction specific court name (#28)

Right, I understand.

It honestly isn't a problem. The only reason I tried it is because some courts have "Court of Appeal" as the official name, while some other provinces have the official name as "Court of Appeal of Manitoba".

However, that is very irrelevant. As long as the base name is accurate, I think it's fine.


From: Frank Bennett notifications@github.com Sent: Sunday, October 11, 2020 7:35:01 PM To: Juris-M/legal-resource-registry legal-resource-registry@noreply.github.com Cc: Droitslinguistiques adjoint@droitslinguistiques.ca; Author author@noreply.github.com Subject: Re: [Juris-M/legal-resource-registry] Unable to set jurisdiction specific court name (#28)

Ah, I understand. It's both a bug and a deliberate choice. I hadn't anticipated that case, and it shouldn't be necessary. I think. My first thought, at least, is that the redefinition of the jurisdiction+court "name" within the variant should probably throw an error in the compiler.

In the UI, with Jurisdiction set to "Canada|CA", a down-arrow will show a listing of courts, with (some of the) subordinate courts prefixed with their jurisdiction, as "Alberta: Supreme Court". When selected, that yields "CA|Alberta" in the Jurisdiction field, and "Supreme Court" as the Court. In both views (before and after selection), the "of Alberta" element would be redundant. So I think there is no need to provide for (jurisdiction+court)-specific UI names, at least in this case. Will that work for your users?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Juris-M/legal-resource-registry/issues/28#issuecomment-706778076, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQQZZZBJ63I2C7CIJDVQXHDSKIXJLANCNFSM4SMADUXQ.

fbennett commented 3 years ago

Not relevant to this issue, but some deep fixes will be needed around abbreviations to get Canada working correctly. It's a long chain of processing (JSON desc -> JSON abbrevs -> SQL abbrevs DB -> JS object -> citeproc-js selection), and the code in it was not written with language arbitration in mind, so it will take awhile to finish. Will stick with it though, your work won't go to waste!

sam-gagnon commented 3 years ago

Hmm, I don't know if this is related or not, but I just noticed something in auto-ca-fr

For the Jurisdictions, the ones where I translated the names, but didn't provide a variant "abbrev", show up with the translation name in the "default": {"place": { CA:XX} list.

Here is what I mean

"default": {
  "place": {
    "CA:AB": "Alta",
    "CA:BC": "Colombie-Britannique",
    "CA:MB": "Man",
    "CA:NB": "N-B",
    "CA:NL": "Terre-Neuve-et-Labrador",
    "CA:NS": "Nouvelle-Écosse",
    "CA:NT": "TN-O",
    "CA:NU": "NU",
    "CA:ON": "Ont",
    "CA:PE": "Île-du-Prince-Édouard",
    "CA:QC": "Québec",
    "CA:SK": "Sask",
    "CA:YK": "Y"
  }
},

So if I'm understanding this code right, instead of using the english abbrevs, the fr variant names overwrote the original "abbrev" values for British-Columbia (Colombie-Britannique), Newfoundland, Nova Scotia, and Prince Edward's Island.

I set variant "name" for these juridictions for the UI, but the citation "abbrev" should stayed the original english "abbrev".

fbennett commented 3 years ago

The abbrev values under "default.place" and in the UI will be the same, so that seems correct. The absence from the UI should come right with a client update. https://github.com/Juris-M/legal-resource-registry/issues/27#issuecomment-707283237

sam-gagnon commented 3 years ago

The problem I'm having is that this list mixes up "abbrevs" from the english list, and variant "names" from the fr variant.

This is how I wrote it in the juris-ca file:

"ca:ab": {
  "name": "Alberta",
  "abbrev": "Alta",
  "ABBREV": "AB",
  "courts": {
    "court.appeal": {},
    "court.queens.bench": {},
    "provincial.court": {}
  }
},
"ca:bc": {
  "name": "British Columbia",
  "abbrev": "BC",
  "ABBREV": "BC",
  "courts": {
    "court.appeal": {},
    "supreme.court.prov": {},
    "provincial.court": {}
  },
  "variants": {
    "fr": {
      "name": "Colombie-Britannique"
    }
  }
},

So British Columbia should have the following end results:

Name: British Columbia abbrev: BC Name-fr: Colombie-Britannique abbrev-fr:BC (not defined since it is the same as in english)

Alberta however, doesn't have any kind of french variant of it's name.

So the list entry for AB is the "Alta" "abbrev", but for BC, the full "name-fr" is what is given. I'm just making sure that it is intended that "defaut.place" includes a mix of variant "name" and also default language "abbrev"s.

sam-gagnon commented 3 years ago

On another note, I've also just noticed that the jurisdictions with both a variant "name" and "abbrev" seem to have a problem.

The variant "name" is nowhere to be found, in either the abbrev or map file. However, the variant "abbrev" is what is placed in "default.place".

fbennett commented 3 years ago

So the list entry for AB is the "Alta" "abbrev", but for BC, the full "name-fr" is what is given. I'm just making sure that it is intended that "defaut.place" includes a mix of variant "name" and also default language "abbrev"s.

Got it. No, they should be consistent, so the compiler script needs attention. The next question will be ... which form should be set in "default.place"? That value is used as the "short" form of the jurisdiction variable:

<text variable="jurisdiction" form="short"/>

The full jurisdiction name is unlikely to be used in citations, so I think this would be best set to abbrev, falling back to name. When a variant is set for name only, but parent has an abbrev value, the abbrev value should be retained. Does that sound right?

sam-gagnon commented 3 years ago

When a variant is set for name only, but parent has an abbrev value, the abbrev value should be retained. Does that sound right?

Absolutely

georgd commented 3 years ago

Sounds correct to me too.

fbennett commented 3 years ago

This has been fixed in code, and will appear in the next release. https://github.com/Juris-M/legal-resource-registry/commit/5b1f264367d65f433e25afa292e1aedae8942bf9