isodoc-i18n 1.1.8 → 1.1.9

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: 03d82802ceebe9b649964369efa5a449b5fa528bb317e327a2683ffd1bcdc502
4
- data.tar.gz: 32001c9565f97ce9b2327ba452e7e745317ce7db56cead17c873e70cdd4f49d3
3
+ metadata.gz: e6ff9dd68aee9f2481e2c3b3efb12eb227d534841dd30ac23fa7402f64a3ffd2
4
+ data.tar.gz: 5b6b0bd8eb4b8323cf8650a5dba48c966226f2898ac812beb5f5b3f31cd91b1f
5
5
  SHA512:
6
- metadata.gz: 734f890b5868a2a889f91749167a7ea89d050b3bc58d12e1064242b858776c5ad7f793ecfa1d1f58972bf3f12d314996cc5f9ec0afb32614a96a5f6ea5b35674
7
- data.tar.gz: 458345fb6eabfc69ec4416444b693ec1b56b07cd28ca994619927ec505c8bba793f161b1f8562a501d42990d56f5a86a1112e5cb9a5af518122696f14f875115
6
+ metadata.gz: a3333a3f5386017bf62a88d8b82597477702965cf7aa9505b00927dd883420cb3a881363774a07311653703316d2f591ad1bb8b2f21d485b034ad2d9356d6544
7
+ data.tar.gz: b980154492673ddd83d2cd3c90fcde55856a14e055f493df0372cc627ffd2602a197c2e3ccb0680e3c942c058540551634f4c3a7d7c51c0ba9eb77f35d422c18
@@ -1,5 +1,5 @@
1
1
  module IsoDoc
2
2
  class I18n
3
- VERSION = "1.1.8".freeze
3
+ VERSION = "1.1.9".freeze
4
4
  end
5
5
  end
data/lib/isodoc/i18n.rb CHANGED
@@ -2,6 +2,7 @@ require "htmlentities"
2
2
  require "twitter_cldr"
3
3
  require_relative "i18n/version"
4
4
  require_relative "i18n-yaml"
5
+ require_relative "date"
5
6
 
6
7
  module IsoDoc
7
8
  class I18n
@@ -9,8 +10,20 @@ module IsoDoc
9
10
  @lang = lang
10
11
  @script = script
11
12
  @locale = locale
13
+ @cal = calendar_data
14
+ @cal_en = TwitterCldr::Shared::Calendar.new(:en)
12
15
  @c = HTMLEntities.new
13
- @labels = load_yaml(lang, script, i18nyaml, i18nhash)
16
+ init_labels(i18nyaml, i18nhash)
17
+ end
18
+
19
+ def calendar_data
20
+ TwitterCldr::Shared::Calendar.new(tw_cldr_lang)
21
+ rescue StandardError
22
+ TwitterCldr::Shared::Calendar.new(:en)
23
+ end
24
+
25
+ def init_labels(i18nyaml, i18nhash)
26
+ @labels = load_yaml(@lang, @script, i18nyaml, i18nhash)
14
27
  @labels["language"] = @lang
15
28
  @labels["script"] = @script
16
29
  @labels.each do |k, _v|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-11 00:00:00.000000000 Z
11
+ date: 2023-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities