Skip to content

Commit

Permalink
lang in metadata: metanorma/metanorma-bipm#5
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Oct 15, 2020
1 parent 5318fbb commit 6cedb47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/isodoc/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def l10n(a, b, c)
end

def initialize(lang, script, i18n, fonts_options = {})
@metadata = {}
@metadata = { lang: lang, script: script }
DATETYPES.each { |w| @metadata["#{w.gsub(/-/, '_')}date".to_sym] = 'XXX' }
@lang = lang
@script = script
Expand Down
6 changes: 6 additions & 0 deletions spec/isodoc/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@
:issueddate=>"XXX",
:iteration=>"2",
:keywords=>["KW2", "KW1", "KW3"],
:lang=>"en",
:obsoleteddate=>"2014",
:pdf=>"URL D",
:publisheddate=>"2011",
:receiveddate=>"XXX",
:revdate=>"2016-05-01",
:revdate_monthyear=>"May 2016",
:script=>"Latn",
:stage=>"Committee Draft",
:stageabbr=>"CD",
:substage=>"Withdrawn",
Expand Down Expand Up @@ -243,6 +245,7 @@
:draftinfo=>" (draft 12, 2016-05)",
:implementeddate=>"XXX",
:issueddate=>"XXX",
:lang=>"en",
:obsoleteddate=>"XXX",
:obsoletes=>"IEC 8121",
:obsoletes_part=>"3.1",
Expand All @@ -257,6 +260,7 @@
:receiveddate=>"XXX",
:revdate=>"2016-05",
:revdate_monthyear=>"May 2016",
:script=>"Latn",
:stage=>"Published",
:subdivision=>"Subdivision",
:transmitteddate=>"XXX",
Expand Down Expand Up @@ -335,12 +339,14 @@
:docyear=>"2016",
:implementeddate=>"XXX",
:issueddate=>"XXX",
:lang=>"fr",
:obsoleteddate=>"XXX",
:publisheddate=>"2011-01",
:publisher=>"International Organization for Standardization et International Electrotechnical Commission",
:receiveddate=>"XXX",
:revdate=>"2016-05",
:revdate_monthyear=>"Mai 2016",
:script=>"Latn",
:stage=>"Published",
:transmitteddate=>"XXX",
:unchangeddate=>"XXX",
Expand Down

0 comments on commit 6cedb47

Please sign in to comment.