From 3b266ee7d0d414d2af7d291f249b0153af51aa2e Mon Sep 17 00:00:00 2001 From: Eiko Wagenknecht Date: Tue, 20 Feb 2024 15:45:10 +0100 Subject: [PATCH 1/3] fix: add space and missing dot for listing pages (#907) --- quartz/components/pages/TagContent.tsx | 9 ++++++--- quartz/i18n/locales/de-DE.ts | 4 ++-- quartz/i18n/locales/en-US.ts | 4 ++-- quartz/i18n/locales/es-ES.ts | 4 ++-- quartz/i18n/locales/fr-FR.ts | 4 ++-- quartz/i18n/locales/it-IT.ts | 4 ++-- quartz/i18n/locales/nl-NL.ts | 2 +- quartz/i18n/locales/uk-UA.ts | 4 ++-- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/quartz/components/pages/TagContent.tsx b/quartz/components/pages/TagContent.tsx index 19452ec..22f6bb2 100644 --- a/quartz/components/pages/TagContent.tsx +++ b/quartz/components/pages/TagContent.tsx @@ -66,9 +66,12 @@ function TagContent(props: QuartzComponentProps) {

{i18n(cfg.locale).pages.tagContent.itemsUnderTag({ count: pages.length })} {pages.length > numPages && ( - - {i18n(cfg.locale).pages.tagContent.showingFirst({ count: numPages })} - + <> + {" "} + + {i18n(cfg.locale).pages.tagContent.showingFirst({ count: numPages })} + + )}

diff --git a/quartz/i18n/locales/de-DE.ts b/quartz/i18n/locales/de-DE.ts index e382194..64c9ba9 100644 --- a/quartz/i18n/locales/de-DE.ts +++ b/quartz/i18n/locales/de-DE.ts @@ -69,13 +69,13 @@ export default { folderContent: { folder: "Ordner", itemsUnderFolder: ({ count }) => - count === 1 ? "1 Datei in diesem Ordner" : `${count} Dateien in diesem Ordner.`, + 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.`, + 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.`, }, diff --git a/quartz/i18n/locales/en-US.ts b/quartz/i18n/locales/en-US.ts index 4a308d7..ac283fd 100644 --- a/quartz/i18n/locales/en-US.ts +++ b/quartz/i18n/locales/en-US.ts @@ -69,13 +69,13 @@ export default { folderContent: { folder: "Folder", itemsUnderFolder: ({ count }) => - count === 1 ? "1 item under this folder" : `${count} items under this folder.`, + 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.`, + count === 1 ? "1 item with this tag." : `${count} items with this tag.`, showingFirst: ({ count }) => `Showing first ${count} tags.`, totalTags: ({ count }) => `Found ${count} total tags.`, }, diff --git a/quartz/i18n/locales/es-ES.ts b/quartz/i18n/locales/es-ES.ts index f59d201..37a2a79 100644 --- a/quartz/i18n/locales/es-ES.ts +++ b/quartz/i18n/locales/es-ES.ts @@ -69,13 +69,13 @@ export default { folderContent: { folder: "Carpeta", itemsUnderFolder: ({ count }) => - count === 1 ? "1 artículo en esta carpeta" : `${count} artículos en esta carpeta.`, + 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.`, + 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.`, }, diff --git a/quartz/i18n/locales/fr-FR.ts b/quartz/i18n/locales/fr-FR.ts index 8b72292..b485d2b 100644 --- a/quartz/i18n/locales/fr-FR.ts +++ b/quartz/i18n/locales/fr-FR.ts @@ -69,13 +69,13 @@ export default { folderContent: { folder: "Dossier", itemsUnderFolder: ({ count }) => - count === 1 ? "1 élément sous ce dossier" : `${count} éléments sous ce dossier.`, + 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.`, + 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.`, }, diff --git a/quartz/i18n/locales/it-IT.ts b/quartz/i18n/locales/it-IT.ts index a0cc042..ca8818a 100644 --- a/quartz/i18n/locales/it-IT.ts +++ b/quartz/i18n/locales/it-IT.ts @@ -69,13 +69,13 @@ export default { folderContent: { folder: "Cartella", itemsUnderFolder: ({ count }) => - count === 1 ? "1 oggetto in questa cartella" : `${count} oggetti in questa cartella.`, + 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.`, + count === 1 ? "1 oggetto con questa etichetta." : `${count} oggetti con questa etichetta.`, showingFirst: ({ count }) => `Prime ${count} etichette.`, totalTags: ({ count }) => `Trovate ${count} etichette totali.`, }, diff --git a/quartz/i18n/locales/nl-NL.ts b/quartz/i18n/locales/nl-NL.ts index e239be0..d075d58 100644 --- a/quartz/i18n/locales/nl-NL.ts +++ b/quartz/i18n/locales/nl-NL.ts @@ -70,7 +70,7 @@ export default { folderContent: { folder: "Map", itemsUnderFolder: ({ count }) => - count === 1 ? "1 item in deze map" : `${count} items in deze map.`, + count === 1 ? "1 item in deze map." : `${count} items in deze map.`, }, tagContent: { tag: "Label", diff --git a/quartz/i18n/locales/uk-UA.ts b/quartz/i18n/locales/uk-UA.ts index c997a69..b636938 100644 --- a/quartz/i18n/locales/uk-UA.ts +++ b/quartz/i18n/locales/uk-UA.ts @@ -69,13 +69,13 @@ export default { folderContent: { folder: "Папка", itemsUnderFolder: ({ count }) => - count === 1 ? "У цій папці 1 елемент" : `Елементів у цій папці: ${count}.`, + count === 1 ? "У цій папці 1 елемент." : `Елементів у цій папці: ${count}.`, }, tagContent: { tag: "Тег", tagIndex: "Індекс тегу", itemsUnderTag: ({ count }) => - count === 1 ? "1 елемент з цим тегом" : `Елементів з цим тегом: ${count}.`, + count === 1 ? "1 елемент з цим тегом." : `Елементів з цим тегом: ${count}.`, showingFirst: ({ count }) => `Показ перших ${count} тегів.`, totalTags: ({ count }) => `Всього знайдено тегів: ${count}.`, }, From 1c3f3d03e1682cd435363e354acae6dc936baef3 Mon Sep 17 00:00:00 2001 From: Eiko Wagenknecht Date: Tue, 20 Feb 2024 18:06:53 +0100 Subject: [PATCH 2/3] fix(toc): correct type for minEntries param (#909) --- quartz/plugins/transformers/toc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/plugins/transformers/toc.ts b/quartz/plugins/transformers/toc.ts index 4c31d20..bfc2f98 100644 --- a/quartz/plugins/transformers/toc.ts +++ b/quartz/plugins/transformers/toc.ts @@ -6,7 +6,7 @@ import Slugger from "github-slugger" export interface Options { maxDepth: 1 | 2 | 3 | 4 | 5 | 6 - minEntries: 1 + minEntries: number showByDefault: boolean collapseByDefault: boolean } @@ -52,7 +52,7 @@ export const TableOfContents: QuartzTransformerPlugin | undefin } }) - if (toc.length > opts.minEntries) { + if (toc.length > 0 && toc.length > opts.minEntries) { file.data.toc = toc.map((entry) => ({ ...entry, depth: entry.depth - highestDepth, From 7dd596ebcece8badf18586186c9712b364fab42e Mon Sep 17 00:00:00 2001 From: kon-foo <25391223+kon-foo@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:18:44 +0100 Subject: [PATCH 3/3] docs: Fix in explorer.md (#911) --- docs/features/explorer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/explorer.md b/docs/features/explorer.md index b5fd379..a2acb86 100644 --- a/docs/features/explorer.md +++ b/docs/features/explorer.md @@ -42,7 +42,7 @@ When passing in your own options, you can omit any or all of these fields if you Want to customize it even more? -- Removing table of contents: remove `Component.Explorer()` from `quartz.layout.ts` +- Removing explorer: remove `Component.Explorer()` from `quartz.layout.ts` - (optional): After removing the explorer component, you can move the [[table of contents | Table of Contents]] component back to the `left` part of the layout - Changing `sort`, `filter` and `map` behavior: explained in [[#Advanced customization]] - Component: