metanorma-iso 2.7.1 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34f733de15ebb368d26c35e755b28b27c5571a3ca85c9ddcf2bf3e70285b7253
4
- data.tar.gz: 468b80f8d03c0c61fdd9b18062b1c68897fa39499c3c391b369911cea17e90b2
3
+ metadata.gz: e7a22ee7f3e6246a8f153899417b7d2a36091350715cde6b80d41546dbd19ace
4
+ data.tar.gz: 0c472f64ad70121d9f9c87775cdcf664b338aa10d49fa6dccb8545006fec4c6f
5
5
  SHA512:
6
- metadata.gz: e843aea35980112f47ef1ced44e26ffbd0ddcf32dc5ac0ab381bb5af81b98070c27bf9a932cb5e5a2dd9a164d18c542dbac34e5849434a779fd9baffe5a1ba8b
7
- data.tar.gz: c36cb73380a1b70649b17a5dedc93849d918d2393ce2e683501b29ebfe5187d3cf86f3f5a4d36f5a45d2bbba0933807385d33f8fe2638615f289e849d4a36321
6
+ metadata.gz: 0c69a24170dbb064699e1452495d8fc7f654aeaee2595066678ee728819cef75ddc4f1ed1c0da002908ffc27d91e54db4c9a0dddb9ac9dd6c5bad8b196fe774f
7
+ data.tar.gz: f2573191de13d2240c413e869038ef61cd3a84c3642993f8e0c6b6b13109e7edbb595ee93f68e9233b586b45c60a2d1909c228f5c43c1aeaba1adef07162ddda
@@ -14,8 +14,7 @@ module IsoDoc
14
14
  end
15
15
 
16
16
  def implicit_reference(bib)
17
- return true if bib&.at(ns("./docidentifier"))&.text == "IEV"
18
-
17
+ bib.at(ns("./docidentifier"))&.text == "IEV" and return true
19
18
  super
20
19
  end
21
20
 
@@ -29,8 +28,7 @@ module IsoDoc
29
28
  end
30
29
 
31
30
  def example_span_label(_node, div, name)
32
- return if name.nil?
33
-
31
+ name.nil? and return
34
32
  div.span class: "example_label" do |p|
35
33
  name.children.each { |n| parse(n, p) }
36
34
  end
@@ -55,9 +53,8 @@ module IsoDoc
55
53
 
56
54
  def node_begins_with_para(node)
57
55
  node.elements.each do |e|
58
- next if e.name == "name"
59
- return true if e.name == "p"
60
-
56
+ e.name == "name" and next
57
+ e.name == "p" and return true
61
58
  return false
62
59
  end
63
60
  false
@@ -187,8 +184,7 @@ module IsoDoc
187
184
  out.div **figure_attrs(node) do |div|
188
185
  node.children.each do |n|
189
186
  figure_key(out) if n.name == "dl"
190
- next if n.name == "note" && n["type"] == "units"
191
-
187
+ n.name == "note" && n["type"] == "units" and next
192
188
  parse(n, div) unless n.name == "name"
193
189
  end
194
190
  figure_name_parse(node, div, node.at(ns("./name")))
@@ -204,6 +200,11 @@ module IsoDoc
204
200
  end
205
201
  end
206
202
  end
203
+
204
+ def convert_i18n_init(docxml)
205
+ super
206
+ update_i18n(docxml)
207
+ end
207
208
  end
208
209
  end
209
210
  end
@@ -11,7 +11,7 @@
11
11
  <p class="coverpage_docnumber">{{ edition_display | capitalize }}</p>
12
12
  {% endif %}
13
13
 
14
- {% if correcteddate != "XXX" %}
14
+ {% if correcteddate and correcteddate != "" and correcteddate != "XXX" %}
15
15
  <p class="coverpage_docnumber">{{ labels["corrected_version"] }} : {{ correcteddate }}</p>
16
16
  {% endif %}
17
17
 
@@ -17,7 +17,7 @@
17
17
  {% if doc_date %}
18
18
  <p class="zzCover" align="right" style='text-align:right;font-weight:normal;'><span lang="EN-GB">Date: <span style='mso-no-proof:yes'>{{ doc_date }}</span></span></p>
19
19
  {% endif %}
20
- {% if correcteddate %}
20
+ {% if correcteddate and correcteddate != "" and correcteddate != "XXX" %}
21
21
  <p class="zzCover">{{ labels["corrected_version"] }}: {{ correcteddate }}</p>
22
22
  {% endif %}
23
23
 
@@ -13,7 +13,7 @@
13
13
  {% if doc_date %}
14
14
  <p class="zzCover" align="right" style='text-align:right'><span lang="EN-GB">Date: <span style='mso-no-proof:yes'><b>{{ doc_date }}</b></span></span></p>
15
15
  {% endif %}
16
- {% if correcteddate %}
16
+ {% if correcteddate and correcteddate != "" and correcteddate != "XXX" %}
17
17
  <p class="zzCover">{{ labels["corrected_version"] }}: {{ correcteddate }}</p>
18
18
  {% endif %}
19
19
 
@@ -33,7 +33,7 @@ style='mso-no-proof:yes'>{{ editorialgroup }}</span></p>
33
33
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB">{{ edition_display | capitalize }}</span></p>
34
34
  {% endif %}
35
35
 
36
- {% if correcteddate %}
36
+ {% if correcteddate and correcteddate != "" and correcteddate != "XXX" %}
37
37
  <p class="MsoNormal" align="right" style='text-align:right'>{{ labels["corrected_version"] }}: {{ correcteddate }}</p>
38
38
  {% endif %}
39
39
 
@@ -10,6 +10,7 @@ term_def_boilerplate: |
10
10
  </ul>
11
11
  all_rights_reserved: Alle Rechte vorbehalten
12
12
  reference_number: Referenznummer
13
+ reference_number_abbrev: Ref.nr
13
14
  price_based_on: Preis basierend auf % Seiten
14
15
  descriptor: Deskriptor
15
16
  under_preparation: In Vorbereitung. (Stadium zum Zeitpunkt der Veröffentlichung %).
@@ -30,6 +31,9 @@ corrected_version: Korrigierte Version
30
31
  fast-track-procedue: Beschleunigtes Verfahren
31
32
  multiple_and: "%1 und %2"
32
33
  multiple_or: "%1 oder %2"
34
+ classification-UDC: UDK
35
+ edition_ordinal_old: "{{ var1 | ordinal_num: 'edition', '' }} AUSGABE"
36
+ edition_replacement: "Diese {{ var1 | ordinal_word: 'edition', '' }} Ausgabe ersetzt die {{ var2 | ordinal_word: 'edition', '' }} Ausgabe"
33
37
  doctype_dict:
34
38
  international-standard: Internationaler Standard
35
39
  technical-specification: Technische Spezifikation
@@ -40,6 +44,8 @@ doctype_dict:
40
44
  amendment: Änderung
41
45
  technical-corrigendum: Technische Berichtigung
42
46
  directive: Richtlinie
47
+ committee-document: Ausschussdokument
48
+ recommendation: ISO-Empfehlung
43
49
  stage_dict:
44
50
  "00": Vorläufiges Arbeitselement
45
51
  "10": Neuer Arbeitselementvorschlag
@@ -10,6 +10,7 @@ term_def_boilerplate: |
10
10
  </ul>
11
11
  all_rights_reserved: All rights reserved
12
12
  reference_number: Reference number
13
+ reference_number_abbrev: Ref. No.
13
14
  price_based_on: Price based on % pages
14
15
  descriptor: Descriptor
15
16
  under_preparation: Under preparation. (Stage at the time of publication %).
@@ -22,6 +23,8 @@ see: see
22
23
  see_also: see also
23
24
  secretariat: Secretariat
24
25
  edition: edition
26
+ edition_ordinal_old: "{{ var1 | ordinal_num: 'edition', '' }} EDITION"
27
+ edition_replacement: "This {{ var1 | ordinal_word: 'edition', '' }} edition supersedes the {{ var2 | ordinal_word: 'edition', '' }} edition"
25
28
  termsrelated: Terms related to
26
29
  availablefrom: Available from
27
30
  voting_begins_on: Voting begins on
@@ -30,6 +33,7 @@ corrected_version: Corrected version
30
33
  fast-track-procedure: Fast track procedure
31
34
  multiple_and: "%1 and %2"
32
35
  multiple_or: "%1 or %2"
36
+ classification-UDC: UDC
33
37
  doctype_dict:
34
38
  international-standard: International Standard
35
39
  technical-specification: Technical Specification
@@ -40,6 +44,8 @@ doctype_dict:
40
44
  amendment: Amendment
41
45
  technical-corrigendum: Technical Corrigendum
42
46
  directive: Directive
47
+ committee-document: Committee Document
48
+ recommendation: ISO Recommendation
43
49
  stage_dict:
44
50
  "00": Preliminary work item
45
51
  "10": New work item proposal
@@ -10,6 +10,7 @@ term_def_boilerplate: |
10
10
  </p> </li> </ul>
11
11
  all_rights_reserved: Tous droits réservés
12
12
  reference_number: Numéro de référence
13
+ reference_number_abbrev: Réf. №
13
14
  price_based_on: Prix basé sur % pages
14
15
  descriptor: Descripteur
15
16
  under_preparation: En cours d'élaboration. (Stade au moment de la publication %).
@@ -21,12 +22,15 @@ see: voir
21
22
  see_also: voir aussi
22
23
  secretariat: Secrétariat
23
24
  edition: édition
25
+ edition_ordinal_old: "{{ var1 | ordinal_num: 'edition', '' }} ÉDITION"
26
+ edition_replacement: "Cette {{ var1 | ordinal_word: 'edition', '' }} édition annule et remplace la {{ var2 | ordinal_word: 'edition', '' }} édition"
24
27
  termsrelated: Termes liés
25
28
  availablefrom: Disponible sur
26
29
  voting_begins_on: Le vote commence le
27
30
  voting_terminates_on: Le vote se termine le
28
31
  corrected_version: Version corrigée
29
32
  fast-track-procedure: Procédure accélérée
33
+ classification-UDC: CDU
30
34
  doctype_dict:
31
35
  international-standard: Norme internationale
32
36
  technical-specification: Spécification technique
@@ -37,6 +41,8 @@ doctype_dict:
37
41
  amendment: Amendement
38
42
  technical-corrigendum: Rectificatif technique
39
43
  directive: Directive
44
+ committee-document: Document du comité
45
+ recommendation: Recommandation ISO
40
46
  stage_dict:
41
47
  "00": Élément de travail préliminaire
42
48
  "10": Nouvelle proposition d'élément de travail
@@ -8,7 +8,8 @@ term_def_boilerplate: |
8
8
  <link target="https://www.electropedia.org"/>
9
9
  </p> </li> </ul>
10
10
  all_rights_reserved: Все права защищены
11
- reference_number: Ссылочный номер
11
+ reference_number: Ссылочный номерS
12
+ reference_number_abbrev: Исх. №
12
13
  descriptor: Дескриптор
13
14
  price_based_on: Цена рассчитана на % стр.
14
15
  under_preparation: В стадии подготовки. (Стадия на момент публикации %).
@@ -22,12 +23,15 @@ see_also: см. также
22
23
  secretariat: Секретариат
23
24
  scope: Область применения
24
25
  edition: издание
26
+ edition_ordinal_old: "{{ var1 | ordinal_num: 'edition', '' }} ИЗДАНИЕ"
27
+ edition_replacement: "Настоящее {{ var1 | ordinal_word: 'edition', 'case:nom' }} издание заменяет {{ var2 | ordinal_word: 'edition', 'case:acc' }} издание"
25
28
  termsrelated: Термины, связанные
26
29
  availablefrom: Доступна с
27
30
  voting_begins_on: Голосование начинается в
28
31
  voting_terminates_on: Голосование заканчивается в
29
32
  corrected_version: Исправленная версия
30
33
  fast-track-procedure: Ускоренная процедура
34
+ classification-UDC: УДК
31
35
  doctype_dict:
32
36
  international-standard: Международный Стандарт
33
37
  technical-specification: Техническая Спецификация
@@ -38,6 +42,8 @@ doctype_dict:
38
42
  amendment: Поправка
39
43
  technical-corrigendum: Техническое Исправление
40
44
  directive: Директива
45
+ committee-document: Документ комитета
46
+ recommendation: Рекомендации ИСО
41
47
  stage_dict:
42
48
  "00": Предварительный рабочий элемент
43
49
  "10": Предложение нового рабочего элемента
@@ -8,6 +8,7 @@ term_def_boilerplate: |
8
8
  </p> </li> </ul>
9
9
  all_rights_reserved: 版权所有
10
10
  reference_number: 参考编号
11
+ reference_number_abbrev: 参考编号
11
12
  price_based_on: 价格基于%页
12
13
  descriptor: 描述符
13
14
  under_preparation: 制定中(出版时最新状态为%)
@@ -25,6 +26,7 @@ voting_begins_on: 投票开始于
25
26
  voting_terminates_on: 投票终止于
26
27
  corrected_version: 修正版本
27
28
  fast-track-procedure: 快速通道程序
29
+ classification-UDC: 通用十进制图书分类法
28
30
  doctype_dict:
29
31
  international-standard: 国际标准
30
32
  technical-specification: 技术规格
@@ -35,6 +37,8 @@ doctype_dict:
35
37
  amendment: 修正
36
38
  technical-corrigendum: 技术勘误
37
39
  directive: 指令
40
+ committee-document: 委员会文件
41
+ recommendation: ISO推荐
38
42
  stage_dict:
39
43
  "00": 初步工作项
40
44
  "10": 新工作项提案
@@ -20,7 +20,22 @@ module IsoDoc
20
20
  i18nyaml: i18nyaml || @i18nyaml)
21
21
  end
22
22
 
23
- def amd?(docxml)
23
+ def update_i18n(docxml)
24
+ @docscheme =
25
+ docxml.at(ns("//presentation-metadata[name" \
26
+ "[text() = 'document-scheme']]/value"))&.text || "2024"
27
+ %w(1951 1972).include?(@docscheme) and
28
+ i18n_conditional_set("reference_number", "reference_number_abbrev")
29
+ %w(1951).include?(@docscheme) and
30
+ i18n_conditional_set("edition_ordinal", "edition_ordinal_old")
31
+ end
32
+
33
+ def i18n_conditional_set(old, new)
34
+ @i18n.get[new] or return
35
+ @i18n.set(old, @i18n.get[new])
36
+ end
37
+
38
+ def amd?(_docxml)
24
39
  %w(amendment technical-corrigendum).include? @doctype
25
40
  end
26
41