Skip to content

Commit

Permalink
Merge pull request #478 from metanorma/fix/itu-abbrev-i18n
Browse files Browse the repository at this point in the history
refactor organisation contributor metadata, add ITU abbreviation to m…
  • Loading branch information
opoudjis authored Nov 24, 2023
2 parents 679b48f + 9ffb573 commit a5688b1
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 27 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ Encoding.default_internal = Encoding::UTF_8
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}" }

gemspec
group :development, :test do
gem "rspec"
end

if File.exist? "Gemfile.devel"
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
end

gemspec
2 changes: 2 additions & 0 deletions Gemfile.devel
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gem "metanorma-standoc", git: "https://github.com/metanorma/metanorma-standoc", branch: "features/logos"

1 change: 1 addition & 0 deletions lib/isodoc/itu/i18n-de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ annex_to_itu_ob: Anhang zum ITU Operational Bulletin
number_abbrev: Nr.
annex_to_itu_ob_abbrev: Anhang zum ITU OB %
international_telecommunication_union: Internationale Fernmeldeunion
ITU: ITU
position_on: (Position auf %)
revision_abbreviation: Rev.
tsb: TSB
Expand Down
1 change: 1 addition & 0 deletions lib/isodoc/itu/i18n-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ annex_to_itu_ob: Annex to ITU Operational Bulletin
number_abbrev: No.
annex_to_itu_ob_abbrev: Annex to ITU OB %
international_telecommunication_union: International Telecommunication Union
ITU: ITU
position_on: (Position on %)
revision_abbreviation: Rev.
tsb: TSB
Expand Down
1 change: 1 addition & 0 deletions lib/isodoc/itu/i18n-es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ annex_to_itu_ob: Anexo al Boletín de Explotación de la UIT
number_abbrev: N.°
annex_to_itu_ob_abbrev: Anexo al BE de la UIT %
international_telecommunication_union: Unión Internacional de Telecomunicaciones
ITU: UIT
position_on: (Posición en %)
revision_abbreviation: Rev.
tsb: TSB
Expand Down
1 change: 1 addition & 0 deletions lib/isodoc/itu/i18n-fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ annex_to_itu_ob: Annexe au Bulletin d’exploitation de l’UIT
number_abbrev:
annex_to_itu_ob_abbrev: Annexe au BE de l’UIT %
international_telecommunication_union: Union internationale des télécommunications
ITU: UIT
position_on: (Position sur %)
revision_abbreviation: Rev.
tsb: TSB
Expand Down
1 change: 1 addition & 0 deletions lib/isodoc/itu/i18n-ru.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ annex_to_itu_ob: Приложение к Оперативному бюллете
number_abbrev: №.
annex_to_itu_ob_abbrev: Приложение к ОБ МСЭ %
international_telecommunication_union: Международный Союз Электросвязи
ITU: МСЭ
position_on: (Позиция по %)
revision_abbreviation: Ред.
tsb: БСЭ
Expand Down
10 changes: 9 additions & 1 deletion lib/metanorma/itu/front.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ def other_title_otherlangs(node, xml, type)
end

def default_publisher
"International Telecommunication Union"
@i18n.get["ITU"] || @i18n.international_telecommunication_union
end

def org_abbrev
if @i18n.get["ITU"]
{ @i18n.international_telecommunication_union => @i18n.get["ITU"] }
else
{}
end
end

def metadata_committee(node, xml)
Expand Down
19 changes: 18 additions & 1 deletion spec/metanorma/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@
<role type="author"/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<contributor>
<role type="publisher"/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<version>
Expand All @@ -132,6 +134,7 @@
<owner>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</owner>
</copyright>
Expand Down Expand Up @@ -263,6 +266,7 @@
<role type='author'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<contributor>
Expand All @@ -286,6 +290,7 @@
<role type='publisher'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<edition>2</edition>
Expand All @@ -302,6 +307,7 @@
<owner>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</owner>
</copyright>
Expand Down Expand Up @@ -709,7 +715,7 @@
<contributor>
<role type='author'/>
<organization>
<name>International Telecommunication Union</name>
<name>International Telecommunication Union</name><abbreviation>ITU</abbreviation>
</organization>
</contributor>
<contributor>
Expand Down Expand Up @@ -754,6 +760,7 @@
<role type='publisher'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<edition>2</edition>
Expand All @@ -771,6 +778,7 @@
<owner>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</owner>
</copyright>
Expand Down Expand Up @@ -875,12 +883,14 @@
<role type='author'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<contributor>
<role type='publisher'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<edition>2</edition>
Expand All @@ -898,6 +908,7 @@
<owner>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</owner>
</copyright>
Expand Down Expand Up @@ -1014,6 +1025,7 @@
<role type='author'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<contributor>
Expand Down Expand Up @@ -1058,6 +1070,7 @@
<role type='publisher'/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<edition>2</edition>
Expand All @@ -1075,6 +1088,7 @@
<owner>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</owner>
</copyright>
Expand Down Expand Up @@ -1154,12 +1168,14 @@
<role type="author"/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<contributor>
<role type="publisher"/>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</contributor>
<language>en</language>
Expand All @@ -1172,6 +1188,7 @@
<owner>
<organization>
<name>International Telecommunication Union</name>
<abbreviation>ITU</abbreviation>
</organization>
</owner>
</copyright>
Expand Down
Loading

0 comments on commit a5688b1

Please sign in to comment.