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

Please clarify how to display concept source #63

Open
skalee opened this issue Nov 6, 2020 · 1 comment
Open

Please clarify how to display concept source #63

skalee opened this issue Nov 6, 2020 · 1 comment
Labels
question Further information is requested

Comments

@skalee
Copy link
Contributor

skalee commented Nov 6, 2020

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.

<section class="field source">
<p class="field-name">source</p>
<p class="field-value">
IEC 60050-{{ page.part_number }}:{{ page.eng.date_accepted | date: "%Y" }}
</p>
</section>

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:

{% if localized_term.authoritative_source.ref != english.authoritative_source.ref %}
{% if localized_term.authoritative_source.link %}
<p class="source localized">
SOURCE: <a href="{{ localized_term.authoritative_source.link }}">
{{ localized_term.authoritative_source.ref }}</a>{% if localized_term.authoritative_source.clause %}, {{ localized_term.authoritative_source.clause }}{% endif %}
</p>
{% elsif localized_term.authoritative_source.ref %}
<p class="source localized">
SOURCE: {{ localized_term.authoritative_source.ref }}{% if localized_term.authoritative_source.clause %}, {{ localized_term.authoritative_source.clause }}{% endif %}
</p>
{% endif %}
<span class="warning">
This translated term may not be from the same source as the normative term.
</span>
{% endif %}

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
@skalee skalee added the question Further information is requested label Nov 6, 2020
@ronaldtse
Copy link
Member

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

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

No branches or pull requests

2 participants