Sessions do not seem to work correctly on your server.
Make sure the " +"variable \"session.save_path\" is set correctly in your PHP config, and that " +"you have write access to it.
It currently points to %s.
On some " +"browsers, accessing your server via a hostname like 'localhost' or any " +"custom hostname without a dot causes cookie storage to fail. We recommend " +"accessing your server via it's IP address or Fully Qualified Domain Name.
" +msgstr "" +"Sessions scheinen auf deinem Server nicht korrekt zu funktionieren. " +"
Stelle sicher, dass die Variable \"session.save_path\" in deiner PHP-" +"Konfiguration richtig eingestellt ist und dass du Schreibzugriff darauf hast." +"
Es verweist aktuell auf %s.
Bei einigen Browsern führt der Zugriff " +"auf deinen Server über einen Hostnamen wie \"localhost\" oder einen " +"beliebigen benutzerdefinierten Hostnamen ohne Punkt dazu, dass der Cookie-" +"Speicher fehlschlägt. Wir empfehlen den Zugriff auf deinen Server über die " +"IP-Adresse oder den Fully Qualified Domain Namen.
" + +#: application/front/controller/visitor/InstallController.php:162 +msgid "" +"Shaarli is now configured. Please login and start shaaring your bookmarks!" +msgstr "" +"Shaarli ist nun konfiguriert. Bitte melden Dich an und teile Deine " +"Lesezeichen!" + +#: application/front/controller/visitor/InstallController.php:176 +msgid "Insufficient permissions:" +msgstr "Unzureichende Berechtigungen:" + +#: application/front/controller/visitor/LoginController.php:46 +#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 +#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:101 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:77 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:101 +msgid "Login" +msgstr "Einloggen" + +#: application/front/controller/visitor/LoginController.php:78 +msgid "Wrong login/password." +msgstr "Falscher Loging/Passwort." + +#: application/front/controller/visitor/PictureWallController.php:29 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:43 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:43 +msgid "Picture wall" +msgstr "Bildwand" + +#: application/front/controller/visitor/TagCloudController.php:90 +msgid "Tag " +msgstr "Tag Liste " + +#: application/front/exceptions/AlreadyInstalledException.php:11 +msgid "Shaarli has already been installed. Login to edit the configuration." +msgstr "" +"Shaarlie wurde bereits installiert. Melde Dich an zum Ändern der " +"Konfiguration." + +#: application/front/exceptions/LoginBannedException.php:11 +msgid "" +"You have been banned after too many failed login attempts. Try again later." +msgstr "" +"Du wurdest nach zu vielen fehlgeschlagenen Anmeldeversuchen gesperrt. " +"Versuche es später noch einmal." + +#: application/front/exceptions/OpenShaarliPasswordException.php:16 +msgid "You are not supposed to change a password on an Open Shaarli." +msgstr "Du darfst kein Passwort für ein offenes Shaarli ändern." + +#: application/front/exceptions/ThumbnailsDisabledException.php:11 +msgid "Picture wall unavailable (thumbnails are disabled)." +msgstr "Bildwand ist nicht verfügbar (Miniaturansichten sind deaktiviert)." + +#: application/front/exceptions/WrongTokenException.php:16 +msgid "Wrong token." +msgstr "Falsches Zeichen." + +#: application/helper/ApplicationUtils.php:165 #, php-format msgid "" "Your PHP version is obsolete! Shaarli requires at least PHP %s, and thus " @@ -30,89 +637,100 @@ msgstr "" "daher nicht laufen. Deine PHP-Version hat bekannte Sicherheitslücken und " "sollte so bald wie möglich aktualisiert werden." -#: application/ApplicationUtils.php:183 application/ApplicationUtils.php:195 +#: application/helper/ApplicationUtils.php:200 +#: application/helper/ApplicationUtils.php:220 msgid "directory is not readable" msgstr "Verzeichnis ist nicht lesbar" -#: application/ApplicationUtils.php:198 +#: application/helper/ApplicationUtils.php:223 msgid "directory is not writable" msgstr "Verzeichnis ist nicht beschreibbar" -#: application/ApplicationUtils.php:216 +#: application/helper/ApplicationUtils.php:247 msgid "file is not readable" msgstr "Datei ist nicht lesbar" -#: application/ApplicationUtils.php:219 +#: application/helper/ApplicationUtils.php:250 msgid "file is not writable" msgstr "Datei ist nicht beschreibbar" -#: application/Cache.php:16 -#, php-format -msgid "Cannot purge %s: no directory" -msgstr "Kann nicht löschen, %s ist kein Verzeichnis" +#: application/helper/ApplicationUtils.php:265 +msgid "" +"Lock can not be acquired on the datastore. You might encounter concurrent " +"access issues." +msgstr "" +"Der Datenspeicher kann nicht gesperrt werden. Möglicherweise treten Probleme " +"beim gleichzeitigen Zugriff auf." -#: application/FeedBuilder.php:151 -msgid "Direct link" -msgstr "Direct Link" +#: application/helper/ApplicationUtils.php:298 +msgid "Configuration parsing" +msgstr "Konfigurationsanalyse" -#: application/FeedBuilder.php:153 -#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:178 -msgid "Permalink" -msgstr "Permalink" +#: application/helper/ApplicationUtils.php:299 +msgid "Slim Framework (routing, etc.)" +msgstr "Slim Framework (Routing usw.)" -#: application/History.php:174 -msgid "History file isn't readable or writable" -msgstr "Protokolldatei nicht lesbar oder beschreibbar" +#: application/helper/ApplicationUtils.php:300 +msgid "Multibyte (Unicode) string support" +msgstr "Unterstützung für Multibyte-Zeichenfolgen (Unicode)" -#: application/History.php:185 -msgid "Could not parse history file" -msgstr "Protokolldatei konnte nicht analysiert werden" +#: application/helper/ApplicationUtils.php:301 +msgid "Required to use thumbnails" +msgstr "Erforderlich, um Miniaturansichten (Thumbnails) zu verwenden" -#: application/Languages.php:177 -msgid "Automatic" -msgstr "Automatisch" +#: application/helper/ApplicationUtils.php:302 +msgid "Localized text sorting (e.g. e->è->f)" +msgstr "Lokalisierte Textsortierung (z. B. e->è->f)" -#: application/Languages.php:178 -msgid "English" -msgstr "Englisch" +#: application/helper/ApplicationUtils.php:303 +msgid "Better retrieval of bookmark metadata and thumbnail" +msgstr "Besserer Abruf von Lesezeichen-Metadaten und Miniaturansichten" -#: application/Languages.php:179 -msgid "French" -msgstr "Französisch" +#: application/helper/ApplicationUtils.php:304 +msgid "Use the translation system in gettext mode" +msgstr "Verwende das Übersetzungssystem im gettext-Modus" -#: application/Languages.php:180 -msgid "German" -msgstr "Deutsch" +#: application/helper/ApplicationUtils.php:305 +msgid "Login using LDAP server" +msgstr "Anmeldung mittels LDAP-Server" -#: application/LinkDB.php:136 +#: application/helper/DailyPageHelper.php:179 +msgid "Week" +msgstr "Woche" + +#: application/helper/DailyPageHelper.php:183 +msgid "Today" +msgstr "Heute" + +#: application/helper/DailyPageHelper.php:185 +msgid "Yesterday" +msgstr "Gestern" + +#: application/helper/FileUtils.php:100 +msgid "Provided path is not a directory." +msgstr "Der angegebene Pfad ist kein Verzeichnis." + +#: application/helper/FileUtils.php:104 +msgid "Trying to delete a folder outside of Shaarli path." +msgstr "Versuch, einen Ordner außerhalb des Shaarli-Pfads zu löschen." + +#: application/legacy/LegacyLinkDB.php:131 msgid "You are not authorized to add a link." msgstr "Du bist nicht berechtigt einen Link hinzuzufügen." -#: application/LinkDB.php:139 +#: application/legacy/LegacyLinkDB.php:134 msgid "Internal Error: A link should always have an id and URL." msgstr "Interner Fehler: Ein Link sollte immer eine ID und URL haben." -#: application/LinkDB.php:142 +#: application/legacy/LegacyLinkDB.php:137 msgid "You must specify an integer as a key." msgstr "Du musst eine Ganzzahl als Schlüssel angeben." -#: application/LinkDB.php:145 +#: application/legacy/LegacyLinkDB.php:140 msgid "Array offset and link ID must be equal." msgstr "Array-Offset und Link-ID müssen gleich sein." -#: application/LinkDB.php:251 -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48 -msgid "" -"The personal, minimalist, super-fast, database free, bookmarking service" -msgstr "" -"Der persönliche, minimalistische, superschnelle, datenbankfreie " -"Lesezeichenservice" - -#: application/LinkDB.php:253 +#: 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" @@ -132,326 +750,115 @@ msgstr "" "Du verwendest die von der Community unterstützte Version des ursprünglichen " "Shaarli-Projekts von Sebastien Sauvage." -#: application/LinkDB.php:267 +#: application/legacy/LegacyLinkDB.php:266 msgid "My secret stuff... - Pastebin.com" msgstr "Meine geheimen Sachen... - Pastebin.com" -#: application/LinkDB.php:269 +#: application/legacy/LegacyLinkDB.php:268 msgid "Shhhh! I'm a private link only YOU can see. You can delete me too." msgstr "" "Pssst Ich bin ein privater Link, den nur du sehen kannst. Du kannst mich " "auch löschen." -#: application/LinkFilter.php:452 -msgid "The link you are trying to reach does not exist or has been deleted." -msgstr "" -"Den Link, den du versucht zu erreichen, existiert nicht oder wurde gelöscht." +#: application/legacy/LegacyUpdater.php:104 +msgid "Couldn't retrieve updater class methods." +msgstr "Die Updater-Klassenmethoden konnten nicht abgerufen werden." -#: application/NetscapeBookmarkUtils.php:35 +#: application/legacy/LegacyUpdater.php:540 +msgid "" +msgstr "" + +#: application/netscape/NetscapeBookmarkUtils.php:63 msgid "Invalid export selection:" msgstr "Ungültige Exportauswahl:" -#: application/NetscapeBookmarkUtils.php:81 +#: application/netscape/NetscapeBookmarkUtils.php:215 #, php-format msgid "File %s (%d bytes) " msgstr "Datei %s (%d bytes) " -#: application/NetscapeBookmarkUtils.php:83 +#: application/netscape/NetscapeBookmarkUtils.php:217 msgid "has an unknown file format. Nothing was imported." msgstr "hat ein unbekanntes Dateiformat. Es wurde nichts importiert." -#: application/NetscapeBookmarkUtils.php:86 +#: application/netscape/NetscapeBookmarkUtils.php:221 #, php-format msgid "" -"was successfully processed in %d seconds: %d links imported, %d links " -"overwritten, %d links skipped." +"was successfully processed in %d seconds: %d bookmarks imported, %d " +"bookmarks overwritten, %d bookmarks skipped." msgstr "" -"wurde erfolgreich in %d Sekunden verarbeitet: %d Links importiert, %d Links " -"überschrieben, %d Links übersprungen." +"wurde erfolgreich in %d Sekunden verarbeitet: %d Lesezeichen importiert, %d " +"Lesezeichen überschrieben, %d Lesezeichen übersprungen." -#: application/PageBuilder.php:168 -msgid "The page you are trying to reach does not exist or has been deleted." -msgstr "" -"Die Seite, die du erreichen möchtest, existiert nicht oder wurde gelöscht." +#: application/plugin/PluginManager.php:99 +#: application/plugin/PluginManager.php:137 +msgid " [plugin incompatibility]: " +msgstr " [Plugin-Inkompatibiliät]: " -#: application/PageBuilder.php:170 -msgid "404 Not Found" -msgstr "404 Nicht gefunden" - -#: application/PluginManager.php:243 +#: application/plugin/exception/PluginFileNotFoundException.php:22 #, php-format msgid "Plugin \"%s\" files not found." msgstr "Plugin \"%s\" Dateien nicht gefunden." -#: application/Updater.php:76 -msgid "Couldn't retrieve Updater class methods." -msgstr "Die Updater-Klassenmethoden konnten nicht abgerufen werden." +#: application/render/PageCacheManager.php:33 +#, php-format +msgid "Cannot purge %s: no directory" +msgstr "Kann nicht löschen, %s ist kein Verzeichnis" -#: application/Updater.php:532 +#: application/updater/exception/UpdaterException.php:51 msgid "An error occurred while running the update " msgstr "Beim Ausführen des Updates ist ein Fehler aufgetreten " -#: application/Updater.php:572 -msgid "Updates file path is not set, can't write updates." -msgstr "" -"Der Update-Dateipfad ist nicht festgelegt, es können keine Updates " -"geschrieben werden." +#: index.php:82 +msgid "Shared bookmarks on " +msgstr "Geteilte Lesezeichen auf " -#: application/Updater.php:577 -msgid "Unable to write updates in " -msgstr "Es ist nicht möglich Updates zu schreiben in " - -#: application/Utils.php:376 tests/UtilsTest.php:340 -msgid "Setting not set" -msgstr "Einstellung nicht gesetzt" - -#: application/Utils.php:383 tests/UtilsTest.php:338 tests/UtilsTest.php:339 -msgid "Unlimited" -msgstr "Unbegrenzt" - -#: application/Utils.php:386 tests/UtilsTest.php:335 tests/UtilsTest.php:336 -#: tests/UtilsTest.php:350 -msgid "B" -msgstr "B" - -#: application/Utils.php:386 tests/UtilsTest.php:329 tests/UtilsTest.php:330 -#: tests/UtilsTest.php:337 -msgid "kiB" -msgstr "kiB" - -#: application/Utils.php:386 tests/UtilsTest.php:331 tests/UtilsTest.php:332 -#: tests/UtilsTest.php:348 tests/UtilsTest.php:349 -msgid "MiB" -msgstr "MiB" - -#: application/Utils.php:386 tests/UtilsTest.php:333 tests/UtilsTest.php:334 -msgid "GiB" -msgstr "GiB" - -#: application/config/ConfigJson.php:52 application/config/ConfigPhp.php:121 -msgid "" -"Shaarli could not create the config file. Please make sure Shaarli has the " -"right to write in the folder is it installed in." -msgstr "" -"Shaarli konnte die Konfigurationsdatei nicht erstellen. Bitte stelle sicher, " -"dass Shaarli das Recht hat, in den Ordner zu schreiben, in dem es " -"installiert ist." - -#: application/config/ConfigManager.php:135 -msgid "Invalid setting key parameter. String expected, got: " -msgstr "" -"Ungültiger Parameter für den Einstellungsschlüssel. Zeichenfolge erwartet, " -"erhalten: " - -#: application/config/exception/MissingFieldConfigException.php:21 -#, php-format -msgid "Configuration value is required for %s" -msgstr "Konfigurationswert erforderlich für %s" - -#: application/config/exception/PluginConfigOrderException.php:15 -msgid "An error occurred while trying to save plugins loading order." -msgstr "" -"Beim Versuch, die Ladereihenfolge der Plugins zu speichern, ist ein Fehler " -"aufgetreten." - -#: application/config/exception/UnauthorizedConfigException.php:16 -msgid "You are not authorized to alter config." -msgstr "Du bist nicht berechtigt, die Konfiguration zu ändern." - -#: application/exceptions/IOException.php:19 -msgid "Error accessing" -msgstr "Fehler beim Zugriff" - -#: index.php:142 -msgid "Shared links on " -msgstr "Geteilte Links auf " - -#: index.php:164 -msgid "Insufficient permissions:" -msgstr "Unzureichende Berechtigungen:" - -#: index.php:303 -msgid "I said: NO. You are banned for the moment. Go away." -msgstr "Ich sagte NEIN. Du bist für den Moment gesperrt. Verschwinde." - -#: index.php:368 -msgid "Wrong login/password." -msgstr "Falscher Loging/Passwort." - -#: index.php:576 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:42 -msgid "Daily" -msgstr "Täglich" - -#: index.php:681 tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 -#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:95 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:71 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:95 -msgid "Login" -msgstr "Einloggen" - -#: index.php:722 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:39 -msgid "Picture wall" -msgstr "Bildwand" - -#: index.php:770 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:36 -#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 -msgid "Tag cloud" -msgstr "Tag Cloud" - -#: index.php:803 tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 -msgid "Tag list" -msgstr "Tag Liste" - -#: index.php:1028 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:31 -msgid "Tools" -msgstr "Tools" - -#: index.php:1037 -msgid "You are not supposed to change a password on an Open Shaarli." -msgstr "Du darfst kein Passwort für ein offenes Shaarli ändern." - -#: index.php:1042 index.php:1084 index.php:1160 index.php:1191 index.php:1291 -msgid "Wrong token." -msgstr "Falsches Zeichen." - -#: index.php:1047 -msgid "The old password is not correct." -msgstr "Das alte Passwort ist nicht korrekt." - -#: index.php:1067 -msgid "Your password has been changed" -msgstr "Dein Passwort wurde geändert" - -#: index.php:1072 -#: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 -msgid "Change password" -msgstr "Passwort ändern" - -#: index.php:1120 -msgid "Configuration was saved." -msgstr "Konfiguration wurde gespeichert." - -#: index.php:1143 tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 -msgid "Configure" -msgstr "Konfigurieren" - -#: index.php:1154 tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 -msgid "Manage tags" -msgstr "Tags verwalten" - -#: index.php:1172 -#, php-format -msgid "The tag was removed from %d link." -msgid_plural "The tag was removed from %d links." -msgstr[0] "Der Tag wurde aus dem Link %d entfernt." -msgstr[1] "Der Tag wurde aus den Links %d entfernt." - -#: index.php:1173 -#, php-format -msgid "The tag was renamed in %d link." -msgid_plural "The tag was renamed in %d links." -msgstr[0] "Der Tag wurde im Link %d umbenannt." -msgstr[1] "Der Tag wurde in den Links %d umbenannt." - -#: index.php:1181 tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 -msgid "Shaare a new link" -msgstr "Teile einen neuen Link" - -#: index.php:1351 tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:170 -msgid "Edit" -msgstr "Bearbeiten" - -#: index.php:1351 index.php:1421 -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:26 -msgid "Shaare" -msgstr "Teilen" - -#: index.php:1390 -msgid "Note: " -msgstr "Notiz: " - -#: index.php:1430 tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 -msgid "Export" -msgstr "Exportieren" - -#: index.php:1492 tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 -msgid "Import" -msgstr "Importieren" - -#: index.php:1502 -#, php-format -msgid "" -"The file you are trying to upload is probably bigger than what this " -"webserver can accept (%s). Please upload in smaller chunks." -msgstr "" -"Die Datei, die du hochladen möchtest, ist wahrscheinlich größer als das, was " -"dieser Webserver akzeptieren kann (%s). Bitte lade in kleineren Blöcken hoch." - -#: index.php:1541 tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 -msgid "Plugin administration" -msgstr "Plugin Adminstration" - -#: index.php:1706 -msgid "Search: " -msgstr "Suche: " - -#: index.php:1933 -#, php-format -msgid "" -"Sessions do not seem to work correctly on your server.
Make sure the " -"variable \"session.save_path\" is set correctly in your PHP config, and that " -"you have write access to it.
It currently points to %s.
On some " -"browsers, accessing your server via a hostname like 'localhost' or any " -"custom hostname without a dot causes cookie storage to fail. We recommend " -"accessing your server via it's IP address or Fully Qualified Domain Name.
" -msgstr "" -"Sessions scheinen auf deinem Server nicht korrekt zu funktionieren. " -"
Stelle sicher, dass die Variable \"session.save_path\" in deiner PHP-" -"Konfiguration richtig eingestellt ist und dass du Schreibzugriff darauf hast." -"
Es verweist aktuell auf %s.
Bei einigen Browsern führt der Zugriff " -"auf deinen Server über einen Hostnamen wie \"localhost\" oder einen " -"beliebigen benutzerdefinierten Hostnamen ohne Punkt dazu, dass der Cookie-" -"Speicher fehlschlägt. Wir empfehlen den Zugriff auf deinen Server über die " -"IP-Adresse oder den Fully Qualified Domain Namen.
" - -#: index.php:1943 -msgid "Click to try again." -msgstr "Klicke um es erneut zu versuchen." - -#: plugins/addlink_toolbar/addlink_toolbar.php:29 +#: plugins/addlink_toolbar/addlink_toolbar.php:31 msgid "URI" msgstr "URI" -#: plugins/addlink_toolbar/addlink_toolbar.php:33 -#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 +#: plugins/addlink_toolbar/addlink_toolbar.php:35 +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 msgid "Add link" msgstr "Link hinzufügen" -#: plugins/addlink_toolbar/addlink_toolbar.php:50 +#: plugins/addlink_toolbar/addlink_toolbar.php:52 msgid "Adds the addlink input on the linklist page." msgstr "Fügt die Link-hinzufügen-Eingabe auf der Linkliste hinzu." -#: plugins/archiveorg/archiveorg.php:23 +#: plugins/archiveorg/archiveorg.php:29 msgid "View on archive.org" msgstr "Auf archive.org ansehen" -#: plugins/archiveorg/archiveorg.php:36 +#: plugins/archiveorg/archiveorg.php:42 msgid "For each link, add an Archive.org icon." msgstr "Füge für jeden Link ein Archive.org Symbol hinzu." -#: plugins/demo_plugin/demo_plugin.php:465 +#: plugins/default_colors/default_colors.php:38 +msgid "" +"Default colors plugin error: This plugin is active and no custom color is " +"configured." +msgstr "" +"Fehler beim Plugin für Standardfarben: Dieses Plugin ist aktiv und es ist " +"keine benutzerdefinierte Farbe konfiguriert." + +#: plugins/default_colors/default_colors.php:127 +msgid "Override default theme colors. Use any CSS valid color." +msgstr "Überschreibe Standard-Thema-Farben. Benutze jede gültige CSS Farbe." + +#: plugins/default_colors/default_colors.php:128 +msgid "Main color (navbar green)" +msgstr "Haupt-Farbe (navbar grün)" + +#: plugins/default_colors/default_colors.php:129 +msgid "Background color (light grey)" +msgstr "Hintergrund-Farbe (hellgrau)" + +#: plugins/default_colors/default_colors.php:130 +msgid "Dark main color (e.g. visited links)" +msgstr "Dunkle Haupt-Farbe (z. B. besuchte Links)" + +#: plugins/demo_plugin/demo_plugin.php:495 msgid "" "A demo plugin covering all use cases for template designers and plugin " "developers." @@ -459,7 +866,16 @@ msgstr "" "Ein Demo-Plugin, das alle Anwendungsfälle für Template-Designer und Plugin-" "Entwickler abdeckt." -#: plugins/isso/isso.php:20 +#: plugins/demo_plugin/demo_plugin.php:496 +msgid "This is a parameter dedicated to the demo plugin. It'll be suffixed." +msgstr "" +"Dies ist ein Parameter, der dem Demo-Plugin gewidmet ist. Es wird angehängt." + +#: plugins/demo_plugin/demo_plugin.php:497 +msgid "Other demo parameter" +msgstr "Andere Demo-Parameter" + +#: plugins/isso/isso.php:22 msgid "" "Isso plugin error: Please define the \"ISSO_SERVER\" setting in the plugin " "administration page." @@ -467,47 +883,17 @@ msgstr "" "Isso Plugin Fehler: Bitte definiere die Einstellung \"ISSO_SERVER\" auf der " "Plugin-Administrationsseite." -#: plugins/isso/isso.php:63 +#: plugins/isso/isso.php:92 msgid "Let visitor comment your shaares on permalinks with Isso." msgstr "" "Lassen Sie Besucher ihre geteilten Links auf Permalinks mit Isso " "kommentieren." -#: plugins/isso/isso.php:64 +#: plugins/isso/isso.php:93 msgid "Isso server URL (without 'http://')" msgstr "Isso Server URL (ohne 'http://')" -#: plugins/markdown/markdown.php:158 -msgid "Description will be rendered with" -msgstr "Die Beschreibung wird dargestellt mit" - -#: plugins/markdown/markdown.php:159 -msgid "Markdown syntax documentation" -msgstr "Markdown Syntax Dokumentation" - -#: plugins/markdown/markdown.php:160 -msgid "Markdown syntax" -msgstr "Markdown Syntax" - -#: plugins/markdown/markdown.php:339 -msgid "" -"Render shaare description with Markdown syntax.
Warning" -"strong>:\n" -"If your shaared descriptions contained HTML tags before enabling the " -"markdown plugin,\n" -"enabling it might break your page.\n" -"See the README." -msgstr "" -"Übertrage Teilen Beschreibung mit Markdown-Syntax.
Warnung" -"strong>:\n" -"Wenn deine Teilen Beschreibungen HTML-Tags enthielten, bevor das Markdown-" -"Plugin aktiviert wurde,\n" -"kann es deine Seite beschädigen, solltest du es aktivieren.\n" -"Weitere Informationen findest du in der README." - -#: plugins/piwik/piwik.php:21 +#: plugins/piwik/piwik.php:24 msgid "" "Piwik plugin error: Please define PIWIK_URL and PIWIK_SITEID in the plugin " "administration page." @@ -515,28 +901,28 @@ msgstr "" "Piwik-Plugin-Fehler: Bitte definiere die PIWIK_URL und PIWIK_SITEID auf der " "Plugin-Administrationsseite." -#: plugins/piwik/piwik.php:70 +#: plugins/piwik/piwik.php:73 msgid "A plugin that adds Piwik tracking code to Shaarli pages." msgstr "" "Ein Plugin, das einen Piwik-Tracking-Code auf Shaarli-Seiten hinzufügt." -#: plugins/piwik/piwik.php:71 +#: plugins/piwik/piwik.php:74 msgid "Piwik URL" msgstr "Piwik URL" -#: plugins/piwik/piwik.php:72 +#: plugins/piwik/piwik.php:75 msgid "Piwik site ID" msgstr "Piwik site ID" -#: plugins/playvideos/playvideos.php:22 +#: plugins/playvideos/playvideos.php:26 msgid "Video player" msgstr "Videoplayer" -#: plugins/playvideos/playvideos.php:25 +#: plugins/playvideos/playvideos.php:29 msgid "Play Videos" msgstr "Videos abspielen" -#: plugins/playvideos/playvideos.php:56 +#: plugins/playvideos/playvideos.php:60 msgid "Add a button in the toolbar allowing to watch all videos." msgstr "" "Fügt eine Schaltfläche in der Symbolleiste hinzu, mit der man alle Videos " @@ -546,30 +932,30 @@ msgstr "" msgid "plugins/playvideos/jquery-1.11.2.min.js" msgstr "plugins/playvideos/jquery-1.11.2.min.js" -#: plugins/pubsubhubbub/pubsubhubbub.php:69 +#: plugins/pubsubhubbub/pubsubhubbub.php:72 #, php-format msgid "Could not publish to PubSubHubbub: %s" msgstr "Veröffentlichung auf PubSubHubbub nicht möglich: %s" -#: plugins/pubsubhubbub/pubsubhubbub.php:95 +#: plugins/pubsubhubbub/pubsubhubbub.php:99 #, php-format msgid "Could not post to %s" msgstr "Kann nicht posten auf %s" -#: plugins/pubsubhubbub/pubsubhubbub.php:99 +#: plugins/pubsubhubbub/pubsubhubbub.php:103 #, php-format msgid "Bad response from the hub %s" msgstr "Ungültige Antwort vom Hub %s" -#: plugins/pubsubhubbub/pubsubhubbub.php:110 +#: plugins/pubsubhubbub/pubsubhubbub.php:114 msgid "Enable PubSubHubbub feed publishing." msgstr "Aktiviere PubSubHubbub Feed Veröffentlichung." -#: plugins/qrcode/qrcode.php:69 plugins/wallabag/wallabag.php:68 +#: plugins/qrcode/qrcode.php:74 plugins/wallabag/wallabag.php:72 msgid "For each link, add a QRCode icon." msgstr "Für jeden Link, füge eine QRCode Icon hinzu." -#: plugins/wallabag/wallabag.php:21 +#: plugins/wallabag/wallabag.php:22 msgid "" "Wallabag plugin error: Please define the \"WALLABAG_URL\" setting in the " "plugin administration page." @@ -577,23 +963,28 @@ msgstr "" "Wallabag Plugin Fehler: Bitte definiere die Einstellung \"WALLABAG_URL\" auf " "der Plugin Administrationsseite." -#: plugins/wallabag/wallabag.php:47 +#: plugins/wallabag/wallabag.php:49 msgid "Save to wallabag" msgstr "Auf Wallabag speichern" -#: plugins/wallabag/wallabag.php:69 +#: plugins/wallabag/wallabag.php:73 msgid "Wallabag API URL" msgstr "Wallabag API URL" -#: plugins/wallabag/wallabag.php:70 +#: plugins/wallabag/wallabag.php:74 msgid "Wallabag API version (1 or 2)" msgstr "Wallabag API version (1 oder 2)" #: tests/LanguagesTest.php:214 tests/LanguagesTest.php:227 -#: tests/languages/fr/LanguagesFrTest.php:160 -#: tests/languages/fr/LanguagesFrTest.php:173 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:81 +#: tests/languages/fr/LanguagesFrTest.php:159 +#: tests/languages/fr/LanguagesFrTest.php:172 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:87 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:87 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:139 +#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 +#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:45 msgid "Search" msgid_plural "Search" msgstr[0] "Suche" @@ -607,6 +998,48 @@ msgstr "Entschuldige, hier gibt es nichts zu sehen." msgid "URL or leave empty to post a note" msgstr "URL oder leer lassen um eine Notiz hinzuzufügen" +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 +msgid "BULK CREATION" +msgstr "Mehrfach-Erstellung" + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40 +msgid "Metadata asynchronous retrieval is disabled." +msgstr "Der asynchrone Metadatenabruf ist deaktiviert." + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 +msgid "" +"We recommend that you enable the setting general > " +"enable_async_metadata in your configuration file to use bulk link " +"creation." +msgstr "" +"Es wird empfohlen, dass Du die Einstellung \"allgemein > " +"enable_async_metadata in Deiner Konfigurationsdatei aktivierst, um die " +"Massen-Linkerstellung verwenden zu können." + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:56 +msgid "Shaare multiple new links" +msgstr "Shaare mehrere neuen Links" + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:59 +msgid "Add one URL per line to create multiple bookmarks." +msgstr "Füge eine URL pro Zeile hinzu, um mehrere Lesezeichen zu erstellen." + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:63 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:67 +msgid "Tags" +msgstr "Tags" + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:73 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 +#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 +msgid "Private" +msgstr "Privat" + +#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:78 +msgid "Add links" +msgstr "Links hinzufügen" + #: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 msgid "Current password" msgstr "Aktuelles Passwort" @@ -633,23 +1066,48 @@ msgid "Case sensitive" msgstr "Groß- / Kleinschreibung-unterscheidend" #: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 -msgid "Rename" -msgstr "Umbenennen" +#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:68 +msgid "Rename tag" +msgstr "Tag umbenennen" #: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35 -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:172 -msgid "Delete" -msgstr "Löschen" +msgid "Delete tag" +msgstr "Lösche Tag" -#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40 msgid "You can also edit tags in the" msgstr "Du kannst auch Tags bearbeiten in der" -#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40 msgid "tag list" msgstr "Tag Liste" +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 +msgid "Change tags separator" +msgstr "Tags-Trennzeichen ändern" + +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50 +msgid "Your current tag separator is" +msgstr "Ihr aktuelles Tag-Trennzeichen ist" + +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:53 +msgid "New separator" +msgstr "Neues Trennzeichen" + +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:355 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:121 +#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 +#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 +msgid "Save" +msgstr "Speichern" + +#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:61 +msgid "Note that hashtags won't fully work with a non-whitespace separator." +msgstr "" +"Beachten Sie, dass Hashtags nicht vollständig mit einem Nicht-" +"Leerraumtrennzeichen funktionieren." + #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 msgid "title" msgstr "Titel" @@ -666,128 +1124,177 @@ msgstr "Standardwert" msgid "Theme" msgstr "Thema" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:87 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:78 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:85 +msgid "Description formatter" +msgstr "Beschreibungsformatierer" + +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:114 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77 msgid "Language" msgstr "Sprache" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:116 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:143 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:101 msgid "Timezone" msgstr "Zeitzone" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:103 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:144 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 msgid "Continent" msgstr "Kontinent" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:103 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:144 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 msgid "City" msgstr "Stadt" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:164 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:191 msgid "Disable session cookie hijacking protection" msgstr "Deaktiviere Session Cookie Hijacking Schutz" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:166 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:193 msgid "Check this if you get disconnected or if your IP address changes often" msgstr "" "Überprüfe dies, wenn die Verbindung getrennt wird oder wenn sich deine IP-" "Adresse häufig ändert" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:183 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:210 msgid "Private links by default" msgstr "Standardmäßig Private Links" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:184 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:211 msgid "All new links are private by default" msgstr "Alle neuen Links sind standardmäßig privat" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:226 msgid "RSS direct links" msgstr "RSS Direkt Links" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:200 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:227 msgid "Check this to use direct URL instead of permalink in feeds" msgstr "" "Aktivieren diese Option, um direkte URLs anstelle von Permalinks in Feeds zu " "verwenden" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:215 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:242 msgid "Hide public links" msgstr "Verstecke öffentliche Links" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:216 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:243 msgid "Do not show any links if the user is not logged in" msgstr "Zeige keine Links, wenn der Benutzer nicht angemeldet ist" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:231 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:150 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:258 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:149 msgid "Check updates" msgstr "Auf Updates prüfen" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:232 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:152 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:259 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:151 msgid "Notify me when a new release is ready" msgstr "Benachrichtige mich, wenn eine neue Version zur Verfügung steht" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:247 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:274 +msgid "Automatically retrieve description for new bookmarks" +msgstr "Automatisches Abrufen der Beschreibung für neue Lesezeichen" + +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:275 +msgid "Shaarli will try to retrieve the description from meta HTML headers" +msgstr "Shaarli versucht, die Beschreibung aus Meta-HTML-Headern abzurufen" + +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:290 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:168 msgid "Enable REST API" msgstr "Aktiviere REST API" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:248 -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:170 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:291 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 msgid "Allow third party software to use Shaarli such as mobile application" msgstr "" "Erlaube Software von Drittanbietern für Shaarli, wie z.B. die mobile " "Anwendung" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:263 +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:306 msgid "API secret" -msgstr "API secret" +msgstr "API-Geheimnis" -#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:274 -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74 -#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 -#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 -msgid "Save" -msgstr "Speichern" +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:320 +msgid "Enable thumbnails" +msgstr "Aktivierte Thunbnails" -#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 -msgid "The Daily Shaarli" -msgstr "Der tägliche Shaarli" +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:324 +msgid "You need to enable the extensionphp-gd
to use thumbnails." +msgstr "" +"Sie müssen die Erweiterungphp-gd
aktivieren, um " +"Miniaturansichten zu verwenden." -#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:17 -msgid "1 RSS entry per day" -msgstr "1 RSS Eintrag pro Tag" +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:328 +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:122 +msgid "Synchronize thumbnails" +msgstr "Thumbnails synchronisieren" -#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:37 -msgid "Previous day" -msgstr "Vorheriger Tag" +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:339 +#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 +msgid "All" +msgstr "Alle" -#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 -msgid "All links of one day in a single page." -msgstr "Alle Links eines Tages auf einer Seite." +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:343 +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:106 +msgid "Only common media hosts" +msgstr "Nur gängige Medienhosts" -#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:51 -msgid "Next day" -msgstr "Nächster Tag" +#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:347 +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:110 +msgid "None" +msgstr "Keine" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25 +#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 +msgid "1 RSS entry per :type" +msgid_plural "" +msgstr[0] "1 RSS Eintrag pro :type" +msgstr[1] "1 RSS Eintrag pro :type" + +#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 +msgid "Previous :type" +msgid_plural "" +msgstr[0] "Vorheriger :type" +msgstr[1] "Vorherige :type" + +#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:56 +#: tmp/dailyrss.b91ef64efc3688266305ea9b42e5017e.rtpl.php:7 +msgid "All links of one :type in a single page." +msgid_plural "" +msgstr[0] "Alle Links eines :type auf einer Seite." +msgstr[1] "Alle Links aller :type auf einer Seite." + +#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:63 +msgid "Next :type" +msgid_plural "" +msgstr[0] "Nächster :type" +msgstr[1] "Nächste :type" + +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 +msgid "Edit Shaare" +msgstr "Bearbeite Shaare" + +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 +msgid "New Shaare" +msgstr "Neue Shaare" + +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38 msgid "Created:" msgstr "Erstellt:" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 msgid "URL" msgstr "URL" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 msgid "Title" msgstr "Titel" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58 #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75 #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99 @@ -795,41 +1302,56 @@ msgstr "Titel" msgid "Description" msgstr "Beschreibung" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 -msgid "Tags" -msgstr "Tags" +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:89 +msgid "Description will be rendered with" +msgstr "Beschreibung wird dargestellt mit" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:59 -#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:168 -msgid "Private" -msgstr "Privat" +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:91 +msgid "Markdown syntax documentation" +msgstr "Dokumentation der Markdown-Syntax" -#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74 +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:92 +msgid "Markdown syntax" +msgstr "Markdown-Syntax" + +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:115 +msgid "Cancel" +msgstr "Abbruch" + +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:121 msgid "Apply Changes" msgstr "Änderungen übernehmen" +#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:126 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:173 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:147 +#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:67 +msgid "Delete" +msgstr "Löschen" + +#: tmp/editlink.batch.b91ef64efc3688266305ea9b42e5017e.rtpl.php:21 +#: tmp/editlink.batch.b91ef64efc3688266305ea9b42e5017e.rtpl.php:32 +msgid "Save all" +msgstr "Speichere alles" + #: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 msgid "Export Database" msgstr "Exportiere Datenbank" -#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 +#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23 msgid "Selection" msgstr "Beschreibung" -#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31 -msgid "All" -msgstr "Alle" - -#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 +#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40 msgid "Public" msgstr "Öffentlich" -#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:52 +#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:51 msgid "Prepend note permalinks with this Shaarli instance's URL" msgstr "Voranstellen von Notizen-Permalinks mit der URL dieser Shaarli-Instanz" -#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:53 +#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:52 msgid "Useful to import bookmarks in a web browser" msgstr "Sinnvoll Lesezeichen im Browser zu importieren" @@ -869,224 +1391,269 @@ msgstr "Duplikate basierend auf URL" msgid "Add default tags" msgstr "Standard-Tag hinzufügen" -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 -msgid "Install Shaarli" -msgstr "Installiere Shaarli" - #: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25 msgid "It looks like it's the first time you run Shaarli. Please configure it." msgstr "" "Es sieht so aus, als ob du Shaarli das erste mal verwendest. Bitte " "konfiguriere es." -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:33 -#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:147 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:32 +#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:167 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:167 msgid "Username" msgstr "Benutzername" -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 -#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:148 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:148 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 +#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:168 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:168 msgid "Password" msgstr "Passwort" -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:63 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:62 msgid "Shaarli title" msgstr "Shaarli Titel" -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:69 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:68 msgid "My links" msgstr "Meine Links" -#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:182 +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:181 msgid "Install" msgstr "Installiere" +#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:190 +msgid "Server requirements" +msgstr "Server-Anforderungen" + #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:80 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 msgid "shaare" msgid_plural "shaares" msgstr[0] "Teile" msgstr[1] "Teilen" #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:84 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 msgid "private link" msgid_plural "private links" msgstr[0] "Privater Link" msgstr[1] "Private Links" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:117 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:123 msgid "Search text" msgstr "Text durchsuchen" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:124 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:124 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:37 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:130 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:130 #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 -#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:64 +#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 #: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 #: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74 msgid "Filter by tag" msgstr "Nach Tag filtern" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:111 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:110 msgid "Nothing found." msgstr "Nichts gefunden." -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:119 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:118 #, php-format msgid "%s result" msgid_plural "%s results" msgstr[0] "%s Ergebnis" msgstr[1] "%s Ergebnisse" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:122 msgid "for" msgstr "für" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:130 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:129 msgid "tagged" msgstr "markiert" +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:133 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:134 msgid "Remove tag" msgstr "Tag entfernen" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:143 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:144 msgid "with status" msgstr "mit Status" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:154 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:155 msgid "without any tag" msgstr "ohne irgendeinen Tag" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:174 -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:42 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:175 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:41 msgid "Fold" -msgstr "Ablegen" +msgstr "Einklappen" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:176 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:177 msgid "Edited: " msgstr "Bearbeitet: " -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:180 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:181 msgid "permalink" msgstr "Permalink" -#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:182 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:183 msgid "Add tag" msgstr "Tag hinzufügen" -#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:7 -#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:7 +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:185 +msgid "Toggle sticky" +msgstr "Anheften umschalten" + +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:187 +msgid "Sticky" +msgstr "Angeheftet" + +#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:189 +msgid "Share a private link" +msgstr "Teile einen privaten Link" + +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:5 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:5 msgid "Filters" msgstr "Filter" -#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:12 -#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:12 +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:10 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:10 msgid "Only display private links" msgstr "Zeige nur private Links" -#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 -#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:15 +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:13 msgid "Only display public links" msgstr "Zeige nur öffentliche Links" -#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 -#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:20 +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:18 msgid "Filter untagged links" msgstr "Unmarkierte Tags filtern" #: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 -#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:76 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:24 -#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:76 -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:43 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:43 -msgid "Fold all" -msgstr "Alles ablegen" +msgid "Select all" +msgstr "Alle selektieren" -#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:69 -#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:69 +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:89 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:29 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:89 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:42 +msgid "Fold all" +msgstr "Alles einklappen" + +#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:76 +#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:76 msgid "Links per page" msgstr "Links pro Seite" -#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 -msgid "" -"You have been banned after too many failed login attempts. Try again later." -msgstr "" -"Du wurdest nach zu vielen fehlgeschlagenen Anmeldeversuchen gesperrt. " -"Versuche es später noch einmal." - -#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:151 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:151 +#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:171 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:171 msgid "Remember me" msgstr "Erinnere dich an mich" -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15 #: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48 msgid "by the Shaarli community" msgstr "von der Shaarli Community" -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:16 msgid "Documentation" msgstr "Dokumentation" -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:44 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:43 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:43 msgid "Expand" msgstr "Erweitern" -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:45 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:45 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:44 msgid "Expand all" msgstr "Alles erweitern" -#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 -#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:46 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:45 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:45 msgid "Are you sure you want to delete this link?" msgstr "Bist du sicher das du diesen Link löschen möchtest?" -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:61 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:86 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:61 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:86 +#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 +#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:46 +msgid "Are you sure you want to delete this tag?" +msgstr "Bist du sicher das du diesen Tag löschen möchtest?" + +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:11 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:11 +msgid "Menu" +msgstr "Menü" + +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:38 +#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 +msgid "Tag cloud" +msgstr "Tag-Cloud" + +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:67 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:92 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:67 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:92 msgid "RSS Feed" msgstr "RSS Feed" -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:66 -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:66 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:102 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:108 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:72 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:108 msgid "Logout" msgstr "Ausloggen" -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:169 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:152 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:152 +msgid "Set public" +msgstr "Setze Status auf Öffentlich" + +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:157 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:157 +msgid "Set private" +msgstr "Setze Status auf Privat" + +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:189 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:189 msgid "is available" msgstr "ist verfügbar" -#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:176 -#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:176 +#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:196 +#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:196 msgid "Error" msgstr "Fehler" -#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 +msgid "There is no cached thumbnail." +msgstr "Es gibt keine zwischengespeicherte Miniaturansicht / Thumbnail." + +#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:17 +msgid "Try to synchronize them." +msgstr "Versuche sie zu synchronisieren." + +#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 msgid "Picture Wall" msgstr "Bildwand" -#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 msgid "pics" msgstr "Bilder" @@ -1095,6 +1662,11 @@ msgid "You need to enable Javascript to change plugin loading order." msgstr "" "Du musst Javascript aktivieren um die Ladereihenfolge der Plugins zu ändern." +#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 +msgid "Plugin administration" +msgstr "Plugin-Administration" + #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 msgid "Enabled Plugins" msgstr "Aktivierte Plugins" @@ -1144,12 +1716,138 @@ msgstr "In der Dokumentation" #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:150 msgid "Plugin configuration" -msgstr "Plugin Konfiguration" +msgstr "Plugin-Konfiguration" #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:195 msgid "No parameter available." msgstr "Kein Parameter verfügbar." +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 +msgid "General" +msgstr "Allgemein" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:20 +msgid "Index URL" +msgstr "Index-URL" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 +msgid "Base path" +msgstr "Basispfad" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 +msgid "Client IP" +msgstr "Client-IP" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 +msgid "Trusted reverse proxies" +msgstr "Vertrauenswürdige Reverse-Proxies" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58 +msgid "N/A" +msgstr "n. a." + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:67 +msgid "Version" +msgstr "Version" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71 +msgid "Current version" +msgstr "Aktuelle Version" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:80 +msgid "Latest release" +msgstr "Letzte Veröffentlichung" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:84 +msgid "Visit releases page on Github" +msgstr "Besuche die Releases-/Veröffentlichungs-Seite bei Github" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:92 +msgid "Thumbnails" +msgstr "Thumbnails / Miniaturbilder" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:96 +msgid "Thumbnails status" +msgstr "Thumbnails-Status" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:121 +msgid "Synchronize all link thumbnails" +msgstr "Synchronisiere alle Link-Thumbnails" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:128 +msgid "Cache" +msgstr "Zwischenspeicher" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:132 +msgid "Clear main cache" +msgstr "Haupt-Zwischenspeicher leeren" + +#: tmp/server.b91ef64efc3688266305ea9b42e5017e.rtpl.php:138 +msgid "Clear thumbnails cache" +msgstr "Leere Thumbnail-Zwischenspeicher" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:2 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:2 +msgid "Permissions" +msgstr "Berechtigungen" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:8 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:8 +msgid "There are permissions that need to be fixed." +msgstr "Es gibt Berechtigungen, die korrigiert werden müssen." + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:23 +msgid "All read/write permissions are properly set." +msgstr "Alle Lese-/Schreib-Berechtigungen sind richtig gesetzt." + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:32 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:32 +msgid "Running PHP" +msgstr "Laufendes PHP" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:36 +msgid "End of life: " +msgstr "Abgekündigt: " + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:48 +msgid "Extension" +msgstr "Erweiterung" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:49 +msgid "Usage" +msgstr "Benutzung" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:50 +msgid "Status" +msgstr "Status" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:51 +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:66 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:51 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:66 +msgid "Loaded" +msgstr "Geladen" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:60 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:60 +msgid "Required" +msgstr "Erforderlich" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:60 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:60 +msgid "Optional" +msgstr "optional" + +#: tmp/server.requirements.b91ef64efc3688266305ea9b42e5017e.rtpl.php:70 +#: tmp/server.requirements.cedf684561d925457130839629000a81.rtpl.php:70 +msgid "Not loaded" +msgstr "Nicht geladen" + #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 #: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 msgid "tags" @@ -1160,6 +1858,10 @@ msgstr "Tags" msgid "List all links with those tags" msgstr "Zeige alle Links mit diesen Tags" +#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 +msgid "Tag list" +msgstr "Tag Liste" + #: tmp/tag.sort.b91ef64efc3688266305ea9b42e5017e.rtpl.php:3 #: tmp/tag.sort.cedf684561d925457130839629000a81.rtpl.php:3 msgid "Sort by:" @@ -1196,15 +1898,19 @@ msgstr "Shaarli konfigurieren" msgid "Enable, disable and configure plugins" msgstr "Plugins aktivieren, deaktivieren und konfigurieren" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:27 +msgid "Check instance's server configuration" +msgstr "Überprüfe die Server-Konfiguration dieser Instanz" + +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 msgid "Change your password" msgstr "Ändere dein Passwort" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 msgid "Rename or delete a tag in all links" msgstr "Umbenennen oder löschen eines Tags in allen Links" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 msgid "" "Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, " "delicious...)" @@ -1212,11 +1918,11 @@ msgstr "" "Importiere Netscape Lesezeichen (wie aus Firefox exportiert, Chrome, Opera, " "delicious...)" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 msgid "Import links" msgstr "Importiere Links" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:53 msgid "" "Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, " "Opera, delicious...)" @@ -1224,11 +1930,11 @@ msgstr "" "Exportiere Netscape HTML Lesezeichen (welche in Firefox importiert werden " "können, Chrome, Opera, delicious...)" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:54 msgid "Export database" msgstr "Exportiere Datenbank" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77 msgid "" "Drag one of these button to your bookmarks toolbar or right-click it and " "\"Bookmark This Link\"" @@ -1237,13 +1943,13 @@ msgstr "" "klicke mit der rechten Maustaste darauf und \"Speichere diesen Link als " "Lesezeichen\"" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:78 msgid "then click on the bookmarklet in any page you want to share." msgstr "" "Klicke dann auf das Bookmarklet auf jeder Seite, welches du teilen möchtest." -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:76 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:100 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:82 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:106 msgid "" "Drag this link to your bookmarks toolbar or right-click it and Bookmark This " "Link" @@ -1251,22 +1957,22 @@ msgstr "" "Ziehe diese Link in deine Lesezeichen-Symbolleiste oder klicke mit der " "rechten Maustaste darauf und \"Speichere diesen Link als Lesezeichen\"" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 msgid "then click ✚Shaare link button in any page you want to share" msgstr "" "klicke dann auf die Schaltfläche ✚Teilen auf jeder Seite, die du teilen " "möchtest" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:86 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:108 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:92 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:114 msgid "The selected text is too long, it will be truncated." msgstr "Der ausgewählte Text ist zu lang, er wird gekürzt." -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:96 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 msgid "Shaare link" msgstr "Teile Link" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:101 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:107 msgid "" "Then click ✚Add Note button anytime to start composing a private Note (text " "post) to your Shaarli" @@ -1274,40 +1980,42 @@ msgstr "" "Klicke auf ✚Notiz hinzufügen um eine private Notiz (Textnachricht) zu " "Shaarli hinzuzufügen" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 msgid "Add Note" msgstr "Notiz hinzufügen" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:129 -msgid "" -"You need to browse your Shaarli over HTTPS to use this " -"functionality." -msgstr "" -"Um diese Funktion nutzen zu können, musst du Shaarli über HTTPS" -"strong> aufrufen." - -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:134 -msgid "Add to" -msgstr "Hinzufügen zu" - -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:145 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:132 msgid "3rd party" msgstr "Von Dritten" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:153 -msgid "Plugin" -msgstr "Plugin" - -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:148 -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:154 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:135 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:140 msgid "plugin" msgstr "Plugin" -#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:175 +#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:165 msgid "" "Drag this link to your bookmarks toolbar, or right-click it and choose " "Bookmark This Link" msgstr "" "Ziehe diesen Link in deine Lesezeichen-Symbolleiste oder klicke mit der " "rechten Maustaste darauf und wähle \"Speichere diesen Link als Lesezeichen\"" + +#~ msgid "Rename" +#~ msgstr "Umbenennen" + +#~ msgid "The Daily Shaarli" +#~ msgstr "Der tägliche Shaarli" + +#~ msgid "" +#~ "You need to browse your Shaarli over HTTPS to use this " +#~ "functionality." +#~ msgstr "" +#~ "Um diese Funktion nutzen zu können, musst du Shaarli über HTTPS" +#~ "strong> aufrufen." + +#~ msgid "Add to" +#~ msgstr "Hinzufügen zu" + +#~ msgid "Plugin" +#~ msgstr "Plugin" diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po index 26dede4e..01492af4 100644 --- a/inc/languages/fr/LC_MESSAGES/shaarli.po +++ b/inc/languages/fr/LC_MESSAGES/shaarli.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Shaarli\n" -"POT-Creation-Date: 2020-11-09 14:39+0100\n" -"PO-Revision-Date: 2020-11-09 14:42+0100\n" +"POT-Creation-Date: 2020-11-24 13:13+0100\n" +"PO-Revision-Date: 2020-11-24 13:14+0100\n" "Last-Translator: \n" "Language-Team: Shaarli\n" "Language: fr_FR\n" @@ -20,31 +20,31 @@ msgstr "" "X-Poedit-SearchPath-3: init.php\n" "X-Poedit-SearchPath-4: plugins\n" -#: application/History.php:180 +#: application/History.php:181 msgid "History file isn't readable or writable" msgstr "Le fichier d'historique n'est pas accessible en lecture ou en écriture" -#: application/History.php:191 +#: application/History.php:192 msgid "Could not parse history file" msgstr "Format incorrect pour le fichier d'historique" -#: application/Languages.php:181 +#: application/Languages.php:184 msgid "Automatic" msgstr "Automatique" -#: application/Languages.php:182 +#: application/Languages.php:185 msgid "German" msgstr "Allemand" -#: application/Languages.php:183 +#: application/Languages.php:186 msgid "English" msgstr "Anglais" -#: application/Languages.php:184 +#: application/Languages.php:187 msgid "French" msgstr "Français" -#: application/Languages.php:185 +#: application/Languages.php:188 msgid "Japanese" msgstr "Japonais" @@ -56,46 +56,46 @@ msgstr "" "l'extension php-gd doit être chargée pour utiliser les miniatures. Les " "miniatures sont désormais désactivées. Rechargez la page." -#: application/Utils.php:402 +#: application/Utils.php:405 msgid "Setting not set" msgstr "Paramètre non défini" -#: application/Utils.php:409 +#: application/Utils.php:412 msgid "Unlimited" msgstr "Illimité" -#: application/Utils.php:412 +#: application/Utils.php:415 msgid "B" msgstr "o" -#: application/Utils.php:412 +#: application/Utils.php:415 msgid "kiB" msgstr "ko" -#: application/Utils.php:412 +#: application/Utils.php:415 msgid "MiB" msgstr "Mo" -#: application/Utils.php:412 +#: application/Utils.php:415 msgid "GiB" msgstr "Go" -#: application/bookmark/BookmarkFileService.php:183 -#: application/bookmark/BookmarkFileService.php:205 -#: application/bookmark/BookmarkFileService.php:227 -#: application/bookmark/BookmarkFileService.php:241 +#: application/bookmark/BookmarkFileService.php:185 +#: application/bookmark/BookmarkFileService.php:207 +#: application/bookmark/BookmarkFileService.php:229 +#: application/bookmark/BookmarkFileService.php:243 msgid "You're not authorized to alter the datastore" msgstr "Vous n'êtes pas autorisé à modifier les données" -#: application/bookmark/BookmarkFileService.php:208 +#: application/bookmark/BookmarkFileService.php:210 msgid "This bookmarks already exists" msgstr "Ce marque-page existe déjà" -#: application/bookmark/BookmarkInitializer.php:39 +#: application/bookmark/BookmarkInitializer.php:42 msgid "(private bookmark with thumbnail demo)" msgstr "(marque page privé avec une miniature)" -#: application/bookmark/BookmarkInitializer.php:42 +#: application/bookmark/BookmarkInitializer.php:45 msgid "" "Shaarli will automatically pick up the thumbnail for links to a variety of " "websites.\n" @@ -118,11 +118,11 @@ msgstr "" "\n" "Maintenant, vous pouvez modifier ou supprimer les shaares créés par défaut.\n" -#: application/bookmark/BookmarkInitializer.php:55 +#: application/bookmark/BookmarkInitializer.php:58 msgid "Note: Shaare descriptions" msgstr "Note : Description des Shaares" -#: application/bookmark/BookmarkInitializer.php:57 +#: application/bookmark/BookmarkInitializer.php:60 msgid "" "Adding a shaare without entering a URL creates a text-only \"note\" post " "such as this one.\n" @@ -186,7 +186,7 @@ msgstr "" "| Citron | Fruit | Jaune | 30 |\n" "| Carotte | Légume | Orange | 14 |\n" -#: application/bookmark/BookmarkInitializer.php:91 +#: application/bookmark/BookmarkInitializer.php:94 #: application/legacy/LegacyLinkDB.php:246 #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 @@ -198,7 +198,7 @@ msgstr "" "Le gestionnaire de marque-pages personnel, minimaliste, et sans base de " "données" -#: application/bookmark/BookmarkInitializer.php:94 +#: application/bookmark/BookmarkInitializer.php:97 msgid "" "Welcome to Shaarli!\n" "\n" @@ -247,11 +247,11 @@ msgstr "" "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:14 msgid "The link you are trying to reach does not exist or has been deleted." msgstr "Le lien que vous essayez de consulter n'existe pas ou a été supprimé." -#: application/config/ConfigJson.php:52 application/config/ConfigPhp.php:129 +#: application/config/ConfigJson.php:52 application/config/ConfigPhp.php:131 msgid "" "Shaarli could not create the config file. Please make sure Shaarli has the " "right to write in the folder is it installed in." @@ -259,12 +259,12 @@ msgstr "" "Shaarli n'a pas pu créer le fichier de configuration. Merci de vérifier que " "Shaarli a les droits d'écriture dans le dossier dans lequel il est installé." -#: application/config/ConfigManager.php:136 -#: application/config/ConfigManager.php:163 +#: application/config/ConfigManager.php:137 +#: application/config/ConfigManager.php:164 msgid "Invalid setting key parameter. String expected, got: " msgstr "Clé de paramétrage invalide. Chaîne de caractères obtenue, attendu : " -#: application/config/exception/MissingFieldConfigException.php:21 +#: application/config/exception/MissingFieldConfigException.php:20 #, php-format msgid "Configuration value is required for %s" msgstr "Le paramètre %s est obligatoire" @@ -274,48 +274,48 @@ msgid "An error occurred while trying to save plugins loading order." msgstr "" "Une erreur s'est produite lors de la sauvegarde de l'ordre des extensions." -#: application/config/exception/UnauthorizedConfigException.php:16 +#: application/config/exception/UnauthorizedConfigException.php:15 msgid "You are not authorized to alter config." msgstr "Vous n'êtes pas autorisé à modifier la configuration." -#: application/exceptions/IOException.php:22 +#: application/exceptions/IOException.php:23 msgid "Error accessing" msgstr "Une erreur s'est produite en accédant à" -#: application/feed/FeedBuilder.php:179 +#: application/feed/FeedBuilder.php:180 msgid "Direct link" msgstr "Liens directs" -#: application/feed/FeedBuilder.php:181 +#: application/feed/FeedBuilder.php:182 #: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:103 #: tmp/dailyrss.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:179 msgid "Permalink" msgstr "Permalien" -#: application/front/controller/admin/ConfigureController.php:54 +#: application/front/controller/admin/ConfigureController.php:56 #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 msgid "Configure" msgstr "Configurer" -#: application/front/controller/admin/ConfigureController.php:102 -#: application/legacy/LegacyUpdater.php:537 +#: application/front/controller/admin/ConfigureController.php:106 +#: application/legacy/LegacyUpdater.php:539 msgid "You have enabled or changed thumbnails mode." msgstr "Vous avez activé ou changé le mode de miniatures." -#: application/front/controller/admin/ConfigureController.php:103 -#: application/front/controller/admin/ServerController.php:75 -#: application/legacy/LegacyUpdater.php:538 +#: application/front/controller/admin/ConfigureController.php:108 +#: application/front/controller/admin/ServerController.php:76 +#: application/legacy/LegacyUpdater.php:540 msgid "Please synchronize them." msgstr "Merci de les synchroniser." -#: application/front/controller/admin/ConfigureController.php:113 -#: application/front/controller/visitor/InstallController.php:146 +#: application/front/controller/admin/ConfigureController.php:119 +#: application/front/controller/visitor/InstallController.php:149 msgid "Error while writing config file after configuration update." msgstr "" "Une erreur s'est produite lors de la sauvegarde du fichier de configuration." -#: application/front/controller/admin/ConfigureController.php:122 +#: application/front/controller/admin/ConfigureController.php:128 msgid "Configuration was saved." msgstr "La configuration a été sauvegardée." @@ -433,7 +433,7 @@ msgstr "Administration serveur" msgid "Thumbnails cache has been cleared." msgstr "Le cache des miniatures a été vidé." -#: application/front/controller/admin/ServerController.php:83 +#: application/front/controller/admin/ServerController.php:85 msgid "Shaarli's cache folder has been cleared!" msgstr "Le dossier de cache de Shaarli a été vidé !" @@ -459,18 +459,18 @@ msgstr "Le lien avec l'identifiant %s n'a pas pu être trouvé." msgid "Invalid visibility provided." msgstr "Visibilité du lien non valide." -#: application/front/controller/admin/ShaarePublishController.php:171 +#: application/front/controller/admin/ShaarePublishController.php:173 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:171 msgid "Edit" msgstr "Modifier" -#: application/front/controller/admin/ShaarePublishController.php:174 +#: application/front/controller/admin/ShaarePublishController.php:176 #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:28 msgid "Shaare" msgstr "Shaare" -#: application/front/controller/admin/ShaarePublishController.php:205 +#: application/front/controller/admin/ShaarePublishController.php:208 msgid "Note: " msgstr "Note : " @@ -485,7 +485,7 @@ msgstr "Mise à jour des miniatures" msgid "Tools" msgstr "Outils" -#: application/front/controller/visitor/BookmarkListController.php:120 +#: application/front/controller/visitor/BookmarkListController.php:121 msgid "Search: " msgstr "Recherche : " @@ -535,12 +535,12 @@ msgstr "Une erreur inattendue s'est produite." msgid "Requested page could not be found." msgstr "La page demandée n'a pas pu être trouvée." -#: application/front/controller/visitor/InstallController.php:64 +#: application/front/controller/visitor/InstallController.php:65 #: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 msgid "Install Shaarli" msgstr "Installation de Shaarli" -#: application/front/controller/visitor/InstallController.php:83 +#: application/front/controller/visitor/InstallController.php:85 #, php-format msgid "" "Sessions do not seem to work correctly on your server.
Make sure the " @@ -559,14 +559,14 @@ msgstr "" "des cookies. Nous vous recommandons d'accéder à votre serveur depuis son " "adresse IP ou un Fully Qualified Domain Name.
" -#: application/front/controller/visitor/InstallController.php:154 +#: application/front/controller/visitor/InstallController.php:157 msgid "" "Shaarli is now configured. Please login and start shaaring your bookmarks!" msgstr "" "Shaarli est maintenant configuré. Vous pouvez vous connecter et commencez à " "shaare vos liens !" -#: application/front/controller/visitor/InstallController.php:168 +#: application/front/controller/visitor/InstallController.php:171 msgid "Insufficient permissions:" msgstr "Permissions insuffisantes :" @@ -580,7 +580,7 @@ msgstr "Permissions insuffisantes :" msgid "Login" msgstr "Connexion" -#: application/front/controller/visitor/LoginController.php:77 +#: application/front/controller/visitor/LoginController.php:78 msgid "Wrong login/password." msgstr "Nom d'utilisateur ou mot de passe incorrect(s)." @@ -620,7 +620,7 @@ msgstr "" msgid "Wrong token." msgstr "Jeton invalide." -#: application/helper/ApplicationUtils.php:162 +#: application/helper/ApplicationUtils.php:165 #, php-format msgid "" "Your PHP version is obsolete! Shaarli requires at least PHP %s, and thus " @@ -631,52 +631,60 @@ msgstr "" "peut donc pas fonctionner. Votre version de PHP a des failles de sécurités " "connues et devrait être mise à jour au plus tôt." -#: application/helper/ApplicationUtils.php:195 -#: application/helper/ApplicationUtils.php:215 +#: application/helper/ApplicationUtils.php:200 +#: application/helper/ApplicationUtils.php:220 msgid "directory is not readable" msgstr "le répertoire n'est pas accessible en lecture" -#: application/helper/ApplicationUtils.php:218 +#: application/helper/ApplicationUtils.php:223 msgid "directory is not writable" msgstr "le répertoire n'est pas accessible en écriture" -#: application/helper/ApplicationUtils.php:240 +#: application/helper/ApplicationUtils.php:247 msgid "file is not readable" msgstr "le fichier n'est pas accessible en lecture" -#: application/helper/ApplicationUtils.php:243 +#: application/helper/ApplicationUtils.php:250 msgid "file is not writable" msgstr "le fichier n'est pas accessible en écriture" -#: application/helper/ApplicationUtils.php:277 +#: application/helper/ApplicationUtils.php:260 +msgid "" +"Lock can not be acquired on the datastore. You might encounter concurrent " +"access issues." +msgstr "" +"Le fichier datastore ne peut pas être verrouillé. Vous pourriez rencontrer " +"des problèmes d'accès concurrents." + +#: application/helper/ApplicationUtils.php:293 msgid "Configuration parsing" msgstr "Chargement de la configuration" -#: application/helper/ApplicationUtils.php:278 +#: application/helper/ApplicationUtils.php:294 msgid "Slim Framework (routing, etc.)" msgstr "Slim Framwork (routage, etc.)" -#: application/helper/ApplicationUtils.php:279 +#: application/helper/ApplicationUtils.php:295 msgid "Multibyte (Unicode) string support" msgstr "Support des chaînes de caractère multibytes (Unicode)" -#: application/helper/ApplicationUtils.php:280 +#: application/helper/ApplicationUtils.php:296 msgid "Required to use thumbnails" msgstr "Obligatoire pour utiliser les miniatures" -#: application/helper/ApplicationUtils.php:281 +#: application/helper/ApplicationUtils.php:297 msgid "Localized text sorting (e.g. e->è->f)" msgstr "Tri des textes traduits (ex : e->è->f)" -#: application/helper/ApplicationUtils.php:282 +#: application/helper/ApplicationUtils.php:298 msgid "Better retrieval of bookmark metadata and thumbnail" msgstr "Meilleure récupération des meta-données des marque-pages et minatures" -#: application/helper/ApplicationUtils.php:283 +#: application/helper/ApplicationUtils.php:299 msgid "Use the translation system in gettext mode" msgstr "Utiliser le système de traduction en mode gettext" -#: application/helper/ApplicationUtils.php:284 +#: application/helper/ApplicationUtils.php:300 msgid "Login using LDAP server" msgstr "Authentification via un serveur LDAP" @@ -750,7 +758,7 @@ msgstr "" msgid "Couldn't retrieve updater class methods." msgstr "Impossible de récupérer les méthodes de la classe Updater." -#: application/legacy/LegacyUpdater.php:538 +#: application/legacy/LegacyUpdater.php:540 msgid "" msgstr "" @@ -776,11 +784,11 @@ msgstr "" "a été importé avec succès en %d secondes : %d liens importés, %d liens " "écrasés, %d liens ignorés." -#: application/plugin/PluginManager.php:124 +#: application/plugin/PluginManager.php:125 msgid " [plugin incompatibility]: " msgstr " [incompatibilité de l'extension] : " -#: application/plugin/exception/PluginFileNotFoundException.php:21 +#: application/plugin/exception/PluginFileNotFoundException.php:22 #, php-format msgid "Plugin \"%s\" files not found." msgstr "Les fichiers de l'extension \"%s\" sont introuvables." @@ -794,7 +802,7 @@ msgstr "Impossible de purger %s : le répertoire n'existe pas" msgid "An error occurred while running the update " msgstr "Une erreur s'est produite lors de l'exécution de la mise à jour " -#: index.php:80 +#: index.php:81 msgid "Shared bookmarks on " msgstr "Liens partagés sur " @@ -811,11 +819,11 @@ msgstr "Shaare" msgid "Adds the addlink input on the linklist page." msgstr "Ajoute le formulaire d'ajout de liens sur la page principale." -#: plugins/archiveorg/archiveorg.php:28 +#: plugins/archiveorg/archiveorg.php:29 msgid "View on archive.org" msgstr "Voir sur archive.org" -#: plugins/archiveorg/archiveorg.php:41 +#: plugins/archiveorg/archiveorg.php:42 msgid "For each link, add an Archive.org icon." msgstr "Pour chaque lien, ajoute une icône pour Archive.org." @@ -845,7 +853,7 @@ msgstr "Couleur de fond (gris léger)" msgid "Dark main color (e.g. visited links)" msgstr "Couleur principale sombre (ex : les liens visités)" -#: plugins/demo_plugin/demo_plugin.php:477 +#: plugins/demo_plugin/demo_plugin.php:478 msgid "" "A demo plugin covering all use cases for template designers and plugin " "developers." @@ -853,11 +861,11 @@ msgstr "" "Une extension de démonstration couvrant tous les cas d'utilisation pour les " "designers de thèmes et les développeurs d'extensions." -#: plugins/demo_plugin/demo_plugin.php:478 +#: plugins/demo_plugin/demo_plugin.php:479 msgid "This is a parameter dedicated to the demo plugin. It'll be suffixed." msgstr "Ceci est un paramètre dédié au plugin de démo. Il sera suffixé." -#: plugins/demo_plugin/demo_plugin.php:479 +#: plugins/demo_plugin/demo_plugin.php:480 msgid "Other demo parameter" msgstr "Un autre paramètre de démo" @@ -879,7 +887,7 @@ msgstr "" msgid "Isso server URL (without 'http://')" msgstr "URL du serveur Isso (sans 'http://')" -#: plugins/piwik/piwik.php:23 +#: plugins/piwik/piwik.php:24 msgid "" "Piwik plugin error: Please define PIWIK_URL and PIWIK_SITEID in the plugin " "administration page." @@ -887,27 +895,27 @@ msgstr "" "Erreur de l'extension Piwik : Merci de définir les paramètres PIWIK_URL et " "PIWIK_SITEID dans la page d'administration des extensions." -#: plugins/piwik/piwik.php:72 +#: plugins/piwik/piwik.php:73 msgid "A plugin that adds Piwik tracking code to Shaarli pages." msgstr "Ajoute le code de traçage de Piwik sur les pages de Shaarli." -#: plugins/piwik/piwik.php:73 +#: plugins/piwik/piwik.php:74 msgid "Piwik URL" msgstr "URL de Piwik" -#: plugins/piwik/piwik.php:74 +#: plugins/piwik/piwik.php:75 msgid "Piwik site ID" msgstr "Site ID de Piwik" -#: plugins/playvideos/playvideos.php:25 +#: plugins/playvideos/playvideos.php:26 msgid "Video player" msgstr "Lecteur vidéo" -#: plugins/playvideos/playvideos.php:28 +#: plugins/playvideos/playvideos.php:29 msgid "Play Videos" msgstr "Jouer les vidéos" -#: plugins/playvideos/playvideos.php:59 +#: plugins/playvideos/playvideos.php:60 msgid "Add a button in the toolbar allowing to watch all videos." msgstr "" "Ajoute un bouton dans la barre de menu pour regarder toutes les vidéos." @@ -935,11 +943,11 @@ msgstr "Mauvaise réponse du hub %s" msgid "Enable PubSubHubbub feed publishing." msgstr "Active la publication de flux vers PubSubHubbub." -#: plugins/qrcode/qrcode.php:73 plugins/wallabag/wallabag.php:71 +#: plugins/qrcode/qrcode.php:74 plugins/wallabag/wallabag.php:72 msgid "For each link, add a QRCode icon." msgstr "Pour chaque lien, ajouter une icône de QRCode." -#: plugins/wallabag/wallabag.php:21 +#: plugins/wallabag/wallabag.php:22 msgid "" "Wallabag plugin error: Please define the \"WALLABAG_URL\" setting in the " "plugin administration page." @@ -947,15 +955,15 @@ msgstr "" "Erreur de l'extension Wallabag : Merci de définir le paramètre « " "WALLABAG_URL » dans la page d'administration des extensions." -#: plugins/wallabag/wallabag.php:48 +#: plugins/wallabag/wallabag.php:49 msgid "Save to wallabag" msgstr "Sauvegarder dans Wallabag" -#: plugins/wallabag/wallabag.php:72 +#: plugins/wallabag/wallabag.php:73 msgid "Wallabag API URL" msgstr "URL de l'API Wallabag" -#: plugins/wallabag/wallabag.php:73 +#: plugins/wallabag/wallabag.php:74 msgid "Wallabag API version (1 or 2)" msgstr "Version de l'API Wallabag (1 ou 2)" diff --git a/inc/languages/jp/LC_MESSAGES/shaarli.po b/inc/languages/jp/LC_MESSAGES/shaarli.po index 57f42fc2..d5a83341 100644 --- a/inc/languages/jp/LC_MESSAGES/shaarli.po +++ b/inc/languages/jp/LC_MESSAGES/shaarli.po @@ -3,14 +3,14 @@ msgstr "" "Project-Id-Version: Shaarli\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-19 10:19+0900\n" -"PO-Revision-Date: 2020-10-19 10:25+0900\n" +"PO-Revision-Date: 2021-01-04 18:54+0900\n" "Last-Translator: yude\n" "Language-Team: Shaarli\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 2.4.2\n" "X-Poedit-Basepath: ../../../..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" @@ -79,8 +79,8 @@ msgid "" "php-gd extension must be loaded to use thumbnails. Thumbnails are now " "disabled. Please reload the page." msgstr "" -"サムネイルを使用するには、php-gd エクステンションが読み込まれている必要があり" -"ます。サムネイルは無効化されました。ページを再読込してください。" +"サムネイルを使用するには、php-gd 拡張機能が読み込まれている必要があります。サ" +"ムネイルは無効化されました。ページを再読込してください。" #: application/Utils.php:383 tests/UtilsTest.php:343 msgid "Setting not set" @@ -118,7 +118,7 @@ msgstr "設定を変更する権限がありません" #: application/bookmark/BookmarkFileService.php:205 msgid "This bookmarks already exists" -msgstr "このブックマークは既に存在します。" +msgstr "このブックマークは既に存在します" #: application/bookmark/BookmarkInitializer.php:39 msgid "(private bookmark with thumbnail demo)" @@ -594,8 +594,6 @@ msgstr "" "す。" #: application/legacy/LegacyUpdater.php:104 -#, fuzzy -#| msgid "Couldn't retrieve Updater class methods." msgid "Couldn't retrieve updater class methods." msgstr "アップデーターのクラスメゾットを受信できませんでした。" @@ -617,10 +615,7 @@ msgid "has an unknown file format. Nothing was imported." msgstr "は不明なファイル形式です。インポートは中止されました。" #: application/netscape/NetscapeBookmarkUtils.php:221 -#, fuzzy, php-format -#| msgid "" -#| "was successfully processed in %d seconds: %d links imported, %d links " -#| "overwritten, %d links skipped." +#, php-format msgid "" "was successfully processed in %d seconds: %d bookmarks imported, %d " "bookmarks overwritten, %d bookmarks skipped." @@ -630,7 +625,7 @@ msgstr "" #: application/plugin/PluginManager.php:124 msgid " [plugin incompatibility]: " -msgstr "[非対応のプラグイン]: " +msgstr " [非対応のプラグイン]: " #: application/plugin/exception/PluginFileNotFoundException.php:21 #, php-format diff --git a/inc/languages/ru/LC_MESSAGES/shaarli.po b/inc/languages/ru/LC_MESSAGES/shaarli.po old mode 100755 new mode 100644 diff --git a/index.php b/index.php index 1eb7659a..862c53ef 100644 --- a/index.php +++ b/index.php @@ -31,6 +31,7 @@ use Shaarli\Config\ConfigManager; use Shaarli\Container\ContainerBuilder; use Shaarli\Languages; +use Shaarli\Plugin\PluginManager; use Shaarli\Security\BanManager; use Shaarli\Security\CookieManager; use Shaarli\Security\LoginManager; @@ -87,7 +88,17 @@ $loginManager->checkLoginState(client_ip_id($_SERVER)); -$containerBuilder = new ContainerBuilder($conf, $sessionManager, $cookieManager, $loginManager, $logger); +$pluginManager = new PluginManager($conf); +$pluginManager->load($conf->get('general.enabled_plugins', [])); + +$containerBuilder = new ContainerBuilder( + $conf, + $sessionManager, + $cookieManager, + $loginManager, + $pluginManager, + $logger +); $container = $containerBuilder->build(); $app = new App($container); @@ -154,6 +165,15 @@ $this->get('/visibility/{visibility}', '\Shaarli\Front\Controller\Admin\SessionFilterController:visibility'); })->add('\Shaarli\Front\ShaarliAdminMiddleware'); +$app->group('/plugin', function () use ($pluginManager) { + foreach ($pluginManager->getRegisteredRoutes() as $pluginName => $routes) { + $this->group('/' . $pluginName, function () use ($routes) { + foreach ($routes as $route) { + $this->{strtolower($route['method'])}('/' . ltrim($route['route'], '/'), $route['callable']); + } + }); + } +})->add('\Shaarli\Front\ShaarliMiddleware'); // REST API routes $app->group('/api/v1', function () { diff --git a/phpcs.xml b/phpcs.xml index c559e35d..9bdc8720 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -18,5 +18,6 @@ diff --git a/plugins/default_colors/default_colors.php b/plugins/default_colors/default_colors.php index 574a0bd4..d3e1fa76 100644 --- a/plugins/default_colors/default_colors.php +++ b/plugins/default_colors/default_colors.php @@ -46,6 +46,20 @@ function default_colors_init($conf) } } +/** + * When plugin parameters are saved, we regenerate the custom CSS file with provided settings. + * + * @param array $data $_POST array + * + * @return array Updated $_POST array + */ +function hook_default_colors_save_plugin_parameters($data) +{ + default_colors_generate_css_file($data); + + return $data; +} + /** * When linklist is displayed, include default_colors CSS file. * diff --git a/plugins/demo_plugin/DemoPluginController.php b/plugins/demo_plugin/DemoPluginController.php new file mode 100644 index 00000000..b8ace9c8 --- /dev/null +++ b/plugins/demo_plugin/DemoPluginController.php @@ -0,0 +1,24 @@ +assignView( + 'content', + ' index.php +plugins/* ' . + 'This is a demo page. I have access to Shaarli container, so I\'m free to do whatever I want here.' . + '' + ); + + return $response->write($this->render('pluginscontent')); + } +} diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php index 22d27b68..d89765cf 100644 --- a/plugins/demo_plugin/demo_plugin.php +++ b/plugins/demo_plugin/demo_plugin.php @@ -7,6 +7,8 @@ * Can be used by plugin developers to make their own plugin. */ +require_once __DIR__ . '/DemoPluginController.php'; + /* * RENDER HEADER, INCLUDES, FOOTER * @@ -15,6 +17,7 @@ * and check user status with _LOGGEDIN_. */ +use Shaarli\Bookmark\Bookmark; use Shaarli\Config\ConfigManager; use Shaarli\Plugin\PluginManager; use Shaarli\Render\TemplatePage; @@ -60,6 +63,17 @@ function demo_plugin_init($conf) return $errors; } +function demo_plugin_register_routes(): array +{ + return [ + [ + 'method' => 'GET', + 'route' => '/custom', + 'callable' => 'Shaarli\DemoPlugin\DemoPluginController:index', + ], + ]; +} + /** * Hook render_header. * Executed on every page render. @@ -250,6 +264,17 @@ function hook_demo_plugin_render_linklist($data) } $data['action_plugin'][] = $action; + // Action to trigger custom filter hiding bookmarks not containing 'e' letter in their description + $action = [ + 'attr' => [ + 'href' => '?e', + 'title' => 'Hide bookmarks without "e" in their description.', + ], + 'html' => 'e', + 'on' => isset($_GET['e']) + ]; + $data['action_plugin'][] = $action; + // link_plugin (for each link) foreach ($data['links'] as &$value) { $value['link_plugin'][] = ' DEMO \o/'; @@ -304,7 +329,11 @@ function hook_demo_plugin_render_editlink($data) function hook_demo_plugin_render_tools($data) { // field_plugin - $data['tools_plugin'][] = 'tools_plugin'; + $data['tools_plugin'][] = '+ + + +'; return $data; } @@ -469,6 +498,27 @@ function hook_demo_plugin_save_plugin_parameters($data) return $data; } +/** + * This hook is called when a search is performed, on every search entry. + * It allows to add custom filters, and filter out additional link. + * + * For exemple here, we hide all bookmarks not containing the letter 'e' in their description. + * + * @param Bookmark $bookmark Search entry. Note that this is a Bookmark object, and not a link array. + * It should NOT be altered. + * @param array $context Additional info on the search performed. + * + * @return bool True if the bookmark should be kept in the search result, false to discard it. + */ +function hook_demo_plugin_filter_search_entry(Bookmark $bookmark, array $context): bool +{ + if (isset($_GET['e'])) { + return strpos($bookmark->getDescription(), 'e') !== false; + } + + return true; +} + /** * This function is never called, but contains translation calls for GNU gettext extraction. */ diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php index efef5e87..75b3ae00 100644 --- a/tests/PluginManagerTest.php +++ b/tests/PluginManagerTest.php @@ -2,6 +2,7 @@ namespace Shaarli\Plugin; +use Shaarli\Bookmark\Bookmark; use Shaarli\Config\ConfigManager; /** @@ -120,4 +121,58 @@ public function testGetPluginsMeta(): void $this->assertEquals('test plugin', $meta[self::$pluginName]['description']); $this->assertEquals($expectedParameters, $meta[self::$pluginName]['parameters']); } + + /** + * Test plugin custom routes - note that there is no check on callable functions + */ + public function testRegisteredRoutes(): void + { + PluginManager::$PLUGINS_PATH = self::$pluginPath; + $this->pluginManager->load([self::$pluginName]); + + $expectedParameters = [ + [ + 'method' => 'GET', + 'route' => '/test', + 'callable' => 'getFunction', + ], + [ + 'method' => 'POST', + 'route' => '/custom', + 'callable' => 'postFunction', + ], + ]; + $meta = $this->pluginManager->getRegisteredRoutes(); + static::assertSame($expectedParameters, $meta[self::$pluginName]); + } + + /** + * Test plugin custom routes with invalid route + */ + public function testRegisteredRoutesInvalid(): void + { + $plugin = 'test_route_invalid'; + $this->pluginManager->load([$plugin]); + + $meta = $this->pluginManager->getRegisteredRoutes(); + static::assertSame([], $meta); + + $errors = $this->pluginManager->getErrors(); + static::assertSame(['test_route_invalid [plugin incompatibility]: trying to register invalid route.'], $errors); + } + + public function testSearchFilterPlugin(): void + { + PluginManager::$PLUGINS_PATH = self::$pluginPath; + $this->pluginManager->load([self::$pluginName]); + + static::assertNull($this->pluginManager->getFilterSearchEntryHooks()); + + static::assertTrue($this->pluginManager->filterSearchEntry(new Bookmark(), ['_result' => true])); + + static::assertCount(1, $this->pluginManager->getFilterSearchEntryHooks()); + static::assertSame('hook_test_filter_search_entry', $this->pluginManager->getFilterSearchEntryHooks()[0]); + + static::assertFalse($this->pluginManager->filterSearchEntry(new Bookmark(), ['_result' => false])); + } } diff --git a/tests/api/ApiMiddlewareTest.php b/tests/api/ApiMiddlewareTest.php index 86700840..2afac28b 100644 --- a/tests/api/ApiMiddlewareTest.php +++ b/tests/api/ApiMiddlewareTest.php @@ -3,6 +3,7 @@ use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -56,6 +57,7 @@ protected function setUp(): void $this->container = new Container(); $this->container['conf'] = $this->conf; $this->container['history'] = $history; + $this->container['pluginManager'] = new PluginManager($this->conf); } /** diff --git a/tests/api/controllers/info/InfoTest.php b/tests/api/controllers/info/InfoTest.php index 10b29ab2..2428ca43 100644 --- a/tests/api/controllers/info/InfoTest.php +++ b/tests/api/controllers/info/InfoTest.php @@ -5,6 +5,7 @@ use Shaarli\Bookmark\BookmarkFileService; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; use Slim\Container; use Slim\Http\Environment; @@ -55,12 +56,18 @@ protected function setUp(): void $this->conf->set('resource.datastore', self::$testDatastore); $this->refDB = new \ReferenceLinkDB(); $this->refDB->write(self::$testDatastore); - + $this->pluginManager = new PluginManager($this->conf); $history = new History('sandbox/history.php'); $this->container = new Container(); $this->container['conf'] = $this->conf; - $this->container['db'] = new BookmarkFileService($this->conf, $history, $mutex, true); + $this->container['db'] = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $history, + $mutex, + true + ); $this->container['history'] = null; $this->controller = new Info($this->container); diff --git a/tests/api/controllers/links/DeleteLinkTest.php b/tests/api/controllers/links/DeleteLinkTest.php index 805c9be3..dc2cf917 100644 --- a/tests/api/controllers/links/DeleteLinkTest.php +++ b/tests/api/controllers/links/DeleteLinkTest.php @@ -7,6 +7,7 @@ use Shaarli\Bookmark\BookmarkFileService; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -57,6 +58,9 @@ class DeleteLinkTest extends \Shaarli\TestCase /** @var NoMutex */ protected $mutex; + /** @var PluginManager */ + protected $pluginManager; + /** * Before each test, instantiate a new Api with its config, plugins and bookmarks. */ @@ -70,7 +74,14 @@ protected function setUp(): void $refHistory = new \ReferenceHistory(); $refHistory->write(self::$testHistory); $this->history = new History(self::$testHistory); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->container = new Container(); $this->container['conf'] = $this->conf; @@ -105,7 +116,13 @@ public function testDeleteLinkValid() $this->assertEquals(204, $response->getStatusCode()); $this->assertEmpty((string) $response->getBody()); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->assertFalse($this->bookmarkService->exists($id)); $historyEntry = $this->history->getHistory()[0]; diff --git a/tests/api/controllers/links/GetLinkIdTest.php b/tests/api/controllers/links/GetLinkIdTest.php index 1ec56ef3..c93a3b4b 100644 --- a/tests/api/controllers/links/GetLinkIdTest.php +++ b/tests/api/controllers/links/GetLinkIdTest.php @@ -7,6 +7,7 @@ use Shaarli\Bookmark\BookmarkFileService; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -67,7 +68,14 @@ protected function setUp(): void $this->container = new Container(); $this->container['conf'] = $this->conf; - $this->container['db'] = new BookmarkFileService($this->conf, $history, $mutex, true); + $pluginManager = new PluginManager($this->conf); + $this->container['db'] = new BookmarkFileService( + $this->conf, + $pluginManager, + $history, + $mutex, + true + ); $this->container['history'] = null; $this->controller = new Links($this->container); diff --git a/tests/api/controllers/links/GetLinksTest.php b/tests/api/controllers/links/GetLinksTest.php index b1c46ee2..3c966732 100644 --- a/tests/api/controllers/links/GetLinksTest.php +++ b/tests/api/controllers/links/GetLinksTest.php @@ -7,6 +7,7 @@ use Shaarli\Bookmark\LinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -67,7 +68,14 @@ protected function setUp(): void $this->container = new Container(); $this->container['conf'] = $this->conf; - $this->container['db'] = new BookmarkFileService($this->conf, $history, $mutex, true); + $pluginManager = new PluginManager($this->conf); + $this->container['db'] = new BookmarkFileService( + $this->conf, + $pluginManager, + $history, + $mutex, + true + ); $this->container['history'] = null; $this->controller = new Links($this->container); diff --git a/tests/api/controllers/links/PostLinkTest.php b/tests/api/controllers/links/PostLinkTest.php index e12f803b..a54e4a16 100644 --- a/tests/api/controllers/links/PostLinkTest.php +++ b/tests/api/controllers/links/PostLinkTest.php @@ -7,6 +7,7 @@ use Shaarli\Bookmark\BookmarkFileService; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; use Slim\Container; use Slim\Http\Environment; @@ -81,8 +82,14 @@ protected function setUp(): void $refHistory = new \ReferenceHistory(); $refHistory->write(self::$testHistory); $this->history = new History(self::$testHistory); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $mutex, true); - + $pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $pluginManager, + $this->history, + $mutex, + true + ); $this->container = new Container(); $this->container['conf'] = $this->conf; $this->container['db'] = $this->bookmarkService; @@ -229,4 +236,52 @@ public function testPostLinkDuplicate() \DateTime::createFromFormat(\DateTime::ATOM, $data['updated']) ); } + + /** + * Test link creation with a tag string provided + */ + public function testPostLinkWithTagString(): void + { + $link = [ + 'tags' => 'one two', + ]; + $env = Environment::mock([ + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/json' + ]); + + $request = Request::createFromEnvironment($env); + $request = $request->withParsedBody($link); + $response = $this->controller->postLink($request, new Response()); + + $this->assertEquals(201, $response->getStatusCode()); + $this->assertEquals('/api/v1/bookmarks/1', $response->getHeader('Location')[0]); + $data = json_decode((string) $response->getBody(), true); + $this->assertEquals(self::NB_FIELDS_LINK, count($data)); + $this->assertEquals(['one', 'two'], $data['tags']); + } + + /** + * Test link creation with a tag string provided + */ + public function testPostLinkWithTagString2(): void + { + $link = [ + 'tags' => ['one two'], + ]; + $env = Environment::mock([ + 'REQUEST_METHOD' => 'POST', + 'CONTENT_TYPE' => 'application/json' + ]); + + $request = Request::createFromEnvironment($env); + $request = $request->withParsedBody($link); + $response = $this->controller->postLink($request, new Response()); + + $this->assertEquals(201, $response->getStatusCode()); + $this->assertEquals('/api/v1/bookmarks/1', $response->getHeader('Location')[0]); + $data = json_decode((string) $response->getBody(), true); + $this->assertEquals(self::NB_FIELDS_LINK, count($data)); + $this->assertEquals(['one', 'two'], $data['tags']); + } } diff --git a/tests/api/controllers/links/PutLinkTest.php b/tests/api/controllers/links/PutLinkTest.php index 240ee323..ed14d5f8 100644 --- a/tests/api/controllers/links/PutLinkTest.php +++ b/tests/api/controllers/links/PutLinkTest.php @@ -8,6 +8,7 @@ use Shaarli\Bookmark\BookmarkFileService; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -73,8 +74,14 @@ protected function setUp(): void $refHistory = new \ReferenceHistory(); $refHistory->write(self::$testHistory); $this->history = new History(self::$testHistory); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $mutex, true); - + $pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $pluginManager, + $this->history, + $mutex, + true + ); $this->container = new Container(); $this->container['conf'] = $this->conf; $this->container['db'] = $this->bookmarkService; @@ -233,4 +240,52 @@ public function testGetLink404() $this->controller->putLink($request, new Response(), ['id' => -1]); } + + /** + * Test link creation with a tag string provided + */ + public function testPutLinkWithTagString(): void + { + $link = [ + 'tags' => 'one two', + ]; + $id = '41'; + $env = Environment::mock([ + 'REQUEST_METHOD' => 'PUT', + 'CONTENT_TYPE' => 'application/json' + ]); + + $request = Request::createFromEnvironment($env); + $request = $request->withParsedBody($link); + $response = $this->controller->putLink($request, new Response(), ['id' => $id]); + + $this->assertEquals(200, $response->getStatusCode()); + $data = json_decode((string) $response->getBody(), true); + $this->assertEquals(self::NB_FIELDS_LINK, count($data)); + $this->assertEquals(['one', 'two'], $data['tags']); + } + + /** + * Test link creation with a tag string provided + */ + public function testPutLinkWithTagString2(): void + { + $link = [ + 'tags' => ['one two'], + ]; + $id = '41'; + $env = Environment::mock([ + 'REQUEST_METHOD' => 'PUT', + 'CONTENT_TYPE' => 'application/json' + ]); + + $request = Request::createFromEnvironment($env); + $request = $request->withParsedBody($link); + $response = $this->controller->putLink($request, new Response(), ['id' => $id]); + + $this->assertEquals(200, $response->getStatusCode()); + $data = json_decode((string) $response->getBody(), true); + $this->assertEquals(self::NB_FIELDS_LINK, count($data)); + $this->assertEquals(['one', 'two'], $data['tags']); + } } diff --git a/tests/api/controllers/tags/DeleteTagTest.php b/tests/api/controllers/tags/DeleteTagTest.php index 37f07229..c0f8a6a9 100644 --- a/tests/api/controllers/tags/DeleteTagTest.php +++ b/tests/api/controllers/tags/DeleteTagTest.php @@ -8,6 +8,7 @@ use Shaarli\Bookmark\LinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -55,6 +56,9 @@ class DeleteTagTest extends \Shaarli\TestCase */ protected $controller; + /** @var PluginManager */ + protected $pluginManager; + /** @var NoMutex */ protected $mutex; @@ -71,7 +75,14 @@ protected function setUp(): void $refHistory = new \ReferenceHistory(); $refHistory->write(self::$testHistory); $this->history = new History(self::$testHistory); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->container = new Container(); $this->container['conf'] = $this->conf; @@ -107,7 +118,13 @@ public function testDeleteTagValid() $this->assertEquals(204, $response->getStatusCode()); $this->assertEmpty((string) $response->getBody()); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $tags = $this->bookmarkService->bookmarksCountPerTag(); $this->assertFalse(isset($tags[$tagName])); @@ -141,7 +158,13 @@ public function testDeleteTagCaseSensitivity() $this->assertEquals(204, $response->getStatusCode()); $this->assertEmpty((string) $response->getBody()); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $tags = $this->bookmarkService->bookmarksCountPerTag(); $this->assertFalse(isset($tags[$tagName])); $this->assertTrue($tags[strtolower($tagName)] > 0); diff --git a/tests/api/controllers/tags/GetTagNameTest.php b/tests/api/controllers/tags/GetTagNameTest.php index 878de5a4..0ad71495 100644 --- a/tests/api/controllers/tags/GetTagNameTest.php +++ b/tests/api/controllers/tags/GetTagNameTest.php @@ -7,6 +7,7 @@ use Shaarli\Bookmark\LinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -46,6 +47,9 @@ class GetTagNameTest extends \Shaarli\TestCase */ protected $controller; + /** @var PluginManager */ + protected $pluginManager; + /** * Number of JSON fields per link. */ @@ -65,7 +69,14 @@ protected function setUp(): void $this->container = new Container(); $this->container['conf'] = $this->conf; - $this->container['db'] = new BookmarkFileService($this->conf, $history, $mutex, true); + $this->pluginManager = new PluginManager($this->conf); + $this->container['db'] = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $history, + $mutex, + true + ); $this->container['history'] = null; $this->controller = new Tags($this->container); diff --git a/tests/api/controllers/tags/GetTagsTest.php b/tests/api/controllers/tags/GetTagsTest.php index b565a8c4..a4b62c51 100644 --- a/tests/api/controllers/tags/GetTagsTest.php +++ b/tests/api/controllers/tags/GetTagsTest.php @@ -6,6 +6,7 @@ use Shaarli\Bookmark\LinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -50,6 +51,9 @@ class GetTagsTest extends \Shaarli\TestCase */ protected $controller; + /** @var PluginManager */ + protected $pluginManager; + /** * Number of JSON field per link. */ @@ -66,9 +70,14 @@ protected function setUp(): void $this->refDB = new \ReferenceLinkDB(); $this->refDB->write(self::$testDatastore); $history = new History('sandbox/history.php'); - - $this->bookmarkService = new BookmarkFileService($this->conf, $history, $mutex, true); - + $this->pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $history, + $mutex, + true + ); $this->container = new Container(); $this->container['conf'] = $this->conf; $this->container['db'] = $this->bookmarkService; diff --git a/tests/api/controllers/tags/PutTagTest.php b/tests/api/controllers/tags/PutTagTest.php index c73f6d3b..045473e6 100644 --- a/tests/api/controllers/tags/PutTagTest.php +++ b/tests/api/controllers/tags/PutTagTest.php @@ -8,6 +8,7 @@ use Shaarli\Bookmark\LinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; @@ -55,6 +56,9 @@ class PutTagTest extends \Shaarli\TestCase */ protected $controller; + /** @var PluginManager */ + protected $pluginManager; + /** * Number of JSON field per link. */ @@ -73,7 +77,14 @@ protected function setUp(): void $refHistory = new \ReferenceHistory(); $refHistory->write(self::$testHistory); $this->history = new History(self::$testHistory); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $mutex, true); + $this->pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $mutex, + true + ); $this->container = new Container(); $this->container['conf'] = $this->conf; diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php index f619aff3..1d250719 100644 --- a/tests/bookmark/BookmarkFileServiceTest.php +++ b/tests/bookmark/BookmarkFileServiceTest.php @@ -14,6 +14,7 @@ use Shaarli\Config\ConfigManager; use Shaarli\Formatter\BookmarkMarkdownFormatter; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; /** @@ -56,6 +57,9 @@ class BookmarkFileServiceTest extends TestCase /** @var NoMutex */ protected $mutex; + /** @var PluginManager */ + protected $pluginManager; + /** * Instantiates public and private LinkDBs with test data * @@ -93,8 +97,21 @@ protected function setUp(): void $this->refDB = new \ReferenceLinkDB(); $this->refDB->write(self::$testDatastore); $this->history = new History('sandbox/history.php'); - $this->publicLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, false); - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->pluginManager = new PluginManager($this->conf); + $this->publicLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + false + ); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); } /** @@ -111,7 +128,13 @@ public function testDatabaseMigration() $db = self::getMethod('migrate'); $db->invokeArgs($this->privateLinkDB, []); - $db = new \FakeBookmarkService($this->conf, $this->history, $this->mutex, true); + $db = new \FakeBookmarkService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->assertInstanceOf(BookmarkArray::class, $db->getBookmarks()); $this->assertEquals($this->refDB->countLinks(), $db->count()); } @@ -180,7 +203,13 @@ public function testAddFull() $this->assertEquals($updated, $bookmark->getUpdated()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new \FakeBookmarkService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(43); $this->assertEquals(43, $bookmark->getId()); @@ -218,7 +247,13 @@ public function testAddMinimal() $this->assertNull($bookmark->getUpdated()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(43); $this->assertEquals(43, $bookmark->getId()); @@ -248,7 +283,13 @@ public function testAddMinimalNoWrite() $this->assertEquals(43, $bookmark->getId()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->privateLinkDB->get(43); } @@ -309,7 +350,13 @@ public function testSetFull() $this->assertTrue(new \DateTime('5 seconds ago') < $bookmark->getUpdated()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(42); $this->assertEquals(42, $bookmark->getId()); @@ -350,7 +397,13 @@ public function testSetMinimal() $this->assertTrue(new \DateTime('5 seconds ago') < $bookmark->getUpdated()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(42); $this->assertEquals(42, $bookmark->getId()); @@ -383,7 +436,13 @@ public function testSetMinimalNoWrite() $this->assertEquals($title, $bookmark->getTitle()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(42); $this->assertEquals(42, $bookmark->getId()); @@ -436,7 +495,13 @@ public function testAddOrSetNew() $this->assertEquals(43, $bookmark->getId()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(43); $this->assertEquals(43, $bookmark->getId()); @@ -456,7 +521,13 @@ public function testAddOrSetExisting() $this->assertEquals($title, $bookmark->getTitle()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(42); $this->assertEquals(42, $bookmark->getId()); @@ -488,7 +559,13 @@ public function testAddOrSetMinimalNoWrite() $this->assertEquals($title, $bookmark->getTitle()); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $bookmark = $this->privateLinkDB->get(42); $this->assertEquals(42, $bookmark->getId()); @@ -514,7 +591,13 @@ public function testRemoveExisting() $this->assertInstanceOf(BookmarkNotFoundException::class, $exception); // reload from file - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->privateLinkDB->get(42); } @@ -607,7 +690,7 @@ public function testConstructDatastoreNotWriteable() $conf = new ConfigManager('tests/utils/config/configJson'); $conf->set('resource.datastore', 'null/store.db'); - new BookmarkFileService($conf, $this->history, $this->mutex, true); + new BookmarkFileService($conf, $this->pluginManager, $this->history, $this->mutex, true); } /** @@ -617,7 +700,7 @@ public function testCheckDBNewLoggedIn() { unlink(self::$testDatastore); $this->assertFileNotExists(self::$testDatastore); - new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + new BookmarkFileService($this->conf, $this->pluginManager, $this->history, $this->mutex, true); $this->assertFileExists(self::$testDatastore); // ensure the correct data has been written @@ -631,7 +714,7 @@ public function testCheckDBNewLoggedOut() { unlink(self::$testDatastore); $this->assertFileNotExists(self::$testDatastore); - $db = new \FakeBookmarkService($this->conf, $this->history, $this->mutex, false); + $db = new \FakeBookmarkService($this->conf, $this->pluginManager, $this->history, $this->mutex, false); $this->assertFileNotExists(self::$testDatastore); $this->assertInstanceOf(BookmarkArray::class, $db->getBookmarks()); $this->assertCount(0, $db->getBookmarks()); @@ -664,13 +747,13 @@ public function testReadPrivateDB() */ public function testSave() { - $testDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $testDB = new BookmarkFileService($this->conf, $this->pluginManager, $this->history, $this->mutex, true); $dbSize = $testDB->count(); $bookmark = new Bookmark(); $testDB->add($bookmark); - $testDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $testDB = new BookmarkFileService($this->conf, $this->pluginManager, $this->history, $this->mutex, true); $this->assertEquals($dbSize + 1, $testDB->count()); } @@ -680,7 +763,7 @@ public function testSave() public function testCountHiddenPublic() { $this->conf->set('privacy.hide_public_links', true); - $linkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, false); + $linkDB = new BookmarkFileService($this->conf, $this->pluginManager, $this->history, $this->mutex, false); $this->assertEquals(0, $linkDB->count()); } @@ -807,7 +890,7 @@ public function testFilterString() $request = ['searchtags' => $tags]; $this->assertEquals( 2, - count($this->privateLinkDB->search($request, null, true)) + count($this->privateLinkDB->search($request, null, true)->getBookmarks()) ); } @@ -820,7 +903,7 @@ public function testFilterArray() $request = ['searchtags' => $tags]; $this->assertEquals( 2, - count($this->privateLinkDB->search($request, null, true)) + count($this->privateLinkDB->search($request, null, true)->getBookmarks()) ); } @@ -834,12 +917,12 @@ public function testHiddenTags() $request = ['searchtags' => $tags]; $this->assertEquals( 1, - count($this->privateLinkDB->search($request, 'all', true)) + count($this->privateLinkDB->search($request, 'all', true)->getBookmarks()) ); $this->assertEquals( 0, - count($this->publicLinkDB->search($request, 'public', true)) + count($this->publicLinkDB->search($request, 'public', true)->getBookmarks()) ); } @@ -906,7 +989,13 @@ public function testFilterHashWithPrivateKey() $bookmark->addAdditionalContentEntry('private_key', $privateKey); $this->privateLinkDB->save(); - $this->privateLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, false); + $this->privateLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + false + ); $bookmark = $this->privateLinkDB->findByHash($hash, $privateKey); static::assertSame(6, $bookmark->getId()); @@ -1152,7 +1241,13 @@ public function testGetLatestWithSticky(): void public function testGetLatestEmptyDatastore(): void { unlink($this->conf->get('resource.datastore')); - $this->publicLinkDB = new BookmarkFileService($this->conf, $this->history, $this->mutex, false); + $this->publicLinkDB = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + false + ); $bookmark = $this->publicLinkDB->getLatest(); diff --git a/tests/bookmark/BookmarkFilterTest.php b/tests/bookmark/BookmarkFilterTest.php index 835674f2..79be807d 100644 --- a/tests/bookmark/BookmarkFilterTest.php +++ b/tests/bookmark/BookmarkFilterTest.php @@ -6,6 +6,7 @@ use ReferenceLinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; /** @@ -32,19 +33,24 @@ class BookmarkFilterTest extends TestCase */ protected static $bookmarkService; + /** @var PluginManager */ + protected static $pluginManager; + /** * Instantiate linkFilter with ReferenceLinkDB data. */ public static function setUpBeforeClass(): void { + $mutex = new NoMutex(); $conf = new ConfigManager('tests/utils/config/configJson'); $conf->set('resource.datastore', self::$testDatastore); + static::$pluginManager = new PluginManager($conf); self::$refDB = new \ReferenceLinkDB(); self::$refDB->write(self::$testDatastore); $history = new History('sandbox/history.php'); - self::$bookmarkService = new \FakeBookmarkService($conf, $history, $mutex, true); - self::$linkFilter = new BookmarkFilter(self::$bookmarkService->getBookmarks(), $conf); + self::$bookmarkService = new \FakeBookmarkService($conf, static::$pluginManager, $history, $mutex, true); + self::$linkFilter = new BookmarkFilter(self::$bookmarkService->getBookmarks(), $conf, static::$pluginManager); } /** @@ -178,61 +184,6 @@ public function testFilterUnknownTag() ); } - /** - * Return bookmarks for a given day - */ - public function testFilterDay() - { - $this->assertEquals( - 4, - count(self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20121206')) - ); - } - - /** - * Return bookmarks for a given day - */ - public function testFilterDayRestrictedVisibility(): void - { - $this->assertEquals( - 3, - count(self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20121206', false, BookmarkFilter::$PUBLIC)) - ); - } - - /** - * 404 - day not found - */ - public function testFilterUnknownDay() - { - $this->assertEquals( - 0, - count(self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '19700101')) - ); - } - - /** - * Use an invalid date format - */ - public function testFilterInvalidDayWithChars() - { - $this->expectException(\Exception::class); - $this->expectExceptionMessageRegExp('/Invalid date format/'); - - self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); - } - - /** - * Use an invalid date format - */ - public function testFilterInvalidDayDigits() - { - $this->expectException(\Exception::class); - $this->expectExceptionMessageRegExp('/Invalid date format/'); - - self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20'); - } - /** * Retrieve a link entry with its hash */ diff --git a/tests/bookmark/BookmarkInitializerTest.php b/tests/bookmark/BookmarkInitializerTest.php index 0c8420ce..351807c1 100644 --- a/tests/bookmark/BookmarkInitializerTest.php +++ b/tests/bookmark/BookmarkInitializerTest.php @@ -5,6 +5,7 @@ use malkusch\lock\mutex\NoMutex; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; /** @@ -38,6 +39,9 @@ class BookmarkInitializerTest extends TestCase /** @var NoMutex */ protected $mutex; + /** @var PluginManager */ + protected $pluginManager; + /** * Initialize an empty BookmarkFileService */ @@ -51,8 +55,15 @@ public function setUp(): void copy('tests/utils/config/configJson.json.php', self::$testConf .'.json.php'); $this->conf = new ConfigManager(self::$testConf); $this->conf->set('resource.datastore', self::$testDatastore); + $this->pluginManager = new PluginManager($this->conf); $this->history = new History('sandbox/history.php'); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->initializer = new BookmarkInitializer($this->bookmarkService); } @@ -64,7 +75,13 @@ public function testInitializeNotEmptyDataStore(): void { $refDB = new \ReferenceLinkDB(); $refDB->write(self::$testDatastore); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->initializer = new BookmarkInitializer($this->bookmarkService); $this->initializer->initialize(); @@ -95,7 +112,13 @@ public function testInitializeNotEmptyDataStore(): void $this->bookmarkService->save(); // Reload from file - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->assertEquals($refDB->countLinks() + 3, $this->bookmarkService->count()); $bookmark = $this->bookmarkService->get(43); @@ -126,7 +149,13 @@ public function testInitializeNotEmptyDataStore(): void public function testInitializeNonExistentDataStore(): void { $this->conf->set('resource.datastore', static::$testDatastore . '_empty'); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $this->mutex, + true + ); $this->initializer->initialize(); diff --git a/tests/bookmark/LinkUtilsTest.php b/tests/bookmark/LinkUtilsTest.php index ddab4e3c..46a7f1fe 100644 --- a/tests/bookmark/LinkUtilsTest.php +++ b/tests/bookmark/LinkUtilsTest.php @@ -245,6 +245,16 @@ public function testHtmlExtractNonExistentOgTag() $this->assertFalse(html_extract_tag('description', $html)); } + public function testHtmlExtractDescriptionFromGoogleRealCase(): void + { + $html = 'id="gsr">'. + ''. + 'assertSame('Bonnes fêtes de fin d\'année ! #GoogleDoodle', html_extract_tag('description', $html)); + } + /** * Test the header callback with valid value */ diff --git a/tests/bookmark/SearchResultTest.php b/tests/bookmark/SearchResultTest.php new file mode 100644 index 00000000..12854c1f --- /dev/null +++ b/tests/bookmark/SearchResultTest.php @@ -0,0 +1,125 @@ +getBookmarks()); + static::assertSame(6, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(null, $searchResult->getLimit()); + static::assertSame(0, $searchResult->getOffset()); + static::assertSame(1, $searchResult->getPage()); + static::assertSame(1, $searchResult->getLastPage()); + static::assertTrue($searchResult->isFirstPage()); + static::assertTrue($searchResult->isLastPage()); + } + + /** Create a SearchResult with only an offset parameter */ + public function testResultWithOffset(): void + { + $searchResult = SearchResult::getSearchResult(['a', 'b', 'c', 'd', 'e', 'f'], 2); + + static::assertSame([2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f'], $searchResult->getBookmarks()); + static::assertSame(4, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(null, $searchResult->getLimit()); + static::assertSame(2, $searchResult->getOffset()); + static::assertSame(2, $searchResult->getPage()); + static::assertSame(2, $searchResult->getLastPage()); + static::assertFalse($searchResult->isFirstPage()); + static::assertTrue($searchResult->isLastPage()); + } + + /** Create a SearchResult with only a limit parameter */ + public function testResultWithLimit(): void + { + $searchResult = SearchResult::getSearchResult(['a', 'b', 'c', 'd', 'e', 'f'], 0, 2); + + static::assertSame([0 => 'a', 1 => 'b'], $searchResult->getBookmarks()); + static::assertSame(2, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(2, $searchResult->getLimit()); + static::assertSame(0, $searchResult->getOffset()); + static::assertSame(1, $searchResult->getPage()); + static::assertSame(3, $searchResult->getLastPage()); + static::assertTrue($searchResult->isFirstPage()); + static::assertFalse($searchResult->isLastPage()); + } + + /** Create a SearchResult with offset and limit parameters */ + public function testResultWithLimitAndOffset(): void + { + $searchResult = SearchResult::getSearchResult(['a', 'b', 'c', 'd', 'e', 'f'], 2, 2); + + static::assertSame([2 => 'c', 3 => 'd'], $searchResult->getBookmarks()); + static::assertSame(2, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(2, $searchResult->getLimit()); + static::assertSame(2, $searchResult->getOffset()); + static::assertSame(2, $searchResult->getPage()); + static::assertSame(3, $searchResult->getLastPage()); + static::assertFalse($searchResult->isFirstPage()); + static::assertFalse($searchResult->isLastPage()); + } + + /** Create a SearchResult with offset and limit parameters displaying the last page */ + public function testResultWithLimitAndOffsetLastPage(): void + { + $searchResult = SearchResult::getSearchResult(['a', 'b', 'c', 'd', 'e', 'f'], 4, 2); + + static::assertSame([4 => 'e', 5 => 'f'], $searchResult->getBookmarks()); + static::assertSame(2, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(2, $searchResult->getLimit()); + static::assertSame(4, $searchResult->getOffset()); + static::assertSame(3, $searchResult->getPage()); + static::assertSame(3, $searchResult->getLastPage()); + static::assertFalse($searchResult->isFirstPage()); + static::assertTrue($searchResult->isLastPage()); + } + + /** Create a SearchResult with offset and limit parameters out of bound (display the last page) */ + public function testResultWithLimitAndOffsetOutOfBounds(): void + { + $searchResult = SearchResult::getSearchResult(['a', 'b', 'c', 'd', 'e', 'f'], 12, 2); + + static::assertSame([4 => 'e', 5 => 'f'], $searchResult->getBookmarks()); + static::assertSame(2, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(2, $searchResult->getLimit()); + static::assertSame(-2, $searchResult->getOffset()); + static::assertSame(3, $searchResult->getPage()); + static::assertSame(3, $searchResult->getLastPage()); + static::assertFalse($searchResult->isFirstPage()); + static::assertTrue($searchResult->isLastPage()); + } + + /** Create a SearchResult with offset and limit parameters out of bound (no result) */ + public function testResultWithLimitAndOffsetOutOfBoundsNoResult(): void + { + $searchResult = SearchResult::getSearchResult(['a', 'b', 'c', 'd', 'e', 'f'], 12, 2, true); + + static::assertSame([], $searchResult->getBookmarks()); + static::assertSame(0, $searchResult->getResultCount()); + static::assertSame(6, $searchResult->getTotalCount()); + static::assertSame(2, $searchResult->getLimit()); + static::assertSame(12, $searchResult->getOffset()); + static::assertSame(7, $searchResult->getPage()); + static::assertSame(3, $searchResult->getLastPage()); + static::assertFalse($searchResult->isFirstPage()); + static::assertFalse($searchResult->isLastPage()); + } +} diff --git a/tests/container/ContainerBuilderTest.php b/tests/container/ContainerBuilderTest.php index 3d43c344..04d4ef01 100644 --- a/tests/container/ContainerBuilderTest.php +++ b/tests/container/ContainerBuilderTest.php @@ -43,11 +43,15 @@ class ContainerBuilderTest extends TestCase /** @var CookieManager */ protected $cookieManager; + /** @var PluginManager */ + protected $pluginManager; + public function setUp(): void { $this->conf = new ConfigManager('tests/utils/config/configJson'); $this->sessionManager = $this->createMock(SessionManager::class); $this->cookieManager = $this->createMock(CookieManager::class); + $this->pluginManager = $this->createMock(PluginManager::class); $this->loginManager = $this->createMock(LoginManager::class); $this->loginManager->method('isLoggedIn')->willReturn(true); @@ -57,6 +61,7 @@ public function setUp(): void $this->sessionManager, $this->cookieManager, $this->loginManager, + $this->pluginManager, $this->createMock(LoggerInterface::class) ); } diff --git a/tests/feed/CachedPageTest.php b/tests/feed/CachedPageTest.php index 904db9dc..1decfaf3 100644 --- a/tests/feed/CachedPageTest.php +++ b/tests/feed/CachedPageTest.php @@ -40,10 +40,10 @@ protected function setUp(): void */ public function testConstruct() { - new CachedPage(self::$testCacheDir, '', true); - new CachedPage(self::$testCacheDir, '', false); - new CachedPage(self::$testCacheDir, 'http://shaar.li/feed/rss', true); - new CachedPage(self::$testCacheDir, 'http://shaar.li/feed/atom', false); + new CachedPage(self::$testCacheDir, '', true, null); + new CachedPage(self::$testCacheDir, '', false, null); + new CachedPage(self::$testCacheDir, 'http://shaar.li/feed/rss', true, null); + new CachedPage(self::$testCacheDir, 'http://shaar.li/feed/atom', false, null); $this->addToAssertionCount(1); } @@ -52,7 +52,7 @@ public function testConstruct() */ public function testCache() { - $page = new CachedPage(self::$testCacheDir, self::$url, true); + $page = new CachedPage(self::$testCacheDir, self::$url, true, null); $this->assertFileNotExists(self::$filename); $page->cache('Some content
'); @@ -68,7 +68,7 @@ public function testCache() */ public function testShouldNotCache() { - $page = new CachedPage(self::$testCacheDir, self::$url, false); + $page = new CachedPage(self::$testCacheDir, self::$url, false, null); $this->assertFileNotExists(self::$filename); $page->cache('Some content
'); @@ -80,7 +80,7 @@ public function testShouldNotCache() */ public function testCachedVersion() { - $page = new CachedPage(self::$testCacheDir, self::$url, true); + $page = new CachedPage(self::$testCacheDir, self::$url, true, null); $this->assertFileNotExists(self::$filename); $page->cache('Some content
'); @@ -96,7 +96,7 @@ public function testCachedVersion() */ public function testCachedVersionNoFile() { - $page = new CachedPage(self::$testCacheDir, self::$url, true); + $page = new CachedPage(self::$testCacheDir, self::$url, true, null); $this->assertFileNotExists(self::$filename); $this->assertEquals( @@ -110,7 +110,7 @@ public function testCachedVersionNoFile() */ public function testNoCachedVersion() { - $page = new CachedPage(self::$testCacheDir, self::$url, false); + $page = new CachedPage(self::$testCacheDir, self::$url, false, null); $this->assertFileNotExists(self::$filename); $this->assertEquals( @@ -118,4 +118,43 @@ public function testNoCachedVersion() $page->cachedVersion() ); } + + /** + * Return a page's cached content within date period + */ + public function testCachedVersionInDatePeriod() + { + $period = new \DatePeriod( + new \DateTime('yesterday'), + new \DateInterval('P1D'), + new \DateTime('tomorrow') + ); + $page = new CachedPage(self::$testCacheDir, self::$url, true, $period); + + $this->assertFileNotExists(self::$filename); + $page->cache('Some content
'); + $this->assertFileExists(self::$filename); + $this->assertEquals( + 'Some content
', + $page->cachedVersion() + ); + } + + /** + * Return a page's cached content outside of date period + */ + public function testCachedVersionNotInDatePeriod() + { + $period = new \DatePeriod( + new \DateTime('yesterday noon'), + new \DateInterval('P1D'), + new \DateTime('yesterday midnight') + ); + $page = new CachedPage(self::$testCacheDir, self::$url, true, $period); + + $this->assertFileNotExists(self::$filename); + $page->cache('Some content
'); + $this->assertFileExists(self::$filename); + $this->assertNull($page->cachedVersion()); + } } diff --git a/tests/feed/FeedBuilderTest.php b/tests/feed/FeedBuilderTest.php index 6b9204eb..fe092f78 100644 --- a/tests/feed/FeedBuilderTest.php +++ b/tests/feed/FeedBuilderTest.php @@ -11,6 +11,7 @@ use Shaarli\Config\ConfigManager; use Shaarli\Formatter\FormatterFactory; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; /** @@ -55,8 +56,15 @@ public static function setUpBeforeClass(): void $refLinkDB->write(self::$testDatastore); $history = new History('sandbox/history.php'); $factory = new FormatterFactory($conf, true); + $pluginManager = new PluginManager($conf); self::$formatter = $factory->getFormatter(); - self::$bookmarkService = new BookmarkFileService($conf, $history, $mutex, true); + self::$bookmarkService = new BookmarkFileService( + $conf, + $pluginManager, + $history, + $mutex, + true + ); self::$serverInfo = array( 'HTTPS' => 'Off', diff --git a/tests/formatter/BookmarkDefaultFormatterTest.php b/tests/formatter/BookmarkDefaultFormatterTest.php index 4fcc5dd1..983960b6 100644 --- a/tests/formatter/BookmarkDefaultFormatterTest.php +++ b/tests/formatter/BookmarkDefaultFormatterTest.php @@ -211,13 +211,17 @@ public function testFormatDescriptionWithSearchHighlight(): void $this->formatter = new BookmarkDefaultFormatter($this->conf, false); $bookmark = new Bookmark(); - $bookmark->setDescription('This guide extends and expands on PSR-1, the basic coding standard.'); + $bookmark->setDescription( + 'This guide extends and expands on PSR-1, the basic coding standard.' . PHP_EOL . + 'https://www.php-fig.org/psr/psr-1/' + ); $bookmark->addAdditionalContentEntry( 'search_highlight', ['description' => [ ['start' => 0, 'end' => 10], // "This guide" ['start' => 45, 'end' => 50], // basic ['start' => 58, 'end' => 67], // standard. + ['start' => 84, 'end' => 87], // fig ]] ); @@ -226,7 +230,10 @@ public function testFormatDescriptionWithSearchHighlight(): void $this->assertSame( 'This guide extends and expands on PSR-1, the ' . 'basic coding ' . - 'standard.', + 'standard.
' . PHP_EOL . + '' . + 'https://www.php-fig.org/psr/psr-1/' . + '', $link['description'] ); } diff --git a/tests/formatter/BookmarkMarkdownFormatterTest.php b/tests/formatter/BookmarkMarkdownFormatterTest.php index ab6b4080..32f7b444 100644 --- a/tests/formatter/BookmarkMarkdownFormatterTest.php +++ b/tests/formatter/BookmarkMarkdownFormatterTest.php @@ -132,6 +132,49 @@ public function testFormatDescription() $this->assertEquals($description, $link['description']); } + /** + * Make sure that the description is properly formatted by the default formatter. + */ + public function testFormatDescriptionWithSearchHighlight() + { + $description = 'This a description'. PHP_EOL; + $description .= 'text https://sub.domain.tld?query=here&for=real#hash more text'. PHP_EOL; + $description .= 'Also, there is an #hashtag added'. PHP_EOL; + $description .= ' A N D KEEP SPACES ! '. PHP_EOL; + $description .= 'And [yet another link](https://other.domain.tld)'. PHP_EOL; + + $bookmark = new Bookmark(); + $bookmark->setDescription($description); + $bookmark->addAdditionalContentEntry( + 'search_highlight', + ['description' => [ + ['start' => 18, 'end' => 26], // cription + ['start' => 49, 'end' => 52], // sub + ['start' => 84, 'end' => 88], // hash + ['start' => 118, 'end' => 123], // hasht + ['start' => 203, 'end' => 215], // other.domain + ]] + ); + + $link = $this->formatter->format($bookmark); + + $description = ''; + + $this->assertEquals($description, $link['description']); + } + /** * Test formatting URL with an index_url set * It should prepend relative links. diff --git a/tests/front/controller/admin/ConfigureControllerTest.php b/tests/front/controller/admin/ConfigureControllerTest.php index d82db0a7..13644df9 100644 --- a/tests/front/controller/admin/ConfigureControllerTest.php +++ b/tests/front/controller/admin/ConfigureControllerTest.php @@ -62,7 +62,7 @@ public function testIndex(): void static::assertSame('privacy.hide_public_links', $assignedVariables['hide_public_links']); static::assertSame('api.enabled', $assignedVariables['api_enabled']); static::assertSame('api.secret', $assignedVariables['api_secret']); - static::assertCount(5, $assignedVariables['languages']); + static::assertCount(6, $assignedVariables['languages']); static::assertArrayHasKey('gd_enabled', $assignedVariables); static::assertSame('thumbnails.mode', $assignedVariables['thumbnails_mode']); } diff --git a/tests/front/controller/admin/ManageTagControllerTest.php b/tests/front/controller/admin/ManageTagControllerTest.php index af6f273f..56a64cbb 100644 --- a/tests/front/controller/admin/ManageTagControllerTest.php +++ b/tests/front/controller/admin/ManageTagControllerTest.php @@ -6,6 +6,7 @@ use Shaarli\Bookmark\Bookmark; use Shaarli\Bookmark\BookmarkFilter; +use Shaarli\Bookmark\SearchResult; use Shaarli\Config\ConfigManager; use Shaarli\Front\Exception\WrongTokenException; use Shaarli\Security\SessionManager; @@ -100,11 +101,11 @@ public function testSaveRenameTagValid(): void ->expects(static::once()) ->method('search') ->with(['searchtags' => 'old-tag'], BookmarkFilter::$ALL, true) - ->willReturnCallback(function () use ($bookmark1, $bookmark2): array { + ->willReturnCallback(function () use ($bookmark1, $bookmark2): SearchResult { $bookmark1->expects(static::once())->method('renameTag')->with('old-tag', 'new-tag'); $bookmark2->expects(static::once())->method('renameTag')->with('old-tag', 'new-tag'); - return [$bookmark1, $bookmark2]; + return SearchResult::getSearchResult([$bookmark1, $bookmark2]); }) ; $this->container->bookmarkService @@ -153,11 +154,11 @@ public function testSaveDeleteTagValid(): void ->expects(static::once()) ->method('search') ->with(['searchtags' => 'old-tag'], BookmarkFilter::$ALL, true) - ->willReturnCallback(function () use ($bookmark1, $bookmark2): array { + ->willReturnCallback(function () use ($bookmark1, $bookmark2): SearchResult { $bookmark1->expects(static::once())->method('deleteTag')->with('old-tag'); $bookmark2->expects(static::once())->method('deleteTag')->with('old-tag'); - return [$bookmark1, $bookmark2]; + return SearchResult::getSearchResult([$bookmark1, $bookmark2]); }) ; $this->container->bookmarkService diff --git a/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php b/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php index a276d988..42d0c0d6 100644 --- a/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php +++ b/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php @@ -363,6 +363,7 @@ public function testDeleteBookmarkFromBookmarklet(): void $this->container->bookmarkService->method('get')->with('123')->willReturn( (new Bookmark())->setId(123)->setUrl('http://domain.tld')->setTitle('Title 123') ); + $this->container->bookmarkService->expects(static::once())->method('remove'); $this->container->formatterFactory = $this->createMock(FormatterFactory::class); $this->container->formatterFactory @@ -379,6 +380,48 @@ public function testDeleteBookmarkFromBookmarklet(): void $result = $this->controller->deleteBookmark($request, $response); static::assertSame(200, $result->getStatusCode()); - static::assertSame('', (string) $result->getBody('location')); + static::assertSame('', (string) $result->getBody()); + } + + /** + * Delete bookmark - from batch view + */ + public function testDeleteBookmarkFromBatch(): void + { + $parameters = [ + 'id' => '123', + 'source' => 'batch', + ]; + + $request = $this->createMock(Request::class); + $request + ->method('getParam') + ->willReturnCallback(function (string $key) use ($parameters): ?string { + return $parameters[$key] ?? null; + }) + ; + $response = new Response(); + + $this->container->bookmarkService->method('get')->with('123')->willReturn( + (new Bookmark())->setId(123)->setUrl('http://domain.tld')->setTitle('Title 123') + ); + $this->container->bookmarkService->expects(static::once())->method('remove'); + + $this->container->formatterFactory = $this->createMock(FormatterFactory::class); + $this->container->formatterFactory + ->expects(static::once()) + ->method('getFormatter') + ->willReturnCallback(function (): BookmarkFormatter { + $formatter = $this->createMock(BookmarkFormatter::class); + $formatter->method('format')->willReturn(['formatted']); + + return $formatter; + }) + ; + + $result = $this->controller->deleteBookmark($request, $response); + + static::assertSame(204, $result->getStatusCode()); + static::assertEmpty((string) $result->getBody()); } } diff --git a/tests/front/controller/admin/ThumbnailsControllerTest.php b/tests/front/controller/admin/ThumbnailsControllerTest.php index e5749654..0c9b63c3 100644 --- a/tests/front/controller/admin/ThumbnailsControllerTest.php +++ b/tests/front/controller/admin/ThumbnailsControllerTest.php @@ -6,6 +6,7 @@ use Shaarli\Bookmark\Bookmark; use Shaarli\Bookmark\Exception\BookmarkNotFoundException; +use Shaarli\Bookmark\SearchResult; use Shaarli\TestCase; use Shaarli\Thumbnailer; use Slim\Http\Request; @@ -40,12 +41,12 @@ public function testIndex(): void $this->container->bookmarkService ->expects(static::once()) ->method('search') - ->willReturn([ + ->willReturn(SearchResult::getSearchResult([ (new Bookmark())->setId(1)->setUrl('http://url1.tld')->setTitle('Title 1'), (new Bookmark())->setId(2)->setUrl('?abcdef')->setTitle('Note 1'), (new Bookmark())->setId(3)->setUrl('http://url2.tld')->setTitle('Title 2'), (new Bookmark())->setId(4)->setUrl('ftp://domain.tld', ['ftp'])->setTitle('FTP'), - ]) + ])) ; $result = $this->controller->index($request, $response); diff --git a/tests/front/controller/visitor/BookmarkListControllerTest.php b/tests/front/controller/visitor/BookmarkListControllerTest.php index dec938f2..0fbab9d4 100644 --- a/tests/front/controller/visitor/BookmarkListControllerTest.php +++ b/tests/front/controller/visitor/BookmarkListControllerTest.php @@ -6,6 +6,7 @@ use Shaarli\Bookmark\Bookmark; use Shaarli\Bookmark\Exception\BookmarkNotFoundException; +use Shaarli\Bookmark\SearchResult; use Shaarli\Config\ConfigManager; use Shaarli\Security\LoginManager; use Shaarli\TestCase; @@ -45,13 +46,15 @@ public function testIndexDefaultFirstPage(): void ['searchtags' => '', 'searchterm' => ''], null, false, - false + false, + false, + ['offset' => 0, 'limit' => 2] ) - ->willReturn([ + ->willReturn(SearchResult::getSearchResult([ (new Bookmark())->setId(1)->setUrl('http://url1.tld')->setTitle('Title 1'), (new Bookmark())->setId(2)->setUrl('http://url2.tld')->setTitle('Title 2'), (new Bookmark())->setId(3)->setUrl('http://url3.tld')->setTitle('Title 3'), - ] + ], 0, 2) ); $this->container->sessionManager @@ -119,13 +122,15 @@ public function testIndexDefaultSecondPage(): void ['searchtags' => '', 'searchterm' => ''], null, false, - false + false, + false, + ['offset' => 2, 'limit' => 2] ) - ->willReturn([ + ->willReturn(SearchResult::getSearchResult([ (new Bookmark())->setId(1)->setUrl('http://url1.tld')->setTitle('Title 1'), (new Bookmark())->setId(2)->setUrl('http://url2.tld')->setTitle('Title 2'), (new Bookmark())->setId(3)->setUrl('http://url3.tld')->setTitle('Title 3'), - ]) + ], 2, 2)) ; $this->container->sessionManager @@ -207,13 +212,15 @@ public function testIndexDefaultWithFilters(): void ['searchtags' => 'abc@def', 'searchterm' => 'ghi jkl'], 'private', false, - true + true, + false, + ['offset' => 0, 'limit' => 2] ) - ->willReturn([ + ->willReturn(SearchResult::getSearchResult([ (new Bookmark())->setId(1)->setUrl('http://url1.tld')->setTitle('Title 1'), (new Bookmark())->setId(2)->setUrl('http://url2.tld')->setTitle('Title 2'), (new Bookmark())->setId(3)->setUrl('http://url3.tld')->setTitle('Title 3'), - ]) + ], 0, 2)) ; $result = $this->controller->index($request, $response); @@ -358,13 +365,13 @@ public function testThumbnailUpdateFromLinkList(): void $this->container->bookmarkService ->expects(static::once()) ->method('search') - ->willReturn([ + ->willReturn(SearchResult::getSearchResult([ (new Bookmark())->setId(1)->setUrl('https://url1.tld')->setTitle('Title 1')->setThumbnail(false), $b1 = (new Bookmark())->setId(2)->setUrl('https://url2.tld')->setTitle('Title 2'), (new Bookmark())->setId(3)->setUrl('https://url3.tld')->setTitle('Title 3')->setThumbnail(false), $b2 = (new Bookmark())->setId(2)->setUrl('https://url4.tld')->setTitle('Title 4'), (new Bookmark())->setId(2)->setUrl('ftp://url5.tld', ['ftp'])->setTitle('Title 5'), - ]) + ])) ; $this->container->bookmarkService ->expects(static::exactly(2)) diff --git a/tests/front/controller/visitor/DailyControllerTest.php b/tests/front/controller/visitor/DailyControllerTest.php index 70fbce54..821ba321 100644 --- a/tests/front/controller/visitor/DailyControllerTest.php +++ b/tests/front/controller/visitor/DailyControllerTest.php @@ -5,6 +5,7 @@ namespace Shaarli\Front\Controller\Visitor; use Shaarli\Bookmark\Bookmark; +use Shaarli\Bookmark\SearchResult; use Shaarli\Feed\CachedPage; use Shaarli\TestCase; use Slim\Http\Request; @@ -347,13 +348,15 @@ public function testValidRssControllerInvokeDefault(): void $request = $this->createMock(Request::class); $response = new Response(); - $this->container->bookmarkService->expects(static::once())->method('search')->willReturn([ - (new Bookmark())->setId(1)->setCreated($dates[0])->setUrl('http://domain.tld/1'), - (new Bookmark())->setId(2)->setCreated($dates[1])->setUrl('http://domain.tld/2'), - (new Bookmark())->setId(3)->setCreated($dates[1])->setUrl('http://domain.tld/3'), - (new Bookmark())->setId(4)->setCreated($dates[2])->setUrl('http://domain.tld/4'), - (new Bookmark())->setId(5)->setCreated($dates[3])->setUrl('http://domain.tld/5'), - ]); + $this->container->bookmarkService->expects(static::once())->method('search')->willReturn( + SearchResult::getSearchResult([ + (new Bookmark())->setId(1)->setCreated($dates[0])->setUrl('http://domain.tld/1'), + (new Bookmark())->setId(2)->setCreated($dates[1])->setUrl('http://domain.tld/2'), + (new Bookmark())->setId(3)->setCreated($dates[1])->setUrl('http://domain.tld/3'), + (new Bookmark())->setId(4)->setCreated($dates[2])->setUrl('http://domain.tld/4'), + (new Bookmark())->setId(5)->setCreated($dates[3])->setUrl('http://domain.tld/5'), + ]) + ); $this->container->pageCacheManager ->expects(static::once()) @@ -454,7 +457,9 @@ public function testValidRssControllerInvokeNoBookmark(): void $request = $this->createMock(Request::class); $response = new Response(); - $this->container->bookmarkService->expects(static::once())->method('search')->willReturn([]); + $this->container->bookmarkService + ->expects(static::once())->method('search') + ->willReturn(SearchResult::getSearchResult([])); // Save RainTPL assigned variables $assignedVariables = []; @@ -613,11 +618,13 @@ public function testSimpleRssWeekly(): void }); $response = new Response(); - $this->container->bookmarkService->expects(static::once())->method('search')->willReturn([ - (new Bookmark())->setId(1)->setCreated($dates[0])->setUrl('http://domain.tld/1'), - (new Bookmark())->setId(2)->setCreated($dates[1])->setUrl('http://domain.tld/2'), - (new Bookmark())->setId(3)->setCreated($dates[1])->setUrl('http://domain.tld/3'), - ]); + $this->container->bookmarkService->expects(static::once())->method('search')->willReturn( + SearchResult::getSearchResult([ + (new Bookmark())->setId(1)->setCreated($dates[0])->setUrl('http://domain.tld/1'), + (new Bookmark())->setId(2)->setCreated($dates[1])->setUrl('http://domain.tld/2'), + (new Bookmark())->setId(3)->setCreated($dates[1])->setUrl('http://domain.tld/3'), + ]) + ); // Save RainTPL assigned variables $assignedVariables = []; @@ -674,11 +681,13 @@ public function testSimpleRssMonthly(): void }); $response = new Response(); - $this->container->bookmarkService->expects(static::once())->method('search')->willReturn([ - (new Bookmark())->setId(1)->setCreated($dates[0])->setUrl('http://domain.tld/1'), - (new Bookmark())->setId(2)->setCreated($dates[1])->setUrl('http://domain.tld/2'), - (new Bookmark())->setId(3)->setCreated($dates[1])->setUrl('http://domain.tld/3'), - ]); + $this->container->bookmarkService->expects(static::once())->method('search')->willReturn( + SearchResult::getSearchResult([ + (new Bookmark())->setId(1)->setCreated($dates[0])->setUrl('http://domain.tld/1'), + (new Bookmark())->setId(2)->setCreated($dates[1])->setUrl('http://domain.tld/2'), + (new Bookmark())->setId(3)->setCreated($dates[1])->setUrl('http://domain.tld/3'), + ]) + ); // Save RainTPL assigned variables $assignedVariables = []; diff --git a/tests/front/controller/visitor/PictureWallControllerTest.php b/tests/front/controller/visitor/PictureWallControllerTest.php index b868231d..429e99a2 100644 --- a/tests/front/controller/visitor/PictureWallControllerTest.php +++ b/tests/front/controller/visitor/PictureWallControllerTest.php @@ -5,6 +5,7 @@ namespace Shaarli\Front\Controller\Visitor; use Shaarli\Bookmark\Bookmark; +use Shaarli\Bookmark\SearchResult; use Shaarli\Config\ConfigManager; use Shaarli\Front\Exception\ThumbnailsDisabledException; use Shaarli\TestCase; @@ -50,17 +51,17 @@ public function testValidControllerInvokeDefault(): void $this->container->bookmarkService ->expects(static::once()) ->method('search') - ->willReturnCallback(function (array $parameters, ?string $visibility): array { + ->willReturnCallback(function (array $parameters, ?string $visibility): SearchResult { // Visibility is set through the container, not the call static::assertNull($visibility); // No query parameters if (count($parameters) === 0) { - return [ + return SearchResult::getSearchResult([ (new Bookmark())->setId(1)->setUrl('http://url.tld')->setThumbnail('thumb1'), (new Bookmark())->setId(2)->setUrl('http://url2.tld'), (new Bookmark())->setId(3)->setUrl('http://url3.tld')->setThumbnail('thumb2'), - ]; + ]); } }) ; diff --git a/tests/front/controller/visitor/ShaarliVisitorControllerTest.php b/tests/front/controller/visitor/ShaarliVisitorControllerTest.php index 935ec24e..7676f14d 100644 --- a/tests/front/controller/visitor/ShaarliVisitorControllerTest.php +++ b/tests/front/controller/visitor/ShaarliVisitorControllerTest.php @@ -93,6 +93,9 @@ public function testRender(): void static::assertSame('templateName', $render); + static::assertSame('templateName', $this->assignedValues['_PAGE_']); + static::assertSame('templateName', $this->assignedValues['template']); + static::assertSame(10, $this->assignedValues['linkcount']); static::assertSame(5, $this->assignedValues['privateLinkcount']); static::assertSame(['error'], $this->assignedValues['plugin_errors']); diff --git a/tests/helper/DailyPageHelperTest.php b/tests/helper/DailyPageHelperTest.php index 5255b7b1..2d745800 100644 --- a/tests/helper/DailyPageHelperTest.php +++ b/tests/helper/DailyPageHelperTest.php @@ -4,6 +4,8 @@ namespace Shaarli\Helper; +use DateTimeImmutable; +use DateTimeInterface; use Shaarli\Bookmark\Bookmark; use Shaarli\TestCase; use Slim\Http\Request; @@ -32,7 +34,7 @@ public function testExtractRequestedDateTime( string $type, string $input, ?Bookmark $bookmark, - \DateTimeInterface $expectedDateTime, + DateTimeInterface $expectedDateTime, string $compareFormat = 'Ymd' ): void { $dateTime = DailyPageHelper::extractRequestedDateTime($type, $input, $bookmark); @@ -71,8 +73,8 @@ public function testGetFormatByTypeExceptionUnknownType(): void */ public function testGetStartDatesByType( string $type, - \DateTimeImmutable $dateTime, - \DateTimeInterface $expectedDateTime + DateTimeImmutable $dateTime, + DateTimeInterface $expectedDateTime ): void { $startDateTime = DailyPageHelper::getStartDateTimeByType($type, $dateTime); @@ -84,7 +86,7 @@ public function testGetStartDatesByTypeExceptionUnknownType(): void $this->expectException(\Exception::class); $this->expectExceptionMessage('Unsupported daily format type'); - DailyPageHelper::getStartDateTimeByType('nope', new \DateTimeImmutable()); + DailyPageHelper::getStartDateTimeByType('nope', new DateTimeImmutable()); } /** @@ -92,8 +94,8 @@ public function testGetStartDatesByTypeExceptionUnknownType(): void */ public function testGetEndDatesByType( string $type, - \DateTimeImmutable $dateTime, - \DateTimeInterface $expectedDateTime + DateTimeImmutable $dateTime, + DateTimeInterface $expectedDateTime ): void { $endDateTime = DailyPageHelper::getEndDateTimeByType($type, $dateTime); @@ -105,7 +107,7 @@ public function testGetEndDatesByTypeExceptionUnknownType(): void $this->expectException(\Exception::class); $this->expectExceptionMessage('Unsupported daily format type'); - DailyPageHelper::getEndDateTimeByType('nope', new \DateTimeImmutable()); + DailyPageHelper::getEndDateTimeByType('nope', new DateTimeImmutable()); } /** @@ -113,7 +115,7 @@ public function testGetEndDatesByTypeExceptionUnknownType(): void */ public function testGeDescriptionsByType( string $type, - \DateTimeImmutable $dateTime, + DateTimeImmutable $dateTime, string $expectedDescription ): void { $description = DailyPageHelper::getDescriptionByType($type, $dateTime); @@ -121,12 +123,25 @@ public function testGeDescriptionsByType( static::assertEquals($expectedDescription, $description); } + /** + * @dataProvider getDescriptionsByTypeNotIncludeRelative + */ + public function testGeDescriptionsByTypeNotIncludeRelative( + string $type, + \DateTimeImmutable $dateTime, + string $expectedDescription + ): void { + $description = DailyPageHelper::getDescriptionByType($type, $dateTime, false); + + static::assertEquals($expectedDescription, $description); + } + public function getDescriptionByTypeExceptionUnknownType(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Unsupported daily format type'); - DailyPageHelper::getDescriptionByType('nope', new \DateTimeImmutable()); + DailyPageHelper::getDescriptionByType('nope', new DateTimeImmutable()); } /** @@ -146,6 +161,29 @@ public function testGeRssLengthsByTypeExceptionUnknownType(): void DailyPageHelper::getRssLengthByType('nope'); } + /** + * @dataProvider getCacheDatePeriodByType + */ + public function testGetCacheDatePeriodByType( + string $type, + DateTimeImmutable $requested, + DateTimeInterface $start, + DateTimeInterface $end + ): void { + $period = DailyPageHelper::getCacheDatePeriodByType($type, $requested); + + static::assertEquals($start, $period->getStartDate()); + static::assertEquals($end, $period->getEndDate()); + } + + public function testGetCacheDatePeriodByTypeExceptionUnknownType(): void + { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Unsupported daily format type'); + + DailyPageHelper::getCacheDatePeriodByType('nope'); + } + /** * Data provider for testExtractRequestedType() test method. */ @@ -216,9 +254,9 @@ public function getFormatsByType(): array public function getStartDatesByType(): array { return [ - [DailyPageHelper::DAY, new \DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-09 00:00:00')], - [DailyPageHelper::WEEK, new \DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-05 00:00:00')], - [DailyPageHelper::MONTH, new \DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-01 00:00:00')], + [DailyPageHelper::DAY, new DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-09 00:00:00')], + [DailyPageHelper::WEEK, new DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-05 00:00:00')], + [DailyPageHelper::MONTH, new DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-01 00:00:00')], ]; } @@ -228,9 +266,9 @@ public function getStartDatesByType(): array public function getEndDatesByType(): array { return [ - [DailyPageHelper::DAY, new \DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-09 23:59:59')], - [DailyPageHelper::WEEK, new \DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-11 23:59:59')], - [DailyPageHelper::MONTH, new \DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-31 23:59:59')], + [DailyPageHelper::DAY, new DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-09 23:59:59')], + [DailyPageHelper::WEEK, new DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-11 23:59:59')], + [DailyPageHelper::MONTH, new DateTimeImmutable('2020-10-09 04:05:06'), new \DateTime('2020-10-31 23:59:59')], ]; } @@ -240,8 +278,22 @@ public function getEndDatesByType(): array public function getDescriptionsByType(): array { return [ - [DailyPageHelper::DAY, $date = new \DateTimeImmutable(), 'Today - ' . $date->format('F j, Y')], - [DailyPageHelper::DAY, $date = new \DateTimeImmutable('-1 day'), 'Yesterday - ' . $date->format('F j, Y')], + [DailyPageHelper::DAY, $date = new DateTimeImmutable(), 'Today - ' . $date->format('F j, Y')], + [DailyPageHelper::DAY, $date = new DateTimeImmutable('-1 day'), 'Yesterday - ' . $date->format('F j, Y')], + [DailyPageHelper::DAY, new DateTimeImmutable('2020-10-09 04:05:06'), 'October 9, 2020'], + [DailyPageHelper::WEEK, new DateTimeImmutable('2020-10-09 04:05:06'), 'Week 41 (October 5, 2020)'], + [DailyPageHelper::MONTH, new DateTimeImmutable('2020-10-09 04:05:06'), 'October, 2020'], + ]; + } + + /** + * Data provider for testGeDescriptionsByTypeNotIncludeRelative() test method. + */ + public function getDescriptionsByTypeNotIncludeRelative(): array + { + return [ + [DailyPageHelper::DAY, $date = new \DateTimeImmutable(), $date->format('F j, Y')], + [DailyPageHelper::DAY, $date = new \DateTimeImmutable('-1 day'), $date->format('F j, Y')], [DailyPageHelper::DAY, new \DateTimeImmutable('2020-10-09 04:05:06'), 'October 9, 2020'], [DailyPageHelper::WEEK, new \DateTimeImmutable('2020-10-09 04:05:06'), 'Week 41 (October 5, 2020)'], [DailyPageHelper::MONTH, new \DateTimeImmutable('2020-10-09 04:05:06'), 'October, 2020'], @@ -249,7 +301,7 @@ public function getDescriptionsByType(): array } /** - * Data provider for testGetDescriptionsByType() test method. + * Data provider for testGetRssLengthsByType() test method. */ public function getRssLengthsByType(): array { @@ -259,4 +311,31 @@ public function getRssLengthsByType(): array [DailyPageHelper::MONTH], ]; } + + /** + * Data provider for testGetCacheDatePeriodByType() test method. + */ + public function getCacheDatePeriodByType(): array + { + return [ + [ + DailyPageHelper::DAY, + new DateTimeImmutable('2020-10-09 04:05:06'), + new \DateTime('2020-10-09 00:00:00'), + new \DateTime('2020-10-09 23:59:59'), + ], + [ + DailyPageHelper::WEEK, + new DateTimeImmutable('2020-10-09 04:05:06'), + new \DateTime('2020-10-05 00:00:00'), + new \DateTime('2020-10-11 23:59:59'), + ], + [ + DailyPageHelper::MONTH, + new DateTimeImmutable('2020-10-09 04:05:06'), + new \DateTime('2020-10-01 00:00:00'), + new \DateTime('2020-10-31 23:59:59'), + ], + ]; + } } diff --git a/tests/http/MetadataRetrieverTest.php b/tests/http/MetadataRetrieverTest.php index 3c9eaa0e..cae65091 100644 --- a/tests/http/MetadataRetrieverTest.php +++ b/tests/http/MetadataRetrieverTest.php @@ -41,7 +41,7 @@ public function testFullRetrieval(): void $remoteCharset = 'utf-8'; $expectedResult = [ - 'title' => $remoteTitle, + 'title' => trim($remoteTitle), 'description' => $remoteDesc, 'tags' => $remoteTags, ]; diff --git a/tests/netscape/BookmarkExportTest.php b/tests/netscape/BookmarkExportTest.php index ad288f78..b8a88cd8 100644 --- a/tests/netscape/BookmarkExportTest.php +++ b/tests/netscape/BookmarkExportTest.php @@ -8,6 +8,7 @@ use Shaarli\Formatter\BookmarkFormatter; use Shaarli\Formatter\FormatterFactory; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; require_once 'tests/utils/ReferenceLinkDB.php'; @@ -47,6 +48,9 @@ class BookmarkExportTest extends TestCase */ protected static $history; + /** @var PluginManager */ + protected static $pluginManager; + /** * @var NetscapeBookmarkUtils */ @@ -63,7 +67,14 @@ public static function setUpBeforeClass(): void static::$refDb = new \ReferenceLinkDB(); static::$refDb->write(static::$testDatastore); static::$history = new History('sandbox/history.php'); - static::$bookmarkService = new BookmarkFileService(static::$conf, static::$history, $mutex, true); + static::$pluginManager = new PluginManager(static::$conf); + static::$bookmarkService = new BookmarkFileService( + static::$conf, + static::$pluginManager, + static::$history, + $mutex, + true + ); $factory = new FormatterFactory(static::$conf, true); static::$formatter = $factory->getFormatter('raw'); } diff --git a/tests/netscape/BookmarkImportTest.php b/tests/netscape/BookmarkImportTest.php index 6856ebca..ecd33ea1 100644 --- a/tests/netscape/BookmarkImportTest.php +++ b/tests/netscape/BookmarkImportTest.php @@ -10,6 +10,7 @@ use Shaarli\Bookmark\BookmarkFilter; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; use Slim\Http\UploadedFile; @@ -71,6 +72,9 @@ class BookmarkImportTest extends TestCase */ protected $netscapeBookmarkUtils; + /** @var PluginManager */ + protected $pluginManager; + /** * @var string Save the current timezone. */ @@ -99,7 +103,14 @@ protected function setUp(): void $this->conf->set('resource.page_cache', $this->pagecache); $this->conf->set('resource.datastore', self::$testDatastore); $this->history = new History(self::$historyFilePath); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $mutex, true); + $this->pluginManager = new PluginManager($this->conf); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->pluginManager, + $this->history, + $mutex, + true + ); $this->netscapeBookmarkUtils = new NetscapeBookmarkUtils($this->bookmarkService, $this->conf, $this->history); } diff --git a/tests/plugins/PluginDefaultColorsTest.php b/tests/plugins/PluginDefaultColorsTest.php index cc844c60..54e97612 100644 --- a/tests/plugins/PluginDefaultColorsTest.php +++ b/tests/plugins/PluginDefaultColorsTest.php @@ -193,4 +193,27 @@ public function testFormatCssRuleInvalid() $result = default_colors_format_css_rule($data, ''); $this->assertEmpty($result); } + + /** + * Make sure that a new CSS file is generated when save_plugin_parameters hook is triggered. + */ + public function testHookSavePluginParameters(): void + { + $params = [ + 'other1' => true, + 'DEFAULT_COLORS_BACKGROUND' => 'pink', + 'other2' => ['yep'], + 'DEFAULT_COLORS_DARK_MAIN' => '', + ]; + + hook_default_colors_save_plugin_parameters($params); + $this->assertFileExists($file = 'sandbox/default_colors/default_colors.css'); + $content = file_get_contents($file); + $expected = ':root { + --background-color: pink; + +} +'; + $this->assertEquals($expected, $content); + } } diff --git a/tests/plugins/test/test.php b/tests/plugins/test/test.php index 03be4f4e..8dbb3f94 100644 --- a/tests/plugins/test/test.php +++ b/tests/plugins/test/test.php @@ -1,5 +1,7 @@ 'GET', + 'route' => '/test', + 'callable' => 'getFunction', + ], + [ + 'method' => 'POST', + 'route' => '/custom', + 'callable' => 'postFunction', + ], + ]; +} + +function hook_test_filter_search_entry(Bookmark $bookmark, array $context): bool +{ + return $context['_result']; +} diff --git a/tests/plugins/test_route_invalid/test_route_invalid.php b/tests/plugins/test_route_invalid/test_route_invalid.php new file mode 100644 index 00000000..0c5a5101 --- /dev/null +++ b/tests/plugins/test_route_invalid/test_route_invalid.php @@ -0,0 +1,12 @@ + 'GET', + 'route' => 'not a route', + 'callable' => 'getFunction', + ], + ]; +} diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php index cadd8265..a8539d63 100644 --- a/tests/updater/UpdaterTest.php +++ b/tests/updater/UpdaterTest.php @@ -7,6 +7,7 @@ use Shaarli\Bookmark\BookmarkServiceInterface; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\Plugin\PluginManager; use Shaarli\TestCase; @@ -51,7 +52,13 @@ protected function setUp(): void copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); $this->conf = new ConfigManager(self::$configFile); - $this->bookmarkService = new BookmarkFileService($this->conf, $this->createMock(History::class), $mutex, true); + $this->bookmarkService = new BookmarkFileService( + $this->conf, + $this->createMock(PluginManager::class), + $this->createMock(History::class), + $mutex, + true + ); $this->updater = new Updater([], $this->bookmarkService, $this->conf, true); } diff --git a/tpl/default/editlink.batch.html b/tpl/default/editlink.batch.html index b1f8e5bd..973a5ccc 100644 --- a/tpl/default/editlink.batch.html +++ b/tpl/default/editlink.batch.html @@ -20,6 +20,7 @@ {loop="$links"} + {$batchId=$key} {include="editlink"} {/loop} diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html index 83e541fd..a5828c75 100644 --- a/tpl/default/editlink.html +++ b/tpl/default/editlink.html @@ -1,3 +1,4 @@ +{$batchId=isset($batchId) ? $batchId : ''} {if="empty($batch_mode)"} @@ -10,7 +11,7 @@ {ignore}Lil hack: when included in a loop in batch mode, `$value` is assigned by RainTPL with template vars.{/ignore} {function="extract($value) ? '' : ''"} {/if} -'; + $description .= 'This a <strong>description</strong>
' . + PHP_EOL; + $url = 'https://sub.domain.tld?query=here&for=real#hash'; + $highlighted = 'https://sub.domain.tld'; + $highlighted .= '?query=here&for=real#hash'; + $description .= 'text '. $highlighted .' more text
'. PHP_EOL; + $description .= 'Also, there is an #hasht' . + 'ag added
'. PHP_EOL; + $description .= 'A N D KEEP SPACES !
' . PHP_EOL; + $description .= 'And ' . + 'yet another link'; + $description .= '+