From 5635598bbc8034c56c880808f4cbb04b862f2ab6 Mon Sep 17 00:00:00 2001
From: Yohann D'ANELLO <yohann.danello@gmail.com>
Date: Sun, 15 Nov 2020 23:28:32 +0100
Subject: [PATCH] Extract strings from javascript files and translate them in
 french

---
 .../templates/activity/activity_detail.html   |   2 +-
 .../templates/activity/activity_entry.html    |   8 +-
 apps/member/static/member/js/alias.js         |   6 +-
 apps/note/static/note/js/consos.js            |  15 +-
 apps/note/static/note/js/transfer.js          |  55 +++----
 locale/de/LC_MESSAGES/django.po               |  49 ++++---
 locale/de/LC_MESSAGES/djangojs.po             | 119 ++++++++++++++++
 locale/es/LC_MESSAGES/django.po               |  49 ++++---
 locale/es/LC_MESSAGES/djangojs.po             | 119 ++++++++++++++++
 locale/fr/LC_MESSAGES/django.po               |  46 +++---
 locale/fr/LC_MESSAGES/djangojs.po             | 134 ++++++++++++++++++
 note_kfet/static/js/base.js                   |   3 +-
 12 files changed, 505 insertions(+), 100 deletions(-)
 create mode 100644 locale/de/LC_MESSAGES/djangojs.po
 create mode 100644 locale/es/LC_MESSAGES/djangojs.po
 create mode 100644 locale/fr/LC_MESSAGES/djangojs.po

diff --git a/apps/activity/templates/activity/activity_detail.html b/apps/activity/templates/activity/activity_detail.html
index c3a40891..0ba1d481 100644
--- a/apps/activity/templates/activity/activity_detail.html
+++ b/apps/activity/templates/activity/activity_detail.html
@@ -30,7 +30,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
          headers: {"X-CSRFTOKEN": CSRF_TOKEN}
      })
       .done(function() {
-          addMsg('Invité supprimé','success');
+          addMsg('{% trans "Guest deleted" %}', 'success');
           $("#guests_table").load(location.pathname + " #guests_table");
       })
       .fail(function(xhr, textStatus, error) {
diff --git a/apps/activity/templates/activity/activity_entry.html b/apps/activity/templates/activity/activity_entry.html
index d778490f..0a0e8015 100644
--- a/apps/activity/templates/activity/activity_entry.html
+++ b/apps/activity/templates/activity/activity_entry.html
@@ -86,10 +86,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
                 }).done(function () {
                     if (target.hasClass("table-info"))
                         addMsg(
-                            "Entrée effectuée, mais attention : la personne n'est plus adhérente Kfet.",
+                            "{% trans "Entry done, but caution: the user is not a Kfet member." %}",
                             "warning", 10000);
                     else
-                        addMsg("Entrée effectuée !", "success", 4000);
+                        addMsg("Entry made!", "success", 4000);
                     reloadTable(true);
                 }).fail(function (xhr) {
                     errMsg(xhr.responseJSON, 4000);
@@ -121,10 +121,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
                     }).done(function () {
                         if (target.hasClass("table-info"))
                             addMsg(
-                                "Entrée effectuée, mais attention : la personne n'est plus adhérente Kfet.",
+                                "{% trans "Entry done, but caution: the user is not a Kfet member." %}",
                                 "warning", 10000);
                         else
-                            addMsg("Entrée effectuée !", "success", 4000);
+                            addMsg("{% trans "Entry done!" %}", "success", 4000);
                         reloadTable(true);
                     }).fail(function (xhr) {
                         errMsg(xhr.responseJSON, 4000);
diff --git a/apps/member/static/member/js/alias.js b/apps/member/static/member/js/alias.js
index 444e1bcf..d445dafd 100644
--- a/apps/member/static/member/js/alias.js
+++ b/apps/member/static/member/js/alias.js
@@ -14,7 +14,7 @@ function create_alias (e) {
   }).done(function () {
     // Reload table
     $('#alias_table').load(location.pathname + ' #alias_table')
-    addMsg('Alias ajouté', 'success')
+    addMsg(gettext('Alias successfully added'), 'success')
   }).fail(function (xhr, _textStatus, _error) {
     errMsg(xhr.responseJSON)
   })
@@ -22,7 +22,7 @@ function create_alias (e) {
 
 /**
  * On click of "delete", delete the alias
- * @param Integer button_id Alias id to remove
+ * @param button_id:Integer Alias id to remove
  */
 function delete_button (button_id) {
   $.ajax({
@@ -30,7 +30,7 @@ function delete_button (button_id) {
     method: 'DELETE',
     headers: { 'X-CSRFTOKEN': CSRF_TOKEN }
   }).done(function () {
-    addMsg('Alias supprimé', 'success')
+    addMsg(gettext('Alias successfully deleted'), 'success')
     $('#alias_table').load(location.pathname + ' #alias_table')
   }).fail(function (xhr, _textStatus, _error) {
     errMsg(xhr.responseJSON)
diff --git a/apps/note/static/note/js/consos.js b/apps/note/static/note/js/consos.js
index 691ddd6f..3c16af98 100644
--- a/apps/note/static/note/js/consos.js
+++ b/apps/note/static/note/js/consos.js
@@ -222,17 +222,14 @@ function consume (source, source_alias, dest, quantity, amount, reason, type, ca
       if (!isNaN(source.balance)) {
         const newBalance = source.balance - quantity * amount
         if (newBalance <= -5000) {
-          addMsg('Attention, La transaction depuis la note ' + source_alias + ' a été réalisée avec ' +
-                        'succès, mais la note émettrice ' + source_alias + ' est en négatif sévère.',
-          'danger', 30000)
+          addMsg(interpolate(gettext('Warning, the transaction from the note %s succeed, ' +
+              'but the emitter note %s is very negative.', [source_alias, source_alias])), 'danger', 30000)
         } else if (newBalance < 0) {
-          addMsg('Attention, La transaction depuis la note ' + source_alias + ' a été réalisée avec ' +
-                        'succès, mais la note émettrice ' + source_alias + ' est en négatif.',
-          'warning', 30000)
+          addMsg(interpolate(gettext('Warning, the transaction from the note %s succeed, ' +
+              'but the emitter note %s is negative.', [source_alias, source_alias])), 'warning', 30000)
         }
         if (source.membership && source.membership.date_end < new Date().toISOString()) {
-          addMsg('Attention : la note émettrice ' + source.name + " n'est plus adhérente.",
-            'danger', 30000)
+          addMsg(interpolate(gettext('Warning, the emitter note %s is no more a BDE member.', [source_alias])), 'danger', 30000)
         }
       }
       reset()
@@ -253,7 +250,7 @@ function consume (source, source_alias, dest, quantity, amount, reason, type, ca
           template: template
         }).done(function () {
         reset()
-        addMsg(gettext("La transaction n'a pas pu être validée pour cause de solde insuffisant."), 'danger', 10000)
+        addMsg(gettext("The transaction couldn't be validated because of insufficient balance."), 'danger', 10000)
       }).fail(function () {
         reset()
         errMsg(e.responseJSON)
diff --git a/apps/note/static/note/js/transfer.js b/apps/note/static/note/js/transfer.js
index db9cf9ac..dff1f8c5 100644
--- a/apps/note/static/note/js/transfer.js
+++ b/apps/note/static/note/js/transfer.js
@@ -235,20 +235,20 @@ $('#btn_transfer').click(function () {
 
   if (!amount_field.val() || isNaN(amount_field.val()) || amount_field.val() <= 0) {
     amount_field.addClass('is-invalid')
-    $('#amount-required').html('<strong>Ce champ est requis et doit comporter un nombre décimal strictement positif.</strong>')
+    $('#amount-required').html('<strong>' + gettext('This field is required and must contain a decimal positive number.') + '</strong>')
     error = true
   }
 
   const amount = Math.floor(100 * amount_field.val())
   if (amount > 2147483647) {
     amount_field.addClass('is-invalid')
-    $('#amount-required').html('<strong>Le montant ne doit pas excéder 21474836.47 €.</strong>')
+    $('#amount-required').html('<strong>' + gettext('The amount must stay under 21,474,836.47 €.') + '</strong>')
     error = true
   }
 
   if (!reason_field.val()) {
     reason_field.addClass('is-invalid')
-    $('#reason-required').html('<strong>Ce champ est requis.</strong>')
+    $('#reason-required').html('<strong>' + gettext('This field is required.') + '</strong>')
     error = true
   }
 
@@ -274,9 +274,8 @@ $('#btn_transfer').click(function () {
     [...sources_notes_display].forEach(function (source) {
       [...dests_notes_display].forEach(function (dest) {
         if (source.note.id === dest.note.id) {
-          addMsg('Attention : la transaction de ' + pretty_money(amount) + ' de la note ' + source.name +
-                        ' vers la note ' + dest.name + " n'a pas été faite car il s'agit de la même note au départ" +
-                        " et à l'arrivée.", 'warning', 10000)
+          addMsg(interpolate(gettext('Warning: the transaction of %s from %s to %s was not made because ' +
+              'it is the same source and destination note.'), [pretty_money(amount), source.name, dest.name]), 'warning', 10000)
           LOCK = false
           return
         }
@@ -296,43 +295,35 @@ $('#btn_transfer').click(function () {
             destination_alias: dest.name
           }).done(function () {
           if (source.note.membership && source.note.membership.date_end < new Date().toISOString()) {
-            addMsg('Attention : la note émettrice ' + source.name + " n'est plus adhérente.",
-              'danger', 30000)
+            addMsg(interpolate(gettext('Warning, the emitter note %s is no more a BDE member.'), [source.name]), 'danger', 30000)
           }
           if (dest.note.membership && dest.note.membership.date_end < new Date().toISOString()) {
-            addMsg('Attention : la note destination ' + dest.name + " n'est plus adhérente.",
-              'danger', 30000)
+            addMsg(interpolate(gettext('Warning, the destination note %s is no more a BDE member.'), [source.name]), 'danger', 30000)
           }
 
           if (!isNaN(source.note.balance)) {
             const newBalance = source.note.balance - source.quantity * dest.quantity * amount
             if (newBalance <= -5000) {
-              addMsg('Le transfert de ' +
-                                    pretty_money(source.quantity * dest.quantity * amount) + ' de la note ' +
-                                    source.name + ' vers la note ' + dest.name + ' a été fait avec succès, ' +
-                                    'mais la note émettrice est en négatif sévère.', 'danger', 10000)
+              addMsg(interpolate(gettext('Warning, the transaction of %s from the note %s to the note %s succeed, but the emitter note %s is very negative.'),
+                  [pretty_money(source.quantity * dest.quantity * amount), source.name, dest.name]), 'danger', 10000)
               reset()
               return
             } else if (newBalance < 0) {
-              addMsg('Le transfert de ' +
-                                    pretty_money(source.quantity * dest.quantity * amount) + ' de la note ' +
-                                    source.name + ' vers la note ' + dest.name + ' a été fait avec succès, ' +
-                                    'mais la note émettrice est en négatif.', 'warning', 10000)
+              addMsg(interpolate(gettext('Warning, the transaction of %s from the note %s to the note %s succeed, but the emitter note %s is negative.'),
+                  [pretty_money(source.quantity * dest.quantity * amount), source.name, dest.name]), 'danger', 10000)
               reset()
               return
             }
           }
-          addMsg('Le transfert de ' +
-                            pretty_money(source.quantity * dest.quantity * amount) + ' de la note ' + source.name +
-                            ' vers la note ' + dest.name + ' a été fait avec succès !', 'success', 10000)
+          addMsg(interpolate(gettext('Transfer of %s from %s to %s succeed!'),
+              [pretty_money((source.quantity * dest.quantity * amount), source.name, dest.name)]), 'success', 10000)
 
           reset()
         }).fail(function (err) { // do it again but valid = false
           const errObj = JSON.parse(err.responseText)
           if (errObj.non_field_errors) {
-            addMsg('Le transfert de ' +
-                                pretty_money(source.quantity * dest.quantity * amount) + ' de la note ' + source.name +
-                                ' vers la note ' + dest.name + ' a échoué : ' + errObj.non_field_errors, 'danger')
+            addMsg(interpolate(gettext('Transfer of %s from %s to %s failed: %s'),
+                [pretty_money(source.quantity * dest.quantity * amount), source.name, + dest.name, errObj.non_field_errors]), 'danger')
             LOCK = false
             return
           }
@@ -352,17 +343,15 @@ $('#btn_transfer').click(function () {
               destination: dest.note.id,
               destination_alias: dest.name
             }).done(function () {
-            addMsg('Le transfert de ' +
-                                pretty_money(source.quantity * dest.quantity * amount) + ' de la note ' + source.name +
-                                ' vers la note ' + dest.name + ' a échoué : Solde insuffisant', 'danger', 10000)
+            addMsg(interpolate(gettext('Transfer of %s from %s to %s failed: %s'),
+                [pretty_money(source.quantity * dest.quantity * amount), source.name, + dest.name, gettext('insufficient funds')]), 'danger', 10000)
             reset()
           }).fail(function (err) {
             const errObj = JSON.parse(err.responseText)
             let error = errObj.detail ? errObj.detail : errObj.non_field_errors
             if (!error) { error = err.responseText }
-            addMsg('Le transfert de ' +
-                                pretty_money(source.quantity * dest.quantity * amount) + ' de la note ' + source.name +
-                                ' vers la note ' + dest.name + ' a échoué : ' + error, 'danger')
+            addMsg(interpolate(gettext('Transfer of %s from %s to %s failed: %s'),
+                [pretty_money(source.quantity * dest.quantity * amount), source.name, + dest.name, error]), 'danger')
             LOCK = false
           })
         })
@@ -408,14 +397,14 @@ $('#btn_transfer').click(function () {
         first_name: $('#first_name').val(),
         bank: $('#bank').val()
       }).done(function () {
-      addMsg('Le crédit/retrait a bien été effectué !', 'success', 10000)
-      if (user_note.membership && user_note.membership.date_end < new Date().toISOString()) { addMsg('Attention : la note ' + alias + " n'est plus adhérente.", 'danger', 10000) }
+      addMsg(gettext('Credit/debit succeed!'), 'success', 10000)
+      if (user_note.membership && user_note.membership.date_end < new Date().toISOString()) { addMsg(gettext('Warning, the emitter note %s is no more a BDE member.'), 'danger', 10000) }
       reset()
     }).fail(function (err) {
       const errObj = JSON.parse(err.responseText)
       let error = errObj.detail ? errObj.detail : errObj.non_field_errors
       if (!error) { error = err.responseText }
-      addMsg('Le crédit/retrait a échoué : ' + error, 'danger', 10000)
+      addMsg(interpolate(gettext('Credit/debit failed: %s'), [error]), 'danger', 10000)
       LOCK = false
     })
   }
diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po
index b3e882a2..073b0668 100644
--- a/locale/de/LC_MESSAGES/django.po
+++ b/locale/de/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-09-19 22:00+0200\n"
+"POT-Creation-Date: 2020-11-15 23:26+0100\n"
 "PO-Revision-Date: 2020-09-13 12:39+0200\n"
 "Last-Translator: elkmaennchen <elkmaennchen@crans.org>\n"
 "Language-Team: \n"
@@ -279,11 +279,17 @@ msgstr "Kontostand"
 msgid "Guests list"
 msgstr "Gastliste"
 
+#: apps/activity/templates/activity/activity_detail.html:33
+#, fuzzy
+#| msgid "Guests list"
+msgid "Guest deleted"
+msgstr "Gastliste"
+
 #: apps/activity/templates/activity/activity_entry.html:14
 #: apps/note/models/transactions.py:253
 #: apps/note/templates/note/transaction_form.html:16
 #: apps/note/templates/note/transaction_form.html:148
-#: note_kfet/templates/base.html:70
+#: note_kfet/templates/base.html:73
 msgid "Transfer"
 msgstr "Ãœberweisen"
 
@@ -308,6 +314,17 @@ msgstr "Eintritte"
 msgid "Return to activity page"
 msgstr "Zurück zur Veranstaltungseite"
 
+#: apps/activity/templates/activity/activity_entry.html:89
+#: apps/activity/templates/activity/activity_entry.html:124
+msgid "Entry done, but caution: the user is not a Kfet member."
+msgstr ""
+
+#: apps/activity/templates/activity/activity_entry.html:127
+#, fuzzy
+#| msgid "Entry page"
+msgid "Entry done!"
+msgstr "Eintrittseite"
+
 #: apps/activity/templates/activity/activity_form.html:16
 #: apps/member/templates/member/add_members.html:46
 #: apps/member/templates/member/club_form.html:16
@@ -378,7 +395,7 @@ msgstr "Einladen"
 msgid "Create new activity"
 msgstr "Neue Veranstaltung schaffen"
 
-#: apps/activity/views.py:65 note_kfet/templates/base.html:88
+#: apps/activity/views.py:65 note_kfet/templates/base.html:91
 msgid "Activities"
 msgstr "Veranstaltungen"
 
@@ -1620,7 +1637,7 @@ msgstr "Tatsen finden"
 msgid "Update button"
 msgstr "Tatse bearbeiten"
 
-#: apps/note/views.py:151 note_kfet/templates/base.html:64
+#: apps/note/views.py:151 note_kfet/templates/base.html:67
 msgid "Consumptions"
 msgstr "Verbräuche"
 
@@ -1798,7 +1815,7 @@ msgstr ""
 "diesen Parametern zu erstellen. Bitte korrigieren Sie Ihre Daten und "
 "versuchen Sie es erneut."
 
-#: apps/permission/views.py:110 note_kfet/templates/base.html:106
+#: apps/permission/views.py:110 note_kfet/templates/base.html:109
 msgid "Rights"
 msgstr "Rechten"
 
@@ -1986,7 +2003,7 @@ msgstr ""
 msgid "Invalidate pre-registration"
 msgstr "Ungültige Vorregistrierung"
 
-#: apps/treasury/apps.py:12 note_kfet/templates/base.html:94
+#: apps/treasury/apps.py:12 note_kfet/templates/base.html:97
 msgid "Treasury"
 msgstr "Quaestor"
 
@@ -2388,7 +2405,7 @@ msgstr "Krediten von der Société générale handeln"
 
 #: apps/wei/apps.py:10 apps/wei/models.py:49 apps/wei/models.py:50
 #: apps/wei/models.py:61 apps/wei/models.py:167
-#: note_kfet/templates/base.html:100
+#: note_kfet/templates/base.html:103
 msgid "WEI"
 msgstr "WEI"
 
@@ -3000,34 +3017,34 @@ msgstr "Reset"
 msgid "The ENS Paris-Saclay BDE note."
 msgstr "Die BDE ENS-Paris-Saclay Note."
 
-#: note_kfet/templates/base.html:76
+#: note_kfet/templates/base.html:79
 msgid "Users"
 msgstr "Users"
 
-#: note_kfet/templates/base.html:82
+#: note_kfet/templates/base.html:85
 msgid "Clubs"
 msgstr "Clubs"
 
-#: note_kfet/templates/base.html:111
+#: note_kfet/templates/base.html:114
 msgid "Admin"
 msgstr "Admin"
 
-#: note_kfet/templates/base.html:125
+#: note_kfet/templates/base.html:128
 msgid "My account"
 msgstr "Mein Konto"
 
-#: note_kfet/templates/base.html:128
+#: note_kfet/templates/base.html:131
 msgid "Log out"
 msgstr "Abmelden"
 
-#: note_kfet/templates/base.html:136
+#: note_kfet/templates/base.html:139
 #: note_kfet/templates/registration/signup.html:6
 #: note_kfet/templates/registration/signup.html:11
 #: note_kfet/templates/registration/signup.html:27
 msgid "Sign up"
 msgstr "Registrieren"
 
-#: note_kfet/templates/base.html:143
+#: note_kfet/templates/base.html:146
 #: note_kfet/templates/registration/login.html:6
 #: note_kfet/templates/registration/login.html:15
 #: note_kfet/templates/registration/login.html:38
@@ -3035,7 +3052,7 @@ msgstr "Registrieren"
 msgid "Log in"
 msgstr "Anmelden"
 
-#: note_kfet/templates/base.html:155
+#: note_kfet/templates/base.html:158
 msgid ""
 "Your e-mail address is not validated. Please check your mail inbox and click "
 "on the validation link."
@@ -3043,7 +3060,7 @@ msgstr ""
 "Ihre E-Mail-Adresse ist nicht validiert. Bitte überprüfen Sie Ihren "
 "Posteingang und klicken Sie auf den Validierungslink."
 
-#: note_kfet/templates/base.html:172
+#: note_kfet/templates/base.html:175
 msgid "Contact us"
 msgstr "Kontakt"
 
diff --git a/locale/de/LC_MESSAGES/djangojs.po b/locale/de/LC_MESSAGES/djangojs.po
new file mode 100644
index 00000000..935a61cb
--- /dev/null
+++ b/locale/de/LC_MESSAGES/djangojs.po
@@ -0,0 +1,119 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-11-15 23:21+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: apps/member/static/member/js/alias.js:17
+msgid "Alias successfully added"
+msgstr ""
+
+#: apps/member/static/member/js/alias.js:33
+msgid "Alias successfully deleted"
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:225
+#, javascript-format
+msgid ""
+"Warning, the transaction from the note %s succeed, but the emitter note %s "
+"is very negative."
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:228
+#, javascript-format
+msgid ""
+"Warning, the transaction from the note %s succeed, but the emitter note %s "
+"is negative."
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:232
+#: apps/note/static/note/js/transfer.js:298
+#: apps/note/static/note/js/transfer.js:401
+#, javascript-format
+msgid "Warning, the emitter note %s is no more a BDE member."
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:253
+msgid "The transaction couldn't be validated because of insufficient balance."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:238
+msgid "This field is required and must contain a decimal positive number."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:245
+msgid "The amount must stay under 21,474,836.47 €."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:251
+msgid "This field is required."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:277
+#, javascript-format
+msgid ""
+"Warning: the transaction of %s from %s to %s was not made because it is the "
+"same source and destination note."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:301
+#, javascript-format
+msgid "Warning, the destination note %s is no more a BDE member."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:307
+#, javascript-format
+msgid ""
+"Warning, the transaction of %s from the note %s to the note %s succeed, but "
+"the emitter note %s is very negative."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:312
+#, javascript-format
+msgid ""
+"Warning, the transaction of %s from the note %s to the note %s succeed, but "
+"the emitter note %s is negative."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:318
+#, javascript-format
+msgid "Transfer of %s from %s to %s succeed!"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:325
+#: apps/note/static/note/js/transfer.js:346
+#: apps/note/static/note/js/transfer.js:353
+#, javascript-format
+msgid "Transfer of %s from %s to %s failed: %s"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:347
+msgid "insufficient funds"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:400
+msgid "Credit/debit succeed!"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:407
+#, javascript-format
+msgid "Credit/debit failed: %s"
+msgstr ""
+
+#: note_kfet/static/js/base.js:366
+msgid "An error occured while (in)validating this transaction:"
+msgstr ""
diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po
index 0c2492ce..537f5ef9 100644
--- a/locale/es/LC_MESSAGES/django.po
+++ b/locale/es/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-09-19 22:00+0200\n"
+"POT-Creation-Date: 2020-11-15 23:26+0100\n"
 "PO-Revision-Date: 2020-09-19 14:56+0200\n"
 "Last-Translator: elkmaennchen <elkmaennchen@crans.org>\n"
 "Language-Team: \n"
@@ -278,11 +278,17 @@ msgstr "Saldo de la cuenta"
 msgid "Guests list"
 msgstr "Lista de los invitados"
 
+#: apps/activity/templates/activity/activity_detail.html:33
+#, fuzzy
+#| msgid "Guests list"
+msgid "Guest deleted"
+msgstr "Lista de los invitados"
+
 #: apps/activity/templates/activity/activity_entry.html:14
 #: apps/note/models/transactions.py:253
 #: apps/note/templates/note/transaction_form.html:16
 #: apps/note/templates/note/transaction_form.html:148
-#: note_kfet/templates/base.html:70
+#: note_kfet/templates/base.html:73
 msgid "Transfer"
 msgstr "Transferencia"
 
@@ -307,6 +313,17 @@ msgstr "Entradas"
 msgid "Return to activity page"
 msgstr "Regresar a la página de la actividad"
 
+#: apps/activity/templates/activity/activity_entry.html:89
+#: apps/activity/templates/activity/activity_entry.html:124
+msgid "Entry done, but caution: the user is not a Kfet member."
+msgstr ""
+
+#: apps/activity/templates/activity/activity_entry.html:127
+#, fuzzy
+#| msgid "Entry page"
+msgid "Entry done!"
+msgstr "Página de las entradas"
+
 #: apps/activity/templates/activity/activity_form.html:16
 #: apps/member/templates/member/add_members.html:46
 #: apps/member/templates/member/club_form.html:16
@@ -377,7 +394,7 @@ msgstr "Invitar"
 msgid "Create new activity"
 msgstr "Crear una nueva actividad"
 
-#: apps/activity/views.py:65 note_kfet/templates/base.html:88
+#: apps/activity/views.py:65 note_kfet/templates/base.html:91
 msgid "Activities"
 msgstr "Actividades"
 
@@ -1617,7 +1634,7 @@ msgstr "Buscar un botón"
 msgid "Update button"
 msgstr "Modificar el botón"
 
-#: apps/note/views.py:151 note_kfet/templates/base.html:64
+#: apps/note/views.py:151 note_kfet/templates/base.html:67
 msgid "Consumptions"
 msgstr "Consumiciones"
 
@@ -1793,7 +1810,7 @@ msgid ""
 "with these parameters. Please correct your data and retry."
 msgstr ""
 
-#: apps/permission/views.py:110 note_kfet/templates/base.html:106
+#: apps/permission/views.py:110 note_kfet/templates/base.html:109
 msgid "Rights"
 msgstr "Permisos"
 
@@ -1980,7 +1997,7 @@ msgstr ""
 msgid "Invalidate pre-registration"
 msgstr "Invalidar la afiliación"
 
-#: apps/treasury/apps.py:12 note_kfet/templates/base.html:94
+#: apps/treasury/apps.py:12 note_kfet/templates/base.html:97
 msgid "Treasury"
 msgstr "Tesorería"
 
@@ -2377,7 +2394,7 @@ msgstr "Gestionar los créditos de la Société Générale"
 
 #: apps/wei/apps.py:10 apps/wei/models.py:49 apps/wei/models.py:50
 #: apps/wei/models.py:61 apps/wei/models.py:167
-#: note_kfet/templates/base.html:100
+#: note_kfet/templates/base.html:103
 msgid "WEI"
 msgstr "WEI"
 
@@ -2982,34 +2999,34 @@ msgstr ""
 msgid "The ENS Paris-Saclay BDE note."
 msgstr "La note del BDE de la ENS Paris-Saclay."
 
-#: note_kfet/templates/base.html:76
+#: note_kfet/templates/base.html:79
 msgid "Users"
 msgstr "Usuarios"
 
-#: note_kfet/templates/base.html:82
+#: note_kfet/templates/base.html:85
 msgid "Clubs"
 msgstr "Clubs"
 
-#: note_kfet/templates/base.html:111
+#: note_kfet/templates/base.html:114
 msgid "Admin"
 msgstr ""
 
-#: note_kfet/templates/base.html:125
+#: note_kfet/templates/base.html:128
 msgid "My account"
 msgstr "Mi cuenta"
 
-#: note_kfet/templates/base.html:128
+#: note_kfet/templates/base.html:131
 msgid "Log out"
 msgstr "Desconectarse"
 
-#: note_kfet/templates/base.html:136
+#: note_kfet/templates/base.html:139
 #: note_kfet/templates/registration/signup.html:6
 #: note_kfet/templates/registration/signup.html:11
 #: note_kfet/templates/registration/signup.html:27
 msgid "Sign up"
 msgstr "Registrar"
 
-#: note_kfet/templates/base.html:143
+#: note_kfet/templates/base.html:146
 #: note_kfet/templates/registration/login.html:6
 #: note_kfet/templates/registration/login.html:15
 #: note_kfet/templates/registration/login.html:38
@@ -3017,7 +3034,7 @@ msgstr "Registrar"
 msgid "Log in"
 msgstr "Conectarse"
 
-#: note_kfet/templates/base.html:155
+#: note_kfet/templates/base.html:158
 msgid ""
 "Your e-mail address is not validated. Please check your mail inbox and click "
 "on the validation link."
@@ -3025,7 +3042,7 @@ msgstr ""
 "Su correo electrónico no fue validado. Por favor mire en sus correos y haga "
 "clic en el enlace de validación."
 
-#: note_kfet/templates/base.html:172
+#: note_kfet/templates/base.html:175
 msgid "Contact us"
 msgstr "Contactarnos"
 
diff --git a/locale/es/LC_MESSAGES/djangojs.po b/locale/es/LC_MESSAGES/djangojs.po
new file mode 100644
index 00000000..935a61cb
--- /dev/null
+++ b/locale/es/LC_MESSAGES/djangojs.po
@@ -0,0 +1,119 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-11-15 23:21+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: apps/member/static/member/js/alias.js:17
+msgid "Alias successfully added"
+msgstr ""
+
+#: apps/member/static/member/js/alias.js:33
+msgid "Alias successfully deleted"
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:225
+#, javascript-format
+msgid ""
+"Warning, the transaction from the note %s succeed, but the emitter note %s "
+"is very negative."
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:228
+#, javascript-format
+msgid ""
+"Warning, the transaction from the note %s succeed, but the emitter note %s "
+"is negative."
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:232
+#: apps/note/static/note/js/transfer.js:298
+#: apps/note/static/note/js/transfer.js:401
+#, javascript-format
+msgid "Warning, the emitter note %s is no more a BDE member."
+msgstr ""
+
+#: apps/note/static/note/js/consos.js:253
+msgid "The transaction couldn't be validated because of insufficient balance."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:238
+msgid "This field is required and must contain a decimal positive number."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:245
+msgid "The amount must stay under 21,474,836.47 €."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:251
+msgid "This field is required."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:277
+#, javascript-format
+msgid ""
+"Warning: the transaction of %s from %s to %s was not made because it is the "
+"same source and destination note."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:301
+#, javascript-format
+msgid "Warning, the destination note %s is no more a BDE member."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:307
+#, javascript-format
+msgid ""
+"Warning, the transaction of %s from the note %s to the note %s succeed, but "
+"the emitter note %s is very negative."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:312
+#, javascript-format
+msgid ""
+"Warning, the transaction of %s from the note %s to the note %s succeed, but "
+"the emitter note %s is negative."
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:318
+#, javascript-format
+msgid "Transfer of %s from %s to %s succeed!"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:325
+#: apps/note/static/note/js/transfer.js:346
+#: apps/note/static/note/js/transfer.js:353
+#, javascript-format
+msgid "Transfer of %s from %s to %s failed: %s"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:347
+msgid "insufficient funds"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:400
+msgid "Credit/debit succeed!"
+msgstr ""
+
+#: apps/note/static/note/js/transfer.js:407
+#, javascript-format
+msgid "Credit/debit failed: %s"
+msgstr ""
+
+#: note_kfet/static/js/base.js:366
+msgid "An error occured while (in)validating this transaction:"
+msgstr ""
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index 029a4721..15cbdf3d 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-09-19 22:00+0200\n"
+"POT-Creation-Date: 2020-11-15 23:26+0100\n"
 "PO-Revision-Date: 2020-09-13 12:36+0200\n"
 "Last-Translator: elkmaennchen <elkmaennchen@crans.org>\n"
 "Language-Team: \n"
@@ -279,11 +279,15 @@ msgstr "Solde du compte"
 msgid "Guests list"
 msgstr "Liste des invités"
 
+#: apps/activity/templates/activity/activity_detail.html:33
+msgid "Guest deleted"
+msgstr "Invité supprimé"
+
 #: apps/activity/templates/activity/activity_entry.html:14
 #: apps/note/models/transactions.py:253
 #: apps/note/templates/note/transaction_form.html:16
 #: apps/note/templates/note/transaction_form.html:148
-#: note_kfet/templates/base.html:70
+#: note_kfet/templates/base.html:73
 msgid "Transfer"
 msgstr "Virement"
 
@@ -308,6 +312,16 @@ msgstr "Entrées"
 msgid "Return to activity page"
 msgstr "Retour à la page de l'activité"
 
+#: apps/activity/templates/activity/activity_entry.html:89
+#: apps/activity/templates/activity/activity_entry.html:124
+msgid "Entry done, but caution: the user is not a Kfet member."
+msgstr ""
+"Entrée effectuée, mais attention : la personne n'est pas un adhérent Kfet."
+
+#: apps/activity/templates/activity/activity_entry.html:127
+msgid "Entry done!"
+msgstr "Entrée effectuée !"
+
 #: apps/activity/templates/activity/activity_form.html:16
 #: apps/member/templates/member/add_members.html:46
 #: apps/member/templates/member/club_form.html:16
@@ -378,7 +392,7 @@ msgstr "Inviter"
 msgid "Create new activity"
 msgstr "Créer une nouvelle activité"
 
-#: apps/activity/views.py:65 note_kfet/templates/base.html:88
+#: apps/activity/views.py:65 note_kfet/templates/base.html:91
 msgid "Activities"
 msgstr "Activités"
 
@@ -1622,7 +1636,7 @@ msgstr "Chercher un bouton"
 msgid "Update button"
 msgstr "Modifier le bouton"
 
-#: apps/note/views.py:151 note_kfet/templates/base.html:64
+#: apps/note/views.py:151 note_kfet/templates/base.html:67
 msgid "Consumptions"
 msgstr "Consommations"
 
@@ -1801,7 +1815,7 @@ msgstr ""
 "Vous n'avez pas la permission d'ajouter une instance du modèle « {model} » "
 "avec ces paramètres. Merci de les corriger et de réessayer."
 
-#: apps/permission/views.py:110 note_kfet/templates/base.html:106
+#: apps/permission/views.py:110 note_kfet/templates/base.html:109
 msgid "Rights"
 msgstr "Droits"
 
@@ -1987,7 +2001,7 @@ msgstr ""
 msgid "Invalidate pre-registration"
 msgstr "Invalider l'inscription"
 
-#: apps/treasury/apps.py:12 note_kfet/templates/base.html:94
+#: apps/treasury/apps.py:12 note_kfet/templates/base.html:97
 msgid "Treasury"
 msgstr "Trésorerie"
 
@@ -2387,7 +2401,7 @@ msgstr "Gérer les crédits de la Société générale"
 
 #: apps/wei/apps.py:10 apps/wei/models.py:49 apps/wei/models.py:50
 #: apps/wei/models.py:61 apps/wei/models.py:167
-#: note_kfet/templates/base.html:100
+#: note_kfet/templates/base.html:103
 msgid "WEI"
 msgstr "WEI"
 
@@ -2999,34 +3013,34 @@ msgstr "Réinitialiser"
 msgid "The ENS Paris-Saclay BDE note."
 msgstr "La note du BDE de l'ENS Paris-Saclay."
 
-#: note_kfet/templates/base.html:76
+#: note_kfet/templates/base.html:79
 msgid "Users"
 msgstr "Utilisateurs"
 
-#: note_kfet/templates/base.html:82
+#: note_kfet/templates/base.html:85
 msgid "Clubs"
 msgstr "Clubs"
 
-#: note_kfet/templates/base.html:111
+#: note_kfet/templates/base.html:114
 msgid "Admin"
 msgstr "Admin"
 
-#: note_kfet/templates/base.html:125
+#: note_kfet/templates/base.html:128
 msgid "My account"
 msgstr "Mon compte"
 
-#: note_kfet/templates/base.html:128
+#: note_kfet/templates/base.html:131
 msgid "Log out"
 msgstr "Se déconnecter"
 
-#: note_kfet/templates/base.html:136
+#: note_kfet/templates/base.html:139
 #: note_kfet/templates/registration/signup.html:6
 #: note_kfet/templates/registration/signup.html:11
 #: note_kfet/templates/registration/signup.html:27
 msgid "Sign up"
 msgstr "Inscription"
 
-#: note_kfet/templates/base.html:143
+#: note_kfet/templates/base.html:146
 #: note_kfet/templates/registration/login.html:6
 #: note_kfet/templates/registration/login.html:15
 #: note_kfet/templates/registration/login.html:38
@@ -3034,7 +3048,7 @@ msgstr "Inscription"
 msgid "Log in"
 msgstr "Se connecter"
 
-#: note_kfet/templates/base.html:155
+#: note_kfet/templates/base.html:158
 msgid ""
 "Your e-mail address is not validated. Please check your mail inbox and click "
 "on the validation link."
@@ -3042,7 +3056,7 @@ msgstr ""
 "Votre adresse e-mail n'est pas validée. Merci de vérifier votre boîte mail "
 "et de cliquer sur le lien de validation."
 
-#: note_kfet/templates/base.html:172
+#: note_kfet/templates/base.html:175
 msgid "Contact us"
 msgstr "Nous contacter"
 
diff --git a/locale/fr/LC_MESSAGES/djangojs.po b/locale/fr/LC_MESSAGES/djangojs.po
new file mode 100644
index 00000000..7d5fd8ce
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/djangojs.po
@@ -0,0 +1,134 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-11-15 23:21+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: apps/member/static/member/js/alias.js:17
+msgid "Alias successfully added"
+msgstr "Alias ajouté avec succès"
+
+#: apps/member/static/member/js/alias.js:33
+msgid "Alias successfully deleted"
+msgstr "Alias supprimé avec succès"
+
+#: apps/note/static/note/js/consos.js:225
+#, javascript-format
+msgid ""
+"Warning, the transaction from the note %s succeed, but the emitter note %s "
+"is very negative."
+msgstr ""
+"Attention, La transaction depuis la note %s a été réalisée avec succès, mais "
+"la note émettrice %s est en négatif sévère."
+
+#: apps/note/static/note/js/consos.js:228
+#, javascript-format
+msgid ""
+"Warning, the transaction from the note %s succeed, but the emitter note %s "
+"is negative."
+msgstr ""
+"Attention, La transaction depuis la note %s a été réalisée avec succès, mais "
+"la note émettrice %s est en négatif."
+
+#: apps/note/static/note/js/consos.js:232
+#: apps/note/static/note/js/transfer.js:298
+#: apps/note/static/note/js/transfer.js:401
+#, javascript-format
+msgid "Warning, the emitter note %s is no more a BDE member."
+msgstr "Attention, la note émettrice %s n'est plus adhérente."
+
+#: apps/note/static/note/js/consos.js:253
+msgid "The transaction couldn't be validated because of insufficient balance."
+msgstr ""
+"La transaction n'a pas pu être validée pour cause de solde insuffisant."
+
+#: apps/note/static/note/js/transfer.js:238
+msgid "This field is required and must contain a decimal positive number."
+msgstr ""
+"Ce champ est requis et doit comporter un nombre décimal strictement positif."
+
+#: apps/note/static/note/js/transfer.js:245
+msgid "The amount must stay under 21,474,836.47 €."
+msgstr "Le montant ne doit pas excéder 21 474 836.47 €."
+
+#: apps/note/static/note/js/transfer.js:251
+msgid "This field is required."
+msgstr "Ce champ est requis."
+
+#: apps/note/static/note/js/transfer.js:277
+#, javascript-format
+msgid ""
+"Warning: the transaction of %s from %s to %s was not made because it is the "
+"same source and destination note."
+msgstr ""
+"Attention : la transaction de %s de la note %s vers la note %s n'a pas été "
+"faite car il s'agit de la même note au départ et à l'arrivée."
+
+#: apps/note/static/note/js/transfer.js:301
+#, javascript-format
+msgid "Warning, the destination note %s is no more a BDE member."
+msgstr "Attention, la note de destination %s n'est plus adhérente."
+
+#: apps/note/static/note/js/transfer.js:307
+#, javascript-format
+msgid ""
+"Warning, the transaction of %s from the note %s to the note %s succeed, but "
+"the emitter note %s is very negative."
+msgstr ""
+"Attention, La transaction de %s depuis la note %s vers la note %s a été "
+"réalisée avec succès, mais la note émettrice %s est en négatif sévère."
+
+#: apps/note/static/note/js/transfer.js:312
+#, javascript-format
+msgid ""
+"Warning, the transaction of %s from the note %s to the note %s succeed, but "
+"the emitter note %s is negative."
+msgstr ""
+"Attention, La transaction de %s depuis la note %s vers la note %s a été "
+"réalisée avec succès, mais la note émettrice %s est en négatif."
+
+#: apps/note/static/note/js/transfer.js:318
+#, javascript-format
+msgid "Transfer of %s from %s to %s succeed!"
+msgstr ""
+"Le transfert de %s de la note %s vers la note %s a été fait avec succès !"
+
+#: apps/note/static/note/js/transfer.js:325
+#: apps/note/static/note/js/transfer.js:346
+#: apps/note/static/note/js/transfer.js:353
+#, javascript-format
+msgid "Transfer of %s from %s to %s failed: %s"
+msgstr "Le transfert de %s de la note %s vers la note %s a échoué : %s"
+
+#: apps/note/static/note/js/transfer.js:347
+msgid "insufficient funds"
+msgstr "solde insuffisant"
+
+#: apps/note/static/note/js/transfer.js:400
+msgid "Credit/debit succeed!"
+msgstr "Le crédit/retrait a bien été effectué !"
+
+#: apps/note/static/note/js/transfer.js:407
+#, javascript-format
+msgid "Credit/debit failed: %s"
+msgstr "Le crédit/retrait a échoué : %s"
+
+#: note_kfet/static/js/base.js:366
+msgid "An error occured while (in)validating this transaction:"
+msgstr ""
+"Une erreur est survenue lors de la validation/dévalidation de cette "
+"transaction :"
diff --git a/note_kfet/static/js/base.js b/note_kfet/static/js/base.js
index 87a99f64..d7772a5a 100644
--- a/note_kfet/static/js/base.js
+++ b/note_kfet/static/js/base.js
@@ -363,8 +363,7 @@ function de_validate (id, validated, resourcetype) {
       const errObj = JSON.parse(err.responseText)
       let error = errObj.detail ? errObj.detail : errObj.non_field_errors
       if (!error) { error = err.responseText }
-      addMsg('Une erreur est survenue lors de la validation/dévalidation ' +
-                'de cette transaction : ' + error, 'danger')
+      addMsg(gettext('An error occured while (in)validating this transaction:') + ' ' + error, 'danger')
 
       refreshBalance()
       // error if this method doesn't exist. Please define it.
-- 
GitLab