|
|
@@ -3,7 +3,7 @@
|
|
|
const path = require('path')
|
|
|
const defaultSettings = require('./src/settings.js')
|
|
|
const { WebUpdateNotificationPlugin } = require('@plugin-web-update-notification/webpack')
|
|
|
-const lang = 'zh'
|
|
|
+const lang = 'zh_CN'
|
|
|
|
|
|
function resolve(dir) {
|
|
|
return path.join(__dirname, dir)
|
|
|
@@ -62,28 +62,28 @@ module.exports = {
|
|
|
plugins: [
|
|
|
new WebUpdateNotificationPlugin({
|
|
|
logVersion: true,
|
|
|
- notificationProps: {
|
|
|
- title: lang === 'en' ? '📢 System update' : '📢 系统更新',
|
|
|
- description: lang === 'en' ? 'System update, please refresh the page' : '系统更新,请刷新页面',
|
|
|
- buttonText: lang === 'en' ? 'refresh' : '刷新',
|
|
|
- dismissButtonText: lang === 'en' ? 'dismiss' : '忽略'
|
|
|
- }
|
|
|
- // plugin preset: zh_CN | zh_TW | en_US
|
|
|
- // locale: 'en_US',
|
|
|
- // localeData: {
|
|
|
- // en_US: {
|
|
|
- // title: 'System update',
|
|
|
- // description: 'System update, please refresh the page',
|
|
|
- // buttonText: 'refresh',
|
|
|
- // dismissButtonText: 'dismiss'
|
|
|
- // },
|
|
|
- // zh_CN: {
|
|
|
- // title: '📢 系统更新',
|
|
|
- // description: '系统更新,请刷新页面',
|
|
|
- // buttonText: '刷新',
|
|
|
- // dismissButtonText: '取消'
|
|
|
- // }
|
|
|
+ // notificationProps: {
|
|
|
+ // title: lang === 'en' ? '📢 System update' : '📢 系统更新',
|
|
|
+ // description: lang === 'en' ? 'System update, please refresh the page' : '系统更新,请刷新页面',
|
|
|
+ // buttonText: lang === 'en' ? 'refresh' : '刷新',
|
|
|
+ // dismissButtonText: lang === 'en' ? 'dismiss' : '忽略'
|
|
|
// }
|
|
|
+ // plugin preset: zh_CN | zh_TW | en_US
|
|
|
+ locale: lang,
|
|
|
+ localeData: {
|
|
|
+ en_US: {
|
|
|
+ title: 'System update',
|
|
|
+ description: 'System update, please refresh the page',
|
|
|
+ buttonText: 'refresh',
|
|
|
+ dismissButtonText: 'dismiss'
|
|
|
+ },
|
|
|
+ zh_CN: {
|
|
|
+ title: '📢 系统更新',
|
|
|
+ description: '系统更新,请刷新页面',
|
|
|
+ buttonText: '刷新',
|
|
|
+ dismissButtonText: '取消'
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
]
|
|
|
},
|