Skip to content

Commit 290e1f3

Browse files
committed
fix
Signed-off-by: yuluo-yx <[email protected]>
1 parent 1f909b1 commit 290e1f3

File tree

1 file changed

+10
-10
lines changed
  • website/src/components/ZoomableMermaid

1 file changed

+10
-10
lines changed

website/src/components/ZoomableMermaid/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
129129
className={styles.zoomButton}
130130
onClick={zoomOut}
131131
disabled={zoomLevel <= 0.5}
132-
aria-label="缩小图表"
132+
aria-label="Reduce the size of the chart"
133133
type="button"
134-
title="缩小 (快捷键: -)"
134+
title="Reduce (Shortcut key: -)"
135135
>
136136
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
137137
<circle cx="11" cy="11" r="8" />
@@ -142,9 +142,9 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
142142
<button
143143
className={styles.resetButton}
144144
onClick={resetZoom}
145-
aria-label={`重置到默认缩放 ${Math.round(defaultZoom * 100)}%`}
145+
aria-label={`Reset to default zoom level ${Math.round(defaultZoom * 100)}%`}
146146
type="button"
147-
title={`重置到默认缩放 ${Math.round(defaultZoom * 100)}% (快捷键: 0)`}
147+
title={`Reset to default zoom level ${Math.round(defaultZoom * 100)}% (Shortcut key: 0)`}
148148
>
149149
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
150150
<path d="M3 3l18 18" />
@@ -156,9 +156,9 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
156156
className={styles.zoomButton}
157157
onClick={zoomIn}
158158
disabled={zoomLevel >= 3.0}
159-
aria-label="放大图表"
159+
aria-label="Enlarge the chart"
160160
type="button"
161-
title="放大 (快捷键: +)"
161+
title="Enlarge (Shortcut key: +)"
162162
>
163163
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
164164
<circle cx="11" cy="11" r="8" />
@@ -170,7 +170,7 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
170170
<button
171171
className={styles.closeButton}
172172
onClick={closeModal}
173-
aria-label="关闭放大视图"
173+
aria-label="Close the zoomed view"
174174
type="button"
175175
>
176176
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
@@ -183,7 +183,7 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
183183
<div
184184
className={styles.modalBody}
185185
id="modal-description"
186-
aria-label="放大的 Mermaid 图表"
186+
aria-label="Enlarged Mermaid diagram"
187187
>
188188
<div
189189
className={styles.diagramContainer}
@@ -207,7 +207,7 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
207207
role="button"
208208
tabIndex={0}
209209
onKeyDown={handleKeyDown}
210-
aria-label={`点击放大查看 ${title || 'Mermaid 图表'}`}
210+
aria-label={`Click to enlarge ${title || 'Mermaid diagram'}`}
211211
aria-expanded={isModalOpen}
212212
>
213213
<div className={styles.zoomHint} aria-hidden="true">
@@ -217,7 +217,7 @@ const ZoomableMermaid = ({ children, title, defaultZoom = 1.2 }) => {
217217
<path d="M11 8v6" />
218218
<path d="M8 11h6" />
219219
</svg>
220-
<span>点击放大</span>
220+
<span>Click to enlarge</span>
221221
</div>
222222
<Mermaid value={children} />
223223
</div>

0 commit comments

Comments
 (0)