Skip to content

Commit

Permalink
funktionierende Minimalversion
Browse files Browse the repository at this point in the history
  • Loading branch information
hartenthaler committed May 4, 2020
1 parent fcebc0b commit a6646b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 76 deletions.
1 change: 1 addition & 0 deletions latest-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.3.0
82 changes: 6 additions & 76 deletions module.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
<?php

/**
* webtrees: online genealogy
* Copyright (C) 2019 webtrees development team
* 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, either version 3 of the License, or
* (at your option) any later version.
* 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 <http://www.gnu.org/licenses/>.
*
* Historical Facts (in German): Bundeskanzler und Bundespräsidenten der Bundesrepublik Deutschland
*/

declare(strict_types=1);

namespace HistoryGermanBundeskanzlerBundespraesidenten;
namespace Hartenthaler\WebtreesModules\HistoryGerman;

use Fisharebest\Localization\Translation;
use Fisharebest\Webtrees\I18N;
Expand All @@ -30,6 +13,9 @@
use Fisharebest\Webtrees\Module\ModuleHistoricEventsInterface;
use Illuminate\Support\Collection;

/**
* Historical Facts (in German): Bundeskanzler und Bundespräsidenten der Bundesrepublik Deutschland
*/
return new class extends AbstractModule implements ModuleCustomInterface, ModuleHistoricEventsInterface {
use ModuleCustomTrait;
use ModuleHistoricEventsTrait;
Expand Down Expand Up @@ -64,7 +50,7 @@ public function boot(): void
*/
public function title(): string
{
return I18N::translate('German Cancellors and Presidents');
return 'buka';
}

/**
Expand All @@ -77,74 +63,18 @@ public function description(): string
return I18N::translate('Historical facts (in German) - Cancellors and Presidents of Germany (since 1949)');
}

/**
* The person or organisation who created this module.
*
* @return string
*/
public function customModuleAuthorName(): string
{
return 'Hermann Hartenthaler';
}

/**
* The version of this module.
*
* @return string
*/
public function customModuleVersion(): string
{
return '2.0.3.0';
}

/**
* A URL that will provide the latest version of this module.
*
* @return string
*/
public function customModuleLatestVersionUrl(): string
{
return 'https://github.com/hartenthaler/German_Bundeskanzler-und-Bundespraesidenten/master/latest-version.txt';
}

/**
* Where to get support for this module. Perhaps a github respository?
*
* @return string
*/
public function customModuleSupportUrl(): string
{
return 'https://github.com/hartenthaler/German_Bundeskanzler-und-Bundespraesidenten';
}
/**
* Should this module be enabled when it is first installed?
*
* @return bool
*/
public function isEnabledByDefault(): bool
{
return false;
return true;
}

/**
* Additional/updated translations.
*
* @param string $language
*
* @return string[]
*/
public function customTranslations(string $language): array
{
switch ($language) {
case 'de':
// Arrays are preferred, and faster.
// If your module uses .MO files, then you can convert them to arrays like this.
return (new Translation(__DIR__ . '/resources/language/de.mo'))->asArray();

default:
return [];
}
}

/**
* All events provided by this module.
Expand Down

0 comments on commit a6646b2

Please sign in to comment.