修改字幕插件

This commit is contained in:
Harvey Zack committed 2018-11-23 17:38:12 +08:00
1 parent 729c734b56
commit c162d8493b
10 files changed
+140 -100

No files matched your search

+4 -2
View File
@@ -1,3 +1,5 @@
import merge from 'deepmerge';
let i18nMap = {
'zh-cn': {
'About author': '关于作者',
@@ -81,8 +83,8 @@ export default class I18n {
return this.language[key] || key;
}
update(callback) {
i18nMap = callback(i18nMap);
update(value) {
i18nMap = merge(i18nMap, value);
this.init();
}
}