/* * Copyright (C) 2021 StApps * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ import {SCMetaTranslations, SCTranslations} from '../general/i18n'; import {SCEvent, SCEventMeta, SCEventWithoutReferences} from './abstract/event'; import {SCThingMeta, SCThingTranslatableProperties, SCThingType} from './abstract/thing'; /** * An publication event without references */ export interface SCPublicationEventWithoutReferences extends SCEventWithoutReferences { /** * All the locations related to the event (e.g. where a creative work was published) */ locations?: string[]; /** * An organization (or a person) that is publishing at the event */ publisher?: string; /** * Translated fields of an publication event */ translations?: SCTranslations; /** * Type of an publication event */ type: SCThingType.PublicationEvent; } /** * An publication event * * @validatable * @indexable */ export interface SCPublicationEvent extends SCEvent, SCPublicationEventWithoutReferences { /** * Translated fields of an publication event */ translations?: SCTranslations; /** * Type of an publication event */ type: SCThingType.PublicationEvent; } /** * Translatable properties of an publication event */ export interface SCPublicationEventTranslatableProperties extends SCThingTranslatableProperties { } /** * Meta information about publication events */ export class SCPublicationEventMeta extends SCThingMeta implements SCMetaTranslations { /** * Translations of fields */ fieldTranslations = { de: { ...SCEventMeta.getInstance().fieldTranslations.de, locations: 'Erscheinungsorte', publisher: 'Verlag', }, en: { ...SCEventMeta.getInstance().fieldTranslations.en, locations: 'places of publication', publisher: 'publisher', }, }; /** * Translations of values of fields */ fieldValueTranslations = { de: { ...SCEventMeta.getInstance().fieldValueTranslations.de, type: 'Veröffentlichung', }, en: { ...SCEventMeta.getInstance().fieldValueTranslations.en, type: 'publication event', }, }; }