Juris-M / legal-resource-registry

Jurisdiction ID and abbreviation data files for using with Jurism and other projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to set jurisdiction specific court name

sam-gagnon opened this issue · comments

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.

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?

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!

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".

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. #27 (comment)

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.

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".

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?

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

Sounds correct to me too.

This has been fixed in code, and will appear in the next release. 5b1f264