Regression introduced by #1596
Fixes #1623
const deleteLinks = document.querySelectorAll('.confirm-delete');
[...deleteLinks].forEach((deleteLink) => {
deleteLink.addEventListener('click', (event) => {
const deleteLinks = document.querySelectorAll('.confirm-delete');
[...deleteLinks].forEach((deleteLink) => {
deleteLink.addEventListener('click', (event) => {
- if (!confirm(document.getElementById('translation-delete-tag').innerHTML)) {
+ const type = event.currentTarget.getAttribute('data-type') || 'link';
+ if (!confirm(document.getElementById(`translation-delete-${type}`).innerHTML)) {
event.preventDefault();
}
});
event.preventDefault();
}
});
msgid ""
msgstr ""
"Project-Id-Version: Shaarli\n"
msgid ""
msgstr ""
"Project-Id-Version: Shaarli\n"
-"POT-Creation-Date: 2020-11-03 11:51+0100\n"
-"PO-Revision-Date: 2020-11-03 11:55+0100\n"
+"POT-Creation-Date: 2020-11-05 16:47+0100\n"
+"PO-Revision-Date: 2020-11-05 16:48+0100\n"
"Last-Translator: \n"
"Language-Team: Shaarli\n"
"Language: fr_FR\n"
"Last-Translator: \n"
"Language-Team: Shaarli\n"
"Language: fr_FR\n"
#: application/bookmark/BookmarkInitializer.php:91
#: application/legacy/LegacyLinkDB.php:246
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
#: application/bookmark/BookmarkInitializer.php:91
#: application/legacy/LegacyLinkDB.php:246
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
-#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49
+#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
-#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:49
+#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:50
msgid ""
"The personal, minimalist, super-fast, database free, bookmarking service"
msgstr ""
msgid ""
"The personal, minimalist, super-fast, database free, bookmarking service"
msgstr ""
msgid "Delete tag"
msgstr "Supprimer le tag"
msgid "Delete tag"
msgstr "Supprimer le tag"
-#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39
+#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
msgid "You can also edit tags in the"
msgstr "Vous pouvez aussi modifier les tags dans la"
msgid "You can also edit tags in the"
msgstr "Vous pouvez aussi modifier les tags dans la"
-#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39
+#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
msgid "tag list"
msgstr "liste des tags"
msgid "tag list"
msgstr "liste des tags"
msgstr "Rester connecté"
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
msgstr "Rester connecté"
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
-#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49
+#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
-#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:49
+#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:50
msgid "by the Shaarli community"
msgstr "par la communauté Shaarli"
msgid "by the Shaarli community"
msgstr "par la communauté Shaarli"
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:47
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:47
+msgid "Are you sure you want to delete this link?"
+msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?"
+
+#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
+#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48
msgid "Are you sure you want to delete this tag?"
msgstr "Êtes-vous sûr de vouloir supprimer ce tag ?"
msgid "Are you sure you want to delete this tag?"
msgstr "Êtes-vous sûr de vouloir supprimer ce tag ?"
<input type="hidden" name="token" value="{$token}">
<div>
<input type="submit" value="{'Rename tag'|t}" name="renametag">
<input type="hidden" name="token" value="{$token}">
<div>
<input type="submit" value="{'Rename tag'|t}" name="renametag">
- <input type="submit" value="{'Delete tag'|t}" name="deletetag" class="button button-red confirm-delete">
+ <input type="submit" value="{'Delete tag'|t}" name="deletetag"
+ class="button button-red confirm-delete" data-type="tag">
<script src="{$root_path}/{$value}#"></script>
{/loop}
<script src="{$root_path}/{$value}#"></script>
{/loop}
-<div id="js-translations" class="hidden">
+<div id="js-translations" class="hidden" aria-hidden="true">
<span id="translation-fold">{'Fold'|t}</span>
<span id="translation-fold-all">{'Fold all'|t}</span>
<span id="translation-expand">{'Expand'|t}</span>
<span id="translation-expand-all">{'Expand all'|t}</span>
<span id="translation-fold">{'Fold'|t}</span>
<span id="translation-fold-all">{'Fold all'|t}</span>
<span id="translation-expand">{'Expand'|t}</span>
<span id="translation-expand-all">{'Expand all'|t}</span>
- <span id="translation-delete-link">{'Are you sure you want to delete this tag?'|t}</span>
+ <span id="translation-delete-link">{'Are you sure you want to delete this link?'|t}</span>
+ <span id="translation-delete-tag">{'Are you sure you want to delete this tag?'|t}</span>
<span id="translation-shaarli-desc">
{'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t}
</span>
<span id="translation-shaarli-desc">
{'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t}
</span>