diff --git a/src/components/shell/LangSwitcher.tsx b/src/components/shell/LangSwitcher.tsx index 9e22093..4d4277b 100644 --- a/src/components/shell/LangSwitcher.tsx +++ b/src/components/shell/LangSwitcher.tsx @@ -3,7 +3,7 @@ import { LOCALES, LOCALE_LABEL, LOCALE_NAME, localizePath, stripLocale, type Lan // Public sections that exist in every locale. Other paths (about, settings…) fall // back to the locale home when switching, so the switcher never lands on a 404. -const LOCALIZED_PREFIXES = ['/tools/', '/category/', '/about']; +const LOCALIZED_PREFIXES = ['/tools/', '/category/', '/about', '/privacy']; /** The URL for the current page in `lang` — computed fresh from the live location. */ function targetFor(lang: Lang): string { diff --git a/src/pages/[...locale]/privacy.astro b/src/pages/[...locale]/privacy.astro new file mode 100644 index 0000000..77d02a0 --- /dev/null +++ b/src/pages/[...locale]/privacy.astro @@ -0,0 +1,99 @@ +--- +import { ChevronRight } from 'lucide-react'; +import Base from '@/layouts/Base.astro'; +import { REPO_URL } from '@/config'; +import { LOCALES, localeParam, localizePath, type Lang } from '@/i18n/config'; + +export function getStaticPaths() { + return LOCALES.map(lang => ({ params: { locale: localeParam(lang) }, props: { lang } })); +} + +const { lang } = Astro.props as { lang: Lang }; +const homePath = localizePath('/', lang); + +const P = { + en: { + title: 'Privacy', home: 'Home', crumb: 'Privacy', + metaDesc: 'How GoodWebTools protects your privacy: files never leave your browser, and analytics are optional, anonymized, and only load with your consent.', + h1: 'Privacy & Verifiability', + s1H: 'No data leaves your device', + s1P: 'All processing happens in your browser. No files, images, or documents are ever uploaded to a server.', + s2H: 'Analytics & cookies', + s2Pa: 'We use a single privacy-friendly analytics cookie (Google Analytics, with IP anonymization) to understand which tools people find useful. It ', + s2Strong: 'only loads after you click “Accept”', + s2Pb: ' in the cookie banner — decline and no analytics cookie is set. This never includes your files or their contents; your documents are always processed entirely on your device.', + s2P2: "You can change your mind anytime by clearing this site's data in your browser settings, which resets the banner.", + s3H: 'Verify it yourself', + s3: ['Open Developer Tools (F12)', 'Go to the Network tab', 'Use any tool and process a file', 'Watch: zero network requests to external servers'], + s4H: 'Works offline', + s4P: 'After first use, tools work with your network completely off. This is the strongest proof that nothing leaves your device.', + s5H: 'Open source', + s5Pa: 'The code is open source on GitHub — you can audit it yourself or run it locally: ', + }, + id: { + title: 'Privasi', home: 'Beranda', crumb: 'Privasi', + metaDesc: 'Bagaimana GoodWebTools melindungi privasi Anda: berkas tidak pernah meninggalkan browser, dan analitik bersifat opsional, dianonimkan, serta hanya dimuat dengan persetujuan Anda.', + h1: 'Privasi & Keterverifikasian', + s1H: 'Tidak ada data yang meninggalkan perangkat Anda', + s1P: 'Semua pemrosesan terjadi di browser Anda. Tidak ada berkas, gambar, atau dokumen yang pernah diunggah ke server.', + s2H: 'Analitik & cookie', + s2Pa: 'Kami menggunakan satu cookie analitik yang ramah privasi (Google Analytics, dengan anonimisasi IP) untuk memahami tool mana yang bermanfaat bagi pengguna. Cookie ini ', + s2Strong: 'hanya dimuat setelah Anda mengeklik “Terima”', + s2Pb: ' pada banner cookie — jika menolak, tidak ada cookie analitik yang dipasang. Ini tidak pernah menyertakan berkas Anda atau isinya; dokumen Anda selalu diproses sepenuhnya di perangkat Anda.', + s2P2: 'Anda dapat berubah pikiran kapan saja dengan menghapus data situs ini di pengaturan browser, yang akan mengatur ulang banner.', + s3H: 'Verifikasi sendiri', + s3: ['Buka Developer Tools (F12)', 'Buka tab Network', 'Gunakan tool apa pun dan proses sebuah berkas', 'Perhatikan: nol permintaan jaringan ke server eksternal'], + s4H: 'Bekerja offline', + s4P: 'Setelah pemakaian pertama, tool bekerja dengan jaringan Anda dimatikan sepenuhnya. Ini adalah bukti terkuat bahwa tidak ada yang meninggalkan perangkat Anda.', + s5H: 'Sumber terbuka', + s5Pa: 'Kode bersifat sumber terbuka di GitHub — Anda dapat mengauditnya sendiri atau menjalankannya secara lokal: ', + }, +}[lang]; +--- + + +
+ + +

{P.h1}

+ +
+

{P.s1H}

+

{P.s1P}

+
+ +
+

{P.s2H}

+

{P.s2Pa}{P.s2Strong}{P.s2Pb}

+

{P.s2P2}

+
+ +
+

{P.s3H}

+
    + {P.s3.map(step =>
  1. {step}
  2. )} +
+
+ +
+

{P.s4H}

+

{P.s4P}

+
+ +
+

{P.s5H}

+

+ {P.s5Pa} + slaveofcode/goodwebtools. +

+
+
+ diff --git a/src/pages/privacy.astro b/src/pages/privacy.astro deleted file mode 100644 index 5a68628..0000000 --- a/src/pages/privacy.astro +++ /dev/null @@ -1,57 +0,0 @@ ---- -import Base from '@/layouts/Base.astro'; ---- - - -
-

Privacy & Verifiability

- -
-

No Data Leaves Your Device

-

- All processing happens in your browser. No files, images, or documents are ever uploaded to a server. -

-
- -
-

Analytics & Cookies

-

- We use a single privacy-friendly analytics cookie (Google Analytics, with IP anonymization) to - understand which tools people find useful. It only loads after you click “Accept” - in the cookie banner — decline and no analytics cookie is set. This never includes your files or - their contents; your documents are always processed entirely on your device. -

-

- You can change your mind anytime by clearing this site's data in your browser settings, which - resets the banner. -

-
- -
-

Verify It Yourself

-
    -
  1. Open Developer Tools (F12)
  2. -
  3. Go to the Network tab
  4. -
  5. Use any tool and process a file
  6. -
  7. Watch: zero network requests to external servers
  8. -
-
- -
-

Works Offline

-

- After first use, tools work with your network completely off. This is the strongest proof that nothing leaves your device. -

-
- -
-

Open Source

-

- The code is open source and will be available on GitHub at launch. You can audit it yourself or run it locally. -

-
-
- diff --git a/worker/index.js b/worker/index.js index b01169d..bcc7867 100644 --- a/worker/index.js +++ b/worker/index.js @@ -75,7 +75,7 @@ export default { if (request.method === 'GET') { const accept = request.headers.get('accept') || ''; const p = url.pathname; - const isLocalized = p === '/' || p.startsWith('/tools/') || p.startsWith('/category/') || p === '/about' || p.startsWith('/about/'); + const isLocalized = p === '/' || p.startsWith('/tools/') || p.startsWith('/category/') || p === '/about' || p.startsWith('/about/') || p === '/privacy' || p.startsWith('/privacy/'); const alreadyId = p === '/id' || p.startsWith('/id/'); const cookie = request.headers.get('cookie') || ''; const hasChoice = /(?:^|;\s*)gwt\.lang=/.test(cookie);