// Created with MonoDevelop
//
//    QuickStep: Acquire, view and identify spectra 
//    Copyright (C) 2021 Torsten Schache, Hiperscan GmbH Dresden, Germany
//
//    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/>.

using System.Collections.Generic;
using Hiperscan.Common.I18n;

namespace Hiperscan.Extensions.ApoIdent
{



    public static class LocalizedSubstanceExtensions
    {
        public class LocalizedStrings
        {
            public string BatchExtension { get; set; }
            public string NotAvailable { get; set; }
            public string UserDefinedClassifierName { get; set; }
        }


        public static void Init(Locale.LocaleType locale)
        {
           
            
        LocalizedSubstanceExtensions.CurrentLocale = locale;

            LocalizedSubstanceExtensions.AllLocalizedStrings = new Dictionary<Locale.LocaleType, LocalizedStrings>();

            LocalizedStrings translations = new LocalizedStrings();
            translations.BatchExtension = ", Charge ";
            translations.NotAvailable = "k.A.";
            translations.UserDefinedClassifierName = "Benutzerdefinierte Substanzen";
            LocalizedSubstanceExtensions.AllLocalizedStrings.Add(Locale.LocaleType.de_DE, translations);

            translations = new LocalizedStrings();
            translations.BatchExtension = ", Batch ";
            translations.NotAvailable = "n/a";
            translations.UserDefinedClassifierName = "Userdefined Substances";
            LocalizedSubstanceExtensions.AllLocalizedStrings.Add(Locale.LocaleType.en_GB, translations);

            translations = new LocalizedStrings();
            translations.BatchExtension = ", Unknown ";
            translations.NotAvailable = "Unknown";
            translations.UserDefinedClassifierName = "Unknown";
            LocalizedSubstanceExtensions.AllLocalizedStrings.Add(Locale.LocaleType.Unknown, translations);
        }

        public static string NotAvailable
        {
            get
            {
                return LocalizedSubstanceExtensions.AllLocalizedStrings[
                    LocalizedSubstanceExtensions.CurrentLocale].NotAvailable;
            }
        }

        public static string BatchExtension
        {
            get
            {
                return LocalizedSubstanceExtensions.AllLocalizedStrings[
                    LocalizedSubstanceExtensions.CurrentLocale].BatchExtension;
            }
        }

        public static string UserDefinedModelClassName
        {
            get
            {
                return LocalizedSubstanceExtensions.AllLocalizedStrings[
                   LocalizedSubstanceExtensions.CurrentLocale].UserDefinedClassifierName;
            }
        }

        private static Locale.LocaleType CurrentLocale { get; set; } = Locale.LocaleType.Unknown;
        public static Dictionary<Locale.LocaleType, LocalizedStrings> AllLocalizedStrings { get; set; }
    }
}

