ad_localize 4.1.0 → 4.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1a18c57ba71812f3a373cb5b5904b784cf2855f444b1cf979a6c854db3d585b
4
- data.tar.gz: aa1199ab974d906eb9b3bad2b319601709251632e42d13965dded74fa4a9384e
3
+ metadata.gz: 1971516fa956f4228c8a1c7e8d3b06e635ef6a6e609d784af4596d3d84761d1c
4
+ data.tar.gz: 63b3fd447704657f10b76485710ceb75a5b945b92b8c40eb5f3c16e5466b381b
5
5
  SHA512:
6
- metadata.gz: 3b7c19e962e871d0248443ba4a64f53a4f7a4348c63cbee07fabdeb2e020d97a8f9d6ae3beff1e46f89347c252615510c003b8cec30c96f93dde9c938e786374
7
- data.tar.gz: 12eaeeded22193ea3c0e5e6a6fc5c4bf9faece87cb4c33811452b0bfa44bb73ca448c3665a26930d824acf724701c85e7e49a045974ca9d470c4da4c1d226051
6
+ metadata.gz: 7e34444bd5440e40fd667b6a904c6871382bffc74461011801e120dd95380c256b42f4ed61dc740695805819abe137294b5071446a158e82e27090fa747c7a19
7
+ data.tar.gz: a062eac8f10ba7f2e3a85d88ee9f02c5f9b1c8fde4de560155c517e69b63010da6d7113c14f18c7e635a0831839ae0a66aacd74ba756ff8c6c5b1d813c892e8a
data/CHANGELOG.md CHANGED
@@ -5,13 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.1.1] - 2022-04-15
9
+
10
+ ### Fixed
11
+
12
+ - Fix an issue with percent export in PR [#74](https://github.com/faberNovel/ad_localize/pull/74)
13
+
8
14
  ## [4.1.0] - 2022-03-02
9
15
 
10
16
  ### Changed
11
17
 
12
18
  - Do not export empty translation on Android in PR [#72](https://github.com/faberNovel/ad_localize/pull/72)
13
19
 
14
-
15
20
  ## [4.0.9] - 2021-09-05
16
21
 
17
22
  ### Fixed
data/Gemfile.lock CHANGED
@@ -11,7 +11,7 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (6.1.4.6)
14
+ activesupport (6.1.5)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 1.6, < 2)
17
17
  minitest (>= 5.1)
@@ -9,9 +9,17 @@ module AdLocalize
9
9
  processedValue = processedValue.gsub(/(?<!\\)\"/, '&#34;') # match " unless there is a \ before
10
10
  processedValue = processedValue.gsub(">", '&gt;')
11
11
  processedValue = processedValue.gsub("<", '&lt;')
12
+ hasFormatting = processedValue.match(/(%(\d+\$)?@)/)
12
13
  processedValue = processedValue.gsub(/(%(\d+\$)?@)/, '%\2s') # should match values like %1$s and %s
14
+ hasFormatting = hasFormatting || processedValue.match(/(%((\d+\$)?(\d+)?)i)/)
13
15
  processedValue = processedValue.gsub(/(%((\d+\$)?(\d+)?)i)/, '%\2d') # should match values like %i, %3$i, %01i, %1$02i
14
- processedValue = processedValue.gsub(/%(?!((\d+\$)?(s|(\d+)?d)))/, '&#37;') # negative lookahead: identifies when user really wants to display a %
16
+ # On Android, '%' must be escaped with a second '%' if and only if the string has at least one formatting pattern. In this specific case,
17
+ # a Java formatting method will be used which interprets every non escaped '%' as the start of a formatting pattern.
18
+ if hasFormatting
19
+ processedValue = processedValue.gsub(/%(?!((\d+\$)?(s|(\d+)?d)))/, '%%') # negative lookahead: identifies when user really wants to display a %
20
+ else
21
+ processedValue = processedValue.gsub(/%(?!((\d+\$)?(s|(\d+)?d)))/, '%') # negative lookahead: identifies when user really wants to display a %
22
+ end
15
23
  processedValue = processedValue.gsub("\\U", "\\u")
16
24
  processedValue = processedValue.gsub(/&(?!((#\d+)|(\w+));)/, '&#38;')
17
25
  processedValue = processedValue.gsub(/&/) { |match| match.replace('\&') }
@@ -1,3 +1,3 @@
1
1
  module AdLocalize
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ad_localize
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edouard Siegel
@@ -17,7 +17,7 @@ authors:
17
17
  - Claire Dufetrelle
18
18
  - Pierre Felgines
19
19
  - Satyan Jacquens
20
- autorequire:
20
+ autorequire:
21
21
  bindir: exe
22
22
  cert_chain: []
23
23
  date: 2018-04-18 00:00:00.000000000 Z
@@ -270,7 +270,7 @@ homepage: https://github.com/applidium/ad_localize
270
270
  licenses:
271
271
  - MIT
272
272
  metadata: {}
273
- post_install_message:
273
+ post_install_message:
274
274
  rdoc_options: []
275
275
  require_paths:
276
276
  - lib
@@ -285,8 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
285
285
  - !ruby/object:Gem::Version
286
286
  version: '0'
287
287
  requirements: []
288
- rubygems_version: 3.2.15
289
- signing_key:
288
+ rubygems_version: 3.2.26
289
+ signing_key:
290
290
  specification_version: 4
291
291
  summary: AdLocalize helps with mobile and web applications wording
292
292
  test_files: []