metanorma-iso 2.0.0 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
  4. data/lib/isodoc/iso/html/isodoc.css +1 -2
  5. data/lib/isodoc/iso/html/isodoc.scss +0 -1
  6. data/lib/isodoc/iso/html/style-human.css +19 -14
  7. data/lib/isodoc/iso/html/style-human.scss +8 -2
  8. data/lib/isodoc/iso/html/style-iso.css +21 -15
  9. data/lib/isodoc/iso/html/style-iso.scss +9 -2
  10. data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
  11. data/lib/isodoc/iso/i18n-en.yaml +22 -0
  12. data/lib/isodoc/iso/i18n-fr.yaml +22 -1
  13. data/lib/isodoc/iso/i18n-ru.yaml +42 -0
  14. data/lib/isodoc/iso/i18n-zh-Hans.yaml +21 -1
  15. data/lib/isodoc/iso/i18n.rb +1 -0
  16. data/lib/isodoc/iso/iso.amendment.xsl +2479 -1631
  17. data/lib/isodoc/iso/iso.international-standard.xsl +2479 -1631
  18. data/lib/isodoc/iso/metadata.rb +12 -2
  19. data/lib/isodoc/iso/word_convert.rb +2 -0
  20. data/lib/metanorma/iso/basicdoc.rng +5 -3
  21. data/lib/metanorma/iso/biblio.rng +7 -5
  22. data/lib/metanorma/iso/boilerplate-fr.xml +3 -3
  23. data/lib/metanorma/iso/boilerplate-ru.xml +39 -0
  24. data/lib/metanorma/iso/boilerplate.xml +3 -3
  25. data/lib/metanorma/iso/cleanup.rb +5 -1
  26. data/lib/metanorma/iso/front.rb +1 -1
  27. data/lib/metanorma/iso/front_id.rb +1 -0
  28. data/lib/metanorma/iso/isodoc.rng +142 -4
  29. data/lib/metanorma/iso/validate.rb +1 -1
  30. data/lib/metanorma/iso/validate_section.rb +3 -2
  31. data/lib/metanorma/iso/version.rb +1 -1
  32. data/spec/isodoc/amd_spec.rb +10 -5
  33. data/spec/isodoc/i18n_spec.rb +350 -9
  34. data/spec/isodoc/metadata_spec.rb +153 -3
  35. data/spec/isodoc/postproc_spec.rb +1 -0
  36. data/spec/isodoc/section_spec.rb +1 -0
  37. data/spec/isodoc/xref_spec.rb +18 -18
  38. data/spec/metanorma/base_spec.rb +439 -370
  39. data/spec/metanorma/refs_spec.rb +1 -4
  40. data/spec/metanorma/validate_spec.rb +27 -2
  41. metadata +4 -4
  42. data/spec/vcr_cassettes/docrels.yml +0 -393
  43. data/spec/vcr_cassettes/sortrefs.yml +0 -599
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0023b1a033a6e07c83e9a8cfdd728953c7d8597e86f75beb7e1001b62d34639
4
- data.tar.gz: c43bcc058f114a0223f165c94d11e490aa77782a45d044522a67203f2bd256ba
3
+ metadata.gz: f550f6f6de1d0b367b35a21f5857f5616d8ab01e392c348988f8432bda72f050
4
+ data.tar.gz: a0b04ee7c488547e054bbcfe76847d90bc4cbdb711e8143730034f9e4cec4ef5
5
5
  SHA512:
6
- metadata.gz: 4d3ffdecf7a8a834e38a1ae0da77a0945638e07656fe95f0f66a28ab05fb9be467754235006a45c66382ac043c59d2989b3bfae232d7990397a07a06902791eb
7
- data.tar.gz: f779a1138797276f389dbf08f88b4191d444fcab194d577a4baf77ac98d1bb1a63a113f101ad0a9b5a3a99ac2d6bb3170d2103cac8ecef2e61fb40fcd392cf2d
6
+ metadata.gz: 2cc09a796e8fb7da929c6bd8ec30ae82394ddc697f0b512f37f117b6d91bda68b25fc8c773587c6d834ce82486607a990e799e6b77aa23ee536f3b4ae085475c
7
+ data.tar.gz: a912d817e08a2b77d574076bd94ecfe127ce26274e92791e72d943aa87c410c60760d886bcb5de257c599e947b674c230be779094821ea7f997fdcd9ed23e99b
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- gem "relaton", git: "https://github.com/relaton/relaton"
7
+ #gem "relaton", git: "https://github.com/relaton/relaton"
8
8
 
9
9
  gemspec
10
10
 
@@ -18,7 +18,7 @@
18
18
  <p class="coverpage_techcommittee">{{ agency }}/{{ editorialgroup | join: "/" }}</p>
19
19
 
20
20
  <p class="coverpage_techcommittee"><a
21
- name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
21
+ name="CVP_Secretariat_Loca">{{ labels["secretariat"] }}</a>: {{ secretariat }}</p>
22
22
 
23
23
  <div class="doctitle-en"><div><span class="title">{{ doctitleintro }}{% if doctitleintro and doctitlemain %} &mdash; {% endif %}</span><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and doctitlepart %} &mdash;{% endif %}</span>
24
24
  {% if doctitlepart %}
@@ -1308,8 +1308,7 @@ span.ExampleChar {
1308
1308
  mso-ansi-language: EN-GB; }
1309
1309
 
1310
1310
  div.Note p.MsoListParagraph {
1311
- font-size: {{smallerfontsize}};
1312
- margin-left: 1.0cm; }
1311
+ font-size: {{smallerfontsize}}; }
1313
1312
 
1314
1313
  div.Note span.stem {
1315
1314
  font-size: {{smallerfontsize}}; }
@@ -1274,7 +1274,6 @@ span.ExampleChar
1274
1274
 
1275
1275
  div.Note p.MsoListParagraph {
1276
1276
  font-size: $smallerfontsize;
1277
- margin-left: 1.0cm;
1278
1277
  }
1279
1278
 
1280
1279
  div.Note span.stem {
@@ -443,44 +443,49 @@ p.Terms {
443
443
  margin-top: 0em; }
444
444
 
445
445
  /* Navigation*/
446
- #toc {
446
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
447
447
  font-family: {{bodyfont}};
448
448
  font-weight: 400; }
449
- #toc ul {
449
+ #toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
450
450
  margin: 0;
451
451
  padding: 0;
452
452
  list-style: none; }
453
- #toc ul li a {
453
+ #toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
454
454
  padding: 5px 10px; }
455
- #toc ul a {
455
+ #toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
456
456
  text-decoration: none;
457
457
  display: block; }
458
- #toc ul a:hover {
458
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
459
459
  box-shadow: none;
460
460
  color: white; }
461
- #toc .h2 {
461
+ #toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
462
462
  padding-left: 30px; }
463
- #toc .h3 {
463
+ #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
464
464
  padding-left: 50px; }
465
- #toc .toc-active, #toc li:hover {
465
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
466
466
  background: #1d1d1d;
467
467
  box-shadow: inset -5px 0px 10px -5px #1d1d1d !important; }
468
- #toc .toc-active a, #toc li:hover a {
468
+ #toc .toc-active a, #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
469
469
  color: white; }
470
470
  @media print {
471
- #toc .toc-active, #toc li:hover {
471
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
472
472
  background: white;
473
473
  box-shadow: none !important; }
474
- #toc li:hover a {
474
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
475
475
  color: black; } }
476
476
  @media screen and (max-width: 768px) {
477
- #toc {
477
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
478
478
  padding: 0 1.5em;
479
479
  overflow: visible; } }
480
- #toc li:before {
480
+ #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
481
481
  content: " ";
482
482
  display: none; }
483
483
 
484
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
485
+ margin-top: 0;
486
+ margin-bottom: 0;
487
+ font-size: 100%; }
488
+
484
489
  nav {
485
490
  line-height: 1.2em; }
486
491
  @media screen and (min-width: 768px) {
@@ -534,7 +539,7 @@ nav {
534
539
  display: none; }
535
540
  h1.toc-contents {
536
541
  margin-top: 1em; }
537
- ul#toc-list {
542
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
538
543
  padding: 0;
539
544
  margin: 0; } }
540
545
 
@@ -259,7 +259,7 @@ p.Terms {
259
259
 
260
260
  /* Navigation*/
261
261
 
262
- #toc {
262
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
263
263
  @include toc(null, #1d1d1d, white);
264
264
  @include sidebarToc();
265
265
 
@@ -275,6 +275,12 @@ p.Terms {
275
275
  }
276
276
  }
277
277
 
278
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
279
+ margin-top: 0;
280
+ margin-bottom: 0;
281
+ font-size: 100%;
282
+ }
283
+
278
284
  nav {
279
285
  @include sidebarNav(#f7f7f7, 278px, 20px);
280
286
  line-height: 1.2em;
@@ -299,7 +305,7 @@ nav {
299
305
  margin-top: 1em;
300
306
  }
301
307
 
302
- ul#toc-list {
308
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
303
309
  padding: 0;
304
310
  margin: 0;
305
311
  }
@@ -390,48 +390,54 @@ p.Terms {
390
390
  margin-top: 0em; }
391
391
 
392
392
  /* Navigation*/
393
- #toc {
393
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
394
394
  font-family: {{bodyfont}};
395
395
  font-weight: 400; }
396
- #toc ul {
396
+ #toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
397
397
  margin: 0;
398
398
  padding: 0;
399
399
  list-style: none; }
400
- #toc ul li a {
400
+ #toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
401
401
  padding: 5px 10px; }
402
- #toc ul a {
402
+ #toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
403
403
  text-decoration: none;
404
404
  display: block; }
405
- #toc ul a:hover {
405
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
406
406
  box-shadow: none;
407
407
  color: black; }
408
- #toc .h2 {
408
+ #toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
409
409
  padding-left: 30px; }
410
- #toc .h3 {
410
+ #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
411
411
  padding-left: 50px; }
412
- #toc .toc-active, #toc li:hover {
412
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
413
413
  background: #f7f7f7;
414
414
  box-shadow: inset -5px 0px 10px -5px #f7f7f7 !important; }
415
- #toc .toc-active a, #toc li:hover a {
415
+ #toc .toc-active a, #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
416
416
  color: black; }
417
417
  @media print {
418
- #toc .toc-active, #toc li:hover {
418
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
419
419
  background: white;
420
420
  box-shadow: none !important; }
421
- #toc li:hover a {
421
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
422
422
  color: black; } }
423
423
  @media screen and (max-width: 768px) {
424
- #toc {
424
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
425
425
  padding: 0 1.5em;
426
426
  overflow: visible; } }
427
427
  #toc .toc-active,
428
- #toc li:hover {
428
+ #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active,
429
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
429
430
  box-shadow: 0px 1px 0px 0px black !important;
430
431
  background: none; }
431
- #toc li:before {
432
+ #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
432
433
  content: " ";
433
434
  display: none; }
434
435
 
436
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
437
+ margin-top: 0;
438
+ margin-bottom: 0;
439
+ font-size: 100%; }
440
+
435
441
  nav {
436
442
  line-height: 1.2em; }
437
443
  @media screen and (min-width: 768px) {
@@ -486,7 +492,7 @@ nav {
486
492
  display: none; }
487
493
  h1.toc-contents {
488
494
  margin-top: 1em; }
489
- ul#toc-list {
495
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
490
496
  padding: 0;
491
497
  margin: 0; } }
492
498
 
@@ -198,7 +198,7 @@ p.Terms {
198
198
 
199
199
  /* Navigation*/
200
200
 
201
- #toc {
201
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
202
202
  @include toc(null, #f7f7f7, black);
203
203
  @include sidebarToc();
204
204
 
@@ -214,6 +214,13 @@ p.Terms {
214
214
  }
215
215
  }
216
216
 
217
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
218
+ margin-top: 0;
219
+ margin-bottom: 0;
220
+ font-size: 100%;
221
+ }
222
+
223
+
217
224
  nav {
218
225
  @include sidebarNav(#f7f7f7, 278px, 20px);
219
226
  line-height: 1.2em;
@@ -239,7 +246,7 @@ nav {
239
246
  margin-top: 1em;
240
247
  }
241
248
 
242
- ul#toc-list {
249
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
243
250
  padding:0;
244
251
  margin:0;
245
252
  }
@@ -29,7 +29,7 @@ style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'>
29
29
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
30
30
  style='mso-no-proof:yes'>{{ agency }}/{{ editorialgroup | join: "/" }}</span></p>
31
31
 
32
- <p class="MsoNormal" align="right" style='margin-bottom:100.0pt;text-align:right'><span lang="EN-GB">Secretariat: <span style='mso-no-proof:yes'>{{ secretariat }}</span></span></p>
32
+ <p class="MsoNormal" align="right" style='margin-bottom:100.0pt;text-align:right'><span lang="EN-GB">{{ labels["secretariat"] }}: <span style='mso-no-proof:yes'>{{ secretariat }}</span></span></p>
33
33
 
34
34
  <p class="MsoNormal" align="left" style='text-align:left;line-height:18.0pt;margin-bottom:0.0pt;font-size:16.0pt'>
35
35
  <span class="title"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} &mdash; {% endif %}</b></span><b><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and doctitlepart %} &mdash;{% endif %}</b></span>
@@ -17,4 +17,26 @@ date: Date
17
17
  index: Index
18
18
  see: see
19
19
  see_also: see also
20
+ secretariat: Secretariat
21
+ edition: edition
22
+ doctype_dict:
23
+ international-standard: International Standard
24
+ technical-specification: Technical Specification
25
+ technical-report: Technical Report
26
+ publicly-available-specification: Publicly Available Specification
27
+ international-workshop-agreement: International Workshop Agreement
28
+ guide: Guide
29
+ amendment: Amendment
30
+ technical-corrigendum: Technical Corrigendum
31
+ directive: Directive
32
+ stage_dict:
33
+ "00": Preliminary work item
34
+ "10": New work item proposal
35
+ "20": Working draft
36
+ "30": Committee draft
37
+ "40": Draft
38
+ "50": Final draft
39
+ "60": International standard
40
+ "90": Review
41
+ "95": Withdrawal
20
42
 
@@ -16,4 +16,25 @@ date: Date
16
16
  index: Index
17
17
  see: voir
18
18
  see_also: voir aussi
19
-
19
+ secretariat: Secrétariat
20
+ edition: édition
21
+ doctype_dict:
22
+ international-standard: Norme internationale
23
+ technical-specification: Spécification technique
24
+ technical-report: Rapport technique
25
+ publicly-available-specification: Spécification disponible publiquement
26
+ international-workshop-agreement: Accord internationale d’atelier
27
+ guide: Guide
28
+ amendment: Amendement
29
+ technical-corrigendum: Rectificatif technique
30
+ directive: Directive
31
+ stage_dict:
32
+ "00": Élément de travail préliminaire
33
+ "10": Nouvelle proposition d'élément de travail
34
+ "20": Brouillon de travail
35
+ "30": Projet de comité
36
+ "40": Brouillon
37
+ "50": Version finale
38
+ "60": Norme internationale
39
+ "90": Révision
40
+ "95": Retrait
@@ -0,0 +1,42 @@
1
+ term_def_boilerplate: |
2
+ <p>ИСО и МЭК поддерживают терминологические базы данных для использования в стандартизации по следующим адресам:</p>
3
+
4
+ <ul>
5
+ <li> <p>ИСО, Интернет-онлайн-платформа: доступна на
6
+ <link target="http://www.iso.org/obp"/></p> </li>
7
+ <li> <p>МЭК Electropedia: доступна на
8
+ <link target="http://www.electropedia.org"/>
9
+ </p> </li> </ul>
10
+ all_rights_reserved: Все права защищены
11
+ reference_number: Ссылочный номер
12
+ price_based_on: Цена рассчитана на % стр.
13
+ under_preparation: В стадии подготовки. (Стадия на момент публикации %).
14
+ table_of_contents: Содержание
15
+ date: Дата
16
+ index: Алфавитный указатель
17
+ see: см.
18
+ see_also: см. также
19
+ secretariat: Секретариат
20
+ scope: Область применения
21
+ edition: издание
22
+ doctype_dict:
23
+ international-standard: Международный Стандарт
24
+ technical-specification: Техническая Спецификация
25
+ technical-report: Технический Отчет
26
+ publicly-available-specification: Общедоступная Спецификация
27
+ international-workshop-agreement: Соглашение Международного Семинара
28
+ guide: Руководство
29
+ amendment: Поправка
30
+ technical-corrigendum: Техническое Исправление
31
+ directive: Директива
32
+ stage_dict:
33
+ "00": Предварительный рабочий элемент
34
+ "10": Предложение нового рабочего элемента
35
+ "20": Рабочий проект
36
+ "30": Проект комитета
37
+ "40": Проект Международного стандарта
38
+ "50": Окончательный проект Международного стандарта
39
+ "60": Международный стандарт
40
+ "90": Пересмотр
41
+ "95": Отмена
42
+
@@ -14,4 +14,24 @@ date: 日期
14
14
  index: 索引
15
15
  see: 见
16
16
  see_also: 另见
17
-
17
+ secretariat: 秘书处
18
+ doctype_dict:
19
+ international-standard: 国际标准
20
+ technical-specification: 技术规格
21
+ technical-report: 技术报告
22
+ publicly-available-specification: 公开可用的规范
23
+ international-workshop-agreement: 国际研讨会协议
24
+ guide: 指南
25
+ amendment: 修正
26
+ technical-corrigendum: 技术勘误
27
+ directive: 指令
28
+ stage_dict:
29
+ "00": 初步工作项
30
+ "10": 新工作项提案
31
+ "20": 工作草案
32
+ "30": 委员会草案
33
+ "40": 草稿
34
+ "50": 最终草案
35
+ "60": 国际标准
36
+ "90": 回顾
37
+ "95": 提款
@@ -8,6 +8,7 @@ module IsoDoc
8
8
  def load_yaml1(lang, script)
9
9
  y = if lang == "en" then load_file("i18n-en.yaml")
10
10
  elsif lang == "fr" then load_file("i18n-fr.yaml")
11
+ elsif lang == "ru" then load_file("i18n-ru.yaml")
11
12
  elsif lang == "zh" && script == "Hans"
12
13
  load_file("i18n-zh-Hans.yaml")
13
14
  else load_file("i18n-en.yaml")