i18n_proofreading 0.12.0 → 0.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dd116667dbbc3243bc9eb5ae929db378fd60d6354dc9101cde3c137474272dd
4
- data.tar.gz: 67cb971e8e0d957f9ce6ccd6e3a39f102242588e7e6599945267423b7a32c0ba
3
+ metadata.gz: 22fd6bf49d89c237346f9d8a2a5bc10314e0eab0fd8401dcca45dd96278ca62b
4
+ data.tar.gz: ba87b38138192aa1d850203839268109f1fc916c3e12160aa439f703f943336a
5
5
  SHA512:
6
- metadata.gz: dd83ae4d457202c63398da204778301533d78c575426591eb4c28acc58a299beab35ccbea8861a468688af0ea09e9a7c67053d299fe0174080377e58ada84b8c
7
- data.tar.gz: e88607a7ebc036f1be84553bd88d995b99ca548992ed9e88d519f0f2497759d48933ce7520eed72524d0c804998c15a0d95aaec88384f7447ce94a44fcac6ee6
6
+ metadata.gz: 9d22947ee3ec8bb759537acbdee15e0d1520427f948499cd1cdc9af43eb4b0cf82ca30f35c562d02c4e0bada7813f8215a6ca071ecdb393563b7fca22581177e
7
+ data.tar.gz: d71f01a6a53c301f5f15453bdcdc8015ffefedcbd442c08ae0638301591496545776f2c98b424d68ad1b7777f5ea7f682b01c5de83bcba5e60e7a7fab0112d74
data/AGENTS.md CHANGED
@@ -151,6 +151,6 @@ Conventions this codebase holds to — follow them rather than the first thing t
151
151
  - **The tool never writes to the host's locale files.** That is why there is deliberately no update or destroy route, and why the dashboard is read-only. Do not add an "apply" action that edits YAML.
152
152
  - **The widget is injected by middleware and served same-origin**, which is what keeps it working under a nonce-based CSP with `strict-dynamic` across Turbo body swaps. Do not inline it.
153
153
  - **Key marking must degrade to plain strings.** A host that reads translations outside a request, or in an environment where the tool is off, has to get ordinary values back.
154
- - **`lib/i18n_proofreading/dashboard.css` is half shared.** Everything above the `GEM-SPECIFIC` banner is the design system all five gems in the family ship — the same tokens, the same `.page-head`/`.tabs`/`.filters`/`.card`/`.badge`/`button`, the same `.dashboard-shell` + `.record-row` + `.detail-panel` two-pane dashboard — identical in every repo apart from the `ip` prefix. Diff it against a sibling before changing it, and carry the change to the other four. Anything only this gem has goes below the banner. New dashboard markup reuses the shared class names rather than inventing a domain-specific one.
154
+ - **`lib/i18n_proofreading/dashboard.css` is half shared.** Everything above the `GEM-SPECIFIC` banner is the design system all five gems in the family ship — the same tokens, the same `.page-head`/`.tabs`/`.filters`/`.card`/`.badge`/`button`/`.status-switch`, the same `.dashboard-shell` + `.record-row` + `.detail-panel` two-pane dashboard — identical in every repo apart from the `ip` prefix. Diff it against a sibling before changing it, and carry the change to the other four. Anything only this gem has goes below the banner. New dashboard markup reuses the shared class names rather than inventing a domain-specific one.
155
155
  - Every user-facing change bumps `lib/i18n_proofreading/version.rb` and adds a `CHANGELOG.md` entry (Keep a Changelog format) that says what it costs, not only what it adds.
156
156
  - Commit messages are prose that explains the tradeoff — read `git log` before writing one.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.1
4
+
5
+ - **The demo suggestions now teach the review contract.** Pending explains the
6
+ inbox decision, applied makes clear that a human edited and committed the
7
+ locale file, and rejected demonstrates a proposal that changes meaning. The
8
+ seed is now a compact tutorial for the gem's deliberately read-only role.
9
+ - `i18n_proofreading:seed_demo` updates its existing demo suggestions in place,
10
+ so rerunning it overwrites edits to those gem-owned rows. Host locale files
11
+ and non-demo suggestions remain untouched.
12
+
3
13
  ## 0.12.0
4
14
 
5
15
  - **One design system across the family.** The stylesheet now opens with a
@@ -144,6 +144,19 @@
144
144
  & .actions form { display: inline; }
145
145
  & .form-actions { padding-top: 12px; }
146
146
 
147
+ /* Status switch: one pill holding every state a record can be in, the state it
148
+ is in now lit. Each other segment is a submit button, so moving a record
149
+ takes one click and no JavaScript; the current segment is a `type="button"`
150
+ so clicking it cannot re-file the record it is already filed under. Two
151
+ states or five, the pill sizes itself. A gem tints the lit segment with its
152
+ own status colour — see the `GEM-SPECIFIC` section. */
153
+ & .status-switch { display: inline-flex; flex: 0 0 auto; margin: 0; padding: 3px; border: 1px solid var(--ip-border); border-radius: 999px; background: var(--ip-bg); }
154
+ & .status-switch button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ip-muted); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .16s ease, color .16s ease; }
155
+ & .status-switch button:hover { border: 0; background: color-mix(in srgb, var(--ip-muted) 12%, transparent); color: var(--ip-text); }
156
+ & .status-switch button.current { background: var(--ip-surface); color: var(--ip-text); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); cursor: default; }
157
+ & .status-switch button.current:hover { background: var(--ip-surface); }
158
+ & .panel-head .status-switch { margin-left: auto; }
159
+
147
160
  & .card { overflow: hidden; border: 1px solid var(--ip-border); border-radius: 12px; background: var(--ip-surface); }
148
161
  & .card.pad { padding: 16px; overflow: visible; }
149
162
  & table { width: 100%; border-collapse: collapse; }
@@ -266,6 +279,7 @@
266
279
  & .dashboard-detail .detail-panel { min-height: calc(100vh - 64px); }
267
280
  & .mobile-back { display: block; flex: 0 0 auto; margin: 4px 0 10px; font-size: 13px; }
268
281
  & .panel-head h1 { font-size: 18px; }
282
+ & .status-switch button { padding: 0 9px; font-size: 12px; }
269
283
  & dl { grid-template-columns: 1fr; gap: 3px; }
270
284
  & dd { margin-bottom: 8px; }
271
285
  }
@@ -7,34 +7,37 @@ module I18nProofreading
7
7
  translation_key: 'dashboard.title',
8
8
  locale: 'en',
9
9
  old_value: 'Dashboard',
10
- proposed_value: 'Overview',
11
- comment: 'Shorter and clearer for the first screen.',
10
+ proposed_value: 'Product overview',
11
+ comment: 'Start here: pending suggestions are the review inbox. Compare the rendered wording and ' \
12
+ 'page context, then decide whether the proposed copy belongs in your locale file.',
12
13
  page_url: '/dashboard',
13
14
  status: 'pending',
14
15
  author_id: 'i18n-proofreading-demo:reviewer',
15
- author_label: 'Demo Reviewer'
16
+ author_label: 'Demo reviewer · needs a decision'
16
17
  },
17
18
  {
18
19
  translation_key: 'billing.cta',
19
20
  locale: 'en',
20
21
  old_value: 'Go',
21
22
  proposed_value: 'Update billing details',
22
- comment: 'The button should say what will happen.',
23
+ comment: 'Applied is bookkeeping, not automation: a maintainer copied this clearer call to action ' \
24
+ 'into config/locales and committed the change. The gem never edits YAML for you.',
23
25
  page_url: '/billing',
24
26
  status: 'applied',
25
27
  author_id: 'i18n-proofreading-demo:copywriter',
26
- author_label: 'Demo Copywriter'
28
+ author_label: 'Demo copywriter · applied by a human'
27
29
  },
28
30
  {
29
31
  translation_key: 'settings.cancel',
30
32
  locale: 'fr',
31
33
  old_value: 'Annuler',
32
34
  proposed_value: 'Supprimer le compte',
33
- comment: 'Rejected example: this changes the meaning.',
35
+ comment: 'Rejected on purpose: the proposal means “Delete the account,” not “Cancel.” The original ' \
36
+ 'translation stays the source of truth, and the rejected row preserves the review decision.',
34
37
  page_url: '/settings',
35
38
  status: 'rejected',
36
39
  author_id: 'i18n-proofreading-demo:reviewer',
37
- author_label: 'Demo Reviewer'
40
+ author_label: 'Demo reviewer · meaning changed'
38
41
  }
39
42
  ].freeze
40
43
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module I18nProofreading
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
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.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubygems_version: 3.6.9
119
+ rubygems_version: 4.0.10
120
120
  specification_version: 4
121
121
  summary: 'In-context i18n proofreading for Rails: click any translated string and
122
122
  suggest a fix.'