use yaml to configure lang

This commit is contained in:
Sola
2015-12-09 19:23:47 +08:00
parent 50bde7336e
commit cd473d0997
7 changed files with 69 additions and 45 deletions

View File

@@ -1,9 +1,8 @@
package love.sola.netsupport.wechat;
import love.sola.netsupport.config.Lang;
import org.junit.Test;
import java.text.MessageFormat;
/**
* ***********************************************
* Created by Sola on 2015/12/2.
@@ -13,16 +12,9 @@ import java.text.MessageFormat;
public class TestMessageFormat {
@Test
public void test() {
MessageFormat format = new MessageFormat("You''ve not registered, please <a href=\"http://topaz.sinaapp.com/nm/reg.php?wechat={0}\">CLICK HERE</a> to register.");
System.out.println(format.format(new Object[]{"wechatid"}));
}
@Test
public void testJsonp() {
String jsonp = "...{0}...";
MessageFormat format = new MessageFormat(jsonp);
System.out.println(format.format(new Object[]{"{SomeData}"}));
public void testLang() {
assert Lang.messages != null;
System.out.println(Lang.messages);
}
}