From d527797fa2e3ea47b79f2191ebf9dfc10fc29f20 Mon Sep 17 00:00:00 2001 From: Yigit Colakoglu Date: Thu, 31 Jul 2025 06:59:11 +0200 Subject: [PATCH] Remove unused field from translations --- quartz/components/scripts/encrypt.inline.ts | 11 ----------- quartz/i18n/locales/ar-SA.ts | 1 - quartz/i18n/locales/ca-ES.ts | 1 - quartz/i18n/locales/cs-CZ.ts | 1 - quartz/i18n/locales/de-DE.ts | 1 - quartz/i18n/locales/definition.ts | 1 - quartz/i18n/locales/en-GB.ts | 1 - quartz/i18n/locales/en-US.ts | 1 - quartz/i18n/locales/es-ES.ts | 1 - quartz/i18n/locales/fa-IR.ts | 1 - quartz/i18n/locales/fi-FI.ts | 1 - quartz/i18n/locales/fr-FR.ts | 1 - quartz/i18n/locales/hu-HU.ts | 1 - quartz/i18n/locales/id-ID.ts | 1 - quartz/i18n/locales/it-IT.ts | 1 - quartz/i18n/locales/ja-JP.ts | 1 - quartz/i18n/locales/ko-KR.ts | 1 - quartz/i18n/locales/lt-LT.ts | 1 - quartz/i18n/locales/nb-NO.ts | 1 - quartz/i18n/locales/nl-NL.ts | 1 - quartz/i18n/locales/pl-PL.ts | 1 - quartz/i18n/locales/pt-BR.ts | 1 - quartz/i18n/locales/ro-RO.ts | 1 - quartz/i18n/locales/ru-RU.ts | 1 - quartz/i18n/locales/th-TH.ts | 1 - quartz/i18n/locales/tr-TR.ts | 1 - quartz/i18n/locales/uk-UA.ts | 1 - quartz/i18n/locales/vi-VN.ts | 1 - quartz/i18n/locales/zh-CN.ts | 1 - quartz/i18n/locales/zh-TW.ts | 1 - quartz/plugins/transformers/encrypt.ts | 5 ++++- quartz/util/encryption.ts | 2 +- 32 files changed, 5 insertions(+), 42 deletions(-) diff --git a/quartz/components/scripts/encrypt.inline.ts b/quartz/components/scripts/encrypt.inline.ts index 62cd62e0f..8f4fe0061 100644 --- a/quartz/components/scripts/encrypt.inline.ts +++ b/quartz/components/scripts/encrypt.inline.ts @@ -128,17 +128,6 @@ const notifyNav = (url: FullSlug) => { document.dispatchEvent(event) } -const getFirstParentWithClass = (container: HTMLElement, className: string): HTMLElement | null => { - let current = container.parentElement - while (current) { - if (current.classList.contains(className)) { - return current - } - current = current.parentElement - } - return null -} - function updateTitle(container: HTMLElement | null) { console.log(container) if (container) { diff --git a/quartz/i18n/locales/ar-SA.ts b/quartz/i18n/locales/ar-SA.ts index 7a6db7650..dd425b708 100644 --- a/quartz/i18n/locales/ar-SA.ts +++ b/quartz/i18n/locales/ar-SA.ts @@ -66,7 +66,6 @@ export default { }, encryption: { title: "🛡️ محتوى محدود 🛡️", - restricted: "هذا المحتوى محدود. ادخل كلمة المرور للعرض:", enterPassword: "ادخل كلمة المرور", decrypt: "فك التشفير", decrypting: "جاري فك التشفير...", diff --git a/quartz/i18n/locales/ca-ES.ts b/quartz/i18n/locales/ca-ES.ts index 73c07f2f1..17c373374 100644 --- a/quartz/i18n/locales/ca-ES.ts +++ b/quartz/i18n/locales/ca-ES.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Contingut Restringit 🛡️", - restricted: "Aquest contingut està restringit. Introduïu la contrasenya per veure:", enterPassword: "Introduïu la contrasenya", decrypt: "Desxifrar", decrypting: "Desxifrant...", diff --git a/quartz/i18n/locales/cs-CZ.ts b/quartz/i18n/locales/cs-CZ.ts index 4648faa6a..017b1900c 100644 --- a/quartz/i18n/locales/cs-CZ.ts +++ b/quartz/i18n/locales/cs-CZ.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Omezený obsah 🛡️", - restricted: "Tento obsah je omezen. Zadejte heslo pro zobrazení:", enterPassword: "Zadejte heslo", decrypt: "Dešifrovat", decrypting: "Dešifruji...", diff --git a/quartz/i18n/locales/de-DE.ts b/quartz/i18n/locales/de-DE.ts index 953f0ddfc..8317ee6f9 100644 --- a/quartz/i18n/locales/de-DE.ts +++ b/quartz/i18n/locales/de-DE.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Eingeschränkter Inhalt 🛡️", - restricted: "Dieser Inhalt ist eingeschränkt. Geben Sie das Passwort ein, um ihn anzuzeigen:", enterPassword: "Passwort eingeben", decrypt: "Entschlüsseln", decrypting: "Entschlüsselt...", diff --git a/quartz/i18n/locales/definition.ts b/quartz/i18n/locales/definition.ts index b51eb94d3..9d5e19d55 100644 --- a/quartz/i18n/locales/definition.ts +++ b/quartz/i18n/locales/definition.ts @@ -63,7 +63,6 @@ export interface Translation { } encryption: { title: string - restricted: string enterPassword: string decrypt: string decrypting: string diff --git a/quartz/i18n/locales/en-GB.ts b/quartz/i18n/locales/en-GB.ts index f3c1eb52f..d3d506843 100644 --- a/quartz/i18n/locales/en-GB.ts +++ b/quartz/i18n/locales/en-GB.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Restricted Content 🛡️", - restricted: "This content is restricted. Enter the password to view:", enterPassword: "Enter password", decrypt: "Decrypt", decrypting: "Decrypting...", diff --git a/quartz/i18n/locales/en-US.ts b/quartz/i18n/locales/en-US.ts index 1ea4437a4..6720064e5 100644 --- a/quartz/i18n/locales/en-US.ts +++ b/quartz/i18n/locales/en-US.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Restricted Content 🛡️", - restricted: "This content is restricted. Enter the password to view:", enterPassword: "Enter password", decrypt: "Decrypt", decrypting: "Decrypting...", diff --git a/quartz/i18n/locales/es-ES.ts b/quartz/i18n/locales/es-ES.ts index f79b5a374..f128702b3 100644 --- a/quartz/i18n/locales/es-ES.ts +++ b/quartz/i18n/locales/es-ES.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Contenido Restringido 🛡️", - restricted: "Este contenido está restringido. Ingrese la contraseña para ver:", enterPassword: "Ingrese contraseña", decrypt: "Desencriptar", decrypting: "Desencriptando...", diff --git a/quartz/i18n/locales/fa-IR.ts b/quartz/i18n/locales/fa-IR.ts index 1fcef66ee..d7b36860b 100644 --- a/quartz/i18n/locales/fa-IR.ts +++ b/quartz/i18n/locales/fa-IR.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ محتوای محدود 🛡️", - restricted: "این محتوا محدود است. رمز عبور را وارد کنید:", enterPassword: "رمز عبور را وارد کنید", decrypt: "رمزگشایی", decrypting: "در حال رمزگشایی...", diff --git a/quartz/i18n/locales/fi-FI.ts b/quartz/i18n/locales/fi-FI.ts index 4375b07f7..9bc84061a 100644 --- a/quartz/i18n/locales/fi-FI.ts +++ b/quartz/i18n/locales/fi-FI.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Rajoitettu Sisältö 🛡️", - restricted: "Tämä sisältö on rajoitettu. Anna salasana nähdäksesi:", enterPassword: "Anna salasana", decrypt: "Pura salaus", decrypting: "Puretaan salausta...", diff --git a/quartz/i18n/locales/fr-FR.ts b/quartz/i18n/locales/fr-FR.ts index 60e7d1fec..ddc9aaa07 100644 --- a/quartz/i18n/locales/fr-FR.ts +++ b/quartz/i18n/locales/fr-FR.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Contenu Restreint 🛡️", - restricted: "Ce contenu est restreint. Entrez le mot de passe pour l'afficher :", enterPassword: "Entrez le mot de passe", decrypt: "Déchiffrer", decrypting: "Déchiffrement...", diff --git a/quartz/i18n/locales/hu-HU.ts b/quartz/i18n/locales/hu-HU.ts index ab022546b..1fd7695f7 100644 --- a/quartz/i18n/locales/hu-HU.ts +++ b/quartz/i18n/locales/hu-HU.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Korlátozott Tartalom 🛡️", - restricted: "Ez a tartalom korlátozott. Adja meg a jelszót a megtekintéshez:", enterPassword: "Jelszó megadása", decrypt: "Visszafejtés", decrypting: "Visszafejtés...", diff --git a/quartz/i18n/locales/id-ID.ts b/quartz/i18n/locales/id-ID.ts index 06da19e21..42bb3f973 100644 --- a/quartz/i18n/locales/id-ID.ts +++ b/quartz/i18n/locales/id-ID.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Konten Terbatas 🛡️", - restricted: "Konten ini terbatas. Masukkan kata sandi untuk melihat:", enterPassword: "Masukkan kata sandi", decrypt: "Dekripsi", decrypting: "Mendekripsi...", diff --git a/quartz/i18n/locales/it-IT.ts b/quartz/i18n/locales/it-IT.ts index 911a05bc4..53189edeb 100644 --- a/quartz/i18n/locales/it-IT.ts +++ b/quartz/i18n/locales/it-IT.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Contenuto Riservato 🛡️", - restricted: "Questo contenuto è riservato. Inserisci la password per visualizzare:", enterPassword: "Inserisci password", decrypt: "Decripta", decrypting: "Decriptando...", diff --git a/quartz/i18n/locales/ja-JP.ts b/quartz/i18n/locales/ja-JP.ts index 6372b3fca..85732e8c6 100644 --- a/quartz/i18n/locales/ja-JP.ts +++ b/quartz/i18n/locales/ja-JP.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ 制限されたコンテンツ 🛡️", - restricted: "このコンテンツは制限されています。表示するにはパスワードを入力してください:", enterPassword: "パスワードを入力", decrypt: "復号化", decrypting: "復号化中...", diff --git a/quartz/i18n/locales/ko-KR.ts b/quartz/i18n/locales/ko-KR.ts index c2d9ca85a..c76fe2297 100644 --- a/quartz/i18n/locales/ko-KR.ts +++ b/quartz/i18n/locales/ko-KR.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ 제한된 콘텐츠 🛡️", - restricted: "이 콘텐츠는 제한되어 있습니다. 보려면 비밀번호를 입력하세요:", enterPassword: "비밀번호 입력", decrypt: "복호화", decrypting: "복호화 중...", diff --git a/quartz/i18n/locales/lt-LT.ts b/quartz/i18n/locales/lt-LT.ts index b85b20934..039877699 100644 --- a/quartz/i18n/locales/lt-LT.ts +++ b/quartz/i18n/locales/lt-LT.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Apribotas Turinys 🛡️", - restricted: "Šis turinys yra apribotas. Įveskite slaptažodį, kad peržiūrėtumėte:", enterPassword: "Įvesti slaptažodį", decrypt: "Iššifruoti", decrypting: "Iššifruojama...", diff --git a/quartz/i18n/locales/nb-NO.ts b/quartz/i18n/locales/nb-NO.ts index 282404b35..73f76871e 100644 --- a/quartz/i18n/locales/nb-NO.ts +++ b/quartz/i18n/locales/nb-NO.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Begrenset Innhold 🛡️", - restricted: "Dette innholdet er begrenset. Skriv inn passord for å vise:", enterPassword: "Skriv inn passord", decrypt: "Dekrypter", decrypting: "Dekrypterer...", diff --git a/quartz/i18n/locales/nl-NL.ts b/quartz/i18n/locales/nl-NL.ts index 3287b2b0d..2d73dd8d4 100644 --- a/quartz/i18n/locales/nl-NL.ts +++ b/quartz/i18n/locales/nl-NL.ts @@ -62,7 +62,6 @@ export default { }, encryption: { title: "🛡️ Beperkte Inhoud 🛡️", - restricted: "Deze inhoud is beperkt. Voer het wachtwoord in om te bekijken:", enterPassword: "Voer wachtwoord in", decrypt: "Ontsleutelen", decrypting: "Ontsleutelen...", diff --git a/quartz/i18n/locales/pl-PL.ts b/quartz/i18n/locales/pl-PL.ts index 5755533cb..5887d7b3b 100644 --- a/quartz/i18n/locales/pl-PL.ts +++ b/quartz/i18n/locales/pl-PL.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Ograniczona Treść 🛡️", - restricted: "Ta treść jest ograniczona. Wprowadź hasło, aby wyświetlić:", enterPassword: "Wprowadź hasło", decrypt: "Odszyfruj", decrypting: "Odszyfrowywanie...", diff --git a/quartz/i18n/locales/pt-BR.ts b/quartz/i18n/locales/pt-BR.ts index c5ecfe170..4e7ebce49 100644 --- a/quartz/i18n/locales/pt-BR.ts +++ b/quartz/i18n/locales/pt-BR.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Conteúdo Restrito 🛡️", - restricted: "Este conteúdo é restrito. Digite a senha para visualizar:", enterPassword: "Digite a senha", decrypt: "Descriptografar", decrypting: "Descriptografando...", diff --git a/quartz/i18n/locales/ro-RO.ts b/quartz/i18n/locales/ro-RO.ts index b211e089b..76b537b61 100644 --- a/quartz/i18n/locales/ro-RO.ts +++ b/quartz/i18n/locales/ro-RO.ts @@ -62,7 +62,6 @@ export default { }, encryption: { title: "🛡️ Conținut Restricționat 🛡️", - restricted: "Acest conținut este restricționat. Introduceți parola pentru a vizualiza:", enterPassword: "Introduceți parola", decrypt: "Decriptați", decrypting: "Se decriptează...", diff --git a/quartz/i18n/locales/ru-RU.ts b/quartz/i18n/locales/ru-RU.ts index 41efcae4b..9996a4f12 100644 --- a/quartz/i18n/locales/ru-RU.ts +++ b/quartz/i18n/locales/ru-RU.ts @@ -62,7 +62,6 @@ export default { }, encryption: { title: "🛡️ Ограниченный Контент 🛡️", - restricted: "Этот контент ограничен. Введите пароль для просмотра:", enterPassword: "Введите пароль", decrypt: "Расшифровать", decrypting: "Расшифровка...", diff --git a/quartz/i18n/locales/th-TH.ts b/quartz/i18n/locales/th-TH.ts index 05e6441ab..01aa47879 100644 --- a/quartz/i18n/locales/th-TH.ts +++ b/quartz/i18n/locales/th-TH.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ เนื้อหาถูกจำกัด 🛡️", - restricted: "เนื้อหานี้ถูกจำกัด กรุณาใส่รหัสผ่านเพื่อดู:", enterPassword: "ใส่รหัสผ่าน", decrypt: "ถอดรหัส", decrypting: "กำลังถอดรหัส...", diff --git a/quartz/i18n/locales/tr-TR.ts b/quartz/i18n/locales/tr-TR.ts index 1d416179c..aeb287b8c 100644 --- a/quartz/i18n/locales/tr-TR.ts +++ b/quartz/i18n/locales/tr-TR.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Kısıtlı İçerik 🛡️", - restricted: "Bu içerik şifreli. Görüntülemek için şifreyi girin:", enterPassword: "Şifreyi girin", decrypt: "Şifreyi Çöz", decrypting: "Şifre çözülüyor...", diff --git a/quartz/i18n/locales/uk-UA.ts b/quartz/i18n/locales/uk-UA.ts index 8db23b072..75c7d6ede 100644 --- a/quartz/i18n/locales/uk-UA.ts +++ b/quartz/i18n/locales/uk-UA.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Обмежений Контент 🛡️", - restricted: "Цей контент обмежений. Введіть пароль, щоб переглянути:", enterPassword: "Введіть пароль", decrypt: "Розшифрувати", decrypting: "Розшифрування...", diff --git a/quartz/i18n/locales/vi-VN.ts b/quartz/i18n/locales/vi-VN.ts index 782702cd9..6af59bf16 100644 --- a/quartz/i18n/locales/vi-VN.ts +++ b/quartz/i18n/locales/vi-VN.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ Nội Dung Bị Hạn Chế 🛡️", - restricted: "Nội dung này bị hạn chế. Nhập mật khẩu để xem:", enterPassword: "Nhập mật khẩu", decrypt: "Giải mã", decrypting: "Đang giải mã...", diff --git a/quartz/i18n/locales/zh-CN.ts b/quartz/i18n/locales/zh-CN.ts index 7a84864fc..470b6eb7d 100644 --- a/quartz/i18n/locales/zh-CN.ts +++ b/quartz/i18n/locales/zh-CN.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ 受限内容 🛡️", - restricted: "此内容受限制。输入密码以查看:", enterPassword: "输入密码", decrypt: "解密", decrypting: "解密中...", diff --git a/quartz/i18n/locales/zh-TW.ts b/quartz/i18n/locales/zh-TW.ts index 52e579778..54294585a 100644 --- a/quartz/i18n/locales/zh-TW.ts +++ b/quartz/i18n/locales/zh-TW.ts @@ -61,7 +61,6 @@ export default { }, encryption: { title: "🛡️ 受限內容 🛡️", - restricted: "此內容受限制。輸入密碼以檢視:", enterPassword: "輸入密碼", decrypt: "解密", decrypting: "解密中...", diff --git a/quartz/plugins/transformers/encrypt.ts b/quartz/plugins/transformers/encrypt.ts index e4d2d0bd6..647b1d748 100644 --- a/quartz/plugins/transformers/encrypt.ts +++ b/quartz/plugins/transformers/encrypt.ts @@ -34,7 +34,10 @@ export const Encrypt: QuartzTransformerPlugin> = (userOpts) => const opts = { ...defaultOptions, ...userOpts } // Validate algorithm at build time - if (opts.algorithm && !SUPPORTED_ALGORITHMS.includes(opts.algorithm as SupportedEncryptionAlgorithm)) { + if ( + opts.algorithm && + !SUPPORTED_ALGORITHMS.includes(opts.algorithm as SupportedEncryptionAlgorithm) + ) { throw new Error( `[EncryptPlugin] Unsupported encryption algorithm: ${opts.algorithm}. Supported algorithms: ${SUPPORTED_ALGORITHMS.join(", ")}`, ) diff --git a/quartz/util/encryption.ts b/quartz/util/encryption.ts index cd138f1d3..5bc7c3944 100644 --- a/quartz/util/encryption.ts +++ b/quartz/util/encryption.ts @@ -592,4 +592,4 @@ export async function contentDecryptedEventListener( } }) } -} \ No newline at end of file +}