Add (un)subscribing to vocabulary
This commit is contained in:
parent
cc3934b423
commit
4ba954a3cf
|
@ -29,7 +29,7 @@ export function answerboxSubscribeHandler(event: Event): void {
|
|||
success: (data) => {
|
||||
if (data.success) {
|
||||
button.dataset.torpedo = ["yes", "no"][torpedo];
|
||||
button.children[0].nextSibling.textContent = ' ' + (torpedo ? I18n.translate('views.actions.unsubscribe') : I18n.translate('views.actions.subscribe'));
|
||||
button.children[0].nextSibling.textContent = ' ' + (torpedo ? I18n.translate('voc.unsubscribe') : I18n.translate('voc.subscribe'));
|
||||
showNotification(I18n.translate(`frontend.subscription.${torpedo ? 'subscribe' : 'unsubscribe'}`));
|
||||
} else {
|
||||
showErrorNotification(I18n.translate(`frontend.subscription.fail.${torpedo ? 'subscribe' : 'unsubscribe'}`));
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
-# fun joke should subscribe?
|
||||
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "no" } }
|
||||
%i.fa.fa-fw.fa-anchor
|
||||
= t(".unsubscribe")
|
||||
= t("voc.unsubscribe")
|
||||
- else
|
||||
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "yes" } }
|
||||
%i.fa.fa-fw.fa-anchor
|
||||
= t(".subscribe")
|
||||
= t("voc.subscribe")
|
||||
- if privileged? answer.user
|
||||
%a.dropdown-item.text-danger{ href: "#", data: { a_id: answer.id, action: "ab-destroy" } }
|
||||
%i.fa.fa-fw.fa-trash-o
|
||||
|
|
|
@ -71,8 +71,6 @@ en:
|
|||
otp_attempt: "Please enter the code from your authenticator app"
|
||||
actions:
|
||||
answer:
|
||||
subscribe: "Subscribe"
|
||||
unsubscribe: "Unsubscribe"
|
||||
return: "Return to Inbox"
|
||||
comment:
|
||||
view_smiles: "View comment smiles"
|
||||
|
|
|
@ -14,6 +14,8 @@ en:
|
|||
logout: "Sign out"
|
||||
save: "Save changes"
|
||||
show_anonymous_questions: "Show all questions from this user"
|
||||
subscribe: "Subscribe"
|
||||
unsubscribe: "Unsubscribe"
|
||||
register: "Sign up"
|
||||
report: "Report"
|
||||
terms: "Terms of Service"
|
||||
|
|
Loading…
Reference in New Issue