From 9d236ba6f493dc93db0c897b67d06357dee20584 Mon Sep 17 00:00:00 2001 From: PiEgg Date: Tue, 11 Jan 2022 23:57:35 +0800 Subject: [PATCH] :construction: WIP: renderer process i18n --- src/main.ts | 2 + src/main/utils/privacyManager.ts | 24 +------ src/renderer/components/ChoosePicBed.vue | 2 +- src/renderer/components/InputBoxDialog.vue | 6 +- src/renderer/layouts/Main.vue | 34 ++++----- src/renderer/pages/Gallery.vue | 84 +++++++++++----------- src/universal/i18n/zh-CN.ts | 59 +++++++++++++++ src/universal/types/extra-vue.d.ts | 1 + 8 files changed, 128 insertions(+), 84 deletions(-) diff --git a/src/main.ts b/src/main.ts index 57792b97..0b7214c3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,6 +10,7 @@ import mainMixin from './renderer/utils/mainMixin' import bus from '@/utils/bus' import { initTalkingData } from './renderer/utils/analytics' import db from './renderer/utils/db' +import { T } from '#/i18n/index' webFrame.setVisualZoomLevelLimits(1, 1) @@ -26,6 +27,7 @@ Vue.prototype.$builtInPicBed = [ Vue.prototype.$$db = db Vue.prototype.$http = axios Vue.prototype.$bus = bus +Vue.prototype.$T = T Vue.use(ElementUI) Vue.use(VueLazyLoad) diff --git a/src/main/utils/privacyManager.ts b/src/main/utils/privacyManager.ts index 2f292704..0d1c48f0 100644 --- a/src/main/utils/privacyManager.ts +++ b/src/main/utils/privacyManager.ts @@ -27,29 +27,7 @@ class PrivacyManager { type: 'info', buttons: showCancel ? ['Yes', 'No'] : ['Yes'], title: T('PRIVACY_AGREEMENT'), - message: ` - 本软件尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更优质的服务,本软件会按照本隐私权政策的规定使用和收集您的一些行为信息。您在同意本软件服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本软件服务使用协议不可分割的一部分,如果不同意将无法使用。本协议会定期更新。 - - 1.适用范围 - - a)在您使用本软件时,本软件会记录的您对本软件的一些操作行为信息,包括但不限于您使用本软件进行文件上传的耗时、类型、数量等信息。 - - 2.信息的使用 - - a)在获得您的使用数据之后,本软件会将其上传至数据分析服务器,以便分析数据后,提供给您更好的服务。 - - 3.信息披露 - - a)本软件不会将您的信息披露给不受信任的第三方。 - - b)根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露; - - c)如您出现违反中国有关法律、法规或者相关规则的情况,需要向第三方披露; - - 4.信息安全 - - a)本软件不会收集您的个人信息、密钥信息等隐私信息,所收集的信息仅仅作为改善软件、优化体验、了解软件日活等用途。 - ` + message: T('PRIVACY') }) return res } diff --git a/src/renderer/components/ChoosePicBed.vue b/src/renderer/components/ChoosePicBed.vue index d19060b6..3ce28c65 100644 --- a/src/renderer/components/ChoosePicBed.vue +++ b/src/renderer/components/ChoosePicBed.vue @@ -1,6 +1,6 @@ diff --git a/src/renderer/layouts/Main.vue b/src/renderer/layouts/Main.vue index e156ac98..2b82d181 100644 --- a/src/renderer/layouts/Main.vue +++ b/src/renderer/layouts/Main.vue @@ -21,18 +21,18 @@ > - 上传区 + {{ $T('UPLOAD_AREA') }} - 相册 + {{ $T('GALLERY') }}