mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-29 16:14:16 +08:00
use yaml to configure lang
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user