<commit_before><?php
/**
* Macro helpers
*
*/


/**
* Locale macro
* Generates the dropdown menu of available languages
*/
Form::macro('locales', function ($name = "locale", $selected = null, $class = null, $id = null) {

    $locales = array(
      ''=> " ",
      'en'=> "English, US",
      'en-GB'=> "English, UK",
      'af'=> "Afrikaans",
      'ar'=> "Arabic",
      'bg'=> "Bulgarian",
      'zh-CN'=> "Chinese Simplified",
      'zh-TW'=> "Chinese Traditional",
      'hr'=> "Croatian",
      'cs'=> "Czech",
      'da'=> "Danish",
      'nl'=> "Dutch",
      'en-ID'=> "English, Indonesia",
      'et'=> "Estonian",
      'fil'=> "Filipino",
      'fi'=> "Finnish",
      'fr'=> "French",
      'de'=> "German",
      'el'=> "Greek",
      'he'=> "Hebrew",
      'hu'=> "Hungarian",
      'is' => 'Icelandic',
      'id'=> "Indonesian",
      'ga-IE'=> "Irish",
      'it'=> "Italian",
      'ja'=> "Japanese",
      'ko'=> "Korean",
      'lv'=>'Latvian',
      'lt'=> "Lithuanian",
      'mk'=> "Macedonian",
      'ms'=> "Malay",
      'mi'=> "Maori",
      'mn'=> "Mongolian",
      'no'=> "Norwegian",
      'fa'=> "Persian",
      'pl'=> "Polish",
      'pt-PT'=> "Portuguese",
      'pt-BR'=> "Portuguese, Brazilian",
      'ro'=> "Romanian",
      'ru'=> "Russian",
      'sr-CS' => 'Serbian (Latin)',
      'sl'=> "Slovenian",
      'es-ES'=> "Spanish",
      'es-CO'=> "Spanish, Colombia",
      'es-MX'=> "Spanish, Mexico",
      'es-VE'=> "Spanish, Venezuela",
      'sv-SE'=> "Swedish",
      'tl'=> "Tagalog",
      'ta'=> "Tamil",
      'th'=> "Thai",
      'tr'=> "Turkish",
      'uk'=> "Ukranian",
      'vi'=> "Vietnamese",
      'zu'=> "Zulu",
    );

    $idclause='';
    if($id) {
      $idclause=" id='$id'";
    }
    $select = '<select name="'.$name.'" class="'.$class.'" style="min-width:350px"'.$idclause.' aria-label="'.$name.'">';

    foreach ($locales as $abbr => $locale) {
        $select .= '<option value="'.$abbr.'"'.($selected == $abbr ? ' selected="selected"' : '').'>'.$locale.'</option> ';
    }

    $select .= '</select>';
<commit_msg>Added welsh as an localization option<commit_after><?php
/**
* Macro helpers
*
*/


/**
* Locale macro
* Generates the dropdown menu of available languages
*/
Form::macro('locales', function ($name = "locale", $selected = null, $class = null, $id = null) {

    $locales = array(
      ''=> " ",
      'en'=> "English, US",
      'en-GB'=> "English, UK",
      'af'=> "Afrikaans",
      'ar'=> "Arabic",
      'bg'=> "Bulgarian",
      'zh-CN'=> "Chinese Simplified",
      'zh-TW'=> "Chinese Traditional",
      'hr'=> "Croatian",
      'cs'=> "Czech",
      'da'=> "Danish",
      'nl'=> "Dutch",
      'en-ID'=> "English, Indonesia",
      'et'=> "Estonian",
      'fil'=> "Filipino",
      'fi'=> "Finnish",
      'fr'=> "French",
      'de'=> "German",
      'el'=> "Greek",
      'he'=> "Hebrew",
      'hu'=> "Hungarian",
      'is' => 'Icelandic',
      'id'=> "Indonesian",
      'ga-IE'=> "Irish",
      'it'=> "Italian",
      'ja'=> "Japanese",
      'ko'=> "Korean",
      'lv'=>'Latvian',
      'lt'=> "Lithuanian",
      'mk'=> "Macedonian",
      'ms'=> "Malay",
      'mi'=> "Maori",
      'mn'=> "Mongolian",
      'no'=> "Norwegian",
      'fa'=> "Persian",
      'pl'=> "Polish",
      'pt-PT'=> "Portuguese",
      'pt-BR'=> "Portuguese, Brazilian",
      'ro'=> "Romanian",
      'ru'=> "Russian",
      'sr-CS' => 'Serbian (Latin)',
      'sl'=> "Slovenian",
      'es-ES'=> "Spanish",
      'es-CO'=> "Spanish, Colombia",
      'es-MX'=> "Spanish, Mexico",
      'es-VE'=> "Spanish, Venezuela",
      'sv-SE'=> "Swedish",
      'tl'=> "Tagalog",
      'ta'=> "Tamil",
      'th'=> "Thai",
      'tr'=> "Turkish",
      'uk'=> "Ukranian",
      'vi'=> "Vietnamese",
      'cy'=> "Welsh",
      'zu'=> "Zulu",
    );

    $idclause='';
    if($id) {
      $idclause=" id='$id'";
    }
    $select = '<select name="'.$name.'" class="'.$class.'" style="min-width:350px"'.$idclause.' aria-label="'.$name.'">';

    foreach ($locales as $abbr => $locale) {
        $select .= '<option value="'.$abbr.'"'.($selected == $abbr ? ' selected="selected"' : '').'>'.$locale.'</option> ';
    }

    $select .= '</select>';

{'fraction_non_alphanumeric': 0.2707247749881573, 'fraction_numerical': 0.0014211274277593558, 'mean_word_length': 2.4111470113085622, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 122, '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': '5871586', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1526, 'n_words': 331}