2013-10-18 73 views
6

在我的國際資源,代碼國際資源

post_badge_format = You've earned the "{0}" badge for {1}. 

在我的Java

代碼:

String messageContent = MessageFormat.format(messageType, paramValues); 

在messageContent的期望值應該是這樣的:

You've earned the "XXX" badge for XXX. 

但AC messageContent的實際值如下:

You've earned the "{0}" badge for {1}. 

爲什麼?

+1

你嘗試調試呢? 「paramValues」是否正確? – Henry

回答

3

在國際資源,代碼應該是這樣的:

post_badge_format = You've earned the "'{0}'" badge for '{1}'.