Commit 0ea2deac authored by Axel Dürkop's avatar Axel Dürkop
Browse files

Merge branch 'localize-metadata-fields' into 'master'

Localize metadata fields

See merge request hos/modernes-publizieren/interner-kreis/software/configurations/journal-configuration!5
parents e5c5bb61 64f9de4d
......@@ -15,13 +15,15 @@ PANDOC_SCHOLAR_PATH = ../../pandoc-scholar
PANDOC_WRITER_OPTIONS += --resource-path=.:../../pandoc-templates/generic-template/templates
# Include separated configuration files
# PANDOC_WRITER_OPTIONS = --metadata-file=config/
# PANDOC_WRITER_OPTIONS ?= --metadata-file=config/
PANDOC_READER_OPTIONS ?= --metadata-file=config/
PANDOC_READER_OPTIONS ?= --metadata-file=config/ \
# Additional option per file type
submitted: Eingereicht
edited: Editiert
reviewed: Begutachtet
received: Erhalten
accepted: Akzeptiert
published: Publiziert
financing: Finanzierung
data-loc: Datenverfügbarkeit
transparency: Transparenzhinweis
article: Zeitschriftenartikel
copyright: Lizenz
citation: Empfohlene Zitierung
correspondence: Korrespondenz
abstract: Zusammenfassung
keywords: Schlagwörter
published-by: Publiziert von der
-- This *should* be doable with ``, but it seems to ignore
-- the `LC_TIME` environment variable.
local months = {
'Januar', 'Februar', 'März', 'April', 'May', 'Juni',
'July', 'August', 'September', 'Oktober', 'November', 'Dezember'
function localize_date(date_meta)
local date_string = pandoc.utils.stringify(date_meta)
local year, month, day = date_string:match('^(%d%d%d%d)-(%d%d)-(%d%d)')
return ("%02d. %s %d"):format(day, months[tonumber(month)], year)
function Meta (meta)
meta.quality.received = localize_date(meta.quality.received)
meta.quality.accepted = localize_date(meta.quality.accepted)
meta.quality.published = localize_date(meta.quality.published)
return meta
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment