-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
323c515
commit d765c05
Showing
13 changed files
with
324 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: flusio\n" | ||
"POT-Creation-Date: 2020-07-17 12:23+0200\n" | ||
"PO-Revision-Date: 2020-07-17 12:23+0200\n" | ||
"POT-Creation-Date: 2020-07-21 15:45+0200\n" | ||
"PO-Revision-Date: 2020-07-21 15:58+0200\n" | ||
"Last-Translator: Marien Fressinaud <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: fr_FR\n" | ||
|
@@ -35,7 +35,8 @@ msgstr "Désolé mais vous ne pouvez pas supprimer le compte de démo 😉" | |
msgid "This collection doesn’t exist." | ||
msgstr "Cette collection n’existe pas." | ||
|
||
#: Collections.php:288 Links.php:369 Links.php:557 Sessions.php:191 | ||
#: Collections.php:288 Links.php:369 Links.php:550 Links.php:596 | ||
#: Sessions.php:191 | ||
msgid "A security verification failed." | ||
msgstr "Une vérification de sécurité a échoué." | ||
|
||
|
@@ -55,9 +56,9 @@ msgstr "Le lien doit être associé à une collection." | |
msgid "One of the associated collection doesn’t exist." | ||
msgstr "L’une des collections associées n’existe pas." | ||
|
||
#: Links.php:551 | ||
msgid "This link-collection relation doesn’t exist." | ||
msgstr "La relation lien-collection n’existe pas." | ||
#: Links.php:544 Links.php:590 | ||
msgid "The link doesn’t exist." | ||
msgstr "Le lien n’existe pas." | ||
|
||
#: Registrations.php:107 | ||
msgid "An account already exists with this email address." | ||
|
@@ -85,6 +86,18 @@ msgstr "Cacher" | |
msgid "Show" | ||
msgstr "Afficher" | ||
|
||
#: assets/javascripts/controllers/link_card_controller.js:35 | ||
#: assets/javascripts/controllers/link_card_controller.js:36 | ||
#: views/collections/show_bookmarks.phtml:56 | ||
#: views/collections/show_bookmarks.phtml:57 | ||
msgid "Remove from bookmarks" | ||
msgstr "Retirer des signets" | ||
|
||
#: assets/javascripts/controllers/link_card_controller.js:52 | ||
#: assets/javascripts/controllers/link_card_controller.js:53 | ||
msgid "Add to bookmarks" | ||
msgstr "Ajouter aux signets" | ||
|
||
#: mailers/Users.php:9 | ||
msgid "[flusio] Confirm your registration" | ||
msgstr "[flusio] Confirmer votre inscription" | ||
|
@@ -358,8 +371,8 @@ msgid_plural "%d links" | |
msgstr[0] "%d lien" | ||
msgstr[1] "%d liens" | ||
|
||
#: views/collections/index.phtml:38 views/collections/show.phtml:72 | ||
#: views/collections/show_bookmarks.phtml:55 | ||
#: views/collections/index.phtml:38 views/collections/show.phtml:59 | ||
#: views/collections/show_bookmarks.phtml:64 | ||
msgid "see" | ||
msgstr "voir" | ||
|
||
|
@@ -403,12 +416,7 @@ msgstr "Annuler et retourner aux collections" | |
msgid "Settings" | ||
msgstr "Paramètres" | ||
|
||
#: views/collections/show.phtml:64 views/collections/show.phtml:65 | ||
#, php-format | ||
msgid "Remove from %s" | ||
msgstr "Retirer de %s" | ||
|
||
#: views/collections/show.phtml:81 views/collections/show_bookmarks.phtml:64 | ||
#: views/collections/show.phtml:68 views/collections/show_bookmarks.phtml:73 | ||
msgid "" | ||
"This collection is empty. The links will appear here once you start adding " | ||
"them." | ||
|
@@ -420,11 +428,6 @@ msgstr "" | |
msgid "Place here the links you want to consult later on." | ||
msgstr "Placez ici les liens que vous souhaitez consulter plus tard." | ||
|
||
#: views/collections/show_bookmarks.phtml:47 | ||
#: views/collections/show_bookmarks.phtml:48 | ||
msgid "Remove from bookmarks" | ||
msgstr "Retirer des signets" | ||
|
||
#: views/internal_server_error.phtml:3 | ||
msgid "Something bad happened" | ||
msgstr "Quelque chose s’est mal passé" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/assets/javascripts/controllers/link_card_controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { Controller } from 'stimulus'; | ||
|
||
import _ from 'js/l10n.js'; | ||
|
||
export default class extends Controller { | ||
static get targets () { | ||
return ['bookmarkForm']; | ||
} | ||
|
||
toggleBookmarked (event) { | ||
event.preventDefault(); | ||
|
||
const isBookmarked = this.data.get('bookmarked') === 'true'; | ||
if (isBookmarked) { | ||
this.unbookmark(); | ||
} else { | ||
this.bookmark(); | ||
} | ||
} | ||
|
||
bookmark () { | ||
const action = this.data.get('bookmark-action'); | ||
const card = this.element; | ||
const form = this.bookmarkFormTarget; | ||
const button = form.querySelector('button'); | ||
const icon = form.querySelector('.icon--bookmark'); | ||
|
||
fetch(action, { | ||
method: 'post', | ||
body: new FormData(form), | ||
}).then(() => { | ||
this.data.set('bookmarked', 'true'); | ||
}); | ||
|
||
card.classList.remove('link--transparent'); | ||
icon.classList.add('icon--solid'); | ||
button.title = _('Remove from bookmarks'); | ||
button.setAttribute('aria-label', _('Remove from bookmarks')); | ||
} | ||
|
||
unbookmark () { | ||
const action = this.data.get('unbookmark-action'); | ||
const card = this.element; | ||
const form = this.bookmarkFormTarget; | ||
const button = form.querySelector('button'); | ||
const icon = form.querySelector('.icon--bookmark'); | ||
|
||
fetch(action, { | ||
method: 'post', | ||
body: new FormData(form), | ||
}).then(() => { | ||
this.data.set('bookmarked', 'false'); | ||
}); | ||
|
||
card.classList.add('link--transparent'); | ||
icon.classList.remove('icon--solid'); | ||
button.title = _('Add to bookmarks'); | ||
button.setAttribute('aria-label', _('Add to bookmarks')); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<?php | ||
|
||
$translations = [ | ||
'Add to bookmarks', | ||
'Hide', | ||
'Remove from bookmarks', | ||
'Show', | ||
]; | ||
|
||
|
Oops, something went wrong.