pseudolocalization 0.9.0 → 0.9.1
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/dependabot.yml +14 -0
- data/.github/workflows/cla.yml +22 -0
- data/.github/workflows/ruby-ci.yml +3 -3
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +3 -3
- data/dev.yml +1 -1
- data/lib/pseudolocalization/version.rb +1 -1
- data/lib/pseudolocalization.rb +23 -0
- data/pseudolocalization.gemspec +2 -0
- data/service.yml +1 -7
- metadata +7 -6
- data/.dependabot/config.yml +0 -12
- data/.github/probots.yml +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 953fc8645d51046e0ea9f3cf943d07d297f0e69894aea97ae986ea3793949eff
|
|
4
|
+
data.tar.gz: f2c5c2ff02cb1c8491794a0c48ccc7e045a95880d10a67b889e7a7ac1dd4592d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21a1bc280d86b3f1c666f48c69fee633e047eae3cfc662c2bcde713acc2554575749557e01dce83c5629605db15a252d724dc4dc2560b45409ce0b0bb73c830e
|
|
7
|
+
data.tar.gz: f5324b187dc3c3113e486f90a89f9e1e2979286f732c5402fac5ac624e138eb2172bb4afa3a70d185912889a1c445deb6176af9fd4a8a39a0b4f9b67b66a0f07
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
- package-ecosystem: bundler
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
time: "10:00"
|
|
9
|
+
timezone: America/Toronto
|
|
10
|
+
open-pull-requests-limit: 99
|
|
11
|
+
reviewers:
|
|
12
|
+
- Shopify/intl-languages
|
|
13
|
+
registries:
|
|
14
|
+
- rubygems-server-pkgs-shopify-io
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Contributor License Agreement (CLA)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, synchronize]
|
|
6
|
+
issue_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
cla:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
if: |
|
|
13
|
+
(github.event.issue.pull_request
|
|
14
|
+
&& !github.event.issue.pull_request.merged_at
|
|
15
|
+
&& contains(github.event.comment.body, 'signed')
|
|
16
|
+
)
|
|
17
|
+
|| (github.event.pull_request && !github.event.pull_request.merged)
|
|
18
|
+
steps:
|
|
19
|
+
- uses: Shopify/shopify-cla-action@v1
|
|
20
|
+
with:
|
|
21
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
cla-token: ${{ secrets.CLA_TOKEN }}
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7.5
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
Nil.
|
|
8
8
|
|
|
9
|
+
## [0.9.1] - 2024-06-27
|
|
10
|
+
### Added
|
|
11
|
+
- Added support for pseudolocalized translations [#82](https://github.com/Shopify/pseudolocalization/pull/82)
|
|
12
|
+
|
|
9
13
|
## [0.9.0] - 2021-02-17
|
|
10
14
|
### Added
|
|
11
15
|
- Added support for ignoring specific translation keys [#59](https://github.com/Shopify/pseudolocalization/pull/59)
|
|
@@ -52,7 +56,8 @@ Nil.
|
|
|
52
56
|
|
|
53
57
|
Please refer to [GitHub releases](https://github.com/Shopify/pseudolocalization/releases) for releases prior to [0.8.0].
|
|
54
58
|
|
|
55
|
-
[Unreleased]: https://github.com/Shopify/pseudolocalization/compare/0.9.
|
|
59
|
+
[Unreleased]: https://github.com/Shopify/pseudolocalization/compare/0.9.1...HEAD
|
|
60
|
+
[0.9.1]: https://github.com/Shopify/pseudolocalization/compare/0.9.0...0.9.1
|
|
56
61
|
[0.9.0]: https://github.com/Shopify/pseudolocalization/compare/0.8.4...0.9.0
|
|
57
62
|
[0.8.4]: https://github.com/Shopify/pseudolocalization/compare/0.8.3...0.8.4
|
|
58
63
|
[0.8.3]: https://github.com/Shopify/pseudolocalization/compare/0.8.2...0.8.3
|
data/Gemfile.lock
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pseudolocalization (0.9.
|
|
4
|
+
pseudolocalization (0.9.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
minitest (5.14.
|
|
9
|
+
minitest (5.14.4)
|
|
10
10
|
rake (13.0.3)
|
|
11
11
|
|
|
12
12
|
PLATFORMS
|
|
@@ -18,4 +18,4 @@ DEPENDENCIES
|
|
|
18
18
|
rake (~> 13.0)
|
|
19
19
|
|
|
20
20
|
BUNDLED WITH
|
|
21
|
-
2.2.
|
|
21
|
+
2.2.22
|
data/dev.yml
CHANGED
data/lib/pseudolocalization.rb
CHANGED
|
@@ -31,6 +31,13 @@ module Pseudolocalization
|
|
|
31
31
|
::Pseudolocalization::I18n::Pseudolocalizer.pseudolocalize(original_backend.translate(locale, key, options))
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def translations
|
|
35
|
+
original = original_backend.translations
|
|
36
|
+
original.transform_values do |locale_translations|
|
|
37
|
+
pseudolocalize_node(locale_translations)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
34
41
|
private
|
|
35
42
|
|
|
36
43
|
def key_ignored?(key)
|
|
@@ -48,6 +55,22 @@ module Pseudolocalization
|
|
|
48
55
|
end
|
|
49
56
|
end
|
|
50
57
|
end
|
|
58
|
+
|
|
59
|
+
def pseudolocalize_node(node, scope = [])
|
|
60
|
+
if node.is_a?(Hash)
|
|
61
|
+
node.each_with_object({}) do |(key, value), memo|
|
|
62
|
+
memo[key] = pseudolocalize_node(value, scope + [key])
|
|
63
|
+
end
|
|
64
|
+
elsif !key_ignored?(scope.join('.'))
|
|
65
|
+
::Pseudolocalization::I18n::Pseudolocalizer.pseudolocalize(node)
|
|
66
|
+
else
|
|
67
|
+
node
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def init_translations
|
|
72
|
+
original_backend.send(:init_translations)
|
|
73
|
+
end
|
|
51
74
|
end
|
|
52
75
|
end
|
|
53
76
|
end
|
data/pseudolocalization.gemspec
CHANGED
|
@@ -10,6 +10,8 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ["christ.blais@gmail.com"]
|
|
11
11
|
spec.licenses = ['MIT']
|
|
12
12
|
|
|
13
|
+
spec.required_ruby_version = ">= 2.7"
|
|
14
|
+
|
|
13
15
|
spec.summary = %q{Internationalization development tool}
|
|
14
16
|
spec.description = %q{Internationalization development tool to help identify missing translations}
|
|
15
17
|
spec.homepage = "https://github.com/Shopify/pseudolocalization"
|
data/service.yml
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pseudolocalization
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christian Blais
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -45,10 +45,11 @@ executables: []
|
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
|
-
- ".dependabot
|
|
49
|
-
- ".github/
|
|
48
|
+
- ".github/dependabot.yml"
|
|
49
|
+
- ".github/workflows/cla.yml"
|
|
50
50
|
- ".github/workflows/ruby-ci.yml"
|
|
51
51
|
- ".gitignore"
|
|
52
|
+
- ".ruby-version"
|
|
52
53
|
- CHANGELOG.md
|
|
53
54
|
- Gemfile
|
|
54
55
|
- Gemfile.lock
|
|
@@ -77,14 +78,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
77
78
|
requirements:
|
|
78
79
|
- - ">="
|
|
79
80
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: '
|
|
81
|
+
version: '2.7'
|
|
81
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
83
|
requirements:
|
|
83
84
|
- - ">="
|
|
84
85
|
- !ruby/object:Gem::Version
|
|
85
86
|
version: '0'
|
|
86
87
|
requirements: []
|
|
87
|
-
rubygems_version: 3.
|
|
88
|
+
rubygems_version: 3.5.13
|
|
88
89
|
signing_key:
|
|
89
90
|
specification_version: 4
|
|
90
91
|
summary: Internationalization development tool
|
data/.dependabot/config.yml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
version: 1
|
|
2
|
-
update_configs:
|
|
3
|
-
- package_manager: "ruby:bundler"
|
|
4
|
-
directory: "/"
|
|
5
|
-
update_schedule: "weekly"
|
|
6
|
-
automerged_updates:
|
|
7
|
-
- match:
|
|
8
|
-
dependency_type: "all"
|
|
9
|
-
update_type: "all"
|
|
10
|
-
version_requirement_updates: "auto"
|
|
11
|
-
default_reviewers:
|
|
12
|
-
- Shopify/intl-languages
|
data/.github/probots.yml
DELETED