i18n_proofreading 0.11.0 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b4d3167c04697942a2b695b1f4b81554a4f12daabc6a8d730b0d4374bb31292
4
- data.tar.gz: 95f184235ea7319ebdd254592924c25f8503ac0fee7943282cd939478d037a54
3
+ metadata.gz: 8e9d17368f6e109aead2f03480cb2d555990bfd6afb785dc312fa31454616ed5
4
+ data.tar.gz: 0a852161c35f521673552b57f276be7114ae632db34de8e93ef52fb9f82316d7
5
5
  SHA512:
6
- metadata.gz: 564ff0282d7ba45a0ef399c82ff6b287dfe54108512aa91356769a6e652fa66875bb3a04c195aed57bce3507eabf50a0d7505ec386ebbe34ed0186e7c8ff065f
7
- data.tar.gz: de5b07512272838e8f15483978cb536d0f4ae55e33fe6c5f17d1d3d7b4b5430badf6bfc54c96a01f37802976565afc287c78f5ccc3d40924e41f7e54137fae7e
6
+ metadata.gz: d0cd1d52b6029883d82f6192d01b085434c75e12ce5871fa9a392f666708a0da85a5c5175730236c396c58e3374316bf62d1ef0cb32e873ba4ca4fc0fa550f34
7
+ data.tar.gz: c6659015e20abc92641ffdc373cbc8aafbdc732179045d1a26426f9ff83296a5e934f1270e0af56e230ba74b740b139717dcb8565d7f2ebe7b032d4fcb7e2591
data/AGENTS.md CHANGED
@@ -102,6 +102,7 @@ Everything is optional; a fresh install works with zero config in development. F
102
102
  | `enabled_environments` | `%w[development staging]` | The hard gate. Never add production |
103
103
  | `enabled` | everyone | Per-request gate on top of the environment check |
104
104
  | `authorize_admin` | development only | **Who can read the dashboard.** Independent of the above |
105
+ | `base_controller_class` | `ActionController::Base` | Controller the dashboard inherits. Name your admin's and it adopts that layout, helpers, authentication and request context. Public endpoints never inherit it. |
105
106
  | `admin_layout` | `i18n_proofreading/application` | Render the dashboard in your admin shell |
106
107
  | `current_user` | `nil` | Receives the request |
107
108
  | `author_label` | email, else `to_s` | Receives the user |
@@ -119,6 +120,7 @@ The tool's own UI ships in 26 languages, RTL mirrored, and follows system light/
119
120
 
120
121
  | Symptom | Cause |
121
122
  | --- | --- |
123
+ | `NameError` for one of your own helpers in the dashboard | `isolate_namespace` scopes `helper` to the engine. Use `config.base_controller_class` so the dashboard inherits your helpers, rather than `admin_layout` alone. |
122
124
  | No pill, no outlines | The environment is not in `enabled_environments` (this is the usual one), or `config.enabled` returned false, or `show_pill = false` |
123
125
  | Pill appears but no strings are outlined | The I18n backend patch is only prepended in an enabled environment at boot — check you are actually in development/staging, and restart after changing the setting |
124
126
  | `/i18n_proofreading` returns a 403 | `authorize_admin` still at its development-only default |
@@ -129,6 +131,10 @@ The tool's own UI ships in 26 languages, RTL mirrored, and follows system light/
129
131
 
130
132
  ---
131
133
 
134
+ ## One family
135
+
136
+ `testimonials`, `ideasbugs`, `livechat`, `product_tours` are the sibling engines. Same install shape, same host hooks (`base_controller_class`, `admin_layout`), same scoped dashboard CSS, same `primary_key_type`-aware migrations — so what you learn here transfers.
137
+
132
138
  ## Working on the gem itself
133
139
 
134
140
  ```bash
data/README.md CHANGED
@@ -306,6 +306,25 @@ Tests run against a dummy Rails app in `test/dummy`.
306
306
  feature requests.
307
307
  - [SupeRails](https://superails.com) — Rails screencasts.
308
308
 
309
+ ## One family
310
+
311
+ Five Rails engines built on the same backbone, so adopting a second one is
312
+ mostly muscle memory:
313
+
314
+ | Gem | What it does |
315
+ | --- | --- |
316
+ | [testimonials](https://github.com/yshmarov/testimonials) | Testimonials, reviews and NPS — text and video, collected in your own app |
317
+ | [ideasbugs](https://github.com/yshmarov/ideasbugs) | In-app bug reports and feature requests, with a triage queue |
318
+ | [livechat](https://github.com/yshmarov/livechat) | Live chat between your visitors and your agents, self-hosted |
319
+ | [product_tours](https://github.com/yshmarov/product_tours) | Product tours and video tutorials, shown in-app at the right moment |
320
+ | **i18n_proofreading** *(this gem)* | In-context translation fixes suggested by your own users |
321
+
322
+ They share the install shape (`generate <gem>:install`, mount, one initializer),
323
+ the same host hooks (`base_controller_class` to inherit your admin's controller,
324
+ `admin_layout` for just the shell), a dashboard stylesheet scoped so it
325
+ cannot touch your own CSS, and migrations that follow your app's
326
+ `primary_key_type`.
327
+
309
328
  ## License
310
329
 
311
330
  MIT.
@@ -62,15 +62,12 @@
62
62
  }
63
63
  }
64
64
 
65
- /* Page frame — the gem's own layout only. */
66
- .ip-page { margin: 0; background: var(--ip-bg); color: var(--ip-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
67
- .ip-index { overflow: hidden; }
68
- .ip-index .container { max-width: 1280px; display: flex; flex-direction: column; padding-bottom: 16px; }
69
- .ip-index header.page { flex: 0 0 auto; margin-bottom: 14px; }
70
- .ip-show .detail-scroll { overflow: visible; }
71
-
72
65
  /* Dashboard components — any layout. */
73
66
  .ip-dashboard {
67
+ /* A scoping device, not a layout one: without this the wrapper would
68
+ become the flex/grid child that the content should be. */
69
+ display: contents;
70
+
74
71
  & * { box-sizing: border-box; }
75
72
  & a { color: var(--ip-accent); text-decoration: none; }
76
73
  & a:hover { text-decoration: underline; }
@@ -118,10 +115,6 @@
118
115
  & .meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
119
116
  & .meta-list dt { color: var(--ip-muted); font-size: 13px; }
120
117
  & .meta-list dd { margin: 0; overflow-wrap: anywhere; }
121
- & /* Desktop review: queue on the left,
122
- & selected suggestion on the right. */
123
- .ip-index,
124
- & .ip-index .container { height: 100vh; height: 100dvh; }
125
118
  & .review-shell { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(330px, 430px) 1fr; gap: 16px; }
126
119
  & .review-sidebar { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--ip-surface); border: 1px solid var(--ip-border); border-radius: 8px; overflow: hidden; }
127
120
  & .review-sidebar .tabs { flex: 0 0 auto; margin: 12px 12px 0; padding: 0; background: transparent; border: 0; border-radius: 0; gap: 6px; flex-wrap: nowrap; }
@@ -153,6 +146,16 @@
153
146
  & .empty-state h2 { margin: 0 0 6px; font-size: 18px; }
154
147
  & .empty-state p { margin: 0; }
155
148
  & .mobile-back { display: none; }
156
- & /* Standalone show pages keep normal page scrolling. */
157
- .ip-show { min-height: 100vh; overflow: auto; }
158
149
  }
150
+
151
+ /* Page frame — the gem's own layout only. Last, so it wins the
152
+ specificity ties against the component layer above. */
153
+ .ip-page { margin: 0; background: var(--ip-bg); color: var(--ip-text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
154
+ /* Desktop review: queue on the left, selected suggestion on the right. */
155
+ .ip-index, .ip-index .container { height: 100vh; height: 100dvh; }
156
+ .ip-index { overflow: hidden; }
157
+ .ip-index .container { max-width: 1280px; display: flex; flex-direction: column; padding-bottom: 16px; }
158
+ .ip-index header.page { flex: 0 0 auto; margin-bottom: 14px; }
159
+ /* Standalone show pages keep normal page scrolling. */
160
+ .ip-show { min-height: 100vh; overflow: auto; }
161
+ .ip-show .detail-scroll { overflow: visible; }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module I18nProofreading
4
- VERSION = '0.11.0'
4
+ VERSION = '0.11.2'
5
5
  end
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.11.0
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov