mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-21 21:45:42 -05:00
Adds a RecentChanges component that displays a live activity feed of recently created and modified notes, with richer UX than RecentNotes. Features: - Created vs. modified distinction (badge + 1h threshold heuristic) - Tab filter UI: All / New (by creation date) / Updated (modified only) - Load-more pagination per tab with configurable page size - Client-side relative timestamps via Intl.RelativeTimeFormat (locale-aware) - Progressive enhancement: SSR initial render + JSON data island for client - localStorage persistence of the active filter tab - Fully i18n: all UI strings go through cfg.locale New files: - quartz/components/RecentChanges.tsx - quartz/components/scripts/recentChanges.inline.ts - quartz/components/utils/recentChanges.ts - quartz/components/styles/recentChanges.scss Modified: - quartz/components/index.ts: export RecentChanges - quartz/i18n/locales/definition.ts: add recentChanges translation block - quartz/i18n/locales/*.ts (30 files): add English fallback translations
98 lines
2.6 KiB
TypeScript
98 lines
2.6 KiB
TypeScript
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",
|
|
},
|
|
readerMode: {
|
|
title: "Mode lecture",
|
|
},
|
|
explorer: {
|
|
title: "Explorateur",
|
|
},
|
|
footer: {
|
|
createdWith: "Créé avec",
|
|
},
|
|
graph: {
|
|
title: "Vue Graphique",
|
|
},
|
|
recentNotes: {
|
|
title: "Notes Récentes",
|
|
seeRemainingMore: ({ remaining }) => `Voir ${remaining} de plus →`,
|
|
},
|
|
recentChanges: {
|
|
title: "Recent Changes",
|
|
filterAll: "All",
|
|
filterNew: "New",
|
|
filterUpdated: "Updated",
|
|
loadMoreTemplate: "Load {count} more · {remaining} remaining",
|
|
noChanges: "No recent changes found.",
|
|
badgeNew: "New",
|
|
badgeUpdated: "Edited",
|
|
},
|
|
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
|