0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

Translate name of default projects

This commit is contained in:
Andrés Moya 2021-03-04 17:01:56 +01:00
parent 161b8cdabb
commit ee6717ef69

View file

@ -39,6 +39,11 @@
current-projects (remove #(= (:id %) (:project-id file))
(:projects current-team))
project-name (fn [project]
(if (:is-default project)
(tr "labels.drafts")
(:name project)))
on-new-tab
(mf/use-callback
(mf/deps file)
@ -159,14 +164,16 @@
(when (or (seq current-projects) (seq other-teams))
[(tr "dashboard.move-to") nil
(conj (vec (for [project current-projects]
[(:name project) (on-move (:id current-team)
[(project-name project)
(on-move (:id current-team)
(:id project))]))
(when (seq other-teams)
[(tr "dashboard.move-to-other-team") nil
(for [team other-teams]
[(:name team) nil
(for [sub-project (:projects team)]
[(:name sub-project) (on-move (:id team)
[(project-name sub-project)
(on-move (:id team)
(:id sub-project))])])]))])
(if (:is-shared file)
[(tr "dashboard.remove-shared") on-del-shared]