mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 11:22:17 -05:00
Added translation capabilities for epub system
This commit is contained in:
parent
4877836b12
commit
34acb02cbb
@ -1189,10 +1189,10 @@ class Poche
|
|||||||
$log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL());
|
$log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL());
|
||||||
$log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL());
|
$log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL());
|
||||||
|
|
||||||
$book->setTitle("wallabag's articles");
|
$book->setTitle(_('wallabag\'s articles'));
|
||||||
$book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID.
|
$book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID.
|
||||||
//$book->setLanguage("en"); // Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc.
|
//$book->setLanguage("en"); // Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc.
|
||||||
$book->setDescription("Some articles saved on my wallabag");
|
$book->setDescription(_("Some articles saved on my wallabag"));
|
||||||
$book->setAuthor("wallabag","wallabag");
|
$book->setAuthor("wallabag","wallabag");
|
||||||
$book->setPublisher("wallabag","wallabag"); // I hope this is a non existant address :)
|
$book->setPublisher("wallabag","wallabag"); // I hope this is a non existant address :)
|
||||||
$book->setDate(time()); // Strictly not needed as the book date defaults to time().
|
$book->setDate(time()); // Strictly not needed as the book date defaults to time().
|
||||||
@ -1206,16 +1206,16 @@ class Poche
|
|||||||
|
|
||||||
$log->logLine("Add Cover");
|
$log->logLine("Add Cover");
|
||||||
if (count($entries)>1){
|
if (count($entries)>1){
|
||||||
$cover = "<h1>" . $entries[0]['title'] . " and " . count($entries) . " other articles</h1>";
|
$cover = sprintf(_('<h1>%s and %s other articles</h1>'), $entries[0]['title'], count($entries));
|
||||||
} else {
|
} else {
|
||||||
$cover = "<h1>" . $entries[0]['title'] . "</h1>";
|
$cover = sprintf(_('<h1>%s</h1>'), $entries[0]['title']);
|
||||||
}
|
}
|
||||||
$book->setCover("Cover.png", file_get_contents("themes/baggy/img/apple-touch-icon-152.png"), "image/png", $cover);
|
$book->setCover("Cover.png", file_get_contents("themes/baggy/img/apple-touch-icon-152.png"), "image/png", $cover);
|
||||||
|
|
||||||
|
|
||||||
$book->setCover($cover);
|
$book->setCover($cover);
|
||||||
//$book->addChapter("Notices", "Cover.html", $cover);
|
//$book->addChapter("Notices", "Cover.html", $cover);
|
||||||
$book->buildTOC(NULL, "toc", "Table of Contents", TRUE, TRUE);
|
$book->buildTOC(NULL, "toc", _('Table of Contents'), TRUE, TRUE);
|
||||||
$subject = "";
|
$subject = "";
|
||||||
|
|
||||||
foreach ($entries as $entry) {
|
foreach ($entries as $entry) {
|
||||||
@ -1239,6 +1239,6 @@ class Poche
|
|||||||
//$book->addChapter("ePubLog", "ePubLog.html", $content_start . $epuplog . "\n</pre>" . $bookEnd);
|
//$book->addChapter("ePubLog", "ePubLog.html", $content_start . $epuplog . "\n</pre>" . $bookEnd);
|
||||||
}
|
}
|
||||||
$book->finalize();
|
$book->finalize();
|
||||||
$zipData = $book->sendBook("wallabag's articles");
|
$zipData = $book->sendBook(_('wallabag\'s articles'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user