From 93527513eedf888f96f21dd42e1346001d45a657 Mon Sep 17 00:00:00 2001 From: Mara-Li Date: Wed, 29 May 2024 08:38:16 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'quartz/'=20wit?= =?UTF-8?q?h=20remote=20'quartz/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quartz/cfg.ts | 4 + quartz/components/RecentNotes.tsx | 28 +-- quartz/components/pages/404.tsx | 5 + quartz/i18n/index.ts | 4 + quartz/i18n/locales/ar-SA.ts | 173 ++++++++-------- quartz/i18n/locales/de-DE.ts | 163 +++++++-------- quartz/i18n/locales/definition.ts | 1 + quartz/i18n/locales/en-US.ts | 163 +++++++-------- quartz/i18n/locales/es-ES.ts | 163 +++++++-------- quartz/i18n/locales/fa-IR.ts | 84 ++++++++ quartz/i18n/locales/fr-FR.ts | 163 +++++++-------- quartz/i18n/locales/hu-HU.ts | 1 + quartz/i18n/locales/it-IT.ts | 163 +++++++-------- quartz/i18n/locales/ja-JP.ts | 159 +++++++-------- quartz/i18n/locales/ko-KR.ts | 159 +++++++-------- quartz/i18n/locales/nl-NL.ts | 167 ++++++++-------- quartz/i18n/locales/pl-PL.ts | 84 ++++++++ quartz/i18n/locales/pt-BR.ts | 1 + quartz/i18n/locales/ro-RO.ts | 165 +++++++-------- quartz/i18n/locales/ru-RU.ts | 189 +++++++++--------- quartz/i18n/locales/uk-UA.ts | 163 +++++++-------- quartz/i18n/locales/vi-VN.ts | 1 + quartz/i18n/locales/zh-CN.ts | 159 +++++++-------- quartz/plugins/emitters/componentResources.ts | 8 + quartz/plugins/transformers/ofm.ts | 7 +- 25 files changed, 1299 insertions(+), 1078 deletions(-) create mode 100644 quartz/i18n/locales/fa-IR.ts create mode 100644 quartz/i18n/locales/pl-PL.ts diff --git a/quartz/cfg.ts b/quartz/cfg.ts index 9d89052da5417..26a24317d6f36 100644 --- a/quartz/cfg.ts +++ b/quartz/cfg.ts @@ -30,6 +30,10 @@ export type Analytics = apiKey: string host?: string } + | { + provider: "tinylytics" + siteId: string + } export interface GlobalConfiguration { pageTitle: string diff --git a/quartz/components/RecentNotes.tsx b/quartz/components/RecentNotes.tsx index d99878db9b5e0..2c32feadf2df7 100644 --- a/quartz/components/RecentNotes.tsx +++ b/quartz/components/RecentNotes.tsx @@ -12,6 +12,7 @@ interface Options { title?: string limit: number linkToMore: SimpleSlug | false + showTags: boolean filter: (f: QuartzPluginData) => boolean sort: (f1: QuartzPluginData, f2: QuartzPluginData) => number } @@ -19,6 +20,7 @@ interface Options { const defaultOptions = (cfg: GlobalConfiguration): Options => ({ limit: 3, linkToMore: false, + showTags: true, filter: () => true, sort: byDateAndAlphabetical(cfg), }) @@ -56,18 +58,20 @@ export default ((userOpts?: Partial) => {

)} - + {opts.showTags && ( + + )} ) diff --git a/quartz/components/pages/404.tsx b/quartz/components/pages/404.tsx index 4ef1b912c32cf..63da2c88afd5c 100644 --- a/quartz/components/pages/404.tsx +++ b/quartz/components/pages/404.tsx @@ -2,10 +2,15 @@ import { i18n } from "../../i18n" import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types" const NotFound: QuartzComponent = ({ cfg }: QuartzComponentProps) => { + // If baseUrl contains a pathname after the domain, use this as the home link + const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`) + const baseDir = url.pathname + return ( ) } diff --git a/quartz/i18n/index.ts b/quartz/i18n/index.ts index 728e4294e7570..94a8c9009a692 100644 --- a/quartz/i18n/index.ts +++ b/quartz/i18n/index.ts @@ -15,6 +15,8 @@ import zh from "./locales/zh-CN" import vi from "./locales/vi-VN" import pt from "./locales/pt-BR" import hu from "./locales/hu-HU" +import fa from "./locales/fa-IR" +import pl from "./locales/pl-PL" export const TRANSLATIONS = { "en-US": en, @@ -54,6 +56,8 @@ export const TRANSLATIONS = { "vi-VN": vi, "pt-BR": pt, "hu-HU": hu, + "fa-IR": fa, + "pl-PL": pl, } as const export const defaultTranslation = "en-US"; diff --git a/quartz/i18n/locales/ar-SA.ts b/quartz/i18n/locales/ar-SA.ts index c54aa5045da93..c5e13162e7aa0 100644 --- a/quartz/i18n/locales/ar-SA.ts +++ b/quartz/i18n/locales/ar-SA.ts @@ -1,88 +1,89 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "غير معنون", - description: "لم يتم تقديم أي وصف", - }, - components: { - callout: { - note: "ملاحظة", - abstract: "ملخص", - info: "معلومات", - todo: "للقيام", - tip: "نصيحة", - success: "نجاح", - question: "سؤال", - warning: "تحذير", - failure: "فشل", - danger: "خطر", - bug: "خلل", - example: "مثال", - quote: "اقتباس", - }, - backlinks: { - title: "وصلات العودة", - noBacklinksFound: "لا يوجد وصلات عودة", - }, - themeToggle: { - lightMode: "الوضع النهاري", - darkMode: "الوضع الليلي", - }, - explorer: { - title: "المستعرض", - }, - footer: { - createdWith: "أُنشئ باستخدام", - }, - graph: { - title: "التمثيل التفاعلي", - }, - recentNotes: { - title: "آخر الملاحظات", - seeRemainingMore: ({ remaining }) => `تصفح ${remaining} أكثر →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `مقتبس من ${targetSlug}`, - linkToOriginal: "وصلة للملاحظة الرئيسة", - }, - search: { - title: "بحث", - searchBarPlaceholder: "ابحث عن شيء ما", - }, - tableOfContents: { - title: "فهرس المحتويات", - }, - contentMeta: { - readingTime: ({ minutes }) => - minutes == 1 - ? "دقيقة أو أقل للقراءة" - : minutes == 2 - ? "دقيقتان للقراءة" - : `${minutes} دقائق للقراءة`, - }, - }, - pages: { - rss: { - recentNotes: "آخر الملاحظات", - lastFewNotes: ({ count }) => `آخر ${count} ملاحظة`, - }, - error: { - title: "غير موجود", - notFound: "إما أن هذه الصفحة خاصة أو غير موجودة.", - }, - folderContent: { - folder: "مجلد", - itemsUnderFolder: ({ count }) => - count === 1 ? "يوجد عنصر واحد فقط تحت هذا المجلد" : `يوجد ${count} عناصر تحت هذا المجلد.`, - }, - tagContent: { - tag: "الوسم", - tagIndex: "مؤشر الوسم", - itemsUnderTag: ({ count }) => - count === 1 ? "يوجد عنصر واحد فقط تحت هذا الوسم" : `يوجد ${count} عناصر تحت هذا الوسم.`, - showingFirst: ({ count }) => `إظهار أول ${count} أوسمة.`, - totalTags: ({ count }) => `يوجد ${count} أوسمة.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'غير معنون', + description: 'لم يتم تقديم أي وصف', + }, + components: { + callout: { + note: 'ملاحظة', + abstract: 'ملخص', + info: 'معلومات', + todo: 'للقيام', + tip: 'نصيحة', + success: 'نجاح', + question: 'سؤال', + warning: 'تحذير', + failure: 'فشل', + danger: 'خطر', + bug: 'خلل', + example: 'مثال', + quote: 'اقتباس', + }, + backlinks: { + title: 'وصلات العودة', + noBacklinksFound: 'لا يوجد وصلات عودة', + }, + themeToggle: { + lightMode: 'الوضع النهاري', + darkMode: 'الوضع الليلي', + }, + explorer: { + title: 'المستعرض', + }, + footer: { + createdWith: 'أُنشئ باستخدام', + }, + graph: { + title: 'التمثيل التفاعلي', + }, + recentNotes: { + title: 'آخر الملاحظات', + seeRemainingMore: ({ remaining }) => `تصفح ${remaining} أكثر →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `مقتبس من ${targetSlug}`, + linkToOriginal: 'وصلة للملاحظة الرئيسة', + }, + search: { + title: 'بحث', + searchBarPlaceholder: 'ابحث عن شيء ما', + }, + tableOfContents: { + title: 'فهرس المحتويات', + }, + contentMeta: { + readingTime: ({ minutes }) => + minutes == 1 + ? `دقيقة أو أقل للقراءة` + : minutes == 2 + ? `دقيقتان للقراءة` + : `${minutes} دقائق للقراءة`, + }, + }, + pages: { + rss: { + recentNotes: 'آخر الملاحظات', + lastFewNotes: ({ count }) => `آخر ${count} ملاحظة`, + }, + error: { + title: 'غير موجود', + notFound: 'إما أن هذه الصفحة خاصة أو غير موجودة.', + home: 'العوده للصفحة الرئيسية', + }, + folderContent: { + folder: 'مجلد', + itemsUnderFolder: ({ count }) => + count === 1 ? 'يوجد عنصر واحد فقط تحت هذا المجلد' : `يوجد ${count} عناصر تحت هذا المجلد.`, + }, + tagContent: { + tag: 'الوسم', + tagIndex: 'مؤشر الوسم', + itemsUnderTag: ({ count }) => + count === 1 ? 'يوجد عنصر واحد فقط تحت هذا الوسم' : `يوجد ${count} عناصر تحت هذا الوسم.`, + showingFirst: ({ count }) => `إظهار أول ${count} أوسمة.`, + totalTags: ({ count }) => `يوجد ${count} أوسمة.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/de-DE.ts b/quartz/i18n/locales/de-DE.ts index a00ee8f6b148b..2b127e15fda67 100644 --- a/quartz/i18n/locales/de-DE.ts +++ b/quartz/i18n/locales/de-DE.ts @@ -1,83 +1,84 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Unbenannt", - description: "Keine Beschreibung angegeben", - }, - components: { - callout: { - note: "Hinweis", - abstract: "Zusammenfassung", - info: "Info", - todo: "Zu erledigen", - tip: "Tipp", - success: "Erfolg", - question: "Frage", - warning: "Warnung", - failure: "Misserfolg", - danger: "Gefahr", - bug: "Fehler", - example: "Beispiel", - quote: "Zitat", - }, - backlinks: { - title: "Backlinks", - noBacklinksFound: "Keine Backlinks gefunden", - }, - themeToggle: { - lightMode: "Light Mode", - darkMode: "Dark Mode", - }, - explorer: { - title: "Explorer", - }, - footer: { - createdWith: "Erstellt mit", - }, - graph: { - title: "Graphansicht", - }, - recentNotes: { - title: "Zuletzt bearbeitete Seiten", - seeRemainingMore: ({ remaining }) => `${remaining} weitere ansehen →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Transklusion von ${targetSlug}`, - linkToOriginal: "Link zum Original", - }, - search: { - title: "Suche", - searchBarPlaceholder: "Suche nach etwas", - }, - tableOfContents: { - title: "Inhaltsverzeichnis", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, - }, - }, - pages: { - rss: { - recentNotes: "Zuletzt bearbeitete Seiten", - lastFewNotes: ({ count }) => `Letzte ${count} Seiten`, - }, - error: { - title: "Nicht gefunden", - notFound: "Diese Seite ist entweder nicht öffentlich oder existiert nicht.", - }, - folderContent: { - folder: "Ordner", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 Datei in diesem Ordner." : `${count} Dateien in diesem Ordner.`, - }, - tagContent: { - tag: "Tag", - tagIndex: "Tag-Übersicht", - itemsUnderTag: ({ count }) => - count === 1 ? "1 Datei mit diesem Tag." : `${count} Dateien mit diesem Tag.`, - showingFirst: ({ count }) => `Die ersten ${count} Tags werden angezeigt.`, - totalTags: ({ count }) => `${count} Tags insgesamt.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Unbenannt', + description: 'Keine Beschreibung angegeben', + }, + components: { + callout: { + note: 'Hinweis', + abstract: 'Zusammenfassung', + info: 'Info', + todo: 'Zu erledigen', + tip: 'Tipp', + success: 'Erfolg', + question: 'Frage', + warning: 'Warnung', + failure: 'Misserfolg', + danger: 'Gefahr', + bug: 'Fehler', + example: 'Beispiel', + quote: 'Zitat', + }, + backlinks: { + title: 'Backlinks', + noBacklinksFound: 'Keine Backlinks gefunden', + }, + themeToggle: { + lightMode: 'Light Mode', + darkMode: 'Dark Mode', + }, + explorer: { + title: 'Explorer', + }, + footer: { + createdWith: 'Erstellt mit', + }, + graph: { + title: 'Graphansicht', + }, + recentNotes: { + title: 'Zuletzt bearbeitete Seiten', + seeRemainingMore: ({ remaining }) => `${remaining} weitere ansehen →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transklusion von ${targetSlug}`, + linkToOriginal: 'Link zum Original', + }, + search: { + title: 'Suche', + searchBarPlaceholder: 'Suche nach etwas', + }, + tableOfContents: { + title: 'Inhaltsverzeichnis', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: 'Zuletzt bearbeitete Seiten', + lastFewNotes: ({ count }) => `Letzte ${count} Seiten`, + }, + error: { + title: 'Nicht gefunden', + notFound: 'Diese Seite ist entweder nicht öffentlich oder existiert nicht.', + home: 'Return to Homepage', + }, + folderContent: { + folder: 'Ordner', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 Datei in diesem Ordner.' : `${count} Dateien in diesem Ordner.`, + }, + tagContent: { + tag: 'Tag', + tagIndex: 'Tag-Übersicht', + itemsUnderTag: ({ count }) => + count === 1 ? '1 Datei mit diesem Tag.' : `${count} Dateien mit diesem Tag.`, + showingFirst: ({ count }) => `Die ersten ${count} Tags werden angezeigt.`, + totalTags: ({ count }) => `${count} Tags insgesamt.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/definition.ts b/quartz/i18n/locales/definition.ts index 7c8d3d788c39a..c07c8e2c30948 100644 --- a/quartz/i18n/locales/definition.ts +++ b/quartz/i18n/locales/definition.ts @@ -67,6 +67,7 @@ export interface Translation { error: { title: string notFound: string + home: string } folderContent: { folder: string diff --git a/quartz/i18n/locales/en-US.ts b/quartz/i18n/locales/en-US.ts index ba128dc170710..17811a3644631 100644 --- a/quartz/i18n/locales/en-US.ts +++ b/quartz/i18n/locales/en-US.ts @@ -1,83 +1,84 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Untitled", - description: "No description provided", - }, - components: { - callout: { - note: "Note", - abstract: "Abstract", - info: "Info", - todo: "Todo", - tip: "Tip", - success: "Success", - question: "Question", - warning: "Warning", - failure: "Failure", - danger: "Danger", - bug: "Bug", - example: "Example", - quote: "Quote", - }, - backlinks: { - title: "Backlinks", - noBacklinksFound: "No backlinks found", - }, - themeToggle: { - lightMode: "Light mode", - darkMode: "Dark mode", - }, - explorer: { - title: "Explorer", - }, - footer: { - createdWith: "Created with", - }, - graph: { - title: "Graph View", - }, - recentNotes: { - title: "Recent Notes", - seeRemainingMore: ({ remaining }) => `See ${remaining} more →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Transclude of ${targetSlug}`, - linkToOriginal: "Link to original", - }, - search: { - title: "Search", - searchBarPlaceholder: "Search for something", - }, - tableOfContents: { - title: "Table of Contents", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, - }, - }, - pages: { - rss: { - recentNotes: "Recent notes", - lastFewNotes: ({ count }) => `Last ${count} notes`, - }, - error: { - title: "Not Found", - notFound: "Either this page is private or doesn't exist.", - }, - folderContent: { - folder: "Folder", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 item under this folder." : `${count} items under this folder.`, - }, - tagContent: { - tag: "Tag", - tagIndex: "Tag Index", - itemsUnderTag: ({ count }) => - count === 1 ? "1 item with this tag." : `${count} items with this tag.`, - showingFirst: ({ count }) => `Showing first ${count} tags.`, - totalTags: ({ count }) => `Found ${count} total tags.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Untitled', + description: 'No description provided', + }, + components: { + callout: { + note: 'Note', + abstract: 'Abstract', + info: 'Info', + todo: 'Todo', + tip: 'Tip', + success: 'Success', + question: 'Question', + warning: 'Warning', + failure: 'Failure', + danger: 'Danger', + bug: 'Bug', + example: 'Example', + quote: 'Quote', + }, + backlinks: { + title: 'Backlinks', + noBacklinksFound: 'No backlinks found', + }, + themeToggle: { + lightMode: 'Light mode', + darkMode: 'Dark mode', + }, + explorer: { + title: 'Explorer', + }, + footer: { + createdWith: 'Created with', + }, + graph: { + title: 'Graph View', + }, + recentNotes: { + title: 'Recent Notes', + seeRemainingMore: ({ remaining }) => `See ${remaining} more →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transclude of ${targetSlug}`, + linkToOriginal: 'Link to original', + }, + search: { + title: 'Search', + searchBarPlaceholder: 'Search for something', + }, + tableOfContents: { + title: 'Table of Contents', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: 'Recent notes', + lastFewNotes: ({ count }) => `Last ${count} notes`, + }, + error: { + title: 'Not Found', + notFound: "Either this page is private or doesn't exist.", + home: 'Return to Homepage', + }, + folderContent: { + folder: 'Folder', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 item under this folder.' : `${count} items under this folder.`, + }, + tagContent: { + tag: 'Tag', + tagIndex: 'Tag Index', + itemsUnderTag: ({ count }) => + count === 1 ? '1 item with this tag.' : `${count} items with this tag.`, + showingFirst: ({ count }) => `Showing first ${count} tags.`, + totalTags: ({ count }) => `Found ${count} total tags.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/es-ES.ts b/quartz/i18n/locales/es-ES.ts index 931668c6a8e72..f7e8b432d5dcb 100644 --- a/quartz/i18n/locales/es-ES.ts +++ b/quartz/i18n/locales/es-ES.ts @@ -1,83 +1,84 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Sin título", - description: "Sin descripción", - }, - components: { - callout: { - note: "Nota", - abstract: "Resumen", - info: "Información", - todo: "Por hacer", - tip: "Consejo", - success: "Éxito", - question: "Pregunta", - warning: "Advertencia", - failure: "Fallo", - danger: "Peligro", - bug: "Error", - example: "Ejemplo", - quote: "Cita", - }, - backlinks: { - title: "Enlaces de Retroceso", - noBacklinksFound: "No se han encontrado enlaces traseros", - }, - themeToggle: { - lightMode: "Modo claro", - darkMode: "Modo oscuro", - }, - explorer: { - title: "Explorador", - }, - footer: { - createdWith: "Creado con", - }, - graph: { - title: "Vista Gráfica", - }, - recentNotes: { - title: "Notas Recientes", - seeRemainingMore: ({ remaining }) => `Vea ${remaining} más →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Transcluido de ${targetSlug}`, - linkToOriginal: "Enlace al original", - }, - search: { - title: "Buscar", - searchBarPlaceholder: "Busca algo", - }, - tableOfContents: { - title: "Tabla de Contenidos", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, - }, - }, - pages: { - rss: { - recentNotes: "Notas recientes", - lastFewNotes: ({ count }) => `Últimás ${count} notas`, - }, - error: { - title: "No se encontró.", - notFound: "Esta página es privada o no existe.", - }, - folderContent: { - folder: "Carpeta", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 artículo en esta carpeta." : `${count} artículos en esta carpeta.`, - }, - tagContent: { - tag: "Etiqueta", - tagIndex: "Índice de Etiquetas", - itemsUnderTag: ({ count }) => - count === 1 ? "1 artículo con esta etiqueta." : `${count} artículos con esta etiqueta.`, - showingFirst: ({ count }) => `Mostrando las primeras ${count} etiquetas.`, - totalTags: ({ count }) => `Se encontraron ${count} etiquetas en total.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Sin título', + description: 'Sin descripción', + }, + components: { + callout: { + note: 'Nota', + abstract: 'Resumen', + info: 'Información', + todo: 'Por hacer', + tip: 'Consejo', + success: 'Éxito', + question: 'Pregunta', + warning: 'Advertencia', + failure: 'Fallo', + danger: 'Peligro', + bug: 'Error', + example: 'Ejemplo', + quote: 'Cita', + }, + backlinks: { + title: 'Enlaces de Retroceso', + noBacklinksFound: 'No se han encontrado enlaces traseros', + }, + themeToggle: { + lightMode: 'Modo claro', + darkMode: 'Modo oscuro', + }, + explorer: { + title: 'Explorador', + }, + footer: { + createdWith: 'Creado con', + }, + graph: { + title: 'Vista Gráfica', + }, + recentNotes: { + title: 'Notas Recientes', + seeRemainingMore: ({ remaining }) => `Vea ${remaining} más →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transcluido de ${targetSlug}`, + linkToOriginal: 'Enlace al original', + }, + search: { + title: 'Buscar', + searchBarPlaceholder: 'Busca algo', + }, + tableOfContents: { + title: 'Tabla de Contenidos', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: 'Notas recientes', + lastFewNotes: ({ count }) => `Últimás ${count} notas`, + }, + error: { + title: 'No se encontró.', + notFound: 'Esta página es privada o no existe.', + home: 'Regresar a la página principal', + }, + folderContent: { + folder: 'Carpeta', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 artículo en esta carpeta.' : `${count} artículos en esta carpeta.`, + }, + tagContent: { + tag: 'Etiqueta', + tagIndex: 'Índice de Etiquetas', + itemsUnderTag: ({ count }) => + count === 1 ? '1 artículo con esta etiqueta.' : `${count} artículos con esta etiqueta.`, + showingFirst: ({ count }) => `Mostrando las primeras ${count} etiquetas.`, + totalTags: ({ count }) => `Se encontraron ${count} etiquetas en total.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/fa-IR.ts b/quartz/i18n/locales/fa-IR.ts new file mode 100644 index 0000000000000..5bfef5aee1226 --- /dev/null +++ b/quartz/i18n/locales/fa-IR.ts @@ -0,0 +1,84 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "بدون عنوان", + description: "توضیح خاصی اضافه نشده است", + }, + components: { + callout: { + note: "یادداشت", + abstract: "چکیده", + info: "اطلاعات", + todo: "اقدام", + tip: "نکته", + success: "تیک", + question: "سؤال", + warning: "هشدار", + failure: "شکست", + danger: "خطر", + bug: "باگ", + example: "مثال", + quote: "نقل قول", + }, + backlinks: { + title: "بک‌لینک‌ها", + noBacklinksFound: "بدون بک‌لینک", + }, + themeToggle: { + lightMode: "حالت روشن", + darkMode: "حالت تاریک", + }, + explorer: { + title: "مطالب", + }, + footer: { + createdWith: "ساخته شده با", + }, + graph: { + title: "نمای گراف", + }, + recentNotes: { + title: "یادداشت‌های اخیر", + seeRemainingMore: ({ remaining }) => `${remaining} یادداشت دیگر →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `از ${targetSlug}`, + linkToOriginal: "پیوند به اصلی", + }, + search: { + title: "جستجو", + searchBarPlaceholder: "مطلبی را جستجو کنید", + }, + tableOfContents: { + title: "فهرست", + }, + contentMeta: { + readingTime: ({ minutes }) => `زمان تقریبی مطالعه: ${minutes} دقیقه`, + }, + }, + pages: { + rss: { + recentNotes: "یادداشت‌های اخیر", + lastFewNotes: ({ count }) => `${count} یادداشت اخیر`, + }, + error: { + title: "یافت نشد", + notFound: "این صفحه یا خصوصی است یا وجود ندارد", + home: "بازگشت به صفحه اصلی", + }, + folderContent: { + folder: "پوشه", + itemsUnderFolder: ({ count }) => + count === 1 ? ".یک مطلب در این پوشه است" : `${count} مطلب در این پوشه است.`, + }, + tagContent: { + tag: "برچسب", + tagIndex: "فهرست برچسب‌ها", + itemsUnderTag: ({ count }) => + count === 1 ? "یک مطلب با این برچسب" : `${count} مطلب با این برچسب.`, + showingFirst: ({ count }) => `در حال نمایش ${count} برچسب.`, + totalTags: ({ count }) => `${count} برچسب یافت شد.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/fr-FR.ts b/quartz/i18n/locales/fr-FR.ts index a52fdbefdd8c1..b21b7848f1813 100644 --- a/quartz/i18n/locales/fr-FR.ts +++ b/quartz/i18n/locales/fr-FR.ts @@ -1,83 +1,84 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Sans titre", - description: "Aucune description fournie", - }, - components: { - callout: { - note: "Note", - abstract: "Résumé", - info: "Info", - todo: "À faire", - tip: "Conseil", - success: "Succès", - question: "Question", - warning: "Avertissement", - failure: "Échec", - danger: "Danger", - bug: "Bogue", - example: "Exemple", - quote: "Citation", - }, - backlinks: { - title: "Liens retour", - noBacklinksFound: "Aucun lien retour trouvé", - }, - themeToggle: { - lightMode: "Mode clair", - darkMode: "Mode sombre", - }, - explorer: { - title: "Explorateur", - }, - footer: { - createdWith: "Créé avec", - }, - graph: { - title: "Vue Graphique", - }, - recentNotes: { - title: "Notes Récentes", - seeRemainingMore: ({ remaining }) => `Voir ${remaining} de plus →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Transclusion de ${targetSlug}`, - linkToOriginal: "Lien vers l'original", - }, - search: { - title: "Recherche", - searchBarPlaceholder: "Rechercher quelque chose", - }, - tableOfContents: { - title: "Table des Matières", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min de lecture`, - }, - }, - pages: { - rss: { - recentNotes: "Notes récentes", - lastFewNotes: ({ count }) => `Les dernières ${count} notes`, - }, - error: { - title: "Introuvable", - notFound: "Cette page est soit privée, soit elle n'existe pas.", - }, - folderContent: { - folder: "Dossier", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 élément sous ce dossier." : `${count} éléments sous ce dossier.`, - }, - tagContent: { - tag: "Étiquette", - tagIndex: "Index des étiquettes", - itemsUnderTag: ({ count }) => - count === 1 ? "1 élément avec cette étiquette." : `${count} éléments avec cette étiquette.`, - showingFirst: ({ count }) => `Affichage des premières ${count} étiquettes.`, - totalTags: ({ count }) => `Trouvé ${count} étiquettes au total.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Sans titre', + description: 'Aucune description fournie', + }, + components: { + callout: { + note: 'Note', + abstract: 'Résumé', + info: 'Info', + todo: 'À faire', + tip: 'Conseil', + success: 'Succès', + question: 'Question', + warning: 'Avertissement', + failure: 'Échec', + danger: 'Danger', + bug: 'Bogue', + example: 'Exemple', + quote: 'Citation', + }, + backlinks: { + title: 'Liens retour', + noBacklinksFound: 'Aucun lien retour trouvé', + }, + themeToggle: { + lightMode: 'Mode clair', + darkMode: 'Mode sombre', + }, + explorer: { + title: 'Explorateur', + }, + footer: { + createdWith: 'Créé avec', + }, + graph: { + title: 'Vue Graphique', + }, + recentNotes: { + title: 'Notes Récentes', + seeRemainingMore: ({ remaining }) => `Voir ${remaining} de plus →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transclusion de ${targetSlug}`, + linkToOriginal: "Lien vers l'original", + }, + search: { + title: 'Recherche', + searchBarPlaceholder: 'Rechercher quelque chose', + }, + tableOfContents: { + title: 'Table des Matières', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min de lecture`, + }, + }, + pages: { + rss: { + recentNotes: 'Notes récentes', + lastFewNotes: ({ count }) => `Les dernières ${count} notes`, + }, + error: { + title: 'Introuvable', + notFound: "Cette page est soit privée, soit elle n'existe pas.", + home: "Retour à la page d'accueil", + }, + folderContent: { + folder: 'Dossier', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 élément sous ce dossier.' : `${count} éléments sous ce dossier.`, + }, + tagContent: { + tag: 'Étiquette', + tagIndex: 'Index des étiquettes', + itemsUnderTag: ({ count }) => + count === 1 ? '1 élément avec cette étiquette.' : `${count} éléments avec cette étiquette.`, + showingFirst: ({ count }) => `Affichage des premières ${count} étiquettes.`, + totalTags: ({ count }) => `Trouvé ${count} étiquettes au total.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/hu-HU.ts b/quartz/i18n/locales/hu-HU.ts index 6397309b769e2..066b7770e3378 100644 --- a/quartz/i18n/locales/hu-HU.ts +++ b/quartz/i18n/locales/hu-HU.ts @@ -65,6 +65,7 @@ export default { error: { title: "Nem található", notFound: "Ez a lap vagy privát vagy nem létezik.", + home: "Vissza a kezdőlapra", }, folderContent: { folder: "Mappa", diff --git a/quartz/i18n/locales/it-IT.ts b/quartz/i18n/locales/it-IT.ts index 62322b15fde25..560821240496a 100644 --- a/quartz/i18n/locales/it-IT.ts +++ b/quartz/i18n/locales/it-IT.ts @@ -1,83 +1,84 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Senza titolo", - description: "Nessuna descrizione", - }, - components: { - callout: { - note: "Nota", - abstract: "Astratto", - info: "Info", - todo: "Da fare", - tip: "Consiglio", - success: "Completato", - question: "Domanda", - warning: "Attenzione", - failure: "Errore", - danger: "Pericolo", - bug: "Bug", - example: "Esempio", - quote: "Citazione", - }, - backlinks: { - title: "Link entranti", - noBacklinksFound: "Nessun link entrante", - }, - themeToggle: { - lightMode: "Tema chiaro", - darkMode: "Tema scuro", - }, - explorer: { - title: "Esplora", - }, - footer: { - createdWith: "Creato con", - }, - graph: { - title: "Vista grafico", - }, - recentNotes: { - title: "Note recenti", - seeRemainingMore: ({ remaining }) => `Vedi ${remaining} altro →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Transclusione di ${targetSlug}`, - linkToOriginal: "Link all'originale", - }, - search: { - title: "Cerca", - searchBarPlaceholder: "Cerca qualcosa", - }, - tableOfContents: { - title: "Tabella dei contenuti", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} minuti`, - }, - }, - pages: { - rss: { - recentNotes: "Note recenti", - lastFewNotes: ({ count }) => `Ultime ${count} note`, - }, - error: { - title: "Non trovato", - notFound: "Questa pagina è privata o non esiste.", - }, - folderContent: { - folder: "Cartella", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 oggetto in questa cartella." : `${count} oggetti in questa cartella.`, - }, - tagContent: { - tag: "Etichetta", - tagIndex: "Indice etichette", - itemsUnderTag: ({ count }) => - count === 1 ? "1 oggetto con questa etichetta." : `${count} oggetti con questa etichetta.`, - showingFirst: ({ count }) => `Prime ${count} etichette.`, - totalTags: ({ count }) => `Trovate ${count} etichette totali.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Senza titolo', + description: 'Nessuna descrizione', + }, + components: { + callout: { + note: 'Nota', + abstract: 'Astratto', + info: 'Info', + todo: 'Da fare', + tip: 'Consiglio', + success: 'Completato', + question: 'Domanda', + warning: 'Attenzione', + failure: 'Errore', + danger: 'Pericolo', + bug: 'Bug', + example: 'Esempio', + quote: 'Citazione', + }, + backlinks: { + title: 'Link entranti', + noBacklinksFound: 'Nessun link entrante', + }, + themeToggle: { + lightMode: 'Tema chiaro', + darkMode: 'Tema scuro', + }, + explorer: { + title: 'Esplora', + }, + footer: { + createdWith: 'Creato con', + }, + graph: { + title: 'Vista grafico', + }, + recentNotes: { + title: 'Note recenti', + seeRemainingMore: ({ remaining }) => `Vedi ${remaining} altro →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Transclusione di ${targetSlug}`, + linkToOriginal: "Link all'originale", + }, + search: { + title: 'Cerca', + searchBarPlaceholder: 'Cerca qualcosa', + }, + tableOfContents: { + title: 'Tabella dei contenuti', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} minuti`, + }, + }, + pages: { + rss: { + recentNotes: 'Note recenti', + lastFewNotes: ({ count }) => `Ultime ${count} note`, + }, + error: { + title: 'Non trovato', + notFound: 'Questa pagina è privata o non esiste.', + home: 'Ritorna alla home page', + }, + folderContent: { + folder: 'Cartella', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 oggetto in questa cartella.' : `${count} oggetti in questa cartella.`, + }, + tagContent: { + tag: 'Etichetta', + tagIndex: 'Indice etichette', + itemsUnderTag: ({ count }) => + count === 1 ? '1 oggetto con questa etichetta.' : `${count} oggetti con questa etichetta.`, + showingFirst: ({ count }) => `Prime ${count} etichette.`, + totalTags: ({ count }) => `Trovate ${count} etichette totali.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/ja-JP.ts b/quartz/i18n/locales/ja-JP.ts index 61327eb70d7fc..33b460f980837 100644 --- a/quartz/i18n/locales/ja-JP.ts +++ b/quartz/i18n/locales/ja-JP.ts @@ -1,81 +1,82 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "無題", - description: "説明なし", - }, - components: { - callout: { - note: "ノート", - abstract: "抄録", - info: "情報", - todo: "やるべきこと", - tip: "ヒント", - success: "成功", - question: "質問", - warning: "警告", - failure: "失敗", - danger: "危険", - bug: "バグ", - example: "例", - quote: "引用", - }, - backlinks: { - title: "バックリンク", - noBacklinksFound: "バックリンクはありません", - }, - themeToggle: { - lightMode: "ライトモード", - darkMode: "ダークモード", - }, - explorer: { - title: "エクスプローラー", - }, - footer: { - createdWith: "作成", - }, - graph: { - title: "グラフビュー", - }, - recentNotes: { - title: "最近の記事", - seeRemainingMore: ({ remaining }) => `さらに${remaining}件 →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `${targetSlug}のまとめ`, - linkToOriginal: "元記事へのリンク", - }, - search: { - title: "検索", - searchBarPlaceholder: "検索ワードを入力", - }, - tableOfContents: { - title: "目次", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, - }, - }, - pages: { - rss: { - recentNotes: "最近の記事", - lastFewNotes: ({ count }) => `最新の${count}件`, - }, - error: { - title: "Not Found", - notFound: "ページが存在しないか、非公開設定になっています。", - }, - folderContent: { - folder: "フォルダ", - itemsUnderFolder: ({ count }) => `${count}件のページ`, - }, - tagContent: { - tag: "タグ", - tagIndex: "タグ一覧", - itemsUnderTag: ({ count }) => `${count}件のページ`, - showingFirst: ({ count }) => `のうち最初の${count}件を表示しています`, - totalTags: ({ count }) => `全${count}個のタグを表示中`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: '無題', + description: '説明なし', + }, + components: { + callout: { + note: 'ノート', + abstract: '抄録', + info: '情報', + todo: 'やるべきこと', + tip: 'ヒント', + success: '成功', + question: '質問', + warning: '警告', + failure: '失敗', + danger: '危険', + bug: 'バグ', + example: '例', + quote: '引用', + }, + backlinks: { + title: 'バックリンク', + noBacklinksFound: 'バックリンクはありません', + }, + themeToggle: { + lightMode: 'ライトモード', + darkMode: 'ダークモード', + }, + explorer: { + title: 'エクスプローラー', + }, + footer: { + createdWith: '作成', + }, + graph: { + title: 'グラフビュー', + }, + recentNotes: { + title: '最近の記事', + seeRemainingMore: ({ remaining }) => `さらに${remaining}件 →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `${targetSlug}のまとめ`, + linkToOriginal: '元記事へのリンク', + }, + search: { + title: '検索', + searchBarPlaceholder: '検索ワードを入力', + }, + tableOfContents: { + title: '目次', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: '最近の記事', + lastFewNotes: ({ count }) => `最新の${count}件`, + }, + error: { + title: 'Not Found', + notFound: 'ページが存在しないか、非公開設定になっています。', + home: 'ホームページに戻る', + }, + folderContent: { + folder: 'フォルダ', + itemsUnderFolder: ({ count }) => `${count}件のページ`, + }, + tagContent: { + tag: 'タグ', + tagIndex: 'タグ一覧', + itemsUnderTag: ({ count }) => `${count}件のページ`, + showingFirst: ({ count }) => `のうち最初の${count}件を表示しています`, + totalTags: ({ count }) => `全${count}個のタグを表示中`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/ko-KR.ts b/quartz/i18n/locales/ko-KR.ts index 617e80836c163..d7befcce7dbc8 100644 --- a/quartz/i18n/locales/ko-KR.ts +++ b/quartz/i18n/locales/ko-KR.ts @@ -1,81 +1,82 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "제목 없음", - description: "설명 없음", - }, - components: { - callout: { - note: "노트", - abstract: "개요", - info: "정보", - todo: "할일", - tip: "팁", - success: "성공", - question: "질문", - warning: "주의", - failure: "실패", - danger: "위험", - bug: "버그", - example: "예시", - quote: "인용", - }, - backlinks: { - title: "백링크", - noBacklinksFound: "백링크가 없습니다.", - }, - themeToggle: { - lightMode: "라이트 모드", - darkMode: "다크 모드", - }, - explorer: { - title: "탐색기", - }, - footer: { - createdWith: "Created with", - }, - graph: { - title: "그래프 뷰", - }, - recentNotes: { - title: "최근 게시글", - seeRemainingMore: ({ remaining }) => `${remaining}건 더보기 →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `${targetSlug}의 포함`, - linkToOriginal: "원본 링크", - }, - search: { - title: "검색", - searchBarPlaceholder: "검색어를 입력하세요", - }, - tableOfContents: { - title: "목차", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, - }, - }, - pages: { - rss: { - recentNotes: "최근 게시글", - lastFewNotes: ({ count }) => `최근 ${count} 건`, - }, - error: { - title: "Not Found", - notFound: "페이지가 존재하지 않거나 비공개 설정이 되어 있습니다.", - }, - folderContent: { - folder: "폴더", - itemsUnderFolder: ({ count }) => `${count}건의 항목`, - }, - tagContent: { - tag: "태그", - tagIndex: "태그 목록", - itemsUnderTag: ({ count }) => `${count}건의 항목`, - showingFirst: ({ count }) => `처음 ${count}개의 태그`, - totalTags: ({ count }) => `총 ${count}개의 태그를 찾았습니다.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: '제목 없음', + description: '설명 없음', + }, + components: { + callout: { + note: '노트', + abstract: '개요', + info: '정보', + todo: '할일', + tip: '팁', + success: '성공', + question: '질문', + warning: '주의', + failure: '실패', + danger: '위험', + bug: '버그', + example: '예시', + quote: '인용', + }, + backlinks: { + title: '백링크', + noBacklinksFound: '백링크가 없습니다.', + }, + themeToggle: { + lightMode: '라이트 모드', + darkMode: '다크 모드', + }, + explorer: { + title: '탐색기', + }, + footer: { + createdWith: 'Created with', + }, + graph: { + title: '그래프 뷰', + }, + recentNotes: { + title: '최근 게시글', + seeRemainingMore: ({ remaining }) => `${remaining}건 더보기 →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `${targetSlug}의 포함`, + linkToOriginal: '원본 링크', + }, + search: { + title: '검색', + searchBarPlaceholder: '검색어를 입력하세요', + }, + tableOfContents: { + title: '목차', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: '최근 게시글', + lastFewNotes: ({ count }) => `최근 ${count} 건`, + }, + error: { + title: 'Not Found', + notFound: '페이지가 존재하지 않거나 비공개 설정이 되어 있습니다.', + home: '홈페이지로 돌아가기', + }, + folderContent: { + folder: '폴더', + itemsUnderFolder: ({ count }) => `${count}건의 항목`, + }, + tagContent: { + tag: '태그', + tagIndex: '태그 목록', + itemsUnderTag: ({ count }) => `${count}건의 항목`, + showingFirst: ({ count }) => `처음 ${count}개의 태그`, + totalTags: ({ count }) => `총 ${count}개의 태그를 찾았습니다.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/nl-NL.ts b/quartz/i18n/locales/nl-NL.ts index 26783e15d4d36..b0fe14c747a47 100644 --- a/quartz/i18n/locales/nl-NL.ts +++ b/quartz/i18n/locales/nl-NL.ts @@ -1,85 +1,86 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Naamloos", - description: "Geen beschrijving gegeven.", - }, - components: { - callout: { - note: "Notitie", - abstract: "Samenvatting", - info: "Info", - todo: "Te doen", - tip: "Tip", - success: "Succes", - question: "Vraag", - warning: "Waarschuwing", - failure: "Mislukking", - danger: "Gevaar", - bug: "Bug", - example: "Voorbeeld", - quote: "Citaat", - }, - backlinks: { - title: "Backlinks", - noBacklinksFound: "Geen backlinks gevonden", - }, - themeToggle: { - lightMode: "Lichte modus", - darkMode: "Donkere modus", - }, - explorer: { - title: "Verkenner", - }, - footer: { - createdWith: "Gemaakt met", - }, - graph: { - title: "Grafiekweergave", - }, - recentNotes: { - title: "Recente notities", - seeRemainingMore: ({ remaining }) => `Zie ${remaining} meer →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Invoeging van ${targetSlug}`, - linkToOriginal: "Link naar origineel", - }, - search: { - title: "Zoeken", - searchBarPlaceholder: "Doorzoek de website", - }, - tableOfContents: { - title: "Inhoudsopgave", - }, - contentMeta: { - readingTime: ({ minutes }) => - minutes === 1 ? "1 minuut leestijd" : `${minutes} minuten leestijd`, - }, - }, - pages: { - rss: { - recentNotes: "Recente notities", - lastFewNotes: ({ count }) => `Laatste ${count} notities`, - }, - error: { - title: "Niet gevonden", - notFound: "Deze pagina is niet zichtbaar of bestaat niet.", - }, - folderContent: { - folder: "Map", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 item in deze map." : `${count} items in deze map.`, - }, - tagContent: { - tag: "Label", - tagIndex: "Label-index", - itemsUnderTag: ({ count }) => - count === 1 ? "1 item met dit label." : `${count} items met dit label.`, - showingFirst: ({ count }) => - count === 1 ? "Eerste label tonen." : `Eerste ${count} labels tonen.`, - totalTags: ({ count }) => `${count} labels gevonden.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Naamloos', + description: 'Geen beschrijving gegeven.', + }, + components: { + callout: { + note: 'Notitie', + abstract: 'Samenvatting', + info: 'Info', + todo: 'Te doen', + tip: 'Tip', + success: 'Succes', + question: 'Vraag', + warning: 'Waarschuwing', + failure: 'Mislukking', + danger: 'Gevaar', + bug: 'Bug', + example: 'Voorbeeld', + quote: 'Citaat', + }, + backlinks: { + title: 'Backlinks', + noBacklinksFound: 'Geen backlinks gevonden', + }, + themeToggle: { + lightMode: 'Lichte modus', + darkMode: 'Donkere modus', + }, + explorer: { + title: 'Verkenner', + }, + footer: { + createdWith: 'Gemaakt met', + }, + graph: { + title: 'Grafiekweergave', + }, + recentNotes: { + title: 'Recente notities', + seeRemainingMore: ({ remaining }) => `Zie ${remaining} meer →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Invoeging van ${targetSlug}`, + linkToOriginal: 'Link naar origineel', + }, + search: { + title: 'Zoeken', + searchBarPlaceholder: 'Doorzoek de website', + }, + tableOfContents: { + title: 'Inhoudsopgave', + }, + contentMeta: { + readingTime: ({ minutes }) => + minutes === 1 ? '1 minuut leestijd' : `${minutes} minuten leestijd`, + }, + }, + pages: { + rss: { + recentNotes: 'Recente notities', + lastFewNotes: ({ count }) => `Laatste ${count} notities`, + }, + error: { + title: 'Niet gevonden', + notFound: 'Deze pagina is niet zichtbaar of bestaat niet.', + home: 'Keer terug naar de start pagina', + }, + folderContent: { + folder: 'Map', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 item in deze map.' : `${count} items in deze map.`, + }, + tagContent: { + tag: 'Label', + tagIndex: 'Label-index', + itemsUnderTag: ({ count }) => + count === 1 ? '1 item met dit label.' : `${count} items met dit label.`, + showingFirst: ({ count }) => + count === 1 ? 'Eerste label tonen.' : `Eerste ${count} labels tonen.`, + totalTags: ({ count }) => `${count} labels gevonden.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/pl-PL.ts b/quartz/i18n/locales/pl-PL.ts new file mode 100644 index 0000000000000..7fa0cd47a8366 --- /dev/null +++ b/quartz/i18n/locales/pl-PL.ts @@ -0,0 +1,84 @@ +import { Translation } from "./definition" + +export default { + propertyDefaults: { + title: "Bez nazwy", + description: "Brak opisu", + }, + components: { + callout: { + note: "Notatka", + abstract: "Streszczenie", + info: "informacja", + todo: "Do zrobienia", + tip: "Wskazówka", + success: "Zrobione", + question: "Pytanie", + warning: "Ostrzeżenie", + failure: "Usterka", + danger: "Niebiezpieczeństwo", + bug: "Błąd w kodzie", + example: "Przykład", + quote: "Cytat", + }, + backlinks: { + title: "Odnośniki zwrotne", + noBacklinksFound: "Brak połączeń zwrotnych", + }, + themeToggle: { + lightMode: "Trzyb jasny", + darkMode: "Tryb ciemny", + }, + explorer: { + title: "Przeglądaj", + }, + footer: { + createdWith: "Stworzone z użyciem", + }, + graph: { + title: "Graf", + }, + recentNotes: { + title: "Najnowsze notatki", + seeRemainingMore: ({ remaining }) => `Zobacz ${remaining} nastepnych →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Osadzone ${targetSlug}`, + linkToOriginal: "Łącze do oryginału", + }, + search: { + title: "Szukaj", + searchBarPlaceholder: "Search for something", + }, + tableOfContents: { + title: "Spis treści", + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min. czytania `, + }, + }, + pages: { + rss: { + recentNotes: "Najnowsze notatki", + lastFewNotes: ({ count }) => `Ostatnie ${count} notatek`, + }, + error: { + title: "Nie znaleziono", + notFound: "Ta strona jest prywatna lub nie istnieje.", + home: "Powrót do strony głównej", + }, + folderContent: { + folder: "Folder", + itemsUnderFolder: ({ count }) => + count === 1 ? "W tym folderze jest 1 element." : `Elementów w folderze: ${count}.`, + }, + tagContent: { + tag: "Znacznik", + tagIndex: "Spis znaczników", + itemsUnderTag: ({ count }) => + count === 1 ? "Oznaczony 1 element." : `Elementów z tym znacznikiem: ${count}.`, + showingFirst: ({ count }) => `Pokazuje ${count} pierwszych znaczników.`, + totalTags: ({ count }) => `Znalezionych wszystkich znaczników: ${count}.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/pt-BR.ts b/quartz/i18n/locales/pt-BR.ts index 489d642201bf5..c7b6bfb606f57 100644 --- a/quartz/i18n/locales/pt-BR.ts +++ b/quartz/i18n/locales/pt-BR.ts @@ -65,6 +65,7 @@ export default { error: { title: "Não encontrado", notFound: "Esta página é privada ou não existe.", + home: "Retornar a página inicial", }, folderContent: { folder: "Arquivo", diff --git a/quartz/i18n/locales/ro-RO.ts b/quartz/i18n/locales/ro-RO.ts index c70f1218c4e82..3045f4f4bfcac 100644 --- a/quartz/i18n/locales/ro-RO.ts +++ b/quartz/i18n/locales/ro-RO.ts @@ -1,84 +1,85 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Fără titlu", - description: "Nici o descriere furnizată", - }, - components: { - callout: { - note: "Notă", - abstract: "Rezumat", - info: "Informație", - todo: "De făcut", - tip: "Sfat", - success: "Succes", - question: "Întrebare", - warning: "Avertisment", - failure: "Eșec", - danger: "Pericol", - bug: "Bug", - example: "Exemplu", - quote: "Citat", - }, - backlinks: { - title: "Legături înapoi", - noBacklinksFound: "Nu s-au găsit legături înapoi", - }, - themeToggle: { - lightMode: "Modul luminos", - darkMode: "Modul întunecat", - }, - explorer: { - title: "Explorator", - }, - footer: { - createdWith: "Creat cu", - }, - graph: { - title: "Graf", - }, - recentNotes: { - title: "Notițe recente", - seeRemainingMore: ({ remaining }) => `Vezi încă ${remaining} →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Extras din ${targetSlug}`, - linkToOriginal: "Legătură către original", - }, - search: { - title: "Căutare", - searchBarPlaceholder: "Introduceți termenul de căutare...", - }, - tableOfContents: { - title: "Cuprins", - }, - contentMeta: { - readingTime: ({ minutes }) => - minutes == 1 ? "lectură de 1 minut" : `lectură de ${minutes} minute`, - }, - }, - pages: { - rss: { - recentNotes: "Notițe recente", - lastFewNotes: ({ count }) => `Ultimele ${count} notițe`, - }, - error: { - title: "Pagina nu a fost găsită", - notFound: "Fie această pagină este privată, fie nu există.", - }, - folderContent: { - folder: "Dosar", - itemsUnderFolder: ({ count }) => - count === 1 ? "1 articol în acest dosar." : `${count} elemente în acest dosar.`, - }, - tagContent: { - tag: "Etichetă", - tagIndex: "Indexul etichetelor", - itemsUnderTag: ({ count }) => - count === 1 ? "1 articol cu această etichetă." : `${count} articole cu această etichetă.`, - showingFirst: ({ count }) => `Se afișează primele ${count} etichete.`, - totalTags: ({ count }) => `Au fost găsite ${count} etichete în total.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Fără titlu', + description: 'Nici o descriere furnizată', + }, + components: { + callout: { + note: 'Notă', + abstract: 'Rezumat', + info: 'Informație', + todo: 'De făcut', + tip: 'Sfat', + success: 'Succes', + question: 'Întrebare', + warning: 'Avertisment', + failure: 'Eșec', + danger: 'Pericol', + bug: 'Bug', + example: 'Exemplu', + quote: 'Citat', + }, + backlinks: { + title: 'Legături înapoi', + noBacklinksFound: 'Nu s-au găsit legături înapoi', + }, + themeToggle: { + lightMode: 'Modul luminos', + darkMode: 'Modul întunecat', + }, + explorer: { + title: 'Explorator', + }, + footer: { + createdWith: 'Creat cu', + }, + graph: { + title: 'Graf', + }, + recentNotes: { + title: 'Notițe recente', + seeRemainingMore: ({ remaining }) => `Vezi încă ${remaining} →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Extras din ${targetSlug}`, + linkToOriginal: 'Legătură către original', + }, + search: { + title: 'Căutare', + searchBarPlaceholder: 'Introduceți termenul de căutare...', + }, + tableOfContents: { + title: 'Cuprins', + }, + contentMeta: { + readingTime: ({ minutes }) => + minutes == 1 ? `lectură de 1 minut` : `lectură de ${minutes} minute`, + }, + }, + pages: { + rss: { + recentNotes: 'Notițe recente', + lastFewNotes: ({ count }) => `Ultimele ${count} notițe`, + }, + error: { + title: 'Pagina nu a fost găsită', + notFound: 'Fie această pagină este privată, fie nu există.', + home: 'Reveniți la pagina de pornire', + }, + folderContent: { + folder: 'Dosar', + itemsUnderFolder: ({ count }) => + count === 1 ? '1 articol în acest dosar.' : `${count} elemente în acest dosar.`, + }, + tagContent: { + tag: 'Etichetă', + tagIndex: 'Indexul etichetelor', + itemsUnderTag: ({ count }) => + count === 1 ? '1 articol cu această etichetă.' : `${count} articole cu această etichetă.`, + showingFirst: ({ count }) => `Se afișează primele ${count} etichete.`, + totalTags: ({ count }) => `Au fost găsite ${count} etichete în total.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/ru-RU.ts b/quartz/i18n/locales/ru-RU.ts index 25ba7aba8606d..ece02c55fb6ac 100644 --- a/quartz/i18n/locales/ru-RU.ts +++ b/quartz/i18n/locales/ru-RU.ts @@ -1,95 +1,106 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Без названия", - description: "Описание отсутствует", - }, - components: { - callout: { - note: "Заметка", - abstract: "Резюме", - info: "Инфо", - todo: "Сделать", - tip: "Подсказка", - success: "Успех", - question: "Вопрос", - warning: "Предупреждение", - failure: "Неудача", - danger: "Опасность", - bug: "Баг", - example: "Пример", - quote: "Цитата", - }, - backlinks: { - title: "Обратные ссылки", - noBacklinksFound: "Обратные ссылки отсутствуют", - }, - themeToggle: { - lightMode: "Светлый режим", - darkMode: "Тёмный режим", - }, - explorer: { - title: "Проводник", - }, - footer: { - createdWith: "Создано с помощью", - }, - graph: { - title: "Вид графа", - }, - recentNotes: { - title: "Недавние заметки", - seeRemainingMore: ({ remaining }) => - `Посмотреть оставш${getForm(remaining, "уюся", "иеся", "иеся")} ${remaining} →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Переход из ${targetSlug}`, - linkToOriginal: "Ссылка на оригинал", - }, - search: { - title: "Поиск", - searchBarPlaceholder: "Найти что-нибудь", - }, - tableOfContents: { - title: "Оглавление", - }, - contentMeta: { - readingTime: ({ minutes }) => `время чтения ~${minutes} мин.`, - }, - }, - pages: { - rss: { - recentNotes: "Недавние заметки", - lastFewNotes: ({ count }) => - `Последн${getForm(count, "яя", "ие", "ие")} ${count} замет${getForm(count, "ка", "ки", "ок")}`, - }, - error: { - title: "Страница не найдена", - notFound: "Эта страница приватная или не существует", - }, - folderContent: { - folder: "Папка", - itemsUnderFolder: ({ count }) => - `в этой папке ${count} элемент${getForm(count, "", "а", "ов")}`, - }, - tagContent: { - tag: "Тег", - tagIndex: "Индекс тегов", - itemsUnderTag: ({ count }) => `с этим тегом ${count} элемент${getForm(count, "", "а", "ов")}`, - showingFirst: ({ count }) => - `Показыва${getForm(count, "ется", "ются", "ются")} ${count} тег${getForm(count, "", "а", "ов")}`, - totalTags: ({ count }) => `Всего ${count} тег${getForm(count, "", "а", "ов")}`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Без названия', + description: 'Описание отсутствует', + }, + components: { + callout: { + note: 'Заметка', + abstract: 'Резюме', + info: 'Инфо', + todo: 'Сделать', + tip: 'Подсказка', + success: 'Успех', + question: 'Вопрос', + warning: 'Предупреждение', + failure: 'Неудача', + danger: 'Опасность', + bug: 'Баг', + example: 'Пример', + quote: 'Цитата', + }, + backlinks: { + title: 'Обратные ссылки', + noBacklinksFound: 'Обратные ссылки отсутствуют', + }, + themeToggle: { + lightMode: 'Светлый режим', + darkMode: 'Тёмный режим', + }, + explorer: { + title: 'Проводник', + }, + footer: { + createdWith: 'Создано с помощью', + }, + graph: { + title: 'Вид графа', + }, + recentNotes: { + title: 'Недавние заметки', + seeRemainingMore: ({ remaining }) => + `Посмотреть оставш${getForm(remaining, 'уюся', 'иеся', 'иеся')} ${remaining} →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Переход из ${targetSlug}`, + linkToOriginal: 'Ссылка на оригинал', + }, + search: { + title: 'Поиск', + searchBarPlaceholder: 'Найти что-нибудь', + }, + tableOfContents: { + title: 'Оглавление', + }, + contentMeta: { + readingTime: ({ minutes }) => `время чтения ~${minutes} мин.`, + }, + }, + pages: { + rss: { + recentNotes: 'Недавние заметки', + lastFewNotes: ({ count }) => + `Последн${getForm(count, 'яя', 'ие', 'ие')} ${count} замет${getForm( + count, + 'ка', + 'ки', + 'ок', + )}`, + }, + error: { + title: 'Страница не найдена', + notFound: 'Эта страница приватная или не существует', + home: 'Вернуться на главную страницу', + }, + folderContent: { + folder: 'Папка', + itemsUnderFolder: ({ count }) => + `в этой папке ${count} элемент${getForm(count, '', 'а', 'ов')}`, + }, + tagContent: { + tag: 'Тег', + tagIndex: 'Индекс тегов', + itemsUnderTag: ({ count }) => `с этим тегом ${count} элемент${getForm(count, '', 'а', 'ов')}`, + showingFirst: ({ count }) => + `Показыва${getForm(count, 'ется', 'ются', 'ются')} ${count} тег${getForm( + count, + '', + 'а', + 'ов', + )}`, + totalTags: ({ count }) => `Всего ${count} тег${getForm(count, '', 'а', 'ов')}`, + }, + }, +} as const satisfies Translation function getForm(number: number, form1: string, form2: string, form5: string): string { - const remainder100 = number % 100; - const remainder10 = remainder100 % 10; + const remainder100 = number % 100 + const remainder10 = remainder100 % 10 - if (remainder100 >= 10 && remainder100 <= 20) return form5; - if (remainder10 > 1 && remainder10 < 5) return form2; - if (remainder10 == 1) return form1; - return form5; + if (remainder100 >= 10 && remainder100 <= 20) return form5 + if (remainder10 > 1 && remainder10 < 5) return form2 + if (remainder10 == 1) return form1 + return form5 } diff --git a/quartz/i18n/locales/uk-UA.ts b/quartz/i18n/locales/uk-UA.ts index 2f40122f1d311..1a33d14f950aa 100644 --- a/quartz/i18n/locales/uk-UA.ts +++ b/quartz/i18n/locales/uk-UA.ts @@ -1,83 +1,84 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "Без назви", - description: "Опис не надано", - }, - components: { - callout: { - note: "Примітка", - abstract: "Абстракт", - info: "Інформація", - todo: "Завдання", - tip: "Порада", - success: "Успіх", - question: "Питання", - warning: "Попередження", - failure: "Невдача", - danger: "Небезпека", - bug: "Баг", - example: "Приклад", - quote: "Цитата", - }, - backlinks: { - title: "Зворотні посилання", - noBacklinksFound: "Зворотних посилань не знайдено", - }, - themeToggle: { - lightMode: "Світлий режим", - darkMode: "Темний режим", - }, - explorer: { - title: "Провідник", - }, - footer: { - createdWith: "Створено за допомогою", - }, - graph: { - title: "Вигляд графа", - }, - recentNotes: { - title: "Останні нотатки", - seeRemainingMore: ({ remaining }) => `Переглянути ще ${remaining} →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `Видобуто з ${targetSlug}`, - linkToOriginal: "Посилання на оригінал", - }, - search: { - title: "Пошук", - searchBarPlaceholder: "Шукати щось", - }, - tableOfContents: { - title: "Зміст", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes} min read`, - }, - }, - pages: { - rss: { - recentNotes: "Останні нотатки", - lastFewNotes: ({ count }) => `Останні нотатки: ${count}`, - }, - error: { - title: "Не знайдено", - notFound: "Ця сторінка або приватна, або не існує.", - }, - folderContent: { - folder: "Папка", - itemsUnderFolder: ({ count }) => - count === 1 ? "У цій папці 1 елемент." : `Елементів у цій папці: ${count}.`, - }, - tagContent: { - tag: "Тег", - tagIndex: "Індекс тегу", - itemsUnderTag: ({ count }) => - count === 1 ? "1 елемент з цим тегом." : `Елементів з цим тегом: ${count}.`, - showingFirst: ({ count }) => `Показ перших ${count} тегів.`, - totalTags: ({ count }) => `Всього знайдено тегів: ${count}.`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: 'Без назви', + description: 'Опис не надано', + }, + components: { + callout: { + note: 'Примітка', + abstract: 'Абстракт', + info: 'Інформація', + todo: 'Завдання', + tip: 'Порада', + success: 'Успіх', + question: 'Питання', + warning: 'Попередження', + failure: 'Невдача', + danger: 'Небезпека', + bug: 'Баг', + example: 'Приклад', + quote: 'Цитата', + }, + backlinks: { + title: 'Зворотні посилання', + noBacklinksFound: 'Зворотних посилань не знайдено', + }, + themeToggle: { + lightMode: 'Світлий режим', + darkMode: 'Темний режим', + }, + explorer: { + title: 'Провідник', + }, + footer: { + createdWith: 'Створено за допомогою', + }, + graph: { + title: 'Вигляд графа', + }, + recentNotes: { + title: 'Останні нотатки', + seeRemainingMore: ({ remaining }) => `Переглянути ще ${remaining} →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `Видобуто з ${targetSlug}`, + linkToOriginal: 'Посилання на оригінал', + }, + search: { + title: 'Пошук', + searchBarPlaceholder: 'Шукати щось', + }, + tableOfContents: { + title: 'Зміст', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes} min read`, + }, + }, + pages: { + rss: { + recentNotes: 'Останні нотатки', + lastFewNotes: ({ count }) => `Останні нотатки: ${count}`, + }, + error: { + title: 'Не знайдено', + notFound: 'Ця сторінка або приватна, або не існує.', + home: 'Повернутися на головну сторінку', + }, + folderContent: { + folder: 'Папка', + itemsUnderFolder: ({ count }) => + count === 1 ? 'У цій папці 1 елемент.' : `Елементів у цій папці: ${count}.`, + }, + tagContent: { + tag: 'Тег', + tagIndex: 'Індекс тегу', + itemsUnderTag: ({ count }) => + count === 1 ? '1 елемент з цим тегом.' : `Елементів з цим тегом: ${count}.`, + showingFirst: ({ count }) => `Показ перших ${count} тегів.`, + totalTags: ({ count }) => `Всього знайдено тегів: ${count}.`, + }, + }, +} as const satisfies Translation diff --git a/quartz/i18n/locales/vi-VN.ts b/quartz/i18n/locales/vi-VN.ts index b72ced4ac55df..39a8fbcc194ab 100644 --- a/quartz/i18n/locales/vi-VN.ts +++ b/quartz/i18n/locales/vi-VN.ts @@ -65,6 +65,7 @@ export default { error: { title: "Không Tìm Thấy", notFound: "Trang này được bảo mật hoặc không tồn tại.", + home: "Trở về trang chủ", }, folderContent: { folder: "Thư Mục", diff --git a/quartz/i18n/locales/zh-CN.ts b/quartz/i18n/locales/zh-CN.ts index eb4345ffe7af7..c3a8e12568f1e 100644 --- a/quartz/i18n/locales/zh-CN.ts +++ b/quartz/i18n/locales/zh-CN.ts @@ -1,81 +1,82 @@ -import { Translation } from "./definition"; +import { Translation } from './definition' export default { - propertyDefaults: { - title: "无题", - description: "无描述", - }, - components: { - callout: { - note: "笔记", - abstract: "摘要", - info: "提示", - todo: "待办", - tip: "提示", - success: "成功", - question: "问题", - warning: "警告", - failure: "失败", - danger: "危险", - bug: "错误", - example: "示例", - quote: "引用", - }, - backlinks: { - title: "反向链接", - noBacklinksFound: "无法找到反向链接", - }, - themeToggle: { - lightMode: "亮色模式", - darkMode: "暗色模式", - }, - explorer: { - title: "探索", - }, - footer: { - createdWith: "Created with", - }, - graph: { - title: "关系图谱", - }, - recentNotes: { - title: "最近的笔记", - seeRemainingMore: ({ remaining }) => `查看更多${remaining}篇笔记 →`, - }, - transcludes: { - transcludeOf: ({ targetSlug }) => `包含${targetSlug}`, - linkToOriginal: "指向原始笔记的链接", - }, - search: { - title: "搜索", - searchBarPlaceholder: "搜索些什么", - }, - tableOfContents: { - title: "目录", - }, - contentMeta: { - readingTime: ({ minutes }) => `${minutes}分钟阅读`, - }, - }, - pages: { - rss: { - recentNotes: "最近的笔记", - lastFewNotes: ({ count }) => `最近的${count}条笔记`, - }, - error: { - title: "无法找到", - notFound: "私有笔记或笔记不存在。", - }, - folderContent: { - folder: "文件夹", - itemsUnderFolder: ({ count }) => `此文件夹下有${count}条笔记。`, - }, - tagContent: { - tag: "标签", - tagIndex: "标签索引", - itemsUnderTag: ({ count }) => `此标签下有${count}条笔记。`, - showingFirst: ({ count }) => `显示前${count}个标签。`, - totalTags: ({ count }) => `总共有${count}个标签。`, - }, - }, -} as const satisfies Translation; + propertyDefaults: { + title: '无题', + description: '无描述', + }, + components: { + callout: { + note: '笔记', + abstract: '摘要', + info: '提示', + todo: '待办', + tip: '提示', + success: '成功', + question: '问题', + warning: '警告', + failure: '失败', + danger: '危险', + bug: '错误', + example: '示例', + quote: '引用', + }, + backlinks: { + title: '反向链接', + noBacklinksFound: '无法找到反向链接', + }, + themeToggle: { + lightMode: '亮色模式', + darkMode: '暗色模式', + }, + explorer: { + title: '探索', + }, + footer: { + createdWith: 'Created with', + }, + graph: { + title: '关系图谱', + }, + recentNotes: { + title: '最近的笔记', + seeRemainingMore: ({ remaining }) => `查看更多${remaining}篇笔记 →`, + }, + transcludes: { + transcludeOf: ({ targetSlug }) => `包含${targetSlug}`, + linkToOriginal: '指向原始笔记的链接', + }, + search: { + title: '搜索', + searchBarPlaceholder: '搜索些什么', + }, + tableOfContents: { + title: '目录', + }, + contentMeta: { + readingTime: ({ minutes }) => `${minutes}分钟阅读`, + }, + }, + pages: { + rss: { + recentNotes: '最近的笔记', + lastFewNotes: ({ count }) => `最近的${count}条笔记`, + }, + error: { + title: '无法找到', + notFound: '私有笔记或笔记不存在。', + home: '返回首页', + }, + folderContent: { + folder: '文件夹', + itemsUnderFolder: ({ count }) => `此文件夹下有${count}条笔记。`, + }, + tagContent: { + tag: '标签', + tagIndex: '标签索引', + itemsUnderTag: ({ count }) => `此标签下有${count}条笔记。`, + showingFirst: ({ count }) => `显示前${count}个标签。`, + totalTags: ({ count }) => `总共有${count}个标签。`, + }, + }, +} as const satisfies Translation diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts index 3dfe77e47ba99..8fdbf779829ea 100644 --- a/quartz/plugins/emitters/componentResources.ts +++ b/quartz/plugins/emitters/componentResources.ts @@ -136,6 +136,14 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso posthog.init('${cfg.analytics.apiKey}',{api_host:'${cfg.analytics.host ?? "https://app.posthog.com"}'})\` document.head.appendChild(posthogScript) `) + } else if (cfg.analytics?.provider === "tinylytics") { + const siteId = cfg.analytics.siteId + componentResources.afterDOMLoaded.push(` + const tinylyticsScript = document.createElement("script") + tinylyticsScript.src = "https://tinylytics.app/embed/${siteId}.js" + tinylyticsScript.defer = true + document.head.appendChild(tinylyticsScript) + `) } if (cfg.enableSPA) { diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index d1d745146fd31..26e0b2c42c8b5 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -123,8 +123,8 @@ export const tableWikilinkRegex = new RegExp(/(!?\[\[[^\]]*?\]\])/, "g") const highlightRegex = new RegExp(/==([^=]+)==/, "g") const commentRegex = new RegExp(/%%[\s\S]*?%%/, "g") // from https://github.com/escwxyz/remark-obsidian-callout/blob/main/src/index.ts -const calloutRegex = new RegExp(/^\[\!(\w+)\]([+-]?)/) -const calloutLineRegex = new RegExp(/^> *\[\!\w+\][+-]?.*$/, "gm") +const calloutRegex = new RegExp(/^\[\!(\w+)\|?(\w+)?\]([+-]?)/) +const calloutLineRegex = new RegExp(/^> *\[\!\w+\|?\w*\][+-]?.*$/, "gm") // (?:^| ) -> non-capturing group, tag should start be separated by a space or be the start of the line // #(...) -> capturing group, tag itself must start with # // (?:[-_\p{L}\d\p{Z}])+ -> non-capturing group, non-empty string of (Unicode-aware) alpha-numeric characters and symbols, hyphens and/or underscores @@ -427,7 +427,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin const match = firstLine.match(calloutRegex) if (match && match.input) { - const [calloutDirective, typeString, collapseChar] = match + const [calloutDirective, typeString, calloutMetaData, collapseChar] = match const calloutType = canonicalizeCallout(typeString.toLowerCase()) const collapse = collapseChar === "+" || collapseChar === "-" const defaultState = collapseChar === "-" ? "collapsed" : "expanded" @@ -489,6 +489,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin className: classNames.join(" "), "data-callout": calloutType, "data-callout-fold": collapse, + "data-callout-metadata": calloutMetaData, }, } }