bisu 2.3.0 → 3.0.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/.github/workflows/test.yml +30 -0
- data/CHANGELOG.md +12 -1
- data/Gemfile.lock +29 -25
- data/bisu.gemspec +3 -0
- data/lib/bisu/localizer.rb +4 -5
- data/lib/bisu/version.rb +2 -2
- data/spec/lib/bisu/localizer_spec.rb +3 -1
- metadata +19 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ea2a5c13b7955fc0c03217a486ff2fc85113f0d24e0a17e384f50e2b58f56d7
|
4
|
+
data.tar.gz: c739da6cdcf198784ec160c106e68182b84f4827b2dd0930716150afdbda847d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abed861d2a9023e00b59dac55b4b3c4dd3cea0d14c1bb630a0d8be21b69ecbd515c5dc278332beb7c62b8023a3fb496b14376ee643b9b6c002d96b9dd871265e
|
7
|
+
data.tar.gz: 74dafa6722b5e12fc0b0d9d92aee0e87018ed264be41927251256ba594c705676efaf32ad0c2b951427f27283d1585b5215f55797f135336d57024cefdaa77b8
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "*" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v4
|
22
|
+
|
23
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby-version }}
|
27
|
+
bundler-cache: true
|
28
|
+
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,18 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## Unreleased
|
6
6
|
|
7
|
-
## [
|
7
|
+
## [3.0.0](https://github.com/hole19/bisu/releases/tag/v2.5.0)(2025-10-13)
|
8
|
+
|
9
|
+
- Add support for ruby 3.4
|
10
|
+
- Add Github test workflow
|
11
|
+
- (Breaking) Set ruby 3.0 as minimum supported version
|
12
|
+
|
13
|
+
## [2.4.0](https://github.com/hole19/bisu/releases/tag/v2.4.0)
|
14
|
+
|
15
|
+
#### Fixed
|
16
|
+
- Escape double quotes (") for every supported language
|
17
|
+
|
18
|
+
## [2.3.0](https://github.com/hole19/bisu/releases/tag/v2.3.0)
|
8
19
|
|
9
20
|
#### Fixed
|
10
21
|
- Fix handling of ampersand (&) character on Android localization
|
data/Gemfile.lock
CHANGED
@@ -1,43 +1,47 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bisu (
|
4
|
+
bisu (3.0.0)
|
5
5
|
colorize
|
6
|
+
csv
|
6
7
|
rubyzip (>= 2.0.0)
|
7
8
|
safe_yaml (>= 1.0.0)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
addressable (2.8.
|
13
|
-
public_suffix (>= 2.0.2, <
|
13
|
+
addressable (2.8.7)
|
14
|
+
public_suffix (>= 2.0.2, < 7.0)
|
15
|
+
bigdecimal (3.3.1)
|
14
16
|
colorize (1.1.0)
|
15
|
-
crack (0.
|
17
|
+
crack (1.0.0)
|
18
|
+
bigdecimal
|
16
19
|
rexml
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
rspec-
|
25
|
-
rspec-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
csv (3.3.5)
|
21
|
+
diff-lcs (1.6.2)
|
22
|
+
hashdiff (1.2.1)
|
23
|
+
public_suffix (6.0.2)
|
24
|
+
rake (13.3.0)
|
25
|
+
rexml (3.4.4)
|
26
|
+
rspec (3.13.1)
|
27
|
+
rspec-core (~> 3.13.0)
|
28
|
+
rspec-expectations (~> 3.13.0)
|
29
|
+
rspec-mocks (~> 3.13.0)
|
30
|
+
rspec-core (3.13.5)
|
31
|
+
rspec-support (~> 3.13.0)
|
32
|
+
rspec-expectations (3.13.5)
|
29
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
-
rspec-support (~> 3.
|
31
|
-
rspec-its (
|
32
|
-
rspec-core (>= 3.
|
33
|
-
rspec-expectations (>= 3.
|
34
|
-
rspec-mocks (3.
|
34
|
+
rspec-support (~> 3.13.0)
|
35
|
+
rspec-its (2.0.0)
|
36
|
+
rspec-core (>= 3.13.0)
|
37
|
+
rspec-expectations (>= 3.13.0)
|
38
|
+
rspec-mocks (3.13.5)
|
35
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
-
rspec-support (~> 3.
|
37
|
-
rspec-support (3.
|
38
|
-
rubyzip (
|
40
|
+
rspec-support (~> 3.13.0)
|
41
|
+
rspec-support (3.13.6)
|
42
|
+
rubyzip (3.1.1)
|
39
43
|
safe_yaml (1.0.5)
|
40
|
-
webmock (3.
|
44
|
+
webmock (3.25.1)
|
41
45
|
addressable (>= 2.8.0)
|
42
46
|
crack (>= 0.3.2)
|
43
47
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/bisu.gemspec
CHANGED
@@ -15,7 +15,10 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.require_paths = ['lib']
|
16
16
|
s.executables = %w[ bisu ]
|
17
17
|
|
18
|
+
s.required_ruby_version = '>= 3.0.0'
|
19
|
+
|
18
20
|
s.add_dependency 'safe_yaml', '>= 1.0.0'
|
19
21
|
s.add_dependency 'colorize'
|
22
|
+
s.add_runtime_dependency 'csv' # For Google Sheets interpretation
|
20
23
|
s.add_runtime_dependency 'rubyzip', '>= 2.0.0' # For extracting the Tolgee zip file
|
21
24
|
end
|
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,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bisu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joaoffcosta
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-10-13 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: safe_yaml
|
@@ -38,6 +37,20 @@ dependencies:
|
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: '0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: csv
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
41
54
|
- !ruby/object:Gem::Dependency
|
42
55
|
name: rubyzip
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,6 +73,7 @@ executables:
|
|
60
73
|
extensions: []
|
61
74
|
extra_rdoc_files: []
|
62
75
|
files:
|
76
|
+
- ".github/workflows/test.yml"
|
63
77
|
- ".rspec"
|
64
78
|
- ".travis.yml"
|
65
79
|
- CHANGELOG.md
|
@@ -103,7 +117,6 @@ homepage: https://github.com/hole19/bisu
|
|
103
117
|
licenses:
|
104
118
|
- MIT
|
105
119
|
metadata: {}
|
106
|
-
post_install_message:
|
107
120
|
rdoc_options: []
|
108
121
|
require_paths:
|
109
122
|
- lib
|
@@ -111,15 +124,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
124
|
requirements:
|
112
125
|
- - ">="
|
113
126
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
127
|
+
version: 3.0.0
|
115
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
129
|
requirements:
|
117
130
|
- - ">="
|
118
131
|
- !ruby/object:Gem::Version
|
119
132
|
version: '0'
|
120
133
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
-
signing_key:
|
134
|
+
rubygems_version: 3.7.2
|
123
135
|
specification_version: 4
|
124
136
|
summary: A localization automation service
|
125
137
|
test_files: []
|