mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 23:45:55 +08:00
lang: zh-TW
This commit is contained in:
parent
1af79e22d7
commit
6dcaa39702
|
@ -49,6 +49,8 @@ public class Language implements Initialization {
|
|||
|
||||
private Map<String, LanguageBundle> bundleMap = new HashMap<>();
|
||||
|
||||
private Map<String, String> aLocales = new LinkedHashMap<>();
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
String[] supports = BootEnvironmentPostProcessor.getProperty(
|
||||
|
@ -62,6 +64,14 @@ public class Language implements Initialization {
|
|||
LanguageBundle bundle = new LanguageBundle(locale, o, this);
|
||||
bundleMap.put(locale, bundle);
|
||||
|
||||
if (LC_NAMES.containsKey(locale)) {
|
||||
aLocales.put(locale, LC_NAMES.get(locale));
|
||||
} else {
|
||||
String[] lc = locale.split("[_-]");
|
||||
Locale inst = new Locale(lc[0], lc.length > 1 ? lc[1] : "");
|
||||
aLocales.put(locale, inst.getDisplayLanguage(inst) + " (" + locale + ")");
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
LOG.error("Cannot load language bundle : " + locale, ex);
|
||||
}
|
||||
|
@ -150,17 +160,7 @@ public class Language implements Initialization {
|
|||
* @return
|
||||
*/
|
||||
public Map<String, String> availableLocales() {
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
for (String locale : bundleMap.keySet()) {
|
||||
if (LC_NAMES.containsKey(locale)) {
|
||||
map.put(locale, LC_NAMES.get(locale));
|
||||
} else {
|
||||
String[] lc = locale.split("[_-]");
|
||||
Locale inst = new Locale(lc[0], lc.length > 1 ? lc[1] : "");
|
||||
map.put(locale, inst.getDisplayLanguage(inst) + " (" + locale + ")");
|
||||
}
|
||||
}
|
||||
return map;
|
||||
return Collections.unmodifiableMap(aLocales);
|
||||
}
|
||||
|
||||
// -- Quick Methods
|
||||
|
|
|
@ -293,7 +293,7 @@
|
|||
"UsernameOrEmail": "用户名 (或邮箱)",
|
||||
"ClickReload": "点击刷新",
|
||||
"RememberMe": "记住登录",
|
||||
"NoAccountYet": "还没有账号?[立即注册](signup)",
|
||||
"NoAccountYet": "还没有账号? [立即注册](signup)",
|
||||
"ForgotPassword": "找回密码",
|
||||
"ResetPassword": "重置密码",
|
||||
"ReturnLogin": "返回登录",
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue