glossarist / iev-demo-site

Glossarist IEV demo site
https://iev-staging.geolexica.org
0 stars 0 forks source link

Please clarify how to display concept source #63

Open skalee opened 4 years ago

skalee commented 4 years ago

Please clarify how to display concept's authoritative source on IEV site.

There are two places where authoritative source appears: the non-localized part (the upper one on picture below) and the localized one. They are defined in a quite different ways.

Zrzut ekranu 2020-11-06 o 12 13 25

The upper (non-localized) one

The upper one is displayed with following piece of code, where part_number is the first segment of term ID, i.e. 112 in this case, as requested in #4.

https://github.com/glossarist/iev-demo-site/blob/fc31fd57732c6ab16b61fe5bf2012f7e02342821/_source/_includes/concept-source.html#L2-L7

Note that "IEC 60050-" part is fixed and cannot be overridden (I'm not sure if that's a problem though).

The lower (localized) one

The lower one is displayed with a following piece of code:

https://github.com/glossarist/iev-demo-site/blob/fc31fd57732c6ab16b61fe5bf2012f7e02342821/_source/_includes/localized-concept.html#L28-L42

It relies on a hash composed of ref, clause and link entries similarly to the other Geolexica sites. It is displayed only if authoritative_source.ref in given translation is different than in eng translation (note that one of them may be null).

Question

I'm quite surprised that concept "main" source works differently than translation source. @ronaldtse Please confirm that this is how it should be.

Concept source

The screenshot was taken from concept 112-01-32 defined as follows (some portions omitted):

---
termid: 1120132
term: unit equation

eng:
  id: 1120132
  terms:
  - type: expression
    normative_status: preferred
    designation: unit equation
  definition: mathematical relation between base units, coherent derived units or
    other units of measurement
  language_code: eng
  notes:
  - "(...)"
  examples: []
  entry_status: Standard
  authoritative_source:
    ref: ISO/IEC GUIDE 99:2007  MOD
    clause: ISO/IEC GUIDE 99:2007 1.23 MOD
    link: https://www.iso.org/standard/45324.html
  date_accepted: '2010-01-01T00:00:00+00:00'
  date_amended: '2010-01-01T00:00:00+00:00'
  review_date: '2010-01-01T00:00:00+00:00'
  review_decision_date: '2010-01-01T00:00:00+00:00'
  review_decision_event: published
fra:
  id: 1120132
  terms:
  - type: expression
    normative_status: preferred
    designation: équation aux unités
    gender: f
    plurality: singular
  definition: relation d'égalité entre des unités de base, des unités dérivées cohérentes
    ou d'autres unités de mesure
  language_code: fra
  notes:
  - "(...)"
  examples: []
  entry_status: Standard
  authoritative_source:
    ref: ISO/IEC GUIDE 99:2007
    clause: '1.23'
    link: https://www.iso.org/standard/45324.html
  date_accepted: '2010-01-01T00:00:00+00:00'
  date_amended: '2010-01-01T00:00:00+00:00'
  review_date: '2010-01-01T00:00:00+00:00'
  review_decision_date: '2010-01-01T00:00:00+00:00'
  review_decision_event: published
ronaldtse commented 3 years ago

The upper (non-localized) one The upper one is displayed with following piece of code, where part_number is the first segment of term ID, i.e. 112 in this case, as requested in #4. Note that "IEC 60050-" part is fixed and cannot be overridden (I'm not sure if that's a problem though).

Yes this was a hack back then. It is true that all IEV entries come from "IEC 60050-*", and the part number is the first segment of the concept ID.

We should probably give a link to the IEV page (of this same site) that contains the part that lists out all terms.

I'm quite surprised that concept "main" source works differently than translation source. ronaldtse Please confirm that this is how it should be.

Yes this is how it works. There is a "main" concept source, and the translations can come from other sources (sometimes they are the same as the concept source).