relaton / relaton-bipm

MIT License
2 stars 0 forks source link

Need URLs differentiated by language #38

Closed opoudjis closed 1 year ago

opoudjis commented 2 years ago

If a bibitem has two URLs, that are differentiated by language, add "language" as an attribute to them alongside "type", so that I can select as appropriate. This is the same behaviour already implemented for bibitem titles.

Needed for https://github.com/metanorma/bipm-si-brochure/issues/192

andrew2net commented 2 years ago

Languages are added to the URLs https://github.com/relaton/relaton-data-bipm/blob/6267fb5b243853114459f3578dfec5ca9058e58f/data/cctf/meeting/5.yaml#L19-L23

opoudjis commented 2 years ago

The good news is that you've implemented this. The bad news is... I'm not at all convinced you've got the right URLs in there:

  <uri type="src">https://www.bipm.org/en/committees/ci/cipm/42-1948</uri>
  <uri type="pdf">https://www.bipm.org/documents/20126/59880031/CIPM1948.pdf/d48b0007-6e43-bc7f-f80a-2489784c1471</uri>
  <uri type="src" language="en" script="Latn">https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-en/meeting-42.yml</uri>
  <uri type="src" language="fr" script="Latn">https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-fr/meeting-42.yml</uri>

What is required is an alternation between https://www.bipm.org/en/committees/ci/cipm/42-1948 and https://www.bipm.org/fr/committees/ci/cipm/42-1948 . The two provided links to https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-en/meeting-42.yml and https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-fr/meeting-42.yml cannot be inserted into the brochure as links.

The expectation in Metanorma is that any URI to be used to link to from a bibliographic citation, overriding the internal link to the bibliography, is of type "citation". So I expect to see:

  <uri type="citation" lang="en">https://www.bipm.org/en/committees/ci/cipm/42-1948</uri>
  <uri type="citation" lang="fr">https://www.bipm.org/fr/committees/ci/cipm/42-1948</uri>
  <uri type="pdf">https://www.bipm.org/documents/20126/59880031/CIPM1948.pdf/d48b0007-6e43-bc7f-f80a-2489784c1471</uri>
  <uri type="src" language="en" script="Latn">https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-en/meeting-42.yml</uri>
  <uri type="src" language="fr" script="Latn">https://raw.githubusercontent.com/metanorma/bipm-data-outcomes/main/cipm/meetings-fr/meeting-42.yml</uri>
ronaldtse commented 2 years ago

@opoudjis is correct here, we need the correct URIs for the original pages at bipm.org:

This is the English page: https://github.com/relaton/relaton-data-bipm/blob/6267fb5b243853114459f3578dfec5ca9058e58f/data/cctf/meeting/5.yaml#L17-L18

The corresponding French link is missing (they are available at bipm-data-outcomes).

ronaldtse commented 1 year ago

@andrew2net the implementation here is incomplete, we also need the "other" URL to be in French:

https://github.com/relaton/relaton-data-bipm/blob/6267fb5b243853114459f3578dfec5ca9058e58f/data/cctf/meeting/5.yaml#L17-L18

andrew2net commented 1 year ago

fixed in v 1.13.11 https://github.com/relaton/relaton-data-bipm/blob/e0a4b88fb376b4ab8f93b7dd2c640fee6fbf00c1/data/cctf/meeting/5.yaml#L17-L24

opoudjis commented 1 year ago

Note that in

https://github.com/relaton/relaton-data-bipm/blob/e0a4b88fb376b4ab8f93b7dd2c640fee6fbf00c1/data/cctf/meeting/5.yaml#L17-L24

- content: https://www.bipm.org/en/committees/cc/cctf/5-1970
  type: citation
  language: en
  script: Latn
- content: https://www.bipm.org/en/committees/cc/cctf/5-1970
  type: citation
  language: fr
  script: Latn

the second link is meant to be https://www.bipm.org/en/committees/cc/cctf/5-1970 !! Please double check.

The bulk of references seem to be working as requested. Thank you!

andrew2net commented 1 year ago

@opoudjis it seems the source has the wrong link https://github.com/metanorma/bipm-data-outcomes/blob/55bba1f2de0e4fce665dcd3cfc341db5ca879f38/cctf/meetings-fr/meeting-5.yml#L7 Do you want me to solve the issue using a hardcode?

ronaldtse commented 1 year ago

@andrew2net we need to fix the data:

andrew2net commented 1 year ago

fixed https://github.com/relaton/relaton-data-bipm/blob/a136990076c8f8fcaa3c62a0286deb21e48f5f5c/data/cctf/meeting/5.yaml#L21