diff --git a/src/PdfCreator.ts b/src/PdfCreator.ts index 15b534e..f45f62c 100644 --- a/src/PdfCreator.ts +++ b/src/PdfCreator.ts @@ -166,7 +166,7 @@ export class PdfCreator { await i18next.changeLanguage(locale); const template_source = fs.readFileSync(`${this.templateDir}/runner_card.html`, 'utf8'); const template = Handlebars.compile(template_source); - let result = template({ cards, cards_swapped, eventname: config.eventname, codeformat: codeformat }) + let result = template({ cards, cards_swapped, eventname: config.eventname, codeformat: codeformat, card_subtitle: config.card_subtitle }) result = await awaitAsyncHandlebarHelpers(result); const pdf = await this.renderPdf(result, { format: "A4", landscape: false }); return pdf diff --git a/src/config.ts b/src/config.ts index aea575a..7717a30 100644 --- a/src/config.ts +++ b/src/config.ts @@ -15,6 +15,7 @@ export const config = { disclaimer_text: process.env.DISCLAIMER_TEXT || "", donations_footer_text: process.env.DONATIONS_FOOTER_TEXT || "", contracts_per_runner: parseInt(process.env.CONTRACTS_PER_RUNNER) || 1, + card_subtitle: process.env.CARD_SUBTITLE || "" } let errors = 0 if (typeof config.internal_port !== "number") { diff --git a/src/locales/de.json b/src/locales/de.json index e495d37..a2dcf3c 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -13,7 +13,7 @@ "id": "ID", "lastname": "Nachname", "location": "Ort", - "mit-unterstuetzung-von": "Mit Unterstützung von:", + "mit_unterstuetzung_von": "Mit Unterstützung von:", "please_use_blockletters": "Bitte in DRUCKBUCHSTABEN schreiben", "postalcode": "Postleitzahl", "signature": "Unterschrift", diff --git a/src/locales/en.json b/src/locales/en.json index 9ca0404..99fcc15 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -13,7 +13,7 @@ "id": "ID", "lastname": "Last name", "location": "Location", - "mit-unterstuetzung-von": "Supported by:", + "mit_unterstuetzung_von": "Supported by:", "please_use_blockletters": "Please write in BLOCK LETTERS.", "postalcode": "Postal code", "signature": "Signature", diff --git a/src/templates/runner_card.html b/src/templates/runner_card.html index 18586eb..b79ba50 100644 --- a/src/templates/runner_card.html +++ b/src/templates/runner_card.html @@ -33,8 +33,8 @@ {{#each cards}}

{{../eventname}}

-

lauf-fuer-kaya.de - am 01.01.2021

-

Mit unterstützung von:

+

{{../card_subtitle}}

+

{{__ "mit_unterstuetzung_von"}}