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 +4 -4
- data/lib/isodoc/i18n/version.rb +1 -1
- data/lib/isodoc/i18n.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6ff9dd68aee9f2481e2c3b3efb12eb227d534841dd30ac23fa7402f64a3ffd2
|
4
|
+
data.tar.gz: 5b6b0bd8eb4b8323cf8650a5dba48c966226f2898ac812beb5f5b3f31cd91b1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3333a3f5386017bf62a88d8b82597477702965cf7aa9505b00927dd883420cb3a881363774a07311653703316d2f591ad1bb8b2f21d485b034ad2d9356d6544
|
7
|
+
data.tar.gz: b980154492673ddd83d2cd3c90fcde55856a14e055f493df0372cc627ffd2602a197c2e3ccb0680e3c942c058540551634f4c3a7d7c51c0ba9eb77f35d422c18
|
data/lib/isodoc/i18n/version.rb
CHANGED
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
|
-
|
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.
|
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
|
+
date: 2023-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|