From ce413b4bae40a21e354b2e065fda60045ae28ecb Mon Sep 17 00:00:00 2001
From: Silviu LorenČ› <124451350+smilorent@users.noreply.github.com>
Date: Wed, 07 Feb 2024 16:26:45 +0000
Subject: [PATCH] feat(i18n): add Romanian to i18n (#821)

---
 quartz/components/Graph.tsx |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/quartz/components/Graph.tsx b/quartz/components/Graph.tsx
index 1b8071b..9fce9bd 100644
--- a/quartz/components/Graph.tsx
+++ b/quartz/components/Graph.tsx
@@ -1,7 +1,9 @@
-import { QuartzComponentConstructor } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
 // @ts-ignore
 import script from "./scripts/graph.inline"
 import style from "./styles/graph.scss"
+import { i18n } from "../i18n"
+import { classNames } from "../util/lang"
 
 export interface D3Config {
   drag: boolean
@@ -52,12 +54,12 @@
 }
 
 export default ((opts?: GraphOptions) => {
-  function Graph() {
+  function Graph({ displayClass, cfg }: QuartzComponentProps) {
     const localGraph = { ...defaultOptions.localGraph, ...opts?.localGraph }
     const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph }
     return (
-      <div class="graph">
-        <h3>Graph View</h3>
+      <div class={classNames(displayClass, "graph")}>
+        <h3>{i18n(cfg.locale).components.graph.title}</h3>
         <div class="graph-outer">
           <div id="graph-container" data-cfg={JSON.stringify(localGraph)}></div>
           <svg

--
Gitblit v1.10.0