newspaper_works 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +5 -5
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +4 -0
  4. data/.travis.yml +2 -2
  5. data/README.md +14 -13
  6. data/app/services/newspaper_works/jp2_derivative_service.rb +1 -3
  7. data/app/services/newspaper_works/newspaper_page_derivative_service.rb +37 -15
  8. data/app/services/newspaper_works/pdf_derivative_service.rb +4 -7
  9. data/app/services/newspaper_works/tiff_derivative_service.rb +5 -9
  10. data/app/views/newspaper_works/base/_attribute_rows.html.erb +72 -24
  11. data/config/locales/newspaper_article.de.yml +1 -1
  12. data/config/locales/newspaper_article.en.yml +1 -1
  13. data/config/locales/newspaper_article.es.yml +1 -1
  14. data/config/locales/newspaper_article.fr.yml +1 -1
  15. data/config/locales/newspaper_article.it.yml +1 -1
  16. data/config/locales/newspaper_article.pt-BR.yml +1 -1
  17. data/config/locales/newspaper_article.zh.yml +1 -1
  18. data/config/locales/newspaper_container.de.yml +1 -1
  19. data/config/locales/newspaper_container.en.yml +1 -1
  20. data/config/locales/newspaper_container.es.yml +1 -1
  21. data/config/locales/newspaper_container.fr.yml +1 -1
  22. data/config/locales/newspaper_container.it.yml +1 -1
  23. data/config/locales/newspaper_container.pt-BR.yml +1 -1
  24. data/config/locales/newspaper_container.zh.yml +1 -1
  25. data/config/locales/newspaper_issue.de.yml +1 -1
  26. data/config/locales/newspaper_issue.en.yml +1 -1
  27. data/config/locales/newspaper_issue.es.yml +1 -1
  28. data/config/locales/newspaper_issue.fr.yml +1 -1
  29. data/config/locales/newspaper_issue.it.yml +2 -2
  30. data/config/locales/newspaper_issue.pt-BR.yml +2 -2
  31. data/config/locales/newspaper_issue.zh.yml +2 -2
  32. data/config/locales/newspaper_page.de.yml +1 -1
  33. data/config/locales/newspaper_page.en.yml +1 -1
  34. data/config/locales/newspaper_page.es.yml +1 -1
  35. data/config/locales/newspaper_page.fr.yml +1 -1
  36. data/config/locales/newspaper_page.it.yml +1 -1
  37. data/config/locales/newspaper_page.pt-BR.yml +1 -1
  38. data/config/locales/newspaper_page.zh.yml +1 -1
  39. data/config/locales/newspaper_title.de.yml +1 -1
  40. data/config/locales/newspaper_title.en.yml +1 -1
  41. data/config/locales/newspaper_title.es.yml +1 -1
  42. data/config/locales/newspaper_title.fr.yml +1 -1
  43. data/config/locales/newspaper_title.it.yml +1 -1
  44. data/config/locales/newspaper_title.pt-BR.yml +1 -1
  45. data/config/locales/newspaper_title.zh.yml +1 -1
  46. data/config/locales/newspaper_works.de.yml +98 -0
  47. data/config/locales/newspaper_works.en.yml +67 -0
  48. data/config/locales/newspaper_works.es.yml +96 -0
  49. data/config/locales/newspaper_works.fr.yml +97 -0
  50. data/config/locales/newspaper_works.it.yml +90 -0
  51. data/config/locales/newspaper_works.pt-BR.yml +96 -0
  52. data/config/locales/newspaper_works.zh.yml +90 -0
  53. data/config/vendor/fits.xml +55 -0
  54. data/config/vendor/imagemagick-6-policy.xml +39 -39
  55. data/lib/newspaper_works.rb +2 -0
  56. data/lib/newspaper_works/image_tool.rb +119 -0
  57. data/lib/newspaper_works/jp2_image_metadata.rb +81 -0
  58. data/lib/newspaper_works/text_extraction.rb +1 -0
  59. data/lib/newspaper_works/text_extraction/hocr_reader.rb +173 -0
  60. data/lib/newspaper_works/text_extraction/page_ocr.rb +37 -51
  61. data/lib/newspaper_works/text_extraction/render_alto.rb +4 -4
  62. data/lib/newspaper_works/version.rb +1 -1
  63. data/newspaper_works.gemspec +2 -3
  64. data/spec/features/search_results_thumbnail_highlights_spec.rb +1 -1
  65. data/spec/fixtures/files/ocr_mono_text_hocr.html +78 -0
  66. data/spec/lib/newspaper_works/image_tool_spec.rb +109 -0
  67. data/spec/lib/newspaper_works/ingest/ingest_shared.rb +3 -3
  68. data/spec/lib/newspaper_works/ingest/newspaper_page_ingest_spec.rb +2 -2
  69. data/spec/lib/newspaper_works/jp2_image_metadata_spec.rb +37 -0
  70. data/spec/lib/newspaper_works/text_extraction/hocr_reader_spec.rb +45 -0
  71. data/spec/lib/newspaper_works/text_extraction/page_ocr_spec.rb +3 -3
  72. data/spec/lib/newspaper_works/text_extraction/render_alto_spec.rb +14 -14
  73. data/spec/services/newspaper_works/jp2_derivative_service_spec.rb +10 -13
  74. data/spec/services/newspaper_works/newspaper_page_derivative_service_spec.rb +10 -8
  75. data/spec/services/newspaper_works/pdf_derivative_service_spec.rb +11 -7
  76. data/spec/services/newspaper_works/tiff_derivative_service_spec.rb +17 -10
  77. data/spec/spec_helper.rb +19 -0
  78. metadata +21 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d0003c7935fbee94e245007e986fcdf7a085bfa5
4
- data.tar.gz: 9609ad4d442b7d7630e0231c09bd0592f9828933
2
+ SHA256:
3
+ metadata.gz: 6e9b9c0ca19656d5b0654d96b5e3f8f31303dfe3a9df388643702a871b64ccbb
4
+ data.tar.gz: 485b605170e6740250ef85b0eac19880c84a4c2472486bffb1adc66beb548915
5
5
  SHA512:
6
- metadata.gz: 1522953bfcacedaea668eaf9b59790a6db6ffe3be317ed0e7388a51fa44b4cf3518f463c422f65b5bfedce77ec9731df49f49ea9a0611d5f44041566d596c453
7
- data.tar.gz: ddda11224cc5a059c0aa13546ac77805ec1e4e94eae7da2cd9f95eacf4fec8abcc78ec8b68d460939bceed0ce4904cb9b596beca5a20535fa0f83c69554756d4
6
+ metadata.gz: a180e466f1e80b83e538f7e3687e982f9a30892901f23044bcbb3cc2a89248686a717d097163fa5c4771c5a726bd2d86c7d9c3ab6ce3ae0c9a2d2404cf4ce7ff
7
+ data.tar.gz: 74794d3456d451b094d83f75378e506383ed0f8da876a9cb5882c696e594fb0a89df1cf300240651cbe3317bffa766672398950133b62b62949a684d08f12f7c
@@ -0,0 +1,2 @@
1
+ service_name: travis-ci
2
+
data/.gitignore CHANGED
@@ -41,3 +41,7 @@ Gemfile.lock
41
41
 
42
42
  # Ignore wrapper downloads
43
43
  fcrepo-webapp-*
44
+
45
+ # ignore gem builds
46
+ *.gem
47
+ pkg/
@@ -30,8 +30,8 @@ before_install:
30
30
  - sudo unzip /opt/install/fits-1.4.1.zip -d /opt/install/fits-1.4.1
31
31
  - sudo chmod +x /opt/install/fits-1.4.1/*.sh
32
32
  - sudo ln -s /opt/install/fits-1.4.1/fits.sh /usr/local/bin/fits.sh
33
- - sudo wget -q -O /etc/ImageMagick-6/policy.xml https://raw.githubusercontent.com/marriott-library/newspaper_works/7052ff3bf58022572870a0720d8c5a705090a833/config/vendor/imagemagick-6-policy.xml
34
- - sudo wget -q -O /opt/install/fits-1.4.1/xml/fits.xml https://gist.githubusercontent.com/brianmcbride/af3fb21fb50a1331d84eca9a9a170f8f/raw/ebb1a285726e4f5c2309b4f6eceed29fa1369538/fits.xml
33
+ - sudo wget -q -O /etc/ImageMagick-6/policy.xml https://raw.githubusercontent.com/samvera-labs/newspaper_works/master/config/vendor/imagemagick-6-policy.xml
34
+ - sudo wget -q -O /opt/install/fits-1.4.1/xml/fits.xml https://raw.githubusercontent.com/samvera-labs/newspaper_works/82d0c18d1679696a762fd7083db83dac49de9b35/config/vendor/fits.xml
35
35
  rvm:
36
36
  - 2.5.5
37
37
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  NewspaperWorks
2
2
  ===================================================
3
3
  Code:
4
- [![Build Status](https://travis-ci.org/marriott-library/newspaper_works.svg?branch=master)](https://travis-ci.org/marriott-library/newspaper_works) [![Coverage Status](https://coveralls.io/repos/github/marriott-library/newspaper_works/badge.svg)](https://coveralls.io/github/marriott-library/newspaper_works)
4
+ [![Build Status](https://travis-ci.org/samvera-labs/newspaper_works.svg?branch=master)](https://travis-ci.org/samvera-labs/newspaper_works) [![Coverage Status](https://coveralls.io/repos/github/samvera-labs/newspaper_works/badge.svg?branch=master)](https://coveralls.io/github/samvera-labs/newspaper_works?branch=master)
5
5
 
6
6
  Docs:
7
7
  [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
@@ -21,7 +21,7 @@ Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samv
21
21
  - [Configuration changes you should make after running the installer](#configuration-changes-you-should-make-after-running-the-installer)
22
22
  - [Ingesting Content](#ingesting-content)
23
23
  - [Developing, Testing, and Contributing](#developing-testing-and-contributing)
24
- - [Contributing](#contributing)
24
+ - [Contributing](#contributing)
25
25
  - [Acknowledgements](#acknowledgements)
26
26
  - [Sponsoring Organizations](#sponsoring-organizations)
27
27
  - [More Information](#more-information)
@@ -45,10 +45,10 @@ NewspaperWorks supports:
45
45
  * OCR keyword match highlighting
46
46
  * viewer with page navigation and deep zooming
47
47
 
48
- A complete list of features can be found [here](wiki/Features-List).
48
+ A complete list of features can be found [here](https://github.com/samvera-labs/newspaper_works/wiki/Features-List).
49
49
 
50
50
  ## Documentation
51
- A set of helpful documents to help you learn more and deploy NewspaperWorks can be found on the [Project Wiki](./newspaper_works/wiki), including a PCDM model diagram, metadata schema, batch ingest instructions, and more details on installing, developing, and testing the code.
51
+ A set of helpful documents to help you learn more and deploy NewspaperWorks can be found on the [Project Wiki](https://github.com/samvera-labs/newspaper_works/wiki), including a PCDM model diagram, metadata schema, batch ingest instructions, and more details on installing, developing, and testing the code.
52
52
 
53
53
  ## Requirements
54
54
 
@@ -66,10 +66,11 @@ A set of helpful documents to help you learn more and deploy NewspaperWorks can
66
66
  * [LibreOffice](https://www.libreoffice.org/)
67
67
  * [ghostscript](https://www.ghostscript.com/)
68
68
  * [poppler-utils](https://poppler.freedesktop.org/)
69
- * [GraphicsMagick](http://www.graphicsmagick.org/)
69
+ * [ImageMagick](https://github.com/ImageMagick/ImageMagick6)
70
+ - _ImageMagick policy XML may need to be more permissive in both resources and source media types allowed. See template [policy.xml](config/vendor/imagemagick-6-policy.xml)._
70
71
  * [libcurl3](https://packages.ubuntu.com/search?keywords=libcurl3)
71
72
 
72
- See the [wiki](./newspaper_works/wiki/Installing,-Developing,-and-Testing) for more details on how to install and configure dependencies.
73
+ See the [wiki](https://github.com/samvera-labs/newspaper_works/wiki/Installing,-Developing,-and-Testing) for more details on how to install and configure dependencies.
73
74
 
74
75
  # Installation
75
76
  NewspaperWorks easily integrates with your Hyrax 2.5.x applications.
@@ -91,7 +92,7 @@ NewspaperWorks easily integrates with your Hyrax 2.5.x applications.
91
92
  ### Configuration changes you should make after running the installer:
92
93
 
93
94
  #### in config/intitializers/hyrax.rb:
94
- * set `config.geonames_username`
95
+ * set `config.geonames_username`
95
96
  * Enables geolocation tagging of content
96
97
  * [how to create a Geonames username](http://www.geonames.org/login)
97
98
  * set `config.work_requires_files = false`
@@ -106,9 +107,9 @@ NewspaperWorks easily integrates with your Hyrax 2.5.x applications.
106
107
 
107
108
  NewspaperWorks supports a range of different ingest workflows:
108
109
  * single-item ingest via the UI
109
- * batch ingest of [NDNP materials](./newspaper_works/wiki/NDNP-Batch-Ingest-Guide) (page-level digitization) via command line
110
- * batch ingest of [PDF issues](./newspaper_works/wiki/PDF-Batch-Ingest-Guide) via command line
111
- * batch ingest of [TIFF or JP2 master files](./newspaper_works/wiki/TIFF-or-JP2-Batch-Ingest-Guide) via command line
110
+ * batch ingest of [NDNP materials](https://github.com/samvera-labs/newspaper_works/wiki/NDNP-Batch-Ingest-Guide) (page-level digitization) via command line
111
+ * batch ingest of [PDF issues](https://github.com/samvera-labs/newspaper_works/wiki/PDF-Batch-Ingest-Guide) via command line
112
+ * batch ingest of [TIFF or JP2 master files](https://github.com/samvera-labs/newspaper_works/wiki/TIFF-or-JP2-Batch-Ingest-Guide) via command line
112
113
 
113
114
  The ingest process creates a full complement of derivatives for each Page object, including:
114
115
  * TIFF
@@ -117,13 +118,13 @@ The ingest process creates a full complement of derivatives for each Page object
117
118
  * OCR text
118
119
  * word-coordinate JSON
119
120
 
120
- For more information on derivatives, see the [wiki](./newspaper_works/wiki/Image-Format-and-Derivative-Notes).
121
+ For more information on derivatives, see the [wiki](https://github.com/samvera-labs/newspaper_works/wiki/Image-Format-and-Derivative-Notes).
121
122
 
122
123
  # Developing, Testing, and Contributing
123
124
 
124
- Detailed information regarding development and testing environments setup and configuration can be found [here](./newspaper_works/wiki/Installing,-Developing,-and-Testing)
125
+ Detailed information regarding development and testing environments setup and configuration can be found [here](https://github.com/samvera-labs/newspaper_works/wiki/Installing,-Developing,-and-Testing)
125
126
 
126
- A Vagrant VM is available for users and developers to quickly and easily deploy the latest NewspaperWorks codebase using Vagrant and VirtualBox. See [samvera-newspapers-vagrant](https://github.com/marriott-library/samvera-newspapers-vagrant) for more.
127
+ A Vagrant VM is available for users and developers to quickly and easily deploy the latest NewspaperWorks codebase using Vagrant and VirtualBox. See [samvera-newspapers-vagrant](https://github.com/samvera-labs/samvera-newspapers-vagrant) for more.
127
128
 
128
129
  Additionally, the [NewspaperWorks Demo Site](https://newspaperworks.digitalnewspapers.org/) is available for those interested in testing out NewspaperWorks as deployed in a vanilla Hyrax application. (**NOTE:** The demo site may not be running the latest release of NewspaperWorks.)
129
130
 
@@ -22,13 +22,11 @@ module NewspaperWorks
22
22
  # Target file extension of this service plugin:
23
23
  TARGET_EXT = 'jp2'.freeze
24
24
 
25
- attr_accessor :source_meta
26
25
  attr_reader :file_set
27
26
  delegate :uri, :mime_type, to: :file_set
28
27
 
29
28
  def initialize(file_set)
30
29
  # cached result string for imagemagick `identify` command
31
- @source_meta = nil
32
30
  @command = nil
33
31
  @unlink_after_creation = []
34
32
  super(file_set)
@@ -66,7 +64,7 @@ module NewspaperWorks
66
64
  # source introspection:
67
65
 
68
66
  def tiff_source?
69
- identify.include?('TIFF')
67
+ identify[:content_type] == 'image/tiff'
70
68
  end
71
69
 
72
70
  def make_symlink
@@ -2,7 +2,7 @@ module NewspaperWorks
2
2
  # Base type for derivative services specific to NewspaperPage only
3
3
  class NewspaperPageDerivativeService
4
4
  attr_reader :file_set, :master_format
5
- delegate :uri, :mime_type, to: :file_set
5
+ delegate :uri, to: :file_set
6
6
 
7
7
  TARGET_EXT = nil
8
8
 
@@ -47,27 +47,21 @@ module NewspaperWorks
47
47
  end
48
48
 
49
49
  def identify
50
- if @source_meta.nil?
51
- path = @source_path
52
- cmd = "identify #{path}"
53
- # fallback to graphicsmagick if source is jp2, as Ubuntu 16.10
54
- # ImageMagick has no jp2 support.
55
- cmd = 'gm ' + cmd if path.ends_with?('jp2')
56
- Open3.popen3(cmd) do |_stdin, stdout, _stderr, _wait_thr|
57
- @source_meta = stdout.read
58
- end
59
- end
60
- @source_meta
50
+ return @source_meta unless @source_meta.nil?
51
+ @source_meta = NewspaperWorks::ImageTool.new(@source_path).metadata
52
+ end
53
+
54
+ def mime_type
55
+ identify[:content_type]
61
56
  end
62
57
 
63
58
  def use_color?
64
- # imagemagick `identify` output describes color space:
65
- !(identify.include?('Gray') || one_bit?)
59
+ identify[:color] == 'color'
66
60
  end
67
61
 
68
62
  # is source one-bit monochrome?
69
63
  def one_bit?
70
- identify.include?('1-bit')
64
+ identify[:color] == 'monochrome'
71
65
  end
72
66
 
73
67
  def create_derivatives(filename)
@@ -86,6 +80,34 @@ module NewspaperWorks
86
80
  end
87
81
  end
88
82
 
83
+ def jp2_to_intermediate
84
+ intermediate_path = File.join(Dir.mktmpdir, 'intermediate.tif')
85
+ jp2_cmd = "opj_decompress -i #{@source_path} -o #{intermediate_path}"
86
+ # make intermediate, then...
87
+ `#{jp2_cmd}`
88
+ intermediate_path
89
+ end
90
+
91
+ def convert_cmd
92
+ raise NotImplementedError, 'Calling subclass missing convert_cmd method'
93
+ end
94
+
95
+ # convert non-JP2 source/primary file to PDF derivative with ImageMagick6
96
+ # calls convert_cmd on calling subclasses
97
+ def im_convert
98
+ `#{convert_cmd}`
99
+ end
100
+
101
+ # convert JP2 source/primary file to PDF derivative, via
102
+ # opj_decompress to intermediate TIFF, then ImageMagick6 convert
103
+ def jp2_convert
104
+ # jp2 source -> intermediate
105
+ intermediate_path = jp2_to_intermediate
106
+ @source_path = intermediate_path
107
+ # intermediate -> PDF
108
+ im_convert
109
+ end
110
+
89
111
  # def cleanup_derivatives; end
90
112
  end
91
113
  end
@@ -16,9 +16,6 @@ module NewspaperWorks
16
16
  '-depth 8 ' \
17
17
  '-compress jpeg %<out_file>s'.freeze
18
18
 
19
- # graphicsmagick prefix, may be needed for jp2 source on Ubuntu
20
- GM_PREFX = 'gm '.freeze
21
-
22
19
  def initialize(file_set)
23
20
  super(file_set)
24
21
  end
@@ -27,8 +24,7 @@ module NewspaperWorks
27
24
  # JP2 source, and whether we have color or grayscale material.
28
25
  def convert_cmd
29
26
  template = use_color? ? COLOR_PDF_CMD : GRAY_PDF_CMD
30
- cmd = format(template, source_file: @source_path, out_file: @dest_path)
31
- @source_path.ends_with?('jp2') ? GM_PREFIX + cmd : cmd
27
+ format(template, source_file: @source_path, out_file: @dest_path)
32
28
  end
33
29
 
34
30
  def create_derivatives(filename)
@@ -38,8 +34,9 @@ module NewspaperWorks
38
34
  # no creation if pdf master
39
35
  return if mime_type == 'application/pdf'
40
36
 
41
- # Get and run imagemagick or graphicsmagick command
42
- `#{convert_cmd}`
37
+ # Get and run conversion command
38
+ return jp2_convert if mime_type == 'image/jp2'
39
+ im_convert
43
40
  end
44
41
  end
45
42
  end
@@ -21,9 +21,6 @@ module NewspaperWorks
21
21
  '-depth 24 ' \
22
22
  '-compress lzw %<out_file>s'.freeze
23
23
 
24
- # graphicsmagick prefix, may be needed for jp2 source on Ubuntu
25
- GM_PREFX = 'gm '.freeze
26
-
27
24
  def initialize(file_set)
28
25
  super(file_set)
29
26
  end
@@ -35,20 +32,19 @@ module NewspaperWorks
35
32
  source_path += '[0]' if @source_path.ends_with?('pdf')
36
33
  template = use_color? ? COLOR_CMD : GRAY_CMD
37
34
  template = MONO_CMD if one_bit?
38
- cmd = format(template, source_file: source_path, out_file: @dest_path)
39
- # normalization of command based on source
40
- @source_path.ends_with?('jp2') ? GM_PREFIX + cmd : cmd
35
+ format(template, source_file: source_path, out_file: @dest_path)
41
36
  end
42
37
 
43
38
  def create_derivatives(filename)
44
39
  # Base class takes care of loading @source_path, @dest_path
45
40
  super(filename)
46
41
 
47
- # no creation if pdf master
42
+ # no creation of TIFF deriviative if primary is TIFF
48
43
  return if mime_type == 'image/tiff'
49
44
 
50
- # Get and run imagemagick or graphicsmagick command
51
- `#{convert_cmd}`
45
+ return jp2_convert if mime_type == 'image/jp2'
46
+ # Otherwise, get, run imagemagick command to convert
47
+ im_convert
52
48
  end
53
49
  end
54
50
  end
@@ -1,34 +1,82 @@
1
1
  <%# newspaper_core_metadata attributes %>
2
2
  <%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified'), html_dl: true) %>
3
- <%= presenter.attribute_to_html(:alternative_title, html_dl: true) %>
4
- <%= presenter.attribute_to_html(:genre, render_as: :faceted, html_dl: true) %>
3
+ <%= presenter.attribute_to_html(:alternative_title,
4
+ label: t('newspaper_works.attributes.alternative_title.label'),
5
+ html_dl: true) %>
6
+ <%= presenter.attribute_to_html(:genre,
7
+ label: t('newspaper_works.attributes.genre.label'),
8
+ render_as: :faceted, html_dl: true) %>
9
+ <%= presenter.attribute_to_html(:publication_title,
10
+ label: t('newspaper_works.attributes.publication_title.label'),
11
+ render_as: :faceted, html_dl: true) %>
5
12
  <%= presenter.attribute_to_html(:place_of_publication_label,
6
- label: I18n.t('newspaper_works.attributes.place_of_publication.label'),
13
+ label: t('newspaper_works.attributes.place_of_publication.label'),
14
+ render_as: :faceted, html_dl: true) %>
15
+ <%= presenter.attribute_to_html(:issn,
16
+ label: t('newspaper_works.attributes.issn.label'),
17
+ render_as: :faceted, html_dl: true) %>
18
+ <%= presenter.attribute_to_html(:lccn,
19
+ label: t('newspaper_works.attributes.lccn.label'),
20
+ render_as: :faceted, html_dl: true) %>
21
+ <%= presenter.attribute_to_html(:oclcnum,
22
+ label: t('newspaper_works.attributes.oclcnum.label'),
23
+ render_as: :faceted, html_dl: true) %>
24
+ <%= presenter.attribute_to_html(:held_by,
25
+ label: t('newspaper_works.attributes.held_by.label'),
7
26
  render_as: :faceted, html_dl: true) %>
8
- <%= presenter.attribute_to_html(:issn, render_as: :faceted, html_dl: true) %>
9
- <%= presenter.attribute_to_html(:lccn, render_as: :faceted, html_dl: true) %>
10
- <%= presenter.attribute_to_html(:oclcnum, render_as: :faceted, html_dl: true) %>
11
- <%= presenter.attribute_to_html(:held_by, render_as: :faceted, html_dl: true) %>
12
27
  <%# scanned_media_metadata attributes %>
13
- <%= presenter.attribute_to_html(:text_direction, html_dl: true) %>
14
- <%= presenter.attribute_to_html(:page_number, html_dl: true) %>
15
- <%= presenter.attribute_to_html(:section, html_dl: true) %>
28
+ <%= presenter.attribute_to_html(:text_direction,
29
+ label: t('newspaper_works.attributes.text_direction.label'),
30
+ html_dl: true) %>
31
+ <%= presenter.attribute_to_html(:page_number,
32
+ label: t('newspaper_works.attributes.page_number.label'),
33
+ html_dl: true) %>
34
+ <%= presenter.attribute_to_html(:section,
35
+ label: t('newspaper_works.attributes.section.label'),
36
+ html_dl: true) %>
16
37
  <%# newspaper_article attributes %>
17
- <%= presenter.attribute_to_html(:author, render_as: :faceted, html_dl: true) %>
18
- <%= presenter.attribute_to_html(:photographer, render_as: :faceted, html_dl: true) %>
19
- <%= presenter.attribute_to_html(:volume, html_dl: true) %>
20
- <%= presenter.attribute_to_html(:issue_number, html_dl: true) %>
21
- <%= presenter.attribute_to_html(:geographic_coverage, render_as: :faceted, html_dl: true) %>
22
- <%= presenter.attribute_to_html(:extent, html_dl: true) %>
23
- <%= presenter.attribute_to_html(:publication_date, render_as: :date, html_dl: true) %>
38
+ <%= presenter.attribute_to_html(:author,
39
+ label: t('newspaper_works.attributes.author.label'),
40
+ render_as: :faceted, html_dl: true) %>
41
+ <%= presenter.attribute_to_html(:photographer,
42
+ label: t('newspaper_works.attributes.photographer.label'),
43
+ render_as: :faceted, html_dl: true) %>
44
+ <%= presenter.attribute_to_html(:volume,
45
+ label: t('newspaper_works.attributes.volume.label'),
46
+ html_dl: true) %>
47
+ <%= presenter.attribute_to_html(:issue_number,
48
+ label: t('newspaper_works.attributes.issue_number.label'),
49
+ html_dl: true) %>
50
+ <%= presenter.attribute_to_html(:geographic_coverage,
51
+ label: t('newspaper_works.attributes.geographic_coverage.label'),
52
+ render_as: :faceted, html_dl: true) %>
53
+ <%= presenter.attribute_to_html(:extent,
54
+ label: t('newspaper_works.attributes.extent.label'),html_dl: true) %>
55
+ <%= presenter.attribute_to_html(:publication_date,
56
+ label: t('newspaper_works.attributes.publication_date.label'),
57
+ render_as: :date, html_dl: true) %>
24
58
  <%# newspaper_title attributes %>
25
- <%= presenter.attribute_to_html(:edition_number, html_dl: true) %>
26
- <%= presenter.attribute_to_html(:edition_name, html_dl: true) %>
27
- <%= presenter.attribute_to_html(:frequency, html_dl: true) %>
28
- <%= presenter.attribute_to_html(:preceded_by, render_as: :faceted, html_dl: true) %>
29
- <%= presenter.attribute_to_html(:succeeded_by, render_as: :faceted, html_dl: true) %>
30
- <%= presenter.attribute_to_html(:publication_date_start, render_as: :date, html_dl: true) %>
31
- <%= presenter.attribute_to_html(:publication_date_end, render_as: :date, html_dl: true) %>
59
+ <%= presenter.attribute_to_html(:edition_number,
60
+ label: t('newspaper_works.attributes.edition_number.label'),
61
+ html_dl: true) %>
62
+ <%= presenter.attribute_to_html(:edition_name,
63
+ label: t('newspaper_works.attributes.edition_name.label'),
64
+ html_dl: true) %>
65
+ <%= presenter.attribute_to_html(:frequency,
66
+ label: t('newspaper_works.attributes.frequency.label'),
67
+ html_dl: true) %>
68
+ <%= presenter.attribute_to_html(:preceded_by,
69
+ label: t('newspaper_works.attributes.preceded_by.label'),
70
+ render_as: :faceted, html_dl: true) %>
71
+ <%= presenter.attribute_to_html(:succeeded_by,
72
+ label: t('newspaper_works.attributes.succeeded_by.label'),
73
+ render_as: :faceted, html_dl: true) %>
74
+ <%= presenter.attribute_to_html(:publication_date_start,
75
+ label: t('newspaper_works.attributes.publication_date_start.label'),
76
+ render_as: :date, html_dl: true) %>
77
+ <%= presenter.attribute_to_html(:publication_date_end,
78
+ label: t('newspaper_works.attributes.publication_date_end.label'),
79
+ render_as: :date, html_dl: true) %>
32
80
  <%# hyrax %>
33
81
  <%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %>
34
82
  <%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %>
@@ -5,7 +5,7 @@ de:
5
5
  select_type:
6
6
  newspaper_article:
7
7
  name: "Zeitungsartikel"
8
- description: "Zeitungsartikel Werke"
8
+ description: "Ein Artikel aus einer Zeitungsausgabe"
9
9
  simple_form:
10
10
  labels:
11
11
  newspaper_article:
@@ -5,7 +5,7 @@ en:
5
5
  select_type:
6
6
  newspaper_article:
7
7
  name: "Newspaper Article"
8
- description: "Newspaper article works"
8
+ description: "An article from a newspaper issue"
9
9
  simple_form:
10
10
  labels:
11
11
  newspaper_article:
@@ -5,7 +5,7 @@ es:
5
5
  select_type:
6
6
  newspaper_article:
7
7
  name: "Artículo de periódico"
8
- description: "Trabajos de artículos periodísticos"
8
+ description: "Un artículo de un número de periódico."
9
9
  simple_form:
10
10
  labels:
11
11
  newspaper_article:
@@ -5,7 +5,7 @@ fr:
5
5
  select_type:
6
6
  newspaper_article:
7
7
  name: "Article de journal"
8
- description: "Article de journal fonctionne"
8
+ description: "Un article d'un numéro de journal"
9
9
  simple_form:
10
10
  labels:
11
11
  newspaper_article:
@@ -5,7 +5,7 @@ it:
5
5
  select_type:
6
6
  newspaper_article:
7
7
  name: "Articolo di giornale"
8
- description: "Articoli per articoli di giornale"
8
+ description: "Un articolo tratto da un numero di giornale"
9
9
  simple_form:
10
10
  labels:
11
11
  newspaper_article:
@@ -5,7 +5,7 @@ pt-BR:
5
5
  select_type:
6
6
  newspaper_article:
7
7
  name: "Artigo de jornal"
8
- description: "Trabalhos de artigo de jornal"
8
+ description: "Um artigo de uma edição de jornal"
9
9
  simple_form:
10
10
  labels:
11
11
  newspaper_article: