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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 608523f42571de5769d7c8833560802cd67140899a9e50dd51d6a50885b662ea
4
- data.tar.gz: bd92d03d5b4f8c0638008fb5bb75db1bb3f446643c79bf2fabad6beeadc2f87c
3
+ metadata.gz: 849b6c02d35c28c27ffa4842867033a7520a854adb3ac31a7f692b9b951a43d7
4
+ data.tar.gz: 83bd97ba69bdc0aae9fb4953002fa29376c95a971e658152031e336f1bb0bece
5
5
  SHA512:
6
- metadata.gz: f5a707a80c64a4092278797801005fc88bd22a27da1cd35c1f1690262fa656a31654659acd46b8e3fc47c50c088ca52f5dd0e015617abd7e0c82f1031499aa2f
7
- data.tar.gz: 866e1b4aff21c863c3f87a769c17b841136fd69809d9b738f050033b769cda32ce49e340a362cc251bfbd0d1213ee0e7a685109fe043d33c3098c25c569e51f9
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.3.0](https://github.com/hole19/bisu/releases/tag/v2.2.0)
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.3.0)
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.2.6)
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)
@@ -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
- if @type.eql?(:android)
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
@@ -1,4 +1,4 @@
1
1
  module Bisu
2
- VERSION = '2.3.0'
3
- VERSION_UPDATED_AT = '2024-03-20'
2
+ VERSION = '2.4.0'
3
+ VERSION_UPDATED_AT = '2025-02-03'
4
4
  end
@@ -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.3.0
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: 2024-03-20 00:00:00.000000000 Z
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.4.22
121
+ rubygems_version: 3.5.22
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: A localization automation service