phraseapp-in-context-editor-ruby 1.3.1 → 1.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/.github/workflows/test.yml +16 -0
- data/.package-licenses.yml +4 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +52 -6
- data/README.md +16 -16
- data/config/license-decisions.yml +34 -0
- data/config/license_finder.yml +2 -0
- data/lib/phraseapp-in-context-editor-ruby/backend_service.rb +21 -1
- data/lib/phraseapp-in-context-editor-ruby/version.rb +1 -1
- metadata +8 -5
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f084a265ff2c55aeeb2a80f802bd7aeb3ea13795d074a50673fb618662f8df74
|
|
4
|
+
data.tar.gz: 1277e9d222fc188b2267d969a6b3db00284ae7cdbbb948a538ad6defa96539f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 661e874a387eb4764297aa3c3fd9d957841852c45b07bae6c82fb06c4f26fcc8c0d0e710b9e44cacd51841090a624d82e3966e6c9fc3b021f128a37d98b327d0
|
|
7
|
+
data.tar.gz: f2595036cc4f547ce47cf2cf0d50478c1c986a16d08482c91df73474d3df1a9d5fe50fd635585b35e1472bb1056d5a1473a4b9518531aac9d896c6cddb5b50cd
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
strategy:
|
|
6
|
+
fail-fast: false
|
|
7
|
+
matrix:
|
|
8
|
+
ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0]
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- uses: ruby/setup-ruby@v1
|
|
13
|
+
with:
|
|
14
|
+
ruby-version: ${{ matrix.ruby }}
|
|
15
|
+
- run: bundle install
|
|
16
|
+
- run: bundle exec rspec spec
|
data/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby 3.0.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [v1.4.0](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.4.0) (2021-02-16)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.3.1...v1.4.0)
|
|
6
|
+
|
|
7
|
+
**Closed issues:**
|
|
8
|
+
|
|
9
|
+
- phraseapp-ruby locked to ~\> 1.2.7, current is 1.3.3 [\#19](https://github.com/phrase/phraseapp-in-context-editor-ruby/issues/19)
|
|
10
|
+
|
|
11
|
+
**Merged pull requests:**
|
|
12
|
+
|
|
13
|
+
- Ruby 3.0 support [\#49](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/49) ([sbruhns](https://github.com/sbruhns))
|
|
14
|
+
- remove all dynport.de references [\#47](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/47) ([tobstarr](https://github.com/tobstarr))
|
|
15
|
+
- Update license decisions [\#46](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/46) ([forelabs](https://github.com/forelabs))
|
|
16
|
+
- Tests: Upgrade to modern RSpec syntax [\#45](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/45) ([docstun](https://github.com/docstun))
|
|
17
|
+
- GitHub actions [\#44](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/44) ([docstun](https://github.com/docstun))
|
|
18
|
+
- Licenses: fix project name [\#43](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/43) ([forelabs](https://github.com/forelabs))
|
|
19
|
+
- Licenses: Ignore dev&test dependencies [\#42](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/42) ([forelabs](https://github.com/forelabs))
|
|
20
|
+
- Introduce LicenseFinder config [\#41](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/41) ([forelabs](https://github.com/forelabs))
|
|
21
|
+
- fix pa licenses [\#40](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/40) ([forelabs](https://github.com/forelabs))
|
|
22
|
+
- Add pa licenses yml [\#39](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/39) ([forelabs](https://github.com/forelabs))
|
|
2
23
|
|
|
3
24
|
## [v1.3.1](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.3.1) (2019-08-29)
|
|
25
|
+
|
|
4
26
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.3.0...v1.3.1)
|
|
5
|
-
- Change api host to api.phrase.com
|
|
6
27
|
|
|
7
|
-
|
|
28
|
+
**Merged pull requests:**
|
|
29
|
+
|
|
30
|
+
- Update docs [\#38](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/38) ([timleers](https://github.com/timleers))
|
|
31
|
+
- Update documentation URLs [\#37](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/37) ([docstun](https://github.com/docstun))
|
|
32
|
+
|
|
33
|
+
## [v1.3.0](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.3.0) (2018-04-19)
|
|
34
|
+
|
|
8
35
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.2.1...v1.3.0)
|
|
9
|
-
|
|
36
|
+
|
|
37
|
+
**Closed issues:**
|
|
38
|
+
|
|
39
|
+
- Using translation in data-x attributes replaces entire string. [\#33](https://github.com/phrase/phraseapp-in-context-editor-ruby/issues/33)
|
|
40
|
+
|
|
41
|
+
**Merged pull requests:**
|
|
42
|
+
|
|
43
|
+
- Set ruby 2.1 as minimum version [\#36](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/36) ([theSoenke](https://github.com/theSoenke))
|
|
44
|
+
- use RequestStore instead of Thread\[:current\] [\#32](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/32) ([zuchmanski](https://github.com/zuchmanski))
|
|
10
45
|
|
|
11
46
|
## [v1.2.1](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.2.1) (2017-03-13)
|
|
47
|
+
|
|
12
48
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.2.0...v1.2.1)
|
|
13
49
|
|
|
14
50
|
**Closed issues:**
|
|
@@ -21,6 +57,7 @@
|
|
|
21
57
|
- Version update, Ruby 2.4.0 support because of json-dependency change [\#20](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/20) ([fredv](https://github.com/fredv))
|
|
22
58
|
|
|
23
59
|
## [v1.2.0](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.2.0) (2017-02-24)
|
|
60
|
+
|
|
24
61
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.1.0...v1.2.0)
|
|
25
62
|
|
|
26
63
|
**Merged pull requests:**
|
|
@@ -28,6 +65,7 @@
|
|
|
28
65
|
- Changes json dependency to json \>= 1.8 [\#18](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/18) ([fredv](https://github.com/fredv))
|
|
29
66
|
|
|
30
67
|
## [v1.1.0](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.1.0) (2016-10-04)
|
|
68
|
+
|
|
31
69
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.0.2...v1.1.0)
|
|
32
70
|
|
|
33
71
|
**Closed issues:**
|
|
@@ -45,16 +83,21 @@
|
|
|
45
83
|
- disable dependency loading on before as fix for rails5 [\#13](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/13) ([koljaa](https://github.com/koljaa))
|
|
46
84
|
- Update LICENSE [\#11](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/11) ([sbruhns](https://github.com/sbruhns))
|
|
47
85
|
- i18n set to \>= 0.6 [\#10](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/10) ([jethroo](https://github.com/jethroo))
|
|
48
|
-
- 18n delegate refactoring [\#6](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/6) ([koljaa](https://github.com/koljaa))
|
|
49
86
|
|
|
50
87
|
## [v1.0.2](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.0.2) (2015-10-12)
|
|
88
|
+
|
|
51
89
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.0.1...v1.0.2)
|
|
52
90
|
|
|
53
91
|
**Closed issues:**
|
|
54
92
|
|
|
55
93
|
- Method missing error [\#5](https://github.com/phrase/phraseapp-in-context-editor-ruby/issues/5)
|
|
56
94
|
|
|
95
|
+
**Merged pull requests:**
|
|
96
|
+
|
|
97
|
+
- 18n delegate refactoring [\#6](https://github.com/phrase/phraseapp-in-context-editor-ruby/pull/6) ([koljaa](https://github.com/koljaa))
|
|
98
|
+
|
|
57
99
|
## [v1.0.1](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.0.1) (2015-10-07)
|
|
100
|
+
|
|
58
101
|
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/v1.0.0...v1.0.1)
|
|
59
102
|
|
|
60
103
|
**Closed issues:**
|
|
@@ -66,5 +109,8 @@
|
|
|
66
109
|
|
|
67
110
|
## [v1.0.0](https://github.com/phrase/phraseapp-in-context-editor-ruby/tree/v1.0.0) (2015-08-21)
|
|
68
111
|
|
|
112
|
+
[Full Changelog](https://github.com/phrase/phraseapp-in-context-editor-ruby/compare/4a0e284a7acad8529eef882863b226858384b757...v1.0.0)
|
|
113
|
+
|
|
114
|
+
|
|
69
115
|
|
|
70
|
-
\* *This
|
|
116
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phrase In-Context Editor for Ruby #
|
|
2
2
|
|
|
3
|
-
*This Ruby gem is for use with Ruby (Rails, Sinatra) applications only. Check out the [documentation](https://help.
|
|
3
|
+
*This Ruby gem is for use with Ruby (Rails, Sinatra) applications only. Check out the [documentation](https://help.phrase.com/help/translate-directly-on-your-website) to learn how to set up the In-Context Editor with other technologies.*
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Phrase is the translation management solution for web and mobile applications. Collaborate with your team, find professional translators and stay on top of the process.
|
|
8
8
|
|
|
9
|
-
[Try out
|
|
9
|
+
[Try out Phrase for free](https://phrase.com/signup) and start translating your app!
|
|
10
10
|
|
|
11
|
-
*Note: This gem [documentation](https://help.
|
|
11
|
+
*Note: This gem [documentation](https://help.phrase.com/help/translate-directly-on-your-website) to learn how to install the In-Context Editor with other technologies.*
|
|
12
12
|
|
|
13
13
|
## In-Context-Editor ###
|
|
14
14
|
|
|
15
|
-
How awesome would it be if translators could simply browse your website and edit text along the way? Our In-Context Editor offers just that. It provides translators with useful contextual information which improves overall translation quality. See our documentation on how to set it up: [In-Context Editor Setup](https://help.
|
|
15
|
+
How awesome would it be if translators could simply browse your website and edit text along the way? Our In-Context Editor offers just that. It provides translators with useful contextual information which improves overall translation quality. See our documentation on how to set it up: [In-Context Editor Setup](https://help.phrase.com/help/translate-directly-on-your-website).
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
@@ -36,7 +36,7 @@ Next, create the initializer file by executing the Rails generator:
|
|
|
36
36
|
|
|
37
37
|
##### --access-token
|
|
38
38
|
|
|
39
|
-
You can create and manage access tokens in your [profile settings](https://
|
|
39
|
+
You can create and manage access tokens in your [profile settings](https://app.phrase.com/settings/oauth_access_tokens) or via the [Authorizations API](https://developers.phrase.com/api/#authorizations).
|
|
40
40
|
|
|
41
41
|
##### --project-id
|
|
42
42
|
|
|
@@ -48,11 +48,11 @@ Next, add the Javascript helper to your Rails application layout file:
|
|
|
48
48
|
|
|
49
49
|
<%= phraseapp_in_context_editor_js %>
|
|
50
50
|
|
|
51
|
-
If you don't want to use the helper but add the plain Javascript yourself, head over to our [documentation](https://help.
|
|
51
|
+
If you don't want to use the helper but add the plain Javascript yourself, head over to our [documentation](https://help.phrase.com/help/translate-directly-on-your-website) to learn more.
|
|
52
52
|
|
|
53
53
|
### Done!
|
|
54
54
|
|
|
55
|
-
Restart your application to see the In-Context
|
|
55
|
+
Restart your application to see the In-Context Editor in action!
|
|
56
56
|
|
|
57
57
|
### OpenSSL issues
|
|
58
58
|
|
|
@@ -82,11 +82,11 @@ This is **not recommended** and should only be used as a temporary workaround.
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
## Further Information
|
|
85
|
-
* [
|
|
86
|
-
* [Software Translation Management with
|
|
87
|
-
* [Contact us](https://
|
|
85
|
+
* [Phrase Help Center](https://help.phrase.com/)
|
|
86
|
+
* [Software Translation Management with Phrase](https://phrase.com/features)
|
|
87
|
+
* [Contact us](https://phrase.com/contact)
|
|
88
88
|
|
|
89
89
|
## References
|
|
90
|
-
* [
|
|
91
|
-
* [In-Context-Editor Demo](https://
|
|
92
|
-
* [Localization Guides and Software Translation Best Practices](https://
|
|
90
|
+
* [Phrase API Documentation](https://developers.phrase.com/api/)
|
|
91
|
+
* [In-Context-Editor Demo](https://phrase.com/demo)
|
|
92
|
+
* [Localization Guides and Software Translation Best Practices](https://phrase.com/blog/)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
- - :name_project
|
|
3
|
+
- ice-ruby
|
|
4
|
+
- :who: Sven Dunemann
|
|
5
|
+
:why: short name of project
|
|
6
|
+
:versions: []
|
|
7
|
+
:when: 2020-05-07 07:33:57.612101331 Z
|
|
8
|
+
- - :ignore_group
|
|
9
|
+
- development
|
|
10
|
+
- :who:
|
|
11
|
+
:why:
|
|
12
|
+
:versions: []
|
|
13
|
+
:when: 2020-05-28 06:07:17.509402355 Z
|
|
14
|
+
- - :ignore_group
|
|
15
|
+
- test
|
|
16
|
+
- :who:
|
|
17
|
+
:why:
|
|
18
|
+
:versions: []
|
|
19
|
+
:when: 2020-05-28 06:07:22.250180736 Z
|
|
20
|
+
- - :ignore
|
|
21
|
+
- phraseapp-in-context-editor-ruby
|
|
22
|
+
- :who: Sven Dunemann
|
|
23
|
+
:why: Internal phrase library
|
|
24
|
+
:versions: []
|
|
25
|
+
:when: 2020-05-28 06:45:09.434963794 Z
|
|
26
|
+
- - :ignore
|
|
27
|
+
- phraseapp-ruby
|
|
28
|
+
- :who: Sven Dunemann
|
|
29
|
+
:why: Internal phrase library
|
|
30
|
+
:versions: []
|
|
31
|
+
:when: 2020-05-28 06:46:05.492507471 Z
|
|
32
|
+
- - :inherit_from
|
|
33
|
+
- url: https://raw.githubusercontent.com/phrase/lawa/master/config/license-decisions.yml
|
|
34
|
+
authorization: token $GITHUB_TOKEN
|
|
@@ -14,7 +14,27 @@ module PhraseApp
|
|
|
14
14
|
|
|
15
15
|
def translate(*args)
|
|
16
16
|
if to_be_translated_without_phraseapp?(args)
|
|
17
|
-
|
|
17
|
+
# *Ruby 2.7+ keyword arguments warning*
|
|
18
|
+
#
|
|
19
|
+
# This method uses keyword arguments.
|
|
20
|
+
# There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
|
|
21
|
+
# The "hash" parameter must be passed as keyword argument.
|
|
22
|
+
#
|
|
23
|
+
# Good:
|
|
24
|
+
# I18n.t(:salutation, :gender => 'w', :name => 'Smith')
|
|
25
|
+
# I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' })
|
|
26
|
+
# I18n.t(:salutation, **any_hash)
|
|
27
|
+
#
|
|
28
|
+
# Bad:
|
|
29
|
+
# I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
|
|
30
|
+
# I18n.t(:salutation, any_hash)
|
|
31
|
+
#
|
|
32
|
+
kw_args = args[1]
|
|
33
|
+
if kw_args.present?
|
|
34
|
+
I18n.translate_without_phraseapp(args[0], **kw_args)
|
|
35
|
+
else
|
|
36
|
+
I18n.translate_without_phraseapp(args[0])
|
|
37
|
+
end
|
|
18
38
|
else
|
|
19
39
|
phraseapp_delegate_for(args)
|
|
20
40
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phraseapp-in-context-editor-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dynport GmbH
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -170,14 +170,18 @@ executables: []
|
|
|
170
170
|
extensions: []
|
|
171
171
|
extra_rdoc_files: []
|
|
172
172
|
files:
|
|
173
|
+
- ".github/workflows/test.yml"
|
|
173
174
|
- ".gitignore"
|
|
174
|
-
- ".
|
|
175
|
+
- ".package-licenses.yml"
|
|
176
|
+
- ".tool-versions"
|
|
175
177
|
- CHANGELOG.md
|
|
176
178
|
- Gemfile
|
|
177
179
|
- Guardfile
|
|
178
180
|
- LICENSE
|
|
179
181
|
- README.md
|
|
180
182
|
- cacert.pem
|
|
183
|
+
- config/license-decisions.yml
|
|
184
|
+
- config/license_finder.yml
|
|
181
185
|
- lib/generators/phraseapp_in_context_editor/install_generator.rb
|
|
182
186
|
- lib/generators/phraseapp_in_context_editor/templates/README
|
|
183
187
|
- lib/generators/phraseapp_in_context_editor/templates/phraseapp_in_context_editor.rb
|
|
@@ -219,8 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
223
|
- !ruby/object:Gem::Version
|
|
220
224
|
version: 1.3.6
|
|
221
225
|
requirements: []
|
|
222
|
-
|
|
223
|
-
rubygems_version: 2.7.7
|
|
226
|
+
rubygems_version: 3.2.3
|
|
224
227
|
signing_key:
|
|
225
228
|
specification_version: 4
|
|
226
229
|
summary: Translation management solution for web and mobile applications
|