0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-09 14:21:42 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Andrey Antukh 2021-05-05 11:31:10 +02:00
commit f507722f43
9 changed files with 2576 additions and 13 deletions

View file

@ -33,7 +33,7 @@ paths.dist = "./target/dist/";
// Templates
function readLocales() {
const langs = ["ca", "el", "en", "es", "fr", "tr", "ru", "zh_cn"];
const langs = ["ca", "de", "el", "en", "es", "fr", "tr", "ru", "zh_cn"];
const result = {};
for (let lang of langs) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,009 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View file

@ -0,0 +1,73 @@
const l = require("lodash");
const fs = require("fs");
const gt = require("gettext-parser");
function generateLang(data, lang) {
let output = {};
for (let key of Object.keys(data)) {
const trObj = data[key];
const trRef = trObj["used-in"];
let content = trObj.translations[lang];
let comments = {};
if (l.isNil(content)) {
continue;
} else {
let result = {
msgid: key,
comments: {}
}
if (l.isArray(trRef)) {
result.comments.reference = trRef.join(", ");
}
if (trObj.permanent) {
result.comments.flag = "permanent";
}
if (l.isArray(content)) {
result.msgid_plural = key;
result.msgstr = content;
} else if (l.isString(content)) {
result.msgstr = [content];
} else {
throw new Error("unexpected");
}
output[key] = result;
}
}
if (lang.includes("_")) {
const [a, b] = lang.split("_");
lang = `${a}_${b.toUpperCase()}`;
}
const poData = {
charset: "utf-8",
headers: {
"Language": lang,
"MIME-Version": "1.0",
"Content-Type": "text/plain; charset=UTF-8",
"Content-Transfer-Encoding": "8bit",
"Plural-Forms": "nplurals=2; plural=(n != 1);"
},
"translations": {
"": output
}
}
const buff = gt.po.compile(poData, {sort: true});
fs.writeFileSync(`./translations/${lang}.po`, buff);
}
const content = fs.readFileSync("./resources/locales.json");
const data = JSON.parse(content);
const langs = ["de"];
for (let lang of langs) {
generateLang(data, lang);
}

View file

@ -39,7 +39,7 @@
(make-corner nil))
([point]
(process-path-tool
#{point}
(when point #{point})
(fn [content points]
(reduce upt/make-corner-point content points)))))
@ -48,7 +48,7 @@
(make-curve nil))
([point]
(process-path-tool
#{point}
(when point #{point})
(fn [content points]
(reduce upt/make-curve-point content points)))))

View file

@ -141,7 +141,10 @@
:dashboard-font-providers
:dashboard-team-members
:dashboard-team-settings)
[:& dashboard {:route route}]
[:*
#_[:div.modal-wrapper
[:& app.main.ui.onboarding/release-notes-modal {:version "1.5"}]]
[:& dashboard {:route route}]]
:viewer
(let [index (get-in route [:query-params :index])

View file

@ -238,9 +238,7 @@
(defmulti render-release-notes :version)
(mf/defc release-notes-modal
{::mf/register modal/components
::mf/register-as :release-notes}
(mf/defc release-notes
[{:keys [version] :as props}]
(let [slide (mf/use-state :start)
klass (mf/use-state "fadeInDown")
@ -285,16 +283,19 @@
:slide slide
:version version})))
;; This case should never happen; but if happen just hide inmediatelly
;; the modal.
(defmethod render-release-notes :default
(mf/defc release-notes-modal
{::mf/wrap-props false
::mf/register modal/components
::mf/register-as :release-notes}
[props]
(tm/schedule 0 #(st/emit! (modal/hide)))
(mf/html [:span ""]))
(let [versions (methods render-release-notes)
version (obj/get props "version")]
(when (contains? versions version)
[:> release-notes props])))
(defmethod render-release-notes "0.0"
[params]
(render-release-notes (assoc params :version "1.4")))
(render-release-notes (assoc params :version "1.5")))
(defmethod render-release-notes "1.4"
[{:keys [slide klass next finish navigate version]}]
@ -393,3 +394,82 @@
{:slide @slide
:navigate navigate
:total 4}]]]]]])))
(defmethod render-release-notes "1.5"
[{:keys [slide klass next finish navigate version]}]
(mf/html
(case @slide
:start
[:div.modal-overlay
[:div.animated {:class @klass}
[:div.modal-container.onboarding.feature
[:div.modal-left
[:img {:src "images/login-on.jpg" :border "0" :alt "What's new Alpha release 1.5.0"}]]
[:div.modal-right
[:div.modal-title
[:h2 "What's new?"]]
[:span.release "Alpha version " version]
[:div.modal-content
[:p "Penpot continues growing with new features that improve performance, user experience and visual design."]
[:p "We are happy to show you a sneak peak of the most important stuff that the Alpha 1.5.0 version brings."]]
[:div.modal-navigation
[:button.btn-secondary {:on-click next} "Continue"]]]
[:img.deco {:src "images/deco-left.png" :border "0"}]
[:img.deco.right {:src "images/deco-right.png" :border "0"}]]]]
0
[:div.modal-overlay
[:div.animated {:class @klass}
[:div.modal-container.onboarding.feature
[:div.modal-left
[:img {:src "images/features/path-tool.gif" :border "0" :alt "New path tool"}]]
[:div.modal-right
[:div.modal-title
[:h2 "New features for paths"]]
[:div.modal-content
[:p "Now you can select snap points on edition, add/remove nodes, merge/join/split nodes."]
[:p "The usability and performance of the paths tool has been improved too."]]
[:div.modal-navigation
[:button.btn-secondary {:on-click next} "Continue"]
[:& navigation-bullets
{:slide @slide
:navigate navigate
:total 3}]]]]]]
1
[:div.modal-overlay
[:div.animated {:class @klass}
[:div.modal-container.onboarding.feature
[:div.modal-left
[:img {:src "images/features/assets-organiz.gif" :border "0" :alt "Manage libraries"}]]
[:div.modal-right
[:div.modal-title
[:h2 "New libraries organization"]]
[:div.modal-content
[:p "Penpot now allows to group, multiselect and bulk edition of assets (components and graphics)."]
[:p "It is time to have all the libraries well organized and work more efficiently."]]
[:div.modal-navigation
[:button.btn-secondary {:on-click next} "Continue"]
[:& navigation-bullets
{:slide @slide
:navigate navigate
:total 3}]]]]]]
2
[:div.modal-overlay
[:div.animated {:class @klass}
[:div.modal-container.onboarding.feature
[:div.modal-left
[:img {:src "images/features/smart-inputs.gif" :border "0" :alt "Smart inputs"}]]
[:div.modal-right
[:div.modal-title
[:h2 "Smart inputs"]]
[:div.modal-content
[:p "Now you can have more precision in your designs with basic math operations in inputs."]
[:p "It's easier to specify by how much you want to change a value and work with measures and distances."]]
[:div.modal-navigation
[:button.btn-secondary {:on-click finish} "Start!"]
[:& navigation-bullets
{:slide @slide
:navigate navigate
:total 3}]]]]]])))

2407
frontend/translations/de.po Normal file

File diff suppressed because it is too large Load diff