Skip to content

Commit ed84f95

Browse files
Add stroke_linecap stroke_linejoin and d translations
1 parent 80221ff commit ed84f95

File tree

5 files changed

+82
-27
lines changed

5 files changed

+82
-27
lines changed

src/lang/el-GR.edn

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,16 @@
289289

290290
:renderer.attribute.impl.stroke-linecap
291291
{:description "Η ιδιότητα stroke-linecap είναι μια ιδιότητα παρουσίασης που καθορίζει το σχήμα που θα χρησιμοποιηθεί στο τέλος των ανοιχτών υποδιαδρομών
292-
όταν εφαρμόζεται περίγραμμα."}
292+
όταν εφαρμόζεται περίγραμμα."
293+
:butt "Κοφτό"
294+
:round "Στρογγυλό"
295+
:square "Τετράγωνο"}
296+
297+
:renderer.attribute.impl.stroke-linejoin
298+
{:description "Η ιδιότητα stroke-linejoin είναι μια ιδιότητα παρουσίασης που καθορίζει το σχήμα που θα χρησιμοποιηθεί στις γωνίες των μονοπατιών όταν εφαρμόζεται περίγραμμα."
299+
:bevel "Λοξό"
300+
:miter "Γωνιώδες"
301+
:round "Στρογγυλεμένο"}
293302

294303
:renderer.tool.impl.element.text
295304
{:help "Κάντε κλικ για να ξεκινήσετε τη πληκτρολόγηση."}
@@ -302,6 +311,22 @@
302311
:renderer.attribute.impl.color
303312
{:title "Επιλέξτε χρώμα"}
304313

314+
:renderer.attribute.impl.d
315+
{:description "Η ιδιότητα d καθορίζει τη διαδρομή που θα σχεδιαστεί."
316+
:edit "Επεξεργασία διαδρομής"
317+
:absolute "(Απόλυτο)"
318+
:relative "(Σχετικό)"
319+
:move-to "Μετακίνηση προς"
320+
:line-to "Γραμμή προς"
321+
:vertical-line "Κάθετη γραμμή"
322+
:horizontal-line "Οριζόντια γραμμή"
323+
:cubic-bezier "Κυβική καμπύλη Bézier"
324+
:shortcut-cubic-bezier "Συντομευμένη κυβική καμπύλη Bézier"
325+
:quadratic-bezier-curve "Τετραγωνική καμπύλη Bézier"
326+
:shortcut-quadratic "Συντομευμένη τετραγωνική καμπύλη Bézier"
327+
:elliptical-arc-curve "Ελλειπτική καμπύλη τόξου"
328+
:close-path "Κλείσιμο διαδρομής"}
329+
305330
:renderer.attribute.impl.length
306331
{:increase "Αύξηση"
307332
:decrease "Μείωση"}
@@ -319,7 +344,7 @@
319344

320345
:renderer.attribute.impl.font-weight
321346
{:description "Η ιδιότητα font-weight αναφέρεται στο πάχος ή την ελαφρότητα των γλυφών που χρησιμοποιούνται για την απεικόνιση του κειμένου,
322-
σε σχέση με άλλες γραμματοσειρές της ίδιας οικογένειας."}
347+
σε σχέση με άλλες γραμματοσειρές της ίδιας οικογένειας."}
323348

324349
:renderer.tool.impl.base.edit
325350
{:help-idle-drag [:div "Σύρετε μια λαβή για να τροποποιήσετε το σχήμα σας."]

src/lang/en-US.edn

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,17 @@
323323

324324
:renderer.attribute.impl.stroke-linecap
325325
{:description "The stroke-linecap attribute is a presentation attribute defining the shape
326-
to be used at the end of open subpaths when they are stroked."}
326+
to be used at the end of open subpaths when they are stroked."
327+
:butt "Butt"
328+
:round "Round"
329+
:square "Square"}
330+
331+
:renderer.attribute.impl.stroke-linejoin
332+
{:description "The stroke-linejoin attribute is a presentation attribute defining the shape
333+
to be used at the corners of paths when they are stroked."
334+
:bevel "Bevel"
335+
:miter "Miter"
336+
:round "Round"}
327337

328338
:renderer.attribute.impl.overflow
329339
{:description "The overflow attribute sets what to do when an element's content is too big to fit in its block formatting context. This feature is not widely implemented yet."
@@ -333,6 +343,22 @@
333343
:renderer.attribute.impl.color
334344
{:title "Pick color"}
335345

346+
:renderer.attribute.impl.d
347+
{:description "The d attribute defines a path to be drawn."
348+
:edit "Edit path"
349+
:absolute "(Absolute)"
350+
:relative "(Relative)"
351+
:move-to "Move To"
352+
:line-to "Line To"
353+
:vertical-line "Vertical Line"
354+
:horizontal-line "Horizontal Line"
355+
:cubic-bezier "Cubic Bézier Curve"
356+
:shortcut-cubic-bezier "Shortcut Cubic Bézier Curve"
357+
:quadratic-bezier-curve "Quadratic Bézier Curve"
358+
:shortcut-quadratic "Shortcut Quadratic Bézier Curve"
359+
:elliptical-arc-curve "Elliptical Arc Curve"
360+
:close-path "Close Path"}
361+
336362
:renderer.attribute.impl.length
337363
{:increase "Increase"
338364
:decrease "Decrease"}

src/renderer/attribute/impl/d.cljs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,40 @@
99
[renderer.attribute.views :as attribute.views]
1010
[renderer.element.events :as-alias element.events]
1111
[renderer.tool.subs :as-alias tool.subs]
12+
[renderer.utils.i18n :refer [t]]
1213
[renderer.views :as views]
1314
[renderer.window.events :as-alias window.events]))
1415

1516
(defmethod attribute.hierarchy/description [:default :d]
1617
[]
17-
"The d attribute defines a path to be drawn.")
18+
(t [::description "The d attribute defines a path to be drawn."]))
1819

19-
(def path-commands
20-
{:m {:label "Move To"
20+
(defn path-commands
21+
[]
22+
{:m {:label (t [::move-to "Move To"])
2123
:url "https://svgwg.org/svg2-draft/paths.html#PathDataMovetoCommands"}
22-
:l {:label "Line To"
24+
:l {:label (t [::line-to "Line To"])
2325
:url "https://svgwg.org/svg2-draft/paths.html#PathDataLinetoCommands"}
24-
:v {:label "Vertical Line"
26+
:v {:label (t [::vertical-line "Vertical Line"])
2527
:url "https://svgwg.org/svg2-draft/paths.html#PathDataLinetoCommands"}
26-
:h {:label "Horizontal Line"
28+
:h {:label (t [::horizontal-line "Horizontal Line"])
2729
:url "https://svgwg.org/svg2-draft/paths.html#PathDataLinetoCommands"}
28-
:c {:label "Cubic Bézier Curve"
30+
:c {:label (t [::cubic-bezier "Cubic Bézier Curve"])
2931
:url "https://svgwg.org/svg2-draft/paths.html#PathDataCubicBezierCommands"}
30-
:s {:label "Shortcut Cubic Bézier Curve"
32+
:s {:label (t [::shortcut-cubic-bezier "Shortcut Cubic Bézier Curve"])
3133
:url "https://svgwg.org/svg2-draft/paths.html#PathDataCubicBezierCommands"}
32-
:q {:label "Quadratic Bézier Curve"
34+
:q {:label (t [::quadratic-bezier-curve "Quadratic Bézier Curve"])
3335
:url "https://svgwg.org/svg2-draft/paths.html#PathDataQuadraticBezierCommands"}
34-
:t {:label "Shortcut Quadratic Bézier Curve"
36+
:t {:label (t [::shortcut-quadratic "Shortcut Quadratic Bézier Curve"])
3537
:url "https://svgwg.org/svg2-draft/paths.html#PathDataQuadraticBezierCommands"}
36-
:a {:label "Elliptical Arc Curve"
38+
:a {:label (t [::elliptical-arc-curve "Elliptical Arc Curve"])
3739
:url "https://svgwg.org/svg2-draft/paths.html#PathDataEllipticalArcCommands"}
38-
:z {:label "Close Path"
40+
:z {:label (t [::close-path "Close Path"])
3941
:url "https://svgwg.org/svg2-draft/paths.html#PathDataClosePathCommand"}})
4042

4143
(defn ->command
4244
[c]
43-
(get path-commands (keyword (string/lower-case c))))
45+
(get (path-commands) (keyword (string/lower-case c))))
4446

4547
(defn remove-segment-by-index
4648
[path i]
@@ -112,7 +114,7 @@
112114
{:on-click #(rf/dispatch [::window.events/open-remote-url url])}
113115
label]
114116
(if (= command (string/lower-case command))
115-
"(Relative)" "(Absolute)")]
117+
(t [::relative "(Relative)"]) (t [::absolute "(Absolute)"]))]
116118
[:button.icon-button.small.bg-transparent.text-muted
117119
{:on-click #(remove-segment-by-index path i)}
118120
[views/icon "times"]]]
@@ -139,7 +141,7 @@
139141
(when v
140142
[:> Popover/Root {:modal true}
141143
[:> Popover/Trigger
142-
{:title "Edit path"
144+
{:title (t [::edit "Edit path"])
143145
:class "form-control-button"}
144146
[views/icon "pencil"]]
145147
[:> Popover/Portal

src/renderer/attribute/impl/stroke_linecap.cljs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
(merge attrs {:default-value "butt"
1818
:items [{:key :butt
1919
:value "butt"
20-
:label "Butt"
20+
:label (t [::butt "Butt"])
2121
:icon "linecap-butt"}
2222
{:key :round
2323
:value "round"
24-
:label "Round"
24+
:label (t [::round "Round"])
2525
:icon "linecap-round"}
2626
{:key :square
2727
:value "square"
28-
:label "Square"
28+
:label (t [::square "Square"])
2929
:icon "linecap-square"}]})])

src/renderer/attribute/impl/stroke_linejoin.cljs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22
"https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/stroke-linejoin"
33
(:require
44
[renderer.attribute.hierarchy :as attribute.hierarchy]
5-
[renderer.attribute.views :as attribute.views]))
5+
[renderer.attribute.views :as attribute.views]
6+
[renderer.utils.i18n :refer [t]]))
67

78
(defmethod attribute.hierarchy/description [:default :stroke-linejoin]
89
[]
9-
"The stroke-linejoin attribute is a presentation attribute defining the shape
10-
to be used at the corners of paths when they are stroked.")
10+
(t [::description
11+
"The stroke-linejoin attribute is a presentation attribute defining the shape
12+
to be used at the corners of paths when they are stroked."]))
1113

1214
(defmethod attribute.hierarchy/form-element [:default :stroke-linejoin]
1315
[_ k v attrs]
1416
[attribute.views/select-input k v
1517
(merge attrs {:default-value "miter"
1618
:items [{:key :bevel
1719
:value "bevel"
18-
:label "Bevel"}
20+
:label (t [::bevel "Bevel"])}
1921
{:key :miter
2022
:value "miter"
21-
:label "Miter"}
23+
:label (t [::miter "Miter"])}
2224
{:key :round
2325
:value "round"
24-
:label "Round"}]})])
26+
:label (t [::round "Round"])}]})])

0 commit comments

Comments
 (0)