relaton / relaton-bipm

MIT License
2 stars 0 forks source link

Fix French translations of document identifiers #39

Closed opoudjis closed 1 year ago

opoudjis commented 1 year ago

From https://github.com/metanorma/bipm-si-brochure/issues/193

From BIPM Janet Miles:

When referring to the Resolutions I’d provided you with the English description but not the French: in French the model for “CGPM Resolution X (YYYY)” would be

And there’s another slight complication in that the wording is “de la” for the CGPM, but “du” for the CIPM and Consultative Committees:

If this proves problematic we’ll have to find another solution… On the French version of the BIPM website my shortest version of the references is:


I believe this is a Relaton issue. The data source at bipm-data-outcomes does not provide this text.

In realton-data-bipm, this text is provided: https://github.com/relaton/relaton-data-bipm/blob/9fd0943b7b142a23903bee0a8386463736e1a1af/data/cipm/meeting/resolution/1948-00.yaml#L26-L40

docid:
- id: CIPM Resolution (1948)
  type: BIPM
  primary: true
- id: CIPM Resolution (1948)
  type: BIPM
  primary: true
  language: en
  script: Latn
- id: CIPM Résolution (1948)
  type: BIPM
  primary: true
  language: fr
  script: Latn
docnumber: CIPM Resolution (1948)

So this is a task for @andrew2net , and there may be some impact to relator-render (@opoudjis )

ronaldtse commented 1 year ago

We need to decide whether "Résolution X de la CGPM (YYYY)" is an actual document identifier, or an in-content textual reference.

I'm discussing this with the BIPM right now, so please hold off for now.

ronaldtse commented 1 year ago

This issue is active again due to this guide: https://metanorma.github.io/bipm-editor-guides/documents/bipm-outcomes-en.html

@andrew2net can you please help address this? Thanks!

andrew2net commented 1 year ago

@ronaldtse as I understans, we need to use these translations as references. We don't need to update document identifiers, correct?

andrew2net commented 1 year ago
andrew2net commented 1 year ago

Is this ok?

ronaldtse commented 1 year ago

@andrew2net the French long identifiers are wrong.

- id: CGPM Résolution 1 de la (1901)
  type: BIPM-long
  primary: true
  language: fr
  script: Latn
- id: CGPM Resolution 1 (1901) / CGPM Résolution 1 de la (1901)
  type: BIPM-long
  primary: true

They should be:

- id: Résolution 1 de la CGPM (1901)
  type: BIPM-long
  primary: true
  language: fr
  script: Latn
- id: CGPM Resolution 1 (1901) / Résolution 1 de la CGPM (1901)
  type: BIPM-long
  primary: true

Please fix this ASAP.

opoudjis commented 1 year ago

So, because there is a lot of stuff going on, this is what I need you to do.

So the complete listing for CGPM Resolution 1 becomes:

  <docidentifier type="BIPM" primary="true">CIPM REC 2 (2002)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CIPM REC 2 (2002, E)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CIPM REC 2 (2002, F)</docidentifier>
  <docidentifier type="BIPM-long" language="en" script="Latn">CIPM Recommendation 2 (2002)</docidentifier>
  <docidentifier type="BIPM-long" language="fr" script="Latn">Recommandation 2 du CIPM (2002)</docidentifier>
  <docidentifier type="BIPM-long">CIPM Recommendation 2 (2002) / Recommandation 2 du CIPM (2002)</docidentifier>
opoudjis commented 1 year ago

I also see you use ordinals in the English BIPM identifiers. They need to be correct: right now you have:

$ bundle exec relaton fetch "CGPM -- Meeting 1 (1889)"

returns

<docidentifier type="BIPM" primary="true" language="en" script="Latn">CGPM 1th Meeting (1889)</docidentifier>

That needs to be "1st", not "1th"!

I recommend you use twitter_cldr, which I do:

For English,

require "twitter_cldr"

n = "1".to_i # the number to form the ordinal of, must be an integer

n.localize(:en).to_rbnf_s("OrdinalRules", "digits-ordinal")

That will return "1st", "2nd", "123rd", "54th", etc.

opoudjis commented 1 year ago

bundle exec relaton fetch "CGPM -- Meeting 1 (1889)"

in French is returning:

<docidentifier type="BIPM" primary="true" language="fr" script="Latn">CGPM 1e Meeting (1889)</docidentifier>

That's Réunion, not Meeting! Please check the correct translations are being looked up.

andrew2net commented 1 year ago

@andrew2net the French long identifiers are wrong.

- id: CGPM Résolution 1 de la (1901)
  type: BIPM-long
  primary: true
  language: fr
  script: Latn
- id: CGPM Resolution 1 (1901) / CGPM Résolution 1 de la (1901)
  type: BIPM-long
  primary: true

They should be:

- id: Résolution 1 de la CGPM (1901)
  type: BIPM-long
  primary: true
  language: fr
  script: Latn
- id: CGPM Resolution 1 (1901) / Résolution 1 de la CGPM (1901)
  type: BIPM-long
  primary: true

Please fix this ASAP.

@ronaldtse fixed https://github.com/relaton/relaton-data-bipm/blob/ccf1c3f8fd8eeba2401c60dcca2779e98a30a005/data/cgpm/meeting/resolution/1901-01.yaml#L55-L60

andrew2net commented 1 year ago

So, because there is a lot of stuff going on, this is what I need you to do.

  • There are two types of identifier: BIPM-long, and BIPM
  • Only BIPM is primary; BIPM-long is not primary
  • As Ronald points out, the long French ID is not "CGPM Résolution 1 de la", but "Résolution 1 de la CGPM"
  • Not your problem, but:

    • In other flavours, BIPM documents are both cited and referenced with the BIPM identifier
    • In BIPM itself, documents are referenced (in references) with the BIPM identifier, but cited (in text) with the long identifier. I'm taking care of that.

So the complete listing for CGPM Resolution 1 becomes:

  <docidentifier type="BIPM" primary="true">CIPM REC 2 (2002)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CIPM REC 2 (2002, E)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CIPM REC 2 (2002, F)</docidentifier>
  <docidentifier type="BIPM-long" language="en" script="Latn">CIPM Recommendation 2 (2002)</docidentifier>
  <docidentifier type="BIPM-long" language="fr" script="Latn">Recommandation 2 du CIPM (2002)</docidentifier>
  <docidentifier type="BIPM-long">CIPM Recommendation 2 (2002) / Recommandation 2 du CIPM (2002)</docidentifier>

@opoudjis fixed https://github.com/relaton/relaton-data-bipm/blob/ccf1c3f8fd8eeba2401c60dcca2779e98a30a005/data/cipm/meeting/recommendation/2002-02.yaml#L37-L60

andrew2net commented 1 year ago

I also see you use ordinals in the English BIPM identifiers. They need to be correct: right now you have:

$ bundle exec relaton fetch "CGPM -- Meeting 1 (1889)"

returns

<docidentifier type="BIPM" primary="true" language="en" script="Latn">CGPM 1th Meeting (1889)</docidentifier>

That needs to be "1st", not "1th"!

@opoudjis fixed https://github.com/relaton/relaton-data-bipm/blob/ccf1c3f8fd8eeba2401c60dcca2779e98a30a005/data/cgpm/meeting/1.yaml#L38-L42

andrew2net commented 1 year ago

bundle exec relaton fetch "CGPM -- Meeting 1 (1889)"

in French is returning:

<docidentifier type="BIPM" primary="true" language="fr" script="Latn">CGPM 1e Meeting (1889)</docidentifier>

That's Réunion, not Meeting! Please check the correct translations are being looked up.

@opoudjis fixed https://github.com/relaton/relaton-data-bipm/blob/ccf1c3f8fd8eeba2401c60dcca2779e98a30a005/data/cgpm/meeting/1.yaml#L43-L47

ronaldtse commented 1 year ago

So, because there is a lot of stuff going on, this is what I need you to do.

  • There are two types of identifier: BIPM-long, and BIPM
  • Only BIPM is primary; BIPM-long is not primary
  • As Ronald points out, the long French ID is not "CGPM Résolution 1 de la", but "Résolution 1 de la CGPM"
  • Not your problem, but:

    • In other flavours, BIPM documents are both cited and referenced with the BIPM identifier
    • In BIPM itself, documents are referenced (in references) with the BIPM identifier, but cited (in text) with the long identifier. I'm taking care of that.

So the complete listing for CGPM Resolution 1 becomes:

  <docidentifier type="BIPM" primary="true">CIPM REC 2 (2002)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CIPM REC 2 (2002, E)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CIPM REC 2 (2002, F)</docidentifier>
  <docidentifier type="BIPM-long" language="en" script="Latn">CIPM Recommendation 2 (2002)</docidentifier>
  <docidentifier type="BIPM-long" language="fr" script="Latn">Recommandation 2 du CIPM (2002)</docidentifier>
  <docidentifier type="BIPM-long">CIPM Recommendation 2 (2002) / Recommandation 2 du CIPM (2002)</docidentifier>

@opoudjis fixed https://github.com/relaton/relaton-data-bipm/blob/ccf1c3f8fd8eeba2401c60dcca2779e98a30a005/data/cipm/meeting/recommendation/2002-02.yaml#L37-L60

Confirmed:

CIPM:

  <docidentifier type="BIPM" primary="true">CIPM REC 2 (1989)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CIPM REC 2 (1989, E)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CIPM REC 2 (1989, F)</docidentifier>
  <docidentifier type="BIPM-long" language="en" script="Latn">CIPM Recommendation 2 (1989)</docidentifier>
  <docidentifier type="BIPM-long" language="fr" script="Latn">Recommandation 2 du CIPM (1989)</docidentifier>
  <docidentifier type="BIPM-long">CIPM Recommendation 2 (1989) / Recommandation 2 du CIPM (1989)</docidentifier>

CGPM:

  <docidentifier type="BIPM" primary="true">CGPM RES 1 (1889)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CGPM RES 1 (1889, E)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CGPM RES 1 (1889, F)</docidentifier>
  <docidentifier type="BIPM-long" language="en" script="Latn">CGPM Resolution 1 (1889)</docidentifier>
  <docidentifier type="BIPM-long" language="fr" script="Latn">Résolution 1 de la CGPM (1889)</docidentifier>
  <docidentifier type="BIPM-long">CGPM Resolution 1 (1889) / Résolution 1 de la CGPM (1889)</docidentifier>
ronaldtse commented 1 year ago

I also see you use ordinals in the English BIPM identifiers. They need to be correct: right now you have:

$ bundle exec relaton fetch "CGPM -- Meeting 1 (1889)"

returns

<docidentifier type="BIPM" primary="true" language="en" script="Latn">CGPM 1th Meeting (1889)</docidentifier>

That needs to be "1st", not "1th"!

@opoudjis fixed https://github.com/relaton/relaton-data-bipm/blob/ccf1c3f8fd8eeba2401c60dcca2779e98a30a005/data/cgpm/meeting/1.yaml#L38-L42

Confirmed:

  <docidentifier type="BIPM" primary="true" language="en" script="Latn">CGPM 1st Meeting (1889)</docidentifier>
  <docidentifier type="BIPM" primary="true" language="fr" script="Latn">CGPM 1e Réunion (1889)</docidentifier>
  <docidentifier type="BIPM" primary="true">CGPM 1st Meeting (1889) / CGPM 1e Réunion (1889)</docidentifier>
ronaldtse commented 1 year ago

@opoudjis this ticket seems solved, any further issue please reopen or file a new ticket. Thanks!