From 91303d0cc4f45db94f4abad166b97352b8a060ca Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 14 Nov 2023 17:37:09 +0100 Subject: [PATCH] Extend list of known currency names --- src/MDConcCurrencies.php | 17 +++++++++++------ src/MDConcMarkingPosition.php | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/MDConcCurrencies.php b/src/MDConcCurrencies.php index 0396b2b..f489acf 100644 --- a/src/MDConcCurrencies.php +++ b/src/MDConcCurrencies.php @@ -19,13 +19,8 @@ final class MDConcCurrencies implements MDImporterConcordanceListInterface { "5,00" => "", "10,00" => "", "23.117,55" => "", + "Belarussischer Rubel" => 'by-BYN', "SFR" => "ch-CHF", - "French Franc" => "fr-FF", - "Forint" => "hu-Ft", - "Korona" => "hu-Korona", - "Austro-Hungarian krone" => "hu-Korona", - "Pengő" => "hu-Pengő", - "pengő" => "hu-Pengő", "DM" => "de-DM", "DEM" => "de-DM", "Mark" => "de-DM", @@ -34,6 +29,13 @@ final class MDConcCurrencies implements MDImporterConcordanceListInterface { "RM" => "de-RM", "Reichsmark" => "de-RM", "Reichsmark (Deutsches Reich)" => "de-RM", + "French Franc" => "fr-FF", + "Forint" => "hu-Ft", + "Korona" => "hu-Korona", + "Austro-Hungarian krone" => "hu-Korona", + "Pengő" => "hu-Pengő", + "pengő" => "hu-Pengő", + "Indonesian Ruphian" => 'id-IDR', "EUR" => "eu-EUR", "euro" => "eu-EUR", "Euro" => "eu-EUR", @@ -60,6 +62,9 @@ final class MDConcCurrencies implements MDImporterConcordanceListInterface { public static function getConcordanceTarget(string $input):string { if (!isset(self::CURRENCIES_LIST[$input])) { + if (in_array($input, MDCurrenciesSet::CURRENCIES, true)) { + return $input; + } throw new MDImporterMissingConcordance("Unknown currency: " . $input); } diff --git a/src/MDConcMarkingPosition.php b/src/MDConcMarkingPosition.php index e975d93..18e90fe 100644 --- a/src/MDConcMarkingPosition.php +++ b/src/MDConcMarkingPosition.php @@ -291,6 +291,7 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface "Flasche" => "other", "auf dem Kontaktbogen unter dem jeweiligen Bild" => "other", "Waage" => "other", + "Weiteres" => "other", "auf Kunststoffhülle (für Kleinbildfilmstreifen)" => "other", "Textplatte" => "other", "oberer Holzkasten" => "other",