isodoc-i18n 1.1.0 → 1.1.1
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.rb +5 -3
- data/lib/isodoc/version.rb +1 -1
- data/spec/isodoc/base_spec.rb +2 -0
- 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: 8f00540677aae6f53c0c517b376529ce6eb5094c6cebd1d1a9b31ce20e346266
|
4
|
+
data.tar.gz: 69dd44b3aedc560540c5de52f05f0ae11b1332edccb4565817845648f23a9631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b3a53fe9058b2cba6f929938e61147adcb6eaa0782705ca2097cf448f63a76500abbe4b4d3513b9d0cfca04456547d8127e278ef7a521ec3b1cff6de8302f58
|
7
|
+
data.tar.gz: 24ff8195e4172769e91fc4f879fe6835b4f24170041e16198ab3a405625f07ed56bce3a702604b5cb25102b4d6f21ce87d5d92889122cd524a4694549ba8d0c8
|
data/lib/isodoc/i18n.rb
CHANGED
@@ -144,12 +144,14 @@ module IsoDoc
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def l10n_fr1(text, locale)
|
147
|
-
text = text.gsub(/(?<=\p{Alnum})([»›;?!])/, "\u202f\\1")
|
147
|
+
text = text.gsub(/(?<=\p{Alnum})([»›;?!])(?=\s)/, "\u202f\\1")
|
148
|
+
text = text.gsub(/(?<=\p{Alnum})([»›;?!])$/, "\u202f\\1")
|
148
149
|
text = text.gsub(/^([»›;?!])/, "\u202f\\1")
|
149
150
|
text = text.gsub(/([«‹])/, "\\1\u202f")
|
150
151
|
colonsp = locale == "CH" ? "\u202f" : "\u00a0"
|
151
|
-
text = text.gsub(/(?<=\p{Alnum})(:)/, "#{colonsp}\\1")
|
152
|
-
text.gsub(
|
152
|
+
text = text.gsub(/(?<=\p{Alnum})(:)(?=\s)/, "#{colonsp}\\1")
|
153
|
+
text = text.gsub(/(?<=\p{Alnum})(:)$/, "#{colonsp}\\1")
|
154
|
+
text.gsub(/^(:\s)/, "#{colonsp}\\1")
|
153
155
|
end
|
154
156
|
|
155
157
|
def boolean_conj(list, conn)
|
data/lib/isodoc/version.rb
CHANGED
data/spec/isodoc/base_spec.rb
CHANGED
@@ -103,6 +103,8 @@ RSpec.describe IsoDoc::I18n do
|
|
103
103
|
expect(e.encode(c.l10n("Code; «code» and: code!"), :hexadecimal))
|
104
104
|
.to be_equivalent_to "Code ; « code » "\
|
105
105
|
"and : code !"
|
106
|
+
expect(e.encode(c.l10n("http://xyz a;b"), :hexadecimal))
|
107
|
+
.to be_equivalent_to "http://xyz a;b"
|
106
108
|
end
|
107
109
|
|
108
110
|
it "does boolean conjunctions" do
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|