🚧 WIP: main process i18n

This commit is contained in:
PiEgg
2022-01-11 21:50:29 +08:00
parent c2991dde2f
commit c19f741243
13 changed files with 121 additions and 60 deletions

View File

@@ -2,6 +2,7 @@ import db from '~/main/apis/core/datastore'
import { ipcMain } from 'electron'
import { showMessageBox } from '~/main/utils/common'
import { SHOW_PRIVACY_MESSAGE } from '~/universal/events/constants'
import { T } from '~/universal/i18n'
class PrivacyManager {
async init () {
@@ -25,7 +26,7 @@ class PrivacyManager {
const res = await showMessageBox({
type: 'info',
buttons: showCancel ? ['Yes', 'No'] : ['Yes'],
title: '隐私协议',
title: T('PRIVACY_AGREEMENT'),
message: `
本软件尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更优质的服务,本软件会按照本隐私权政策的规定使用和收集您的一些行为信息。您在同意本软件服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本软件服务使用协议不可分割的一部分,如果不同意将无法使用。本协议会定期更新。

View File

@@ -3,6 +3,7 @@ import db from '~/main/apis/core/datastore'
import axios from 'axios'
import pkg from 'root/package.json'
import { lt } from 'semver'
import { T } from '~/universal/i18n'
const version = pkg.version
const releaseUrl = 'https://api.github.com/repos/Molunerfinn/PicGo/releases/latest'
const releaseUrlBackup = 'https://cdn.jsdelivr.net/gh/Molunerfinn/PicGo@latest/package.json'
@@ -30,10 +31,12 @@ const checkVersion = async () => {
if (result) {
dialog.showMessageBox({
type: 'info',
title: '发现新版本',
title: T('FIND_NEW_VERSION'),
buttons: ['Yes', 'No'],
message: `发现新版本${latest},更新了很多功能,是否去下载最新的版本?`,
checkboxLabel: '以后不再提醒',
message: T('TIPS_FIND_NEW_VERSION', {
v: latest
}),
checkboxLabel: T('NO_MORE_NOTICE'),
checkboxChecked: false
}).then(res => {
if (res.response === 0) { // if selected yes