diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 99d2989b0..bce7d6515 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -1143,27 +1143,32 @@ class Poche $entry = $this->store->retrieveOneById($entryID, $this->user->getId()); $entries = array($entry); $bookTitle = $entry['title']; + $bookFileName = substr($bookTitle, 0, 200); break; case 'all': $entries = $this->store->retrieveAll($this->user->getId()); - $bookTitle = _('All my articles'); + $bookTitle = sprintf(_('All my articles on '), date(_('d.m.y'))); #translatable because each country has it's own date format system + $bookFileName = _('Allarticles') . date(_('dmY')); break; case 'tag': $tag = filter_var($_GET['tag'],FILTER_SANITIZE_STRING); $tags_id = $this->store->retrieveAllTags($this->user->getId(),$tag); $tag_id = $tags_id[0]["id"]; // we take the first result, which is supposed to match perfectly. There must be a workaround. $entries = $this->store->retrieveEntriesByTag($tag_id,$this->user->getId()); - $bookTitle = sprintf(_('Articles related to %s'),$tag); + $bookTitle = sprintf(_('Articles tagged %s'),$tag); + $bookFileName = substr(sprintf(_('Tag %s'),$tag), 0, 200); break; case 'category': $category = filter_var($_GET['category'],FILTER_SANITIZE_STRING); $entries = $this->store->getEntriesByView($category,$this->user->getId()); - $bookTitle = sprintf(_('All my articles in category %s'), $category); + $bookTitle = sprintf(_('All articles in category %s'), $category); + $bookFileName = substr(sprintf(_('Category %s'),$category), 0, 200); break; case 'search': $search = filter_var($_GET['search'],FILTER_SANITIZE_STRING); $entries = $this->store->search($search,$this->user->getId()); - $bookTitle = sprintf(_('All my articles for search %s'), $search); + $bookTitle = sprintf(_('All articles for search %s'), $search); + $bookFileName = substr(sprintf(_('Search %s'), $search), 0, 200); break; case 'default': die(_('Uh, there is a problem while generating epub.')); @@ -1241,6 +1246,6 @@ class Poche //$book->addChapter("ePubLog", "ePubLog.html", $content_start . $epuplog . "\n" . $bookEnd); } $book->finalize(); - $zipData = $book->sendBook(_('wallabag\'s articles')); + $zipData = $book->sendBook($bookFileName); } } diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig index 1b8b86483..46735f074 100755 --- a/themes/baggy/config.twig +++ b/themes/baggy/config.twig @@ -125,8 +125,9 @@
{% trans "Click here" %} {% trans "to download your database." %}
{% endif %}{% trans "Click here" %} {% trans "to export your wallabag data." %}
-{% trans "Click on this link to get all your articles in one ebook (ePub 3 format)." %}
+
{% trans "This can take a while and can even fail if you have too many articles, depending on your server configuration." %}
{% trans "Click here" %} {% trans "to delete cache." %}
diff --git a/themes/courgette/_view.twig b/themes/courgette/_view.twig index 9f9ea4f60..25479a3d7 100755 --- a/themes/courgette/_view.twig +++ b/themes/courgette/_view.twig @@ -12,6 +12,7 @@ {% if constant('SHARE_MAIL') == 1 %}{% trans "Click here" %} {% trans "to export your wallabag data." %}
+{% trans "Click on this link to get all your articles in one ebook (ePub 3 format)." %}
+
{% trans "This can take a while and can even fail if you have too many articles, depending on your server configuration." %}
{% trans 'Add a new user :' %}
diff --git a/themes/courgette/home.twig b/themes/courgette/home.twig index 6ba72d353..401f3f20d 100755 --- a/themes/courgette/home.twig +++ b/themes/courgette/home.twig @@ -50,6 +50,13 @@{{ entry.content|striptags|slice(0, 300) }}...
{% endfor %} - {% endif %} + {{ block('pager') }} + + {% if tag %}{% trans "Download the articles from this tag in an epub" %} + {% elseif search_term is defined %}{% trans "Download the articles from this search in an epub" %} + {% else %}{% trans "Download the articles from this category in an epub" %}{% endif %} + + {% endif %} + {% endblock %} \ No newline at end of file diff --git a/themes/default/config.twig b/themes/default/config.twig index 5ed9d80f8..160f6046a 100755 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -127,6 +127,10 @@{% trans "Click here" %} {% trans "to delete cache." %}
+{% trans "Click on this link to get all your articles in one ebook (ePub 3 format)." %}
+
{% trans "This can take a while and can even fail if you have too many articles, depending on your server configuration." %}
{% trans 'Add a new user :' %}