<commit_before>package com.gamingmesh.jobs.config;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.bukkit.configuration.file.YamlConfiguration;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.container.LocaleReader;

public class LanguageManager {
    private Jobs plugin;

    public LanguageManager(Jobs plugin) {
	this.plugin = plugin;
    }

    List<String> languages = new ArrayList<String>();

    public List<String> getLanguages() {
	return languages;
    }

    /**
     * Method to load the language file configuration
     * 
     * loads from Jobs/locale/messages_en.yml
     */
    synchronized void load() {

	// Just copying default language files, except en, that one will be generated
	languages = new ArrayList<String>();
	languages.add("cs");
	languages.add("cz");
	languages.add("de");
	languages.add("es");
	languages.add("fr");
	languages.add("lt");
	languages.add("ru");
	languages.add("tr");
	languages.add("zhcn");
	languages.add("zhtw");

	for (String lang : languages) {
	    YmlMaker langFile = new YmlMaker(plugin, "locale" + File.separator + "messages_" + lang + ".yml");
	    langFile.saveDefaultConfig();
	}

	languages.add("en");

	File customLocaleFile = new File(plugin.getDataFolder(), "locale" + File.separator + "messages_" + Jobs.getGCManager().localeString + ".yml");
	if (!customLocaleFile.exists() && !Jobs.getGCManager().localeString.equalsIgnoreCase("en"))
	    languages.add(Jobs.getGCManager().localeString);<commit_msg>Including new Estonian locale file to default package<commit_after>package com.gamingmesh.jobs.config;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.bukkit.configuration.file.YamlConfiguration;
import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.container.LocaleReader;

public class LanguageManager {
    private Jobs plugin;

    public LanguageManager(Jobs plugin) {
	this.plugin = plugin;
    }

    List<String> languages = new ArrayList<String>();

    public List<String> getLanguages() {
	return languages;
    }

    /**
     * Method to load the language file configuration
     * 
     * loads from Jobs/locale/messages_en.yml
     */
    synchronized void load() {

	// Just copying default language files, except en, that one will be generated
	languages = new ArrayList<String>();
	languages.add("cs");
	languages.add("cz");
	languages.add("de");
	languages.add("es");
	languages.add("et");
	languages.add("fr");
	languages.add("lt");
	languages.add("ru");
	languages.add("tr");
	languages.add("zhcn");
	languages.add("zhtw");

	for (String lang : languages) {
	    YmlMaker langFile = new YmlMaker(plugin, "locale" + File.separator + "messages_" + lang + ".yml");
	    langFile.saveDefaultConfig();
	}

	languages.add("en");

	File customLocaleFile = new File(plugin.getDataFolder(), "locale" + File.separator + "messages_" + Jobs.getGCManager().localeString + ".yml");
	if (!customLocaleFile.exists() && !Jobs.getGCManager().localeString.equalsIgnoreCase("en"))
	    languages.add(Jobs.getGCManager().localeString);
{'fraction_non_alphanumeric': 0.143125, 'fraction_numerical': 0.0, 'mean_word_length': 4.453151618398637, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '14060', 'n_tokens_mistral': 1035, 'n_tokens_neox': 988, 'n_words': 215}