<commit_before>﻿using System.Collections;

namespace RelhaxModpack
{
    //A static class to exist throughout the entire application life, will always have translations
    public static class Translations
    {
        //Enumerator to determine which translated string to return
        public enum Languages { English = 0, German = 1 };
        public static Languages language = Languages.English;//set it to this default
        public static Hashtable english = new Hashtable();
        public static Hashtable german = new Hashtable();
        //load hashes on application startup
        //Translations.loadHashes();

        public static string getTranslatedString(string componetName)
        {
            if (language == Languages.English)
            {
                if (english.Contains(componetName))
                {
                    return (string)english[componetName];
                }
            }
            else if (language == Languages.German)
            {
                if (german.Contains(componetName))
                {
                    return (string)german[componetName];
                }
            }
            Settings.appendToLog("ERROR: no value in language hash for key: " + componetName + ": Language: " + language);
            return componetName;
        }
        //method to load each translated string based on which language is selected
        public static void loadHashes()
        {
            //Syntax is as follows:
            //languageName.Add("componetName","TranslatedString");
            //Section: MainWindow
            //Componet: installRelhaxMod
            //The button for installing the modpack
            english.Add("installRelhaxMod", "Start Mod Selection");
            german.Add("installRelhaxMod", "Auswahl der Änderungen");

            //Componet: uninstallRelhaxMod
            //
            english.Add("uninstallRelhaxMod", "Uninstall Relhax Modpack");
            german.Add("uninstallRelhaxMod", "Relhax Modpack deinstallieren");

            //Componet: forceManuel
            //
            english.Add("forceManuel", "Force manual game detection");
            german.Add("forceManuel", "Erzwinge manuelle Spielerkennung");

            //Componet: forceManuel
            //
            english.Add("languageSelectionGB", "Language Selection");
            german.Add("languageSelectionGB", "Sprachauswahl");

            //Componet: formPageLink
            //
            english.Add("formPageLink", "View Modpack Form Page");
            german.Add("formPageLink", "Zeige Modpack Formularseite");<commit_msg>updated Translations<commit_after>﻿using System.Collections;

namespace RelhaxModpack
{
    //A static class to exist throughout the entire application life, will always have translations
    public static class Translations
    {
        //Enumerator to determine which translated string to return
        public enum Languages { English = 0, German = 1 };
        public static Languages language = Languages.English;//set it to this default
        public static Hashtable english = new Hashtable();
        public static Hashtable german = new Hashtable();
        //load hashes on application startup
        //Translations.loadHashes();

        public static string getTranslatedString(string componetName)
        {
            if (language == Languages.English)
            {
                if (english.Contains(componetName))
                {
                    return (string)english[componetName];
                }
            }
            else if (language == Languages.German)
            {
                if (german.Contains(componetName))
                {
                    return (string)german[componetName];
                }
            }
            Settings.appendToLog("ERROR: no value in language hash for key: " + componetName + ": Language: " + language);
            return componetName;
        }
        //method to load each translated string based on which language is selected
        public static void loadHashes()
        {
            //Syntax is as follows:
            //languageName.Add("componetName","TranslatedString");
            //Section: MainWindow
            //Componet: installRelhaxMod
            //The button for installing the modpack
            english.Add("installRelhaxMod", "Start Mod Selection");
            german.Add("installRelhaxMod", "Auswahl der Modifikationen");

            //Componet: uninstallRelhaxMod
            //
            english.Add("uninstallRelhaxMod", "Uninstall Relhax Modpack");
            german.Add("uninstallRelhaxMod", "Relhax Modpack deinstallieren");

            //Componet: forceManuel
            //
            english.Add("forceManuel", "Force manual game detection");
            german.Add("forceManuel", "Erzwinge manuelle Spielerkennung");

            //Componet: forceManuel
            //
            english.Add("languageSelectionGB", "Language Selection");
            german.Add("languageSelectionGB", "Sprachauswahl");

            //Componet: formPageLink
            //
            english.Add("formPageLink", "View Modpack Form Page");
            german.Add("formPageLink", "Zeige Modpack Formularseite");
{'fraction_non_alphanumeric': 0.08964333396910167, 'fraction_numerical': 0.0007629219912263971, 'mean_word_length': 1.9328859060402686, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7533768', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1277, 'n_words': 350}