isodoc-i18n 1.3.0 → 1.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 877e7b6ea883a3562e7c7d03cba8ebff7edaaf7c75ecf32230985dd628239437
4
- data.tar.gz: 98211e58ba133c1bc89b34547dd7ce475192e929bf2e18f5b065140efff1e186
3
+ metadata.gz: 2a242d0bc7609246ea502ffec35e515457e739c478b25478a01c7ff641dc4523
4
+ data.tar.gz: 0f89c271766d244f037a0b6c6f40431888c2b6140814ac2b6e4d2906e142b1d5
5
5
  SHA512:
6
- metadata.gz: f982a348a685cc311fb7f1d0b65c8a5c474011245a5fbcdda705fd3976bcba0808b868bfdc10cf729263e23a3527afa8b457bdc7f58a34d3b2fe4d0b26baec0e
7
- data.tar.gz: ebf2118816ef33196454bb3b4e31f25609c3efb649c6c38aa4c88b966cb462ad71b7b4776fdb7e50136b1736bc5597a16391302aee316e7609dbf390161469e6
6
+ metadata.gz: cb3f3f3a28b1b8fddd35ff74290ccf62f905ef54d51d62efd4fd8000d2d38a389eb4c78ec02aefd83ab0d1d98aaec462a0138c51257f8548c07f4a4726854c38
7
+ data.tar.gz: f6dcb2d4c05c630527d02888bf614a0e09396166e2f27437dedc0cc0a619149c6606fe2a8a78ce3c98948d4279ef3bfa224d9c1b18fbb1d38e74d92d280b74db
@@ -1,5 +1,5 @@
1
1
  module IsoDoc
2
2
  class I18n
3
- VERSION = "1.3.0".freeze
3
+ VERSION = "1.3.2".freeze
4
4
  end
5
5
  end
data/lib/isodoc/i18n.rb CHANGED
@@ -21,11 +21,12 @@ module IsoDoc
21
21
  @c = HTMLEntities.new
22
22
  init_labels(i18nyaml, i18nhash)
23
23
  liquid_init
24
+ self
24
25
  end
25
26
 
26
27
  def liquid_init
27
28
  ::IsoDoc::I18n::Liquid.set(self)
28
- ::Liquid::Template.register_filter(::IsoDoc::I18n::Liquid)
29
+ ::Liquid::Environment.default.register_filter(::IsoDoc::I18n::Liquid)
29
30
  end
30
31
 
31
32
  def calendar_data
@@ -39,6 +40,8 @@ module IsoDoc
39
40
  @labels["language"] = @lang
40
41
  @labels["script"] = @script
41
42
  @labels.each_key do |k|
43
+ methods.include?(k.downcase.to_sym) ||
44
+ self.class.methods.include?(k.downcase.to_sym) and next
42
45
  self.class.send(:define_method, k.downcase) { get[k] }
43
46
  end
44
47
  end
data/lib/isodoc/l10n.rb CHANGED
@@ -140,7 +140,7 @@ module IsoDoc
140
140
  def l10n_fr1(text, prev, foll, locale)
141
141
  text = l10n_gsub(text, prev, foll, [/[»›;?!]/, "\u202f\\0"],
142
142
  [/\p{Alnum}$/, /^(\s|$)/])
143
- text = l10n_gsub(text, prev, foll, [/[«‹]/, "\\0\u202f"], [/$/, /^./])
143
+ text = l10n_gsub(text, prev, foll, [/[«‹]/, "\\0\u202f"], [/$/, /^(?!\p{Zs})./])
144
144
  colonsp = locale == "CH" ? "\u202f" : "\u00a0"
145
145
  l10n_gsub(text, prev, foll, [":", "#{colonsp}\\0"],
146
146
  [/\p{Alnum}$/, /^(\s|$)/])
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.3.0
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-08 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -262,7 +262,7 @@ homepage: https://github.com/metanorma/isodoc-i18n
262
262
  licenses:
263
263
  - BSD-2-Clause
264
264
  metadata: {}
265
- post_install_message:
265
+ post_install_message:
266
266
  rdoc_options: []
267
267
  require_paths:
268
268
  - lib
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
278
  version: '0'
279
279
  requirements: []
280
280
  rubygems_version: 3.3.27
281
- signing_key:
281
+ signing_key:
282
282
  specification_version: 4
283
283
  summary: isodoc-i18n
284
284
  test_files: []