1
0
mirror of https://github.com/nitu2003/T18n synced 2024-11-14 03:18:48 +00:00

[-/+] 再修改一点点

This commit is contained in:
Taskeren 2019-07-07 14:22:20 +08:00
parent 4eef26a4c8
commit 009699b11e
2 changed files with 15 additions and 15 deletions

View File

@ -61,26 +61,13 @@ public class I18n {
}
/** 使字符串列表扁平化。 */
private static String flattenList(List<String> vlist) {
String v = "";
for(String o : vlist) {
v += o + "\n";
}
v = v.trim();
return v;
}
/**
* 将列表翻译中的内容进行format操作
* @see #translateList(String)
*/
public static String formatList(String keyRegular, Object...format) {
return tryFormat(flattenList(translateList(keyRegular)), format);
return tryFormat(T18nUtils.flattenList(translateList(keyRegular)), format);
}

View File

@ -68,7 +68,7 @@ public class T18nUtils {
try {
String content = I18n.flattenList(map.getAllKeyValuePairs());
String content = flattenList(map.getAllKeyValuePairs());
if(!file.exists()) {
file.getParentFile().mkdirs();
@ -85,4 +85,17 @@ public class T18nUtils {
}
/** 使字符串列表扁平化。 */
public static String flattenList(List<String> vlist) {
String v = "";
for(String o : vlist) {
v += o + "\n";
}
v = v.trim();
return v;
}
}