i18n_feedback 0.5.0 → 0.6.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/CHANGELOG.md +16 -0
- data/README.md +13 -7
- data/config/locales/i18n_feedback.ar.yml +3 -1
- data/config/locales/i18n_feedback.bn.yml +3 -1
- data/config/locales/i18n_feedback.de.yml +3 -1
- data/config/locales/i18n_feedback.en.yml +3 -1
- data/config/locales/i18n_feedback.es.yml +3 -1
- data/config/locales/i18n_feedback.fr.yml +3 -1
- data/config/locales/i18n_feedback.hi.yml +3 -1
- data/config/locales/i18n_feedback.id.yml +3 -1
- data/config/locales/i18n_feedback.it.yml +3 -1
- data/config/locales/i18n_feedback.ja.yml +3 -1
- data/config/locales/i18n_feedback.ko.yml +3 -1
- data/config/locales/i18n_feedback.nl.yml +3 -1
- data/config/locales/i18n_feedback.pl.yml +3 -1
- data/config/locales/i18n_feedback.pt.yml +3 -1
- data/config/locales/i18n_feedback.ru.yml +3 -1
- data/config/locales/i18n_feedback.th.yml +3 -1
- data/config/locales/i18n_feedback.tr.yml +3 -1
- data/config/locales/i18n_feedback.uk.yml +3 -1
- data/config/locales/i18n_feedback.ur.yml +3 -1
- data/config/locales/i18n_feedback.vi.yml +3 -1
- data/config/locales/i18n_feedback.zh-CN.yml +3 -1
- data/lib/generators/i18n_feedback/install/templates/initializer.rb +5 -0
- data/lib/i18n_feedback/version.rb +1 -1
- data/lib/i18n_feedback/widget.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95496ac9d8c8e5d87d38993e013ba581335400684f92821e3dccc8831bb538ce
|
|
4
|
+
data.tar.gz: b9af30cbad39249662fc3eb93f182e5462f34a03db4e5f29da1507a220df45ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 185359bb72c672baefee3f014bf16f234aa090ba3cd67fccce8a5653fb5e68c8e660efb3611c53b9d17db68c29c9224c345db03edb9669707a41b39b32830267
|
|
7
|
+
data.tar.gz: 6a667109731c48369071b900a4d723a42a03896659bc89b31e77175e93a8263fbafab01e507b10532c22ebda2ed6fe0dc23eafe83017c647dc8ca628ff8b0763
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.6.1]
|
|
6
|
+
|
|
7
|
+
- Shorten the active-pill label from "Suggesting — tap to exit (Esc)" to
|
|
8
|
+
"Stop suggesting (Esc)" across all bundled languages.
|
|
9
|
+
- Release workflow: skip the flaky post-publish propagation probe
|
|
10
|
+
(`await-release: false`) so a successful push no longer fails the job.
|
|
11
|
+
|
|
12
|
+
## [0.6.0]
|
|
13
|
+
|
|
14
|
+
- Ship `i18n_feedback.start` / `i18n_feedback.stop` labels in every bundled
|
|
15
|
+
language, for hosts that drive suggest mode from their own menu/link instead
|
|
16
|
+
of the floating pill. Because the `i18n_feedback.*` scope is exempt from
|
|
17
|
+
key-marking, these are safe to render with `t(...)` — no plain-literal
|
|
18
|
+
workaround needed. See the "Toggling suggest mode from your own link" README
|
|
19
|
+
section for a full HTML example.
|
|
20
|
+
|
|
5
21
|
## [0.5.0]
|
|
6
22
|
|
|
7
23
|
- Add a `status` to each suggestion — a string-backed Active Record enum with
|
data/README.md
CHANGED
|
@@ -136,16 +136,20 @@ config.show_pill = false # optional
|
|
|
136
136
|
A one-way "turn it on" link is just the toggle parameter:
|
|
137
137
|
|
|
138
138
|
```erb
|
|
139
|
-
<%= link_to "
|
|
139
|
+
<%= link_to t("i18n_feedback.start"), "?i18n_feedback=true" %>
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
For a single control that flips both ways, read the current state from the
|
|
143
|
-
`i18n_feedback` cookie and point at the opposite state
|
|
143
|
+
`i18n_feedback` cookie and point at the opposite state. The gem ships `start`
|
|
144
|
+
and `stop` labels under the `i18n_feedback.*` scope in every bundled language,
|
|
145
|
+
so a localized toggle needs no keys of your own:
|
|
144
146
|
|
|
145
147
|
```erb
|
|
146
|
-
<%
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
<% if I18nFeedback.available?(request) %>
|
|
149
|
+
<% suggesting = cookies[:i18n_feedback].present? %>
|
|
150
|
+
<%= link_to (suggesting ? t("i18n_feedback.stop") : t("i18n_feedback.start")),
|
|
151
|
+
"?#{I18nFeedback.config.toggle_param}=#{!suggesting}" %>
|
|
152
|
+
<% end %>
|
|
149
153
|
```
|
|
150
154
|
|
|
151
155
|
Good to know:
|
|
@@ -158,8 +162,10 @@ Good to know:
|
|
|
158
162
|
ordinary navigation during proofreading (so a stray click can't leave the page
|
|
159
163
|
mid-edit), but any link carrying the toggle parameter is exempt — so a "Disable"
|
|
160
164
|
item in your nav always gets you out.
|
|
161
|
-
- **
|
|
162
|
-
|
|
165
|
+
- The `i18n_feedback.*` keys are **safe to run through `I18n.t`** — that scope is
|
|
166
|
+
exempt from key-marking, so the tool never flags its own controls as editable.
|
|
167
|
+
Use the bundled `i18n_feedback.start` / `i18n_feedback.stop` labels (or your own
|
|
168
|
+
keys); either way, no plain-literal workaround is needed.
|
|
163
169
|
|
|
164
170
|
### Gating examples
|
|
165
171
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
ar:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "اقترح تعديلات"
|
|
4
|
-
|
|
4
|
+
start: "اقترح تعديلات"
|
|
5
|
+
stop: "إيقاف الاقتراح"
|
|
6
|
+
pill_active: "إيقاف الاقتراح (Esc)"
|
|
5
7
|
title: "اقترح تصحيحًا للترجمة"
|
|
6
8
|
current_text: "النص الحالي"
|
|
7
9
|
suggested_text: "النص المقترح"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
bn:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "সম্পাদনা প্রস্তাব করুন"
|
|
4
|
-
|
|
4
|
+
start: "সম্পাদনা প্রস্তাব করুন"
|
|
5
|
+
stop: "প্রস্তাব দেওয়া বন্ধ করুন"
|
|
6
|
+
pill_active: "প্রস্তাব দেওয়া বন্ধ করুন (Esc)"
|
|
5
7
|
title: "অনুবাদ সংশোধন প্রস্তাব করুন"
|
|
6
8
|
current_text: "বর্তমান লেখা"
|
|
7
9
|
suggested_text: "প্রস্তাবিত লেখা"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
de:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Änderungen vorschlagen"
|
|
4
|
-
|
|
4
|
+
start: "Änderungen vorschlagen"
|
|
5
|
+
stop: "Vorschläge beenden"
|
|
6
|
+
pill_active: "Vorschläge beenden (Esc)"
|
|
5
7
|
title: "Übersetzungskorrektur vorschlagen"
|
|
6
8
|
current_text: "Aktueller Text"
|
|
7
9
|
suggested_text: "Vorgeschlagener Text"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
en:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Suggest edits"
|
|
4
|
-
|
|
4
|
+
start: "Suggest edits"
|
|
5
|
+
stop: "Stop suggesting"
|
|
6
|
+
pill_active: "Stop suggesting (Esc)"
|
|
5
7
|
title: "Suggest a translation fix"
|
|
6
8
|
current_text: "Current text"
|
|
7
9
|
suggested_text: "Suggested text"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
es:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Sugerir cambios"
|
|
4
|
-
|
|
4
|
+
start: "Sugerir cambios"
|
|
5
|
+
stop: "Dejar de sugerir"
|
|
6
|
+
pill_active: "Dejar de sugerir (Esc)"
|
|
5
7
|
title: "Sugerir una corrección de traducción"
|
|
6
8
|
current_text: "Texto actual"
|
|
7
9
|
suggested_text: "Texto sugerido"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
fr:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Proposer des corrections"
|
|
4
|
-
|
|
4
|
+
start: "Proposer des corrections"
|
|
5
|
+
stop: "Arrêter de proposer"
|
|
6
|
+
pill_active: "Arrêter de proposer (Échap)"
|
|
5
7
|
title: "Proposer une correction de traduction"
|
|
6
8
|
current_text: "Texte actuel"
|
|
7
9
|
suggested_text: "Texte proposé"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
hi:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "बदलाव सुझाएँ"
|
|
4
|
-
|
|
4
|
+
start: "बदलाव सुझाएँ"
|
|
5
|
+
stop: "सुझाव देना बंद करें"
|
|
6
|
+
pill_active: "सुझाव देना बंद करें (Esc)"
|
|
5
7
|
title: "अनुवाद सुधार सुझाएँ"
|
|
6
8
|
current_text: "वर्तमान टेक्स्ट"
|
|
7
9
|
suggested_text: "सुझाया गया टेक्स्ट"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
id:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Sarankan perubahan"
|
|
4
|
-
|
|
4
|
+
start: "Sarankan perubahan"
|
|
5
|
+
stop: "Berhenti menyarankan"
|
|
6
|
+
pill_active: "Berhenti menyarankan (Esc)"
|
|
5
7
|
title: "Sarankan perbaikan terjemahan"
|
|
6
8
|
current_text: "Teks saat ini"
|
|
7
9
|
suggested_text: "Teks yang disarankan"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
it:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Suggerisci modifiche"
|
|
4
|
-
|
|
4
|
+
start: "Suggerisci modifiche"
|
|
5
|
+
stop: "Interrompi i suggerimenti"
|
|
6
|
+
pill_active: "Interrompi i suggerimenti (Esc)"
|
|
5
7
|
title: "Suggerisci una correzione di traduzione"
|
|
6
8
|
current_text: "Testo attuale"
|
|
7
9
|
suggested_text: "Testo suggerito"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
nl:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Wijzigingen voorstellen"
|
|
4
|
-
|
|
4
|
+
start: "Wijzigingen voorstellen"
|
|
5
|
+
stop: "Stoppen met voorstellen"
|
|
6
|
+
pill_active: "Stoppen met voorstellen (Esc)"
|
|
5
7
|
title: "Een vertaalcorrectie voorstellen"
|
|
6
8
|
current_text: "Huidige tekst"
|
|
7
9
|
suggested_text: "Voorgestelde tekst"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
pl:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Zaproponuj zmiany"
|
|
4
|
-
|
|
4
|
+
start: "Zaproponuj zmiany"
|
|
5
|
+
stop: "Zakończ sugerowanie"
|
|
6
|
+
pill_active: "Zakończ sugerowanie (Esc)"
|
|
5
7
|
title: "Zaproponuj poprawkę tłumaczenia"
|
|
6
8
|
current_text: "Bieżący tekst"
|
|
7
9
|
suggested_text: "Proponowany tekst"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
pt:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Sugerir edições"
|
|
4
|
-
|
|
4
|
+
start: "Sugerir edições"
|
|
5
|
+
stop: "Parar de sugerir"
|
|
6
|
+
pill_active: "Parar de sugerir (Esc)"
|
|
5
7
|
title: "Sugerir uma correção de tradução"
|
|
6
8
|
current_text: "Texto atual"
|
|
7
9
|
suggested_text: "Texto sugerido"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
ru:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Предложить правки"
|
|
4
|
-
|
|
4
|
+
start: "Предложить правки"
|
|
5
|
+
stop: "Остановить предложения"
|
|
6
|
+
pill_active: "Остановить предложения (Esc)"
|
|
5
7
|
title: "Предложить исправление перевода"
|
|
6
8
|
current_text: "Текущий текст"
|
|
7
9
|
suggested_text: "Предлагаемый текст"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
th:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "แนะนำการแก้ไข"
|
|
4
|
-
|
|
4
|
+
start: "แนะนำการแก้ไข"
|
|
5
|
+
stop: "หยุดแนะนำ"
|
|
6
|
+
pill_active: "หยุดแนะนำ (Esc)"
|
|
5
7
|
title: "แนะนำการแก้ไขคำแปล"
|
|
6
8
|
current_text: "ข้อความปัจจุบัน"
|
|
7
9
|
suggested_text: "ข้อความที่แนะนำ"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
tr:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Düzenleme öner"
|
|
4
|
-
|
|
4
|
+
start: "Düzenleme öner"
|
|
5
|
+
stop: "Önermeyi durdur"
|
|
6
|
+
pill_active: "Önermeyi durdur (Esc)"
|
|
5
7
|
title: "Çeviri düzeltmesi öner"
|
|
6
8
|
current_text: "Mevcut metin"
|
|
7
9
|
suggested_text: "Önerilen metin"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
uk:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Запропонувати зміни"
|
|
4
|
-
|
|
4
|
+
start: "Запропонувати зміни"
|
|
5
|
+
stop: "Зупинити пропозиції"
|
|
6
|
+
pill_active: "Зупинити пропозиції (Esc)"
|
|
5
7
|
title: "Запропонувати виправлення перекладу"
|
|
6
8
|
current_text: "Поточний текст"
|
|
7
9
|
suggested_text: "Запропонований текст"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
ur:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "ترامیم تجویز کریں"
|
|
4
|
-
|
|
4
|
+
start: "ترامیم تجویز کریں"
|
|
5
|
+
stop: "تجویز کرنا بند کریں"
|
|
6
|
+
pill_active: "تجویز کرنا بند کریں (Esc)"
|
|
5
7
|
title: "ترجمے کی اصلاح تجویز کریں"
|
|
6
8
|
current_text: "موجودہ متن"
|
|
7
9
|
suggested_text: "تجویز کردہ متن"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
vi:
|
|
2
2
|
i18n_feedback:
|
|
3
3
|
pill: "Đề xuất chỉnh sửa"
|
|
4
|
-
|
|
4
|
+
start: "Đề xuất chỉnh sửa"
|
|
5
|
+
stop: "Dừng đề xuất"
|
|
6
|
+
pill_active: "Dừng đề xuất (Esc)"
|
|
5
7
|
title: "Đề xuất sửa bản dịch"
|
|
6
8
|
current_text: "Văn bản hiện tại"
|
|
7
9
|
suggested_text: "Văn bản đề xuất"
|
|
@@ -41,4 +41,9 @@ I18nFeedback.configure do |config|
|
|
|
41
41
|
# ticket. Runs inline after save, so keep it fast or hand off to a job.
|
|
42
42
|
#
|
|
43
43
|
# config.on_submit = ->(suggestion) { SuggestionMailer.with(suggestion:).created.deliver_later }
|
|
44
|
+
|
|
45
|
+
# Per-IP throttle on the submission endpoint, passed to Rails' built-in rate
|
|
46
|
+
# limiter (Rails 7.2+; ignored on 7.1). Set nil to disable.
|
|
47
|
+
#
|
|
48
|
+
# config.rate_limit = { to: 30, within: 60 }
|
|
44
49
|
end
|
data/lib/i18n_feedback/widget.rb
CHANGED
|
@@ -61,7 +61,7 @@ module I18nFeedback
|
|
|
61
61
|
def labels(locale)
|
|
62
62
|
{
|
|
63
63
|
pill: t(locale, :pill, 'Suggest edits'),
|
|
64
|
-
pillActive: t(locale, :pill_active, '
|
|
64
|
+
pillActive: t(locale, :pill_active, 'Stop suggesting (Esc)'),
|
|
65
65
|
title: t(locale, :title, 'Suggest a translation fix'),
|
|
66
66
|
currentText: t(locale, :current_text, 'Current text'),
|
|
67
67
|
suggestedText: t(locale, :suggested_text, 'Suggested text'),
|