Merge pull request #1552 from ArthurHoaro/feature/better-initializer

This commit is contained in:
ArthurHoaro 2020-09-12 12:14:18 +02:00 committed by GitHub
commit 6128ab6a55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 325 additions and 106 deletions

View file

@ -34,25 +34,77 @@ class BookmarkInitializer
public function initialize() public function initialize()
{ {
$bookmark = new Bookmark(); $bookmark = new Bookmark();
$bookmark->setTitle(t('My secret stuff... - Pastebin.com')); $bookmark->setTitle('quicksilver (loop) on Vimeo ' . t('(private bookmark with thumbnail demo)'));
$bookmark->setUrl('http://sebsauvage.net/paste/?8434b27936c09649#bR7XsXhoTiLcqCpQbmOpBi3rq2zzQUC5hBI7ZT1O3x8='); $bookmark->setUrl('https://vimeo.com/153493904');
$bookmark->setDescription(t('Shhhh! I\'m a private link only YOU can see. You can delete me too.')); $bookmark->setDescription(t(
$bookmark->setTagsString('secretstuff'); 'Shaarli will automatically pick up the thumbnail for links to a variety of websites.
Explore your new Shaarli instance by trying out controls and menus.
Visit the project on [Github](https://github.com/shaarli/Shaarli) or [the documentation](https://shaarli.readthedocs.io/en/master/) to learn more about Shaarli.
Now you can edit or delete the default shaares.
'
));
$bookmark->setTagsString('shaarli help thumbnail');
$bookmark->setPrivate(true); $bookmark->setPrivate(true);
$this->bookmarkService->add($bookmark, false); $this->bookmarkService->add($bookmark, false);
$bookmark = new Bookmark(); $bookmark = new Bookmark();
$bookmark->setTitle(t('The personal, minimalist, super-fast, database free, bookmarking service')); $bookmark->setTitle(t('Note: Shaare descriptions'));
$bookmark->setUrl('https://shaarli.readthedocs.io', []);
$bookmark->setDescription(t( $bookmark->setDescription(t(
'Welcome to Shaarli! This is your first public bookmark. ' 'Adding a shaare without entering a URL creates a text-only "note" post such as this one.
. 'To edit or delete me, you must first login. This note is private, so you are the only one able to see it while logged in.
To learn how to use Shaarli, consult the link "Documentation" at the bottom of this page. You can use this to keep notes, post articles, code snippets, and much more.
You use the community supported version of the original Shaarli project, by Sebastien Sauvage.' The Markdown formatting setting allows you to format your notes and bookmark description:
### Title headings
#### Multiple headings levels
* bullet lists
* _italic_ text
* **bold** text
* ~~strike through~~ text
* `code` blocks
* images
* [links](https://en.wikipedia.org/wiki/Markdown)
Markdown also supports tables:
| Name | Type | Color | Qty |
| ------- | --------- | ------ | ----- |
| Orange | Fruit | Orange | 126 |
| Apple | Fruit | Any | 62 |
| Lemon | Fruit | Yellow | 30 |
| Carrot | Vegetable | Red | 14 |
'
)); ));
$bookmark->setTagsString('opensource software'); $bookmark->setTagsString('shaarli help');
$bookmark->setPrivate(true);
$this->bookmarkService->add($bookmark, false);
$bookmark = new Bookmark();
$bookmark->setTitle(
'Shaarli - ' . t('The personal, minimalist, super-fast, database free, bookmarking service')
);
$bookmark->setDescription(t(
'Welcome to Shaarli!
Shaarli allows you to bookmark your favorite pages, and share them with others or store them privately.
You can add a description to your bookmarks, such as this one, and tag them.
Create a new shaare by clicking the `+Shaare` button, or using any of the recommended tools (browser extension, mobile app, bookmarklet, REST API, etc.).
You can easily retrieve your links, even with thousands of them, using the internal search engine, or search through tags (e.g. this Shaare is tagged with `shaarli` and `help`).
Hashtags such as #shaarli #help are also supported.
You can also filter the available [RSS feed](/feed/atom) and picture wall by tag or plaintext search.
We hope that you will enjoy using Shaarli, maintained with ❤️ by the community!
Feel free to open [an issue](https://github.com/shaarli/Shaarli/issues) if you have a suggestion or encounter an issue.
'
));
$bookmark->setTagsString('shaarli help');
$this->bookmarkService->add($bookmark, false); $this->bookmarkService->add($bookmark, false);
} }
} }

View file

@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Shaarli\n" "Project-Id-Version: Shaarli\n"
"POT-Creation-Date: 2020-08-27 12:01+0200\n" "POT-Creation-Date: 2020-09-10 16:06+0200\n"
"PO-Revision-Date: 2020-08-27 12:02+0200\n" "PO-Revision-Date: 2020-09-10 16:07+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Shaarli\n" "Language-Team: Shaarli\n"
"Language: fr_FR\n" "Language: fr_FR\n"
@ -60,16 +60,20 @@ msgid "Automatic"
msgstr "Automatique" msgstr "Automatique"
#: application/Languages.php:182 #: application/Languages.php:182
msgid "German"
msgstr "Allemand"
#: application/Languages.php:183
msgid "English" msgid "English"
msgstr "Anglais" msgstr "Anglais"
#: application/Languages.php:183 #: application/Languages.php:184
msgid "French" msgid "French"
msgstr "Français" msgstr "Français"
#: application/Languages.php:184 #: application/Languages.php:185
msgid "German" msgid "Japanese"
msgstr "Allemand" msgstr "Japonais"
#: application/Thumbnailer.php:62 #: application/Thumbnailer.php:62
msgid "" msgid ""
@ -103,36 +107,119 @@ msgstr "Mo"
msgid "GiB" msgid "GiB"
msgstr "Go" msgstr "Go"
#: application/bookmark/BookmarkFileService.php:165 #: application/bookmark/BookmarkFileService.php:174
#: application/bookmark/BookmarkFileService.php:190 #: application/bookmark/BookmarkFileService.php:199
#: application/bookmark/BookmarkFileService.php:215 #: application/bookmark/BookmarkFileService.php:224
#: application/bookmark/BookmarkFileService.php:232 #: application/bookmark/BookmarkFileService.php:241
msgid "You're not authorized to alter the datastore" msgid "You're not authorized to alter the datastore"
msgstr "Vous n'êtes pas autorisé à modifier les données" msgstr "Vous n'êtes pas autorisé à modifier les données"
#: application/bookmark/BookmarkFileService.php:168 #: application/bookmark/BookmarkFileService.php:177
#: application/bookmark/BookmarkFileService.php:193 #: application/bookmark/BookmarkFileService.php:202
#: application/bookmark/BookmarkFileService.php:235 #: application/bookmark/BookmarkFileService.php:244
msgid "Provided data is invalid" msgid "Provided data is invalid"
msgstr "Les informations fournies ne sont pas valides" msgstr "Les informations fournies ne sont pas valides"
#: application/bookmark/BookmarkFileService.php:196 #: application/bookmark/BookmarkFileService.php:205
msgid "This bookmarks already exists" msgid "This bookmarks already exists"
msgstr "Ce marque-page existe déjà." msgstr "Ce marque-page existe déjà."
#: application/bookmark/BookmarkInitializer.php:37 #: application/bookmark/BookmarkInitializer.php:37
#: application/legacy/LegacyLinkDB.php:266 msgid "(private bookmark with thumbnail demo)"
msgid "My secret stuff... - Pastebin.com" msgstr "(marque page privé avec une miniature)"
msgstr "Mes trucs secrets... - Pastebin.com"
#: application/bookmark/BookmarkInitializer.php:39 #: application/bookmark/BookmarkInitializer.php:40
#: application/legacy/LegacyLinkDB.php:268 msgid ""
msgid "Shhhh! I'm a private link only YOU can see. You can delete me too." "Shaarli will automatically pick up the thumbnail for links to a variety of "
"websites.\n"
"\n"
"Explore your new Shaarli instance by trying out controls and menus.\n"
"Visit the project on [Github](https://github.com/shaarli/Shaarli) or [the "
"documentation](https://shaarli.readthedocs.io/en/master/) to learn more "
"about Shaarli.\n"
"\n"
"Now you can edit or delete the default shaares.\n"
msgstr "" msgstr ""
"Pssst ! Je suis un lien privé que VOUS êtes le seul à voir. Vous pouvez me " "Shaarli récupérera automatiquement la miniature associée au liens pour de "
"supprimer aussi." "nombreux sites web.\n"
"\n"
"Explorez votre nouvelle instance de Shaarli en essayant les différents "
"contrôles et menus.\n"
"Visitez le projet sur [Github](https://github.com/shaarli/Shaarli) ou [la "
"documentation](https://shaarli.readthedocs.io/en/master/) pour en apprendre "
"plus sur Shaarli.\n"
"\n"
"Maintenant, vous pouvez modifier ou supprimer les shaares créés par défaut.\n"
#: application/bookmark/BookmarkInitializer.php:45 #: application/bookmark/BookmarkInitializer.php:53
msgid "Note: Shaare descriptions"
msgstr "Note : Description des Shaares"
#: application/bookmark/BookmarkInitializer.php:55
msgid ""
"Adding a shaare without entering a URL creates a text-only \"note\" post "
"such as this one.\n"
"This note is private, so you are the only one able to see it while logged "
"in.\n"
"\n"
"You can use this to keep notes, post articles, code snippets, and much "
"more.\n"
"\n"
"The Markdown formatting setting allows you to format your notes and bookmark "
"description:\n"
"\n"
"### Title headings\n"
"\n"
"#### Multiple headings levels\n"
" * bullet lists\n"
" * _italic_ text\n"
" * **bold** text\n"
" * ~~strike through~~ text\n"
" * `code` blocks\n"
" * images\n"
" * [links](https://en.wikipedia.org/wiki/Markdown)\n"
"\n"
"Markdown also supports tables:\n"
"\n"
"| Name | Type | Color | Qty |\n"
"| ------- | --------- | ------ | ----- |\n"
"| Orange | Fruit | Orange | 126 |\n"
"| Apple | Fruit | Any | 62 |\n"
"| Lemon | Fruit | Yellow | 30 |\n"
"| Carrot | Vegetable | Red | 14 |\n"
msgstr ""
"Ajouter un shaare sans préciser d'URL créé une « note » textuelle, telle que "
"celle-ci.\n"
"Cette note est privée, donc vous êtes seul à pouvoir la voir lorsque vous "
"êtes connecté.\n"
"\n"
"Vous pouvez utiliser cette fonctionnalité pour prendre des notes, publier "
"des articles, des extraits de code, et bien plus.\n"
"\n"
"L'option du formatage par Markdown vous permet de formater vos description "
"de notes et marque-pages :\n"
"\n"
"### Titre d'en-tête\n"
"\n"
"#### Sur plusieurs niveaux\n"
" * liste à puce\n"
" * texte en _italique_\n"
" * texte en **gras**\n"
" * texte ~~barré~~\n"
" * blocs de `code`\n"
" * images\n"
" * [liens](https://en.wikipedia.org/wiki/Markdown)\n"
"\n"
"Markdown supporte aussi les tableaux :\n"
"\n"
"| Nom | Type | Couleur | Qte |\n"
"| ------- | --------- | ------ | ----- |\n"
"| Orange | Fruit | Orange | 126 |\n"
"| Pomme | Fruit | Multiple | 62 |\n"
"| Citron | Fruit | Jaune | 30 |\n"
"| Carotte | Légume | Orange | 14 |\n"
#: application/bookmark/BookmarkInitializer.php:89
#: application/legacy/LegacyLinkDB.php:246 #: application/legacy/LegacyLinkDB.php:246
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49
@ -144,26 +231,54 @@ msgstr ""
"Le gestionnaire de marque-pages personnel, minimaliste, et sans base de " "Le gestionnaire de marque-pages personnel, minimaliste, et sans base de "
"données" "données"
#: application/bookmark/BookmarkInitializer.php:48 #: application/bookmark/BookmarkInitializer.php:92
#: application/legacy/LegacyLinkDB.php:249
msgid "" msgid ""
"Welcome to Shaarli! This is your first public bookmark. To edit or delete " "Welcome to Shaarli!\n"
"me, you must first login.\n"
"\n" "\n"
"To learn how to use Shaarli, consult the link \"Documentation\" at the " "Shaarli allows you to bookmark your favorite pages, and share them with "
"bottom of this page.\n" "others or store them privately.\n"
"You can add a description to your bookmarks, such as this one, and tag "
"them.\n"
"\n" "\n"
"You use the community supported version of the original Shaarli project, by " "Create a new shaare by clicking the `+Shaare` button, or using any of the "
"Sebastien Sauvage." "recommended tools (browser extension, mobile app, bookmarklet, REST API, "
"etc.).\n"
"\n"
"You can easily retrieve your links, even with thousands of them, using the "
"internal search engine, or search through tags (e.g. this Shaare is tagged "
"with `shaarli` and `help`).\n"
"Hashtags such as #shaarli #help are also supported.\n"
"You can also filter the available [RSS feed](/feed/atom) and picture wall by "
"tag or plaintext search.\n"
"\n"
"We hope that you will enjoy using Shaarli, maintained with ❤️ by the "
"community!\n"
"Feel free to open [an issue](https://github.com/shaarli/Shaarli/issues) if "
"you have a suggestion or encounter an issue.\n"
msgstr "" msgstr ""
"Bienvenue sur Shaarli ! Ceci est votre premier marque-page public. Pour me " "Bienvenue sur Shaarli !\n"
"modifier ou me supprimer, vous devez d'abord vous connecter.\n"
"\n" "\n"
"Pour apprendre à utiliser Shaarli, consultez le lien « Documentation » en " "Shaarli vous permet de sauvegarder des marque-pages de vos pages favorites, "
"bas de page.\n" "et de les partager avec d'autres, ou de les enregistrer en privé.\n"
"Vous pouvez ajouter une description à vos marque-pages, comme celle-ci, et y "
"ajouter des tags.\n"
"\n" "\n"
"Vous utilisez la version supportée par la communauté du projet original " "Créez un nouveau shaare en cliquant sur le bouton `+Shaare`, ou en utilisant "
"Shaarli de Sébastien Sauvage." "l'un des outils recommandés (extension de navigateur, application mobile, "
"bookmarklet, REST API, etc.).\n"
"\n"
"Vous pouvez facilement retrouver vos liens, même parmi des milliers, en "
"utilisant le moteur de recherche interne, ou en filtrant par tags (par "
"exemple ce Shaare est taggé avec `shaarli` et `help`).\n"
"Les hashtags comme #shaarli #help sont aussi supportés.\n"
"Vous pouvez aussi filtrer les [flux RSS](/feed/atom) et [mur d'images]() par "
"tag ou par texte brut.\n"
"\n"
"Nous espérons que vous apprécierez utiliser Shaarli, maintenu avec ❤️ par la "
"communauté !\n"
"N'hésitez pas à ouvrir [un ticket (en)](https://github.com/shaarli/Shaarli/"
"issues) si vous avez une suggestion ou si vous rencontrez un problème.\n"
" \n"
#: application/bookmark/exception/BookmarkNotFoundException.php:13 #: application/bookmark/exception/BookmarkNotFoundException.php:13
msgid "The link you are trying to reach does not exist or has been deleted." msgid "The link you are trying to reach does not exist or has been deleted."
@ -489,6 +604,36 @@ msgstr "Vous devez utiliser un entier comme clé."
msgid "Array offset and link ID must be equal." msgid "Array offset and link ID must be equal."
msgstr "La clé du tableau et l'ID du lien doivent être identiques." msgstr "La clé du tableau et l'ID du lien doivent être identiques."
#: application/legacy/LegacyLinkDB.php:249
msgid ""
"Welcome to Shaarli! This is your first public bookmark. To edit or delete "
"me, you must first login.\n"
"\n"
"To learn how to use Shaarli, consult the link \"Documentation\" at the "
"bottom of this page.\n"
"\n"
"You use the community supported version of the original Shaarli project, by "
"Sebastien Sauvage."
msgstr ""
"Bienvenue sur Shaarli ! Ceci est votre premier marque-page public. Pour me "
"modifier ou me supprimer, vous devez d'abord vous connecter.\n"
"\n"
"Pour apprendre à utiliser Shaarli, consultez le lien « Documentation » en "
"bas de page.\n"
"\n"
"Vous utilisez la version supportée par la communauté du projet original "
"Shaarli de Sébastien Sauvage."
#: application/legacy/LegacyLinkDB.php:266
msgid "My secret stuff... - Pastebin.com"
msgstr "Mes trucs secrets... - Pastebin.com"
#: application/legacy/LegacyLinkDB.php:268
msgid "Shhhh! I'm a private link only YOU can see. You can delete me too."
msgstr ""
"Pssst ! Je suis un lien privé que VOUS êtes le seul à voir. Vous pouvez me "
"supprimer aussi."
#: application/legacy/LegacyUpdater.php:104 #: application/legacy/LegacyUpdater.php:104
msgid "Couldn't retrieve updater class methods." msgid "Couldn't retrieve updater class methods."
msgstr "Impossible de récupérer les méthodes de la classe Updater." msgstr "Impossible de récupérer les méthodes de la classe Updater."
@ -562,7 +707,7 @@ msgstr "Voir sur archive.org"
msgid "For each link, add an Archive.org icon." msgid "For each link, add an Archive.org icon."
msgstr "Pour chaque lien, ajoute une icône pour Archive.org." msgstr "Pour chaque lien, ajoute une icône pour Archive.org."
#: plugins/default_colors/default_colors.php:33 #: plugins/default_colors/default_colors.php:38
msgid "" msgid ""
"Default colors plugin error: This plugin is active and no custom color is " "Default colors plugin error: This plugin is active and no custom color is "
"configured." "configured."
@ -570,21 +715,21 @@ msgstr ""
"Erreur du plugin default colors : ce plugin est actif et aucune couleur " "Erreur du plugin default colors : ce plugin est actif et aucune couleur "
"n'est configurée." "n'est configurée."
#: plugins/default_colors/default_colors.php:107 #: plugins/default_colors/default_colors.php:113
msgid "Override default theme colors. Use any CSS valid color." msgid "Override default theme colors. Use any CSS valid color."
msgstr "" msgstr ""
"Remplacer les couleurs du thème par défaut. Utiliser n'importe quelle " "Remplacer les couleurs du thème par défaut. Utiliser n'importe quelle "
"couleur CSS valide." "couleur CSS valide."
#: plugins/default_colors/default_colors.php:108 #: plugins/default_colors/default_colors.php:114
msgid "Main color (navbar green)" msgid "Main color (navbar green)"
msgstr "Couleur principale (vert de la barre de navigation)" msgstr "Couleur principale (vert de la barre de navigation)"
#: plugins/default_colors/default_colors.php:109 #: plugins/default_colors/default_colors.php:115
msgid "Background color (light grey)" msgid "Background color (light grey)"
msgstr "Couleur de fond (gris léger)" msgstr "Couleur de fond (gris léger)"
#: plugins/default_colors/default_colors.php:110 #: plugins/default_colors/default_colors.php:116
msgid "Dark main color (e.g. visited links)" msgid "Dark main color (e.g. visited links)"
msgstr "Couleur principale sombre (ex : les liens visités)" msgstr "Couleur principale sombre (ex : les liens visités)"
@ -1168,23 +1313,23 @@ msgstr "Changer statut épinglé"
msgid "Sticky" msgid "Sticky"
msgstr "Épinglé" msgstr "Épinglé"
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:7 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:5
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:7 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:5
msgid "Filters" msgid "Filters"
msgstr "Filtres" msgstr "Filtres"
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:12 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:10
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:12 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:10
msgid "Only display private links" msgid "Only display private links"
msgstr "Afficher uniquement les liens privés" msgstr "Afficher uniquement les liens privés"
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:15 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:13
msgid "Only display public links" msgid "Only display public links"
msgstr "Afficher uniquement les liens publics" msgstr "Afficher uniquement les liens publics"
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:20 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:18
msgid "Filter untagged links" msgid "Filter untagged links"
msgstr "Filtrer par liens privés" msgstr "Filtrer par liens privés"
@ -1193,17 +1338,17 @@ msgstr "Filtrer par liens privés"
msgid "Select all" msgid "Select all"
msgstr "Tout sélectionner" msgstr "Tout sélectionner"
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:27 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:89
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:27 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:29
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:79 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:89
#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:44 #: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:44
msgid "Fold all" msgid "Fold all"
msgstr "Replier tout" msgstr "Replier tout"
#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:76
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:72 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:76
msgid "Links per page" msgid "Links per page"
msgstr "Liens par page" msgstr "Liens par page"
@ -1429,32 +1574,24 @@ msgid "Rename or delete a tag in all links"
msgstr "Renommer ou supprimer un tag dans tous les liens" msgstr "Renommer ou supprimer un tag dans tous les liens"
#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
#, fuzzy
#| msgid ""
#| "Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, "
#| "delicious…)"
msgid "" msgid ""
"Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, " "Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, "
"delicious...)" "delicious...)"
msgstr "" msgstr ""
"Importer des marques pages au format Netscape HTML (comme exportés depuis " "Importer des marques pages au format Netscape HTML (comme exportés depuis "
"Firefox, Chrome, Opera, delicious)" "Firefox, Chrome, Opera, delicious...)"
#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
msgid "Import links" msgid "Import links"
msgstr "Importer des liens" msgstr "Importer des liens"
#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
#, fuzzy
#| msgid ""
#| "Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, "
#| "Opera, delicious…)"
msgid "" msgid ""
"Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, " "Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, "
"Opera, delicious...)" "Opera, delicious...)"
msgstr "" msgstr ""
"Exporter les marques pages au format Netscape HTML (comme exportés depuis " "Exporter les marques pages au format Netscape HTML (comme exportés depuis "
"Firefox, Chrome, Opera, delicious)" "Firefox, Chrome, Opera, delicious...)"
#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
msgid "Export database" msgid "Export database"

View file

@ -615,14 +615,18 @@ class BookmarkFileServiceTest extends TestCase
{ {
$dbSize = $this->privateLinkDB->count(); $dbSize = $this->privateLinkDB->count();
$this->privateLinkDB->initialize(); $this->privateLinkDB->initialize();
$this->assertEquals($dbSize + 2, $this->privateLinkDB->count()); $this->assertEquals($dbSize + 3, $this->privateLinkDB->count());
$this->assertEquals( $this->assertStringStartsWith(
'My secret stuff... - Pastebin.com', 'Shaarli will automatically pick up the thumbnail for links to a variety of websites.',
$this->privateLinkDB->get(43)->getTitle() $this->privateLinkDB->get(43)->getDescription()
); );
$this->assertEquals( $this->assertStringStartsWith(
'The personal, minimalist, super-fast, database free, bookmarking service', 'Adding a shaare without entering a URL creates a text-only "note" post such as this one.',
$this->privateLinkDB->get(44)->getTitle() $this->privateLinkDB->get(44)->getDescription()
);
$this->assertStringStartsWith(
'Welcome to Shaarli!',
$this->privateLinkDB->get(45)->getDescription()
); );
} }

View file

@ -37,7 +37,7 @@ class BookmarkInitializerTest extends TestCase
/** /**
* Initialize an empty BookmarkFileService * Initialize an empty BookmarkFileService
*/ */
public function setUp() public function setUp(): void
{ {
if (file_exists(self::$testDatastore)) { if (file_exists(self::$testDatastore)) {
unlink(self::$testDatastore); unlink(self::$testDatastore);
@ -64,17 +64,26 @@ class BookmarkInitializerTest extends TestCase
$this->initializer->initialize(); $this->initializer->initialize();
$this->assertEquals($refDB->countLinks() + 2, $this->bookmarkService->count()); $this->assertEquals($refDB->countLinks() + 3, $this->bookmarkService->count());
$bookmark = $this->bookmarkService->get(43); $bookmark = $this->bookmarkService->get(43);
$this->assertEquals(43, $bookmark->getId()); $this->assertStringStartsWith(
$this->assertEquals('My secret stuff... - Pastebin.com', $bookmark->getTitle()); 'Shaarli will automatically pick up the thumbnail for links to a variety of websites.',
$bookmark->getDescription()
);
$this->assertTrue($bookmark->isPrivate()); $this->assertTrue($bookmark->isPrivate());
$bookmark = $this->bookmarkService->get(44); $bookmark = $this->bookmarkService->get(44);
$this->assertEquals(44, $bookmark->getId()); $this->assertStringStartsWith(
$this->assertEquals( 'Adding a shaare without entering a URL creates a text-only "note" post such as this one.',
'The personal, minimalist, super-fast, database free, bookmarking service', $bookmark->getDescription()
$bookmark->getTitle() );
$this->assertTrue($bookmark->isPrivate());
$bookmark = $this->bookmarkService->get(45);
$this->assertStringStartsWith(
'Welcome to Shaarli!',
$bookmark->getDescription()
); );
$this->assertFalse($bookmark->isPrivate()); $this->assertFalse($bookmark->isPrivate());
@ -82,17 +91,26 @@ class BookmarkInitializerTest extends TestCase
// Reload from file // Reload from file
$this->bookmarkService = new BookmarkFileService($this->conf, $this->history, true); $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, true);
$this->assertEquals($refDB->countLinks() + 2, $this->bookmarkService->count()); $this->assertEquals($refDB->countLinks() + 3, $this->bookmarkService->count());
$bookmark = $this->bookmarkService->get(43); $bookmark = $this->bookmarkService->get(43);
$this->assertEquals(43, $bookmark->getId()); $this->assertStringStartsWith(
$this->assertEquals('My secret stuff... - Pastebin.com', $bookmark->getTitle()); 'Shaarli will automatically pick up the thumbnail for links to a variety of websites.',
$bookmark->getDescription()
);
$this->assertTrue($bookmark->isPrivate()); $this->assertTrue($bookmark->isPrivate());
$bookmark = $this->bookmarkService->get(44); $bookmark = $this->bookmarkService->get(44);
$this->assertEquals(44, $bookmark->getId()); $this->assertStringStartsWith(
$this->assertEquals( 'Adding a shaare without entering a URL creates a text-only "note" post such as this one.',
'The personal, minimalist, super-fast, database free, bookmarking service', $bookmark->getDescription()
$bookmark->getTitle() );
$this->assertTrue($bookmark->isPrivate());
$bookmark = $this->bookmarkService->get(45);
$this->assertStringStartsWith(
'Welcome to Shaarli!',
$bookmark->getDescription()
); );
$this->assertFalse($bookmark->isPrivate()); $this->assertFalse($bookmark->isPrivate());
} }
@ -107,17 +125,25 @@ class BookmarkInitializerTest extends TestCase
$this->initializer->initialize(); $this->initializer->initialize();
$this->assertEquals(2, $this->bookmarkService->count()); $this->assertEquals(3, $this->bookmarkService->count());
$bookmark = $this->bookmarkService->get(0); $bookmark = $this->bookmarkService->get(0);
$this->assertEquals(0, $bookmark->getId()); $this->assertStringStartsWith(
$this->assertEquals('My secret stuff... - Pastebin.com', $bookmark->getTitle()); 'Shaarli will automatically pick up the thumbnail for links to a variety of websites.',
$bookmark->getDescription()
);
$this->assertTrue($bookmark->isPrivate()); $this->assertTrue($bookmark->isPrivate());
$bookmark = $this->bookmarkService->get(1); $bookmark = $this->bookmarkService->get(1);
$this->assertEquals(1, $bookmark->getId()); $this->assertStringStartsWith(
$this->assertEquals( 'Adding a shaare without entering a URL creates a text-only "note" post such as this one.',
'The personal, minimalist, super-fast, database free, bookmarking service', $bookmark->getDescription()
$bookmark->getTitle() );
$this->assertTrue($bookmark->isPrivate());
$bookmark = $this->bookmarkService->get(2);
$this->assertStringStartsWith(
'Welcome to Shaarli!',
$bookmark->getDescription()
); );
$this->assertFalse($bookmark->isPrivate()); $this->assertFalse($bookmark->isPrivate());
} }