From f98238482e80fe3221d2f99bd162d4d1d029b82e Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 22 Oct 2024 16:05:30 +0800 Subject: [PATCH] cookie translate --- v3/src/components/CookieConsentConfig.ts | 61 +++------------ v3/src/components/common/Scamming.jsx | 95 ++++++++++++++++++++++-- v3/src/components/cookie/de.json | 55 ++++++++++++++ v3/src/components/cookie/en.json | 55 ++++++++++++++ v3/src/components/cookie/es.json | 55 ++++++++++++++ v3/src/components/cookie/fr.json | 55 ++++++++++++++ v3/src/components/cookie/it.json | 55 ++++++++++++++ v3/src/components/cookie/ja.json | 55 ++++++++++++++ v3/src/components/cookie/pt.json | 55 ++++++++++++++ v3/src/components/cookie/zh-CN.json | 55 ++++++++++++++ v3/src/components/cookie/zh-TW.json | 55 ++++++++++++++ v3/src/i18n.ts | 4 +- v3/src/layouts/Layout.astro | 4 +- v3/src/pages/ja/index.astro | 12 +-- v3/src/pages/ja/support.astro | 6 +- 15 files changed, 607 insertions(+), 70 deletions(-) create mode 100644 v3/src/components/cookie/de.json create mode 100644 v3/src/components/cookie/en.json create mode 100644 v3/src/components/cookie/es.json create mode 100644 v3/src/components/cookie/fr.json create mode 100644 v3/src/components/cookie/it.json create mode 100644 v3/src/components/cookie/ja.json create mode 100644 v3/src/components/cookie/pt.json create mode 100644 v3/src/components/cookie/zh-CN.json create mode 100644 v3/src/components/cookie/zh-TW.json diff --git a/v3/src/components/CookieConsentConfig.ts b/v3/src/components/CookieConsentConfig.ts index 04857c4..0c3ea25 100644 --- a/v3/src/components/CookieConsentConfig.ts +++ b/v3/src/components/CookieConsentConfig.ts @@ -1,4 +1,13 @@ import type { CookieConsentConfig } from 'vanilla-cookieconsent'; +import en from './cookie/en.json'; +import de from './cookie/de.json'; +import es from './cookie/es.json'; +import fr from './cookie/fr.json'; +import pt from './cookie/pt.json'; +import it from './cookie/pt.json'; +import ja from './cookie/pt.json'; +import zhCN from './cookie/zh-CN.json'; +import zhTW from './cookie/zh-TW.json'; export const config: CookieConsentConfig = { guiOptions: { @@ -46,57 +55,7 @@ export const config: CookieConsentConfig = { default: 'en', autoDetect: 'browser', translations: { - en: { - consentModal: { - title: "Hello traveller, it's cookie time!", - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.', - acceptAllBtn: 'Accept all', - acceptNecessaryBtn: 'Reject all', - showPreferencesBtn: 'Manage preferences', - footer: - 'Privacy Policy\nTerms and conditions', - }, - preferencesModal: { - title: 'Consent Preferences Center', - acceptAllBtn: 'Accept all', - acceptNecessaryBtn: 'Reject all', - savePreferencesBtn: 'Save preferences', - closeIconLabel: 'Close modal', - serviceCounterLabel: 'Service|Services', - sections: [ - { - title: 'Cookie Usage', - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', - }, - { - title: - 'Strictly Necessary Cookies Always Enabled', - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', - linkedCategory: 'necessary', - }, - { - title: 'Functionality Cookies', - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', - linkedCategory: 'functionality', - }, - { - title: 'Analytics Cookies', - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.', - linkedCategory: 'analytics', - }, - { - title: 'More information', - description: - 'For any query in relation to my policy on cookies and your choices, please contact me.', - }, - ], - }, - }, + en, de, es, fr, ja, pt, it, 'zh-CN': zhCN, 'zh-TW': zhTW, }, }, }; diff --git a/v3/src/components/common/Scamming.jsx b/v3/src/components/common/Scamming.jsx index 732ed0a..ff999c6 100644 --- a/v3/src/components/common/Scamming.jsx +++ b/v3/src/components/common/Scamming.jsx @@ -1,6 +1,8 @@ import React, { useState, useEffect } from 'react'; +import { useTranslations } from '@/i18n'; -const ScammingBanner = () => { +const ScammingBanner = ({ lang }) => { + const t = useTranslations(lang || ''); const [isHide, setHide] = useState(true); useEffect(() => { @@ -22,11 +24,92 @@ const ScammingBanner = () => { return (
- WARNING: YOU MAY BE BEING SCAMMED!
- If you are on the phone with someone you DON'T know AND TRUST who has asked you to install RustDesk, -
- do not install and hang up immediately.
- They are likely a scammer trying to steal your money or other private information. + {t({ + en: ( + <> + WARNING: YOU MAY BE BEING SCAMMED!
+ If you are on the phone with someone you DON'T know AND TRUST who has asked you to install RustDesk, +
+ do not install and hang up immediately.
+ They are likely a scammer trying to steal your money or other private information. + + ), + fr: ( + <> + ATTENTION: VOUS POURRIEZ ÊTRE SCAMMÉ!
+ Si vous êtes sur la ligne avec quelqu'un que vous ne connaissez pas et qui vous a demandé d'installer + RustDesk, +
+ ne l'installez pas et coupez immédiatement.
+ Ils sont probablement des escrocs qui essaient de voler votre argent ou d'autres informations privées. + + ), + de: ( + <> + WARNUNG: Sie könnten betrogen worden sein!
+ Wenn du mit jemanden telefoniest, der du nicht kennst und vertraust, der dich fragt, RustDesk zu + installieren, +
+ installiere es nicht und hänge sofort auf.
+ Sie sind wahrscheinlich ein Betrüger, der versucht, dein Geld oder andere private Informationen zu + stehlen. + + ), + es: ( + <> + ADVERTENCIA: PODRÍAS ESTAR SIENDO ESTAFADO!
+ Si estás en la llamada con alguien que no conoces y no puedes confiar que te pida instalar RustDesk, +
+ no instales y cuelga inmediatamente.
+ Probablemente sean estafadores que intentan robar tu dinero o otra información privada. + + ), + pt: ( + <> + AVISO: VOCÊ PODE ESTAR SENDO ENGANADO!
+ Se você está no telefone com alguém que NÃO conhece e CONFIANÇA que pediu para instalar RustDesk, +
+ não instale e desligue imediatamente.
+ Eles provavelmente são golpistas tentando roubar seu dinheiro ou outras informações privadas. + + ), + 'zh-cn': ( + <> + 警告:您可能正在被骗!
+ 如果您与您不认识和信任的人通话,并要求您安装 RustDesk, +
+ 请勿安装并立即挂断。
+ 他们很可能是骗子,试图窃取您的钱或其他私人信息。 + + ), + 'zh-tw': ( + <> + 警告:您可能正在被騙!
+ 如果您與您不認識和信任的人通話,並要求您安裝 RustDesk, +
+ 請勿安裝並立即掛斷。
+ 他們很可能是騙子,試圖竊取您的錢或其他私人信息。 + + ), + ja: ( + <> + 警告:あなたは騙されているかもしれません!
+ RustDesk をインストールするように頼んだことがない人と電話中である場合、 +
+ インストールしないですぐに電話を切断してください。
+ おそらく、あなたのお金や他の個人情報を盗もうとする詐欺師です。 + + ), + it: ( + <> + AVVISO: POTRESTI ESSERE TRUFFATO!
+ Se sei al telefono con qualcuno che NON conosci e in cui CONFIANZA ti ha chiesto di installare RustDesk, +
+ non installare e riaggancia immediatamente.
+ Probabilmente sono truffatori che cercano di rubarti i soldi o + + ), + })}