Added publication date on epub export

This commit is contained in:
Nicolas Lœuillet 2020-04-06 15:34:32 +02:00
parent fbfeb20062
commit 0bddd34847
No known key found for this signature in database
GPG Key ID: 3A8718BE51C3BA8E
17 changed files with 23 additions and 0 deletions

View File

@ -196,10 +196,17 @@ class EntriesExport
$authors = implode(',', $publishedBy);
}
$publishedAt = $entry->getPublishedAt();
$publishedDate = $this->translator->trans('export.unknown');
if (!empty($publishedAt)) {
$publishedDate = $entry->getPublishedAt()->format('Y-m-d');
}
$titlepage = $content_start .
'<h1>' . $entry->getTitle() . '</h1>' .
'<dl>' .
'<dt>' . $this->translator->trans('entry.view.published_by') . '</dt><dd>' . $authors . '</dd>' .
'<dt>' . $this->translator->trans('entry.metadata.published_on') . '</dt><dd>' . $publishedDate . '</dd>' .
'<dt>' . $this->translator->trans('entry.metadata.reading_time') . '</dt><dd>' . $this->translator->trans('entry.metadata.reading_time_minutes_short', ['%readingTime%' => $entry->getReadingTime()]) . '</dd>' .
'<dt>' . $this->translator->trans('entry.metadata.added_on') . '</dt><dd>' . $entry->getCreatedAt()->format('Y-m-d') . '</dd>' .
'<dt>' . $this->translator->trans('entry.metadata.address') . '</dt><dd><a href="' . $entry->getUrl() . '">' . $entry->getUrl() . '</a></dd>' .

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'Om'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'Über'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% min"
address: "Address"
added_on: "Added on"
published_on: "Published on"
about:
page_title: 'About'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% min"
address: "Dirección"
added_on: "Añadido el"
# published_on: "Published on"
about:
page_title: 'Acerca de'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'درباره'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% min"
address: "Adresse"
added_on: "Ajouté le"
published_on: "Publié le"
about:
page_title: "À propos"

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'A proposito'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% 分"
address: "アドレス"
added_on: "追加日"
# published_on: "Published on"
about:
page_title: 'アプリについて'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% min"
address: "Adreça"
added_on: "Ajustat a"
# published_on: "Published on"
about:
page_title: 'A prepaus'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'O nas'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% min"
address: "Endereço"
added_on: "Adicionado o"
# published_on: "Published on"
about:
page_title: 'Sobre'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'Despre'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'О'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'เกี่ยวกับ'

View File

@ -285,6 +285,7 @@ entry:
# reading_time_minutes_short: "%readingTime% min"
# address: "Address"
# added_on: "Added on"
# published_on: "Published on"
about:
page_title: 'Hakkımızda'

View File

@ -285,6 +285,7 @@ entry:
reading_time_minutes_short: "%readingTime% 分钟"
address: "地址"
added_on: "添加于"
# published_on: "Published on"
about:
page_title: '关于'