mirror of
https://github.com/penpot/penpot.git
synced 2026-06-09 17:02:05 +00:00
🐛 Translate layout panel header and add-layout options (#9424)
* 🐛 Translate layout panel header and add-layout options * ♻️ Wrap shared layout dropdown binding in mf/html
This commit is contained in:
parent
67f6786809
commit
a9e88b8fa8
@ -1233,7 +1233,21 @@
|
||||
(mf/use-fn #(swap! show-dropdown* not))
|
||||
|
||||
on-hide-dropdown
|
||||
(mf/use-fn #(reset! show-dropdown* false))]
|
||||
(mf/use-fn #(reset! show-dropdown* false))
|
||||
|
||||
add-layout-dropdown
|
||||
(mf/html
|
||||
[:& dropdown {:show show-dropdown?
|
||||
:on-close on-hide-dropdown}
|
||||
[:div {:class (stl/css :layout-options)}
|
||||
[:button {:class (stl/css :layout-option)
|
||||
:data-type "flex"
|
||||
:on-click on-add-layout}
|
||||
(tr "labels.flex-layout")]
|
||||
[:button {:class (stl/css :layout-option)
|
||||
:data-type "grid"
|
||||
:on-click on-add-layout}
|
||||
(tr "labels.grid-layout")]]])]
|
||||
|
||||
[:div {:class (stl/css :element-set) :data-testid "inspect-layout"}
|
||||
[:div {:class (stl/css :element-title)}
|
||||
@ -1241,7 +1255,7 @@
|
||||
{:collapsable has-layout?
|
||||
:collapsed (not open?)
|
||||
:on-collapsed on-toggle-visibility
|
||||
:title "Layout"
|
||||
:title (tr "labels.layout")
|
||||
:class (stl/css-case :title-spacing-layout (not has-layout?))}
|
||||
|
||||
(if (and (not multiple) (:layout values))
|
||||
@ -1251,17 +1265,7 @@
|
||||
:on-click on-toggle-dropdown-visibility
|
||||
:icon i/menu}]
|
||||
|
||||
[:& dropdown {:show show-dropdown?
|
||||
:on-close on-hide-dropdown}
|
||||
[:div {:class (stl/css :layout-options)}
|
||||
[:button {:class (stl/css :layout-option)
|
||||
:data-type "flex"
|
||||
:on-click on-add-layout}
|
||||
"Flex layout"]
|
||||
[:button {:class (stl/css :layout-option)
|
||||
:data-type "grid"
|
||||
:on-click on-add-layout}
|
||||
"Grid layout"]]]
|
||||
add-layout-dropdown
|
||||
|
||||
(when has-layout?
|
||||
[:> icon-button* {:variant "ghost"
|
||||
@ -1275,17 +1279,7 @@
|
||||
:on-click on-toggle-dropdown-visibility
|
||||
:icon i/add}]
|
||||
|
||||
[:& dropdown {:show show-dropdown?
|
||||
:on-close on-hide-dropdown}
|
||||
[:div {:class (stl/css :layout-options)}
|
||||
[:button {:class (stl/css :layout-option)
|
||||
:data-type "flex"
|
||||
:on-click on-add-layout}
|
||||
"Flex layout"]
|
||||
[:button {:class (stl/css :layout-option)
|
||||
:data-type "grid"
|
||||
:on-click on-add-layout}
|
||||
"Grid layout"]]]
|
||||
add-layout-dropdown
|
||||
|
||||
(when has-layout?
|
||||
[:> icon-button* {:variant "ghost"
|
||||
|
||||
@ -2758,6 +2758,10 @@ msgstr "Figma"
|
||||
msgid "labels.fill"
|
||||
msgstr "Fill"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs
|
||||
msgid "labels.flex-layout"
|
||||
msgstr "Flex layout"
|
||||
|
||||
#: src/app/main/ui/dashboard/fonts.cljs:432
|
||||
msgid "labels.font-family"
|
||||
msgstr "Font Family"
|
||||
@ -2800,6 +2804,10 @@ msgstr "Go back"
|
||||
msgid "labels.graphic-design"
|
||||
msgstr "Graphic design"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs
|
||||
msgid "labels.grid-layout"
|
||||
msgstr "Grid layout"
|
||||
|
||||
#: src/app/main/ui/dashboard/sidebar.cljs:887, src/app/main/ui/workspace/main_menu.cljs:136, src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs:1317, src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs:1345, src/app/main/ui/workspace/sidebar/options/menus/layout_container.cljs:1533
|
||||
msgid "labels.help-center"
|
||||
msgstr "Help Center"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user