i18n_proofreading 0.9.0 → 0.9.2
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/CHANGELOG.md +18 -0
- data/README.md +3 -3
- data/Rakefile +11 -1
- data/lib/i18n_proofreading/version.rb +1 -1
- data/lib/i18n_proofreading/widget.js +16 -0
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 442bbc0db3a43634199ae4ad02e0b4c93bfe4b0278f5c4bf4236793acfd9006d
|
|
4
|
+
data.tar.gz: b5adfadeac507e64888ea36412173daec3ec8b8b0067fe1c056de8b1c328c5b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad016e5b43be45f388e0f0c11956dbcfaed05d2702f1765d598a2c29e4ee2af8a539bb853c8d8ef8d0dd0121273c64e64353611b8acb494348d10e24188aa5d4
|
|
7
|
+
data.tar.gz: '08506d993c5b691a33ab9dc327fc2ca84814723cd289bf014ff164181f4fa85d882901286ccc0816aa26363aba371893090ee4024845cb7e0431c57bb2483dd4'
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.2]
|
|
6
|
+
|
|
7
|
+
- Make the suggestion popover **full-screen on mobile** (≤ 480px wide): edge to
|
|
8
|
+
edge with no rounded corners, instead of a floating dialog — no bottom sheet
|
|
9
|
+
and no animation. The widget's inputs render at 16px on small screens so iOS
|
|
10
|
+
Safari no longer zooms the page when one gains focus, the action row pads
|
|
11
|
+
itself past the iPhone home indicator (`env(safe-area-inset-bottom)`), and the
|
|
12
|
+
panel's scrolling is contained (`overscroll-behavior`) so reaching its end
|
|
13
|
+
never scrolls the page behind it. CSS only; desktop is unchanged.
|
|
14
|
+
|
|
15
|
+
## [0.9.1]
|
|
16
|
+
|
|
17
|
+
- Add Minitest **system tests** that drive the widget in headless Chrome
|
|
18
|
+
(Capybara + Selenium): entering suggest mode, marker stripping, opening the
|
|
19
|
+
popover, submitting a suggestion, and Escape to exit. Run with
|
|
20
|
+
`rake test:system`; `rake test` stays browser-free. Dev/test only — no runtime
|
|
21
|
+
change and no new runtime dependencies.
|
|
22
|
+
|
|
5
23
|
## [0.9.0]
|
|
6
24
|
|
|
7
25
|
- **Renamed the gem `i18n_feedback` → `i18n_proofreading`.** The name now says
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/i18n_proofreading)
|
|
4
4
|
[](https://rubygems.org/gems/i18n_proofreading)
|
|
5
|
-
[](https://github.com/yshmarov/i18n_proofreading/actions/workflows/ci.yml)
|
|
6
6
|
[](MIT-LICENSE)
|
|
7
7
|
|
|
8
8
|
In-context translation proofreading for Rails.
|
|
@@ -14,9 +14,9 @@ It is meant for development and staging, never production.
|
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
<video src="https://github.com/yshmarov/
|
|
17
|
+
<video src="https://github.com/yshmarov/i18n_proofreading/raw/main/i18n-proofreading-demo-640-high.mp4" controls muted playsinline width="640">
|
|
18
18
|
Your browser can't play this video —
|
|
19
|
-
<a href="https://github.com/yshmarov/
|
|
19
|
+
<a href="https://github.com/yshmarov/i18n_proofreading/raw/main/i18n-proofreading-demo-640-high.mp4">download it here</a>.
|
|
20
20
|
</video>
|
|
21
21
|
|
|
22
22
|
- **Zero UI dependencies.** The widget is plain JavaScript and styles itself. No
|
data/Rakefile
CHANGED
|
@@ -6,9 +6,19 @@ require 'bundler/setup'
|
|
|
6
6
|
require 'bundler/gem_tasks'
|
|
7
7
|
|
|
8
8
|
require 'rake/testtask'
|
|
9
|
+
|
|
10
|
+
# Unit/integration tests — no browser, runs on every Ruby x Rails combo.
|
|
9
11
|
Rake::TestTask.new(:test) do |t|
|
|
10
12
|
t.libs << 'test'
|
|
11
|
-
t.
|
|
13
|
+
t.test_files = FileList['test/**/*_test.rb'].exclude('test/system/**/*')
|
|
14
|
+
t.warning = false
|
|
15
|
+
t.verbose = false
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# System tests — drive the widget in headless Chrome (needs a browser).
|
|
19
|
+
Rake::TestTask.new('test:system') do |t|
|
|
20
|
+
t.libs << 'test'
|
|
21
|
+
t.test_files = FileList['test/system/**/*_test.rb']
|
|
12
22
|
t.warning = false
|
|
13
23
|
t.verbose = false
|
|
14
24
|
end
|
|
@@ -394,6 +394,7 @@
|
|
|
394
394
|
" align-items: center; justify-content: center; padding: 16px;",
|
|
395
395
|
" background: rgba(0,0,0,.45); cursor: default; }",
|
|
396
396
|
".i18np-panel { width: 28rem; max-width: 100%; max-height: 90vh; overflow: auto;",
|
|
397
|
+
" overscroll-behavior: contain;",
|
|
397
398
|
" background: #fff; color: #111; border-radius: 12px; padding: 20px;",
|
|
398
399
|
" box-shadow: 0 20px 60px rgba(0,0,0,.35); font: 14px/1.5 system-ui, sans-serif; }",
|
|
399
400
|
".i18np-panel > * + * { margin-top: 14px; }",
|
|
@@ -437,6 +438,21 @@
|
|
|
437
438
|
" .i18np-error { color: #f87171; }",
|
|
438
439
|
" .i18np-btn-ghost { color: #f4f4f5; }",
|
|
439
440
|
"}",
|
|
441
|
+
|
|
442
|
+
// Full-screen popover on small screens — no bottom sheet, no animation.
|
|
443
|
+
// Selectors are at least as specific as the base rules and this block
|
|
444
|
+
// comes last, so the mobile values win.
|
|
445
|
+
"@media (max-width: 480px) {",
|
|
446
|
+
" .i18np-overlay { padding: 0; }",
|
|
447
|
+
" .i18np-overlay .i18np-panel { position: fixed; top: 0; right: 0; bottom: 0; left: 0;",
|
|
448
|
+
" width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }",
|
|
449
|
+
// 16px inputs stop iOS Safari from zooming the page on focus.
|
|
450
|
+
" .i18np-panel input.i18np-input, .i18np-panel textarea.i18np-input,",
|
|
451
|
+
" .i18np-panel select { font-size: 16px; }",
|
|
452
|
+
// Keep the action row clear of the iPhone home indicator (its own
|
|
453
|
+
// padding-bottom is 0; the panel padding sits outside the row).
|
|
454
|
+
" .i18np-panel .i18np-actions { padding-bottom: calc(0px + env(safe-area-inset-bottom)); }",
|
|
455
|
+
"}",
|
|
440
456
|
].join("\n");
|
|
441
457
|
document.head.appendChild(style);
|
|
442
458
|
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: i18n_proofreading
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yaroslav Shmarov
|
|
@@ -83,12 +83,12 @@ files:
|
|
|
83
83
|
- lib/i18n_proofreading/version.rb
|
|
84
84
|
- lib/i18n_proofreading/widget.js
|
|
85
85
|
- lib/i18n_proofreading/widget.rb
|
|
86
|
-
homepage: https://github.com/yshmarov/
|
|
86
|
+
homepage: https://github.com/yshmarov/i18n_proofreading
|
|
87
87
|
licenses:
|
|
88
88
|
- MIT
|
|
89
89
|
metadata:
|
|
90
|
-
source_code_uri: https://github.com/yshmarov/
|
|
91
|
-
changelog_uri: https://github.com/yshmarov/
|
|
90
|
+
source_code_uri: https://github.com/yshmarov/i18n_proofreading
|
|
91
|
+
changelog_uri: https://github.com/yshmarov/i18n_proofreading/blob/main/CHANGELOG.md
|
|
92
92
|
rubygems_mfa_required: 'true'
|
|
93
93
|
rdoc_options: []
|
|
94
94
|
require_paths:
|
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
104
104
|
- !ruby/object:Gem::Version
|
|
105
105
|
version: '0'
|
|
106
106
|
requirements: []
|
|
107
|
-
rubygems_version:
|
|
107
|
+
rubygems_version: 3.6.9
|
|
108
108
|
specification_version: 4
|
|
109
109
|
summary: 'In-context i18n proofreading for Rails: click any translated string and
|
|
110
110
|
suggest a fix.'
|