bisu 2.3.0 → 2.4.0
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 +4 -4
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +2 -2
- data/lib/bisu/localizer.rb +4 -5
- data/lib/bisu/version.rb +2 -2
- data/spec/lib/bisu/localizer_spec.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 849b6c02d35c28c27ffa4842867033a7520a854adb3ac31a7f692b9b951a43d7
|
4
|
+
data.tar.gz: 83bd97ba69bdc0aae9fb4953002fa29376c95a971e658152031e336f1bb0bece
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ec754ef5da4a0e2cc864338ec9b0974258d96adf84034198f951098e25199e365084e5d7ff0832bbbd60ac017aa2615abc284a8d8c7dca6e7efdb3c21584e5
|
7
|
+
data.tar.gz: 3fa3832be0d5d9dedfd11305d5b16ea8d8aa9634f7562a3374d1455a3bd7c6451a968ab57719633b01441505a4ff06575393901094bce5328f1a52d8dc4ca553
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## Unreleased
|
6
6
|
|
7
|
-
## [2.
|
7
|
+
## [2.4.0](https://github.com/hole19/bisu/releases/tag/v2.4.0)
|
8
|
+
|
9
|
+
#### Fixed
|
10
|
+
- Escape double quotes (") for every supported language
|
11
|
+
|
12
|
+
## [2.3.0](https://github.com/hole19/bisu/releases/tag/v2.3.0)
|
8
13
|
|
9
14
|
#### Fixed
|
10
15
|
- Fix handling of ampersand (&) character on Android localization
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bisu (2.
|
4
|
+
bisu (2.4.0)
|
5
5
|
colorize
|
6
6
|
rubyzip (>= 2.0.0)
|
7
7
|
safe_yaml (>= 1.0.0)
|
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
hashdiff (1.0.1)
|
19
19
|
public_suffix (5.0.3)
|
20
20
|
rake (13.1.0)
|
21
|
-
rexml (3.
|
21
|
+
rexml (3.3.9)
|
22
22
|
rspec (3.12.0)
|
23
23
|
rspec-core (~> 3.12.0)
|
24
24
|
rspec-expectations (~> 3.12.0)
|
data/lib/bisu/localizer.rb
CHANGED
@@ -79,17 +79,16 @@ module Bisu
|
|
79
79
|
|
80
80
|
def process(text, is_formatted_string)
|
81
81
|
text = text.gsub("\n", "\\n")
|
82
|
+
text = text.gsub(/\"/, "\\\\\"")
|
82
83
|
|
83
|
-
|
84
|
+
case @type
|
85
|
+
when :android
|
84
86
|
text = text.gsub(/[']/, "\\\\\\\\'")
|
85
|
-
text = text.gsub(/\"/, "\\\\\"")
|
86
87
|
text = text.gsub("...", "…")
|
87
88
|
text = text.gsub("&", "&")
|
88
89
|
text = text.gsub("@", "\\\\@")
|
89
90
|
text = text.gsub(/%(?!{)/, "\\\\%%")
|
90
|
-
|
91
|
-
elsif @type.eql?(:ios)
|
92
|
-
text = text.gsub(/\"/, "\\\\\"")
|
91
|
+
when :ios
|
93
92
|
text = text.gsub(/%(?!{)/, "%%") if is_formatted_string
|
94
93
|
end
|
95
94
|
|
data/lib/bisu/version.rb
CHANGED
@@ -196,7 +196,9 @@ describe Bisu::Localizer do
|
|
196
196
|
describe "of type Ruby on Rails" do
|
197
197
|
let(:type) { :ror }
|
198
198
|
|
199
|
-
let(:expected) { type_dependent_defaults
|
199
|
+
let(:expected) { type_dependent_defaults.merge(
|
200
|
+
double_quoted: "Não sabes nada \\\"João das Neves\\\"",
|
201
|
+
) }
|
200
202
|
|
201
203
|
it_behaves_like "a localizer"
|
202
204
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bisu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joaoffcosta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: safe_yaml
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.5.22
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: A localization automation service
|