// Path: src/main/java/io/github/bonigarcia/dualsub/util/I18N.java
// public class I18N {
// 
// 	public static final String MESSAGES = "lang/messages";
// 
// 	public static final String HTML_INIT_TAG = "<html><font face='Lucid'>";
// 
// 	public static final String HTML_END_TAG = "</font></html>";
// 
// 	public enum Html {
// 		LINK, BOLD, MONOSPACE
// 	}
// 
// 	private static I18N singleton = null;
// 
// 	private Locale locale;
// 
// 	public I18N() {
// 		this.locale = Locale.getDefault();
// 	}
// 
// 	public static I18N getSingleton() {
// 		if (singleton == null) {
// 			singleton = new I18N();
// 		}
// 		return singleton;
// 	}
// 
// 	public static String getHtmlText(String key, Html html) {
// 		String out = HTML_INIT_TAG;
// 		switch (html) {
// 		case LINK:
// 			out += "<a href='#'>" + getText(key) + "</a>";
// 			break;
// 		case BOLD:
// 			out += "<b><u>" + getText(key) + "</u></b>";
// 			break;
// 		case MONOSPACE:
// 			out += "<pre>" + getText(key) + "</pre>";
// 			break;
// 		default:
// 			out += getText(key);
// 			break;
// 		}
// 		out += HTML_END_TAG;
// 		return out;
// 	}
// 
// 	public static String getHtmlText(String key) {
// 		return HTML_INIT_TAG + getText(key) + HTML_END_TAG;
// 	}
// 
// 	public static String getText(String key) {
// 		return ResourceBundle.getBundle(MESSAGES, getLocale()).getString(key);
// 	}
// 
// 	public static Locale getLocale() {
// 		return I18N.getSingleton().locale;
// 	}
// 
// 	public static void setLocale(String locale) {
// 		I18N.getSingleton().locale = new Locale(locale);
// 	}
// 
// 	public static void setLocale(Locale locale) {
// 		I18N.getSingleton().locale = locale;
// 	}
// 
// }


import io.github.bonigarcia.dualsub.util.I18N;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Locale;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/*
 * (C) Copyright 2014 Boni Garcia (http://bonigarcia.github.io/)
 * 
 * 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/>.
 */
package io.github.bonigarcia.dualsub.test;




/**
 * TestLocale.
 * 
 * @author Boni Garcia (boni.gg@gmail.com)
 * @since 1.0.0
 */
public class TestLocale {

	private static final Logger log = LoggerFactory.getLogger(TestLocale.class);

	@Test
	public void testLocale() throws IOException {
		Enumeration<URL> classpath = Thread.currentThread()
				.getContextClassLoader().getResources("");
		File folder;
		String[] ls;
		String localeStr;
// Path: src/main/java/io/github/bonigarcia/dualsub/util/I18N.java
// public class I18N {
// 
// 	public static final String MESSAGES = "lang/messages";
// 
// 	public static final String HTML_INIT_TAG = "<html><font face='Lucid'>";
// 
// 	public static final String HTML_END_TAG = "</font></html>";
// 
// 	public enum Html {
// 		LINK, BOLD, MONOSPACE
// 	}
// 
// 	private static I18N singleton = null;
// 
// 	private Locale locale;
// 
// 	public I18N() {
// 		this.locale = Locale.getDefault();
// 	}
// 
// 	public static I18N getSingleton() {
// 		if (singleton == null) {
// 			singleton = new I18N();
// 		}
// 		return singleton;
// 	}
// 
// 	public static String getHtmlText(String key, Html html) {
// 		String out = HTML_INIT_TAG;
// 		switch (html) {
// 		case LINK:
// 			out += "<a href='#'>" + getText(key) + "</a>";
// 			break;
// 		case BOLD:
// 			out += "<b><u>" + getText(key) + "</u></b>";
// 			break;
// 		case MONOSPACE:
// 			out += "<pre>" + getText(key) + "</pre>";
// 			break;
// 		default:
// 			out += getText(key);
// 			break;
// 		}
// 		out += HTML_END_TAG;
// 		return out;
// 	}
// 
// 	public static String getHtmlText(String key) {
// 		return HTML_INIT_TAG + getText(key) + HTML_END_TAG;
// 	}
// 
// 	public static String getText(String key) {
// 		return ResourceBundle.getBundle(MESSAGES, getLocale()).getString(key);
// 	}
// 
// 	public static Locale getLocale() {
// 		return I18N.getSingleton().locale;
// 	}
// 
// 	public static void setLocale(String locale) {
// 		I18N.getSingleton().locale = new Locale(locale);
// 	}
// 
// 	public static void setLocale(Locale locale) {
// 		I18N.getSingleton().locale = locale;
// 	}
// 
// }


// Path: src/test/java/io/github/bonigarcia/dualsub/test/TestLocale.java
import io.github.bonigarcia.dualsub.util.I18N;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
import java.util.Locale;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/*
 * (C) Copyright 2014 Boni Garcia (http://bonigarcia.github.io/)
 * 
 * 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/>.
 */
package io.github.bonigarcia.dualsub.test;




/**
 * TestLocale.
 * 
 * @author Boni Garcia (boni.gg@gmail.com)
 * @since 1.0.0
 */
public class TestLocale {

	private static final Logger log = LoggerFactory.getLogger(TestLocale.class);

	@Test
	public void testLocale() throws IOException {
		Enumeration<URL> classpath = Thread.currentThread()
				.getContextClassLoader().getResources("");
		File folder;
		String[] ls;
		String localeStr;
		while (classpath.hasMoreElements()) {