mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 16:21:57 -05:00
🌐 More i18n updates
This commit is contained in:
parent
a0ee33b63d
commit
2db5b0f60f
9 changed files with 84 additions and 57 deletions
|
@ -92,7 +92,7 @@
|
|||
(defrecord CreateCollection [id]
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [item {:name (str "Unnamed Collection (" (gensym "c") ")")
|
||||
(let [item {:name (tr "ds.default-library-title" (gensym "c"))
|
||||
:id id
|
||||
:created-at (dt/now)
|
||||
:type :own
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
(defrecord CreateCollection []
|
||||
ptk/WatchEvent
|
||||
(watch [_ state s]
|
||||
(let [name (str "Unnamed Collection (" (gensym "c") ")")
|
||||
(let [name (tr "ds.default-library-title" (gensym "c"))
|
||||
coll {:name name}]
|
||||
(->> (rp/req :create/icon-collection coll)
|
||||
(rx/map :payload)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
[potok.core :as ptk]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.repo :as rp]
|
||||
[uxbox.util.i18n :refer [tr]]
|
||||
[uxbox.util.data :refer (jscoll->vec)]
|
||||
[uxbox.util.uuid :as uuid]
|
||||
[uxbox.util.time :as ts]
|
||||
|
@ -146,7 +147,7 @@
|
|||
(defrecord CreateCollection []
|
||||
ptk/WatchEvent
|
||||
(watch [_ state s]
|
||||
(let [coll {:name (str "Unnamed Collection (" (gensym "c") ")")
|
||||
(let [coll {:name (tr "ds.default-library-title" (gensym "c"))
|
||||
:id (uuid/random)}]
|
||||
(->> (rp/req :create/image-collection coll)
|
||||
(rx/map :payload)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
ptk/WatchEvent
|
||||
(watch [_ state s]
|
||||
(rx/of (profile-fetched data)
|
||||
(uum/info (tr "settings.profile-saved")))))
|
||||
(uum/info (tr "settings.profile.profile-saved")))))
|
||||
|
||||
(defn profile-updated
|
||||
[data]
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
"ds.library-title" "Library: "
|
||||
"ds.standard-title" "STANDARD"
|
||||
"ds.your-libraries-title" "YOUR LIBRARIES"
|
||||
"ds.default-library-title" "Unnamed Collection (%s)"
|
||||
|
||||
"ds.recent-colors" "Recent colors"
|
||||
"ds.element-options" "Element options"
|
||||
|
@ -115,21 +116,31 @@
|
|||
"settings.profile" "PROFILE"
|
||||
"settings.password" "PASSWORD"
|
||||
"settings.notifications" "NOTIFICATIONS"
|
||||
"settings.profile-saved" "Profile saved successfully!"
|
||||
"settings.name-username-email" "Name, username and email"
|
||||
"settings.your-name" "Your name"
|
||||
"settings.your-username" "Your username"
|
||||
"settings.your-email" "Your email"
|
||||
"settings.light-theme" "Light theme"
|
||||
"settings.dark-theme" "Dark theme"
|
||||
"settings.high-contrast-theme" "High-contrast theme"
|
||||
"settings.your-avatar" "Your avatar"
|
||||
"settings.password-saved" "Password saved successfully!"
|
||||
"settings.wrong-old-password" "Wrong old password"
|
||||
"settings.change-password" "Change password"
|
||||
"settings.old-password" "Old password"
|
||||
"settings.new-password" "New password"
|
||||
"settings.confirm-password" "Confirm password"
|
||||
|
||||
"settings.profile.profile-saved" "Profile saved successfully!"
|
||||
"settings.profile.profile.profile-saved" "Name, username and email"
|
||||
"settings.profile.your-name" "Your name"
|
||||
"settings.profile.your-username" "Your username"
|
||||
"settings.profile.your-email" "Your email"
|
||||
"settings.profile.light-theme" "Light theme"
|
||||
"settings.profile.dark-theme" "Dark theme"
|
||||
"settings.profile.high-contrast-theme" "High-contrast theme"
|
||||
"settings.profile.your-avatar" "Your avatar"
|
||||
|
||||
"settings.password.password-saved" "Password saved successfully!"
|
||||
"settings.password.wrong-old-password" "Wrong old password"
|
||||
"settings.password.change-password" "Change password"
|
||||
"settings.password.old-password" "Old password"
|
||||
"settings.password.new-password" "New password"
|
||||
"settings.password.confirm-password" "Confirm password"
|
||||
|
||||
"settings.notifications.notifications-saved" "Notifications preferences saved successfully!"
|
||||
"settings.notifications.prototype-notifications" "Prototype notifications"
|
||||
"settings.notifications.description" "Get a roll up of prototype changes in your inbox."
|
||||
"settings.notifications.none" "None"
|
||||
"settings.notifications.every-hour" "Every hour"
|
||||
"settings.notifications.every-day" "Every day"
|
||||
|
||||
"settings.update-settings" "Update settings"
|
||||
|
||||
"history.alert-message" "You are seeing version %s"
|
||||
|
|
|
@ -53,22 +53,23 @@
|
|||
"ds.your-images-title" "VOS IMAGES"
|
||||
"ds.store-images-title" "BOUTIQUE"
|
||||
"ds.images-collection.new" "+ Nouvelle librairie"
|
||||
"ds.image-new" "+ New image"
|
||||
"ds.image-new" "+ Nouvelle image"
|
||||
|
||||
"ds.colors" "COULEURS"
|
||||
"ds.num-colors" ["Nb couleurs"
|
||||
"%s couleur"
|
||||
"%s couleurs"]
|
||||
"ds.your-colors-title" "YOUR COLORS"
|
||||
"ds.your-colors-title" "VOS COULEURS"
|
||||
"ds.store-colors-title" "BOUTIQUE"
|
||||
"ds.colors-collection.new" "+ Nouvelle librairie"
|
||||
"ds.color-new" "+ Nouvelle color"
|
||||
"ds.color-new" "+ Nouvelle couleur"
|
||||
"ds.color-lightbox.title" "Nouvelle couleur"
|
||||
"ds.color-lightbox.add" "+ Ajouter couleur"
|
||||
|
||||
"ds.library-title" "Librairie : "
|
||||
"ds.standard-title" "STANDARD"
|
||||
"ds.your-libraries-title" "VOS LIBRAIRIES"
|
||||
"ds.default-library-title" "Collection sans nom (%s)"
|
||||
|
||||
"ds.recent-colors" "Couleurs récentes"
|
||||
"ds.element-options" "Options d'élément"
|
||||
|
@ -115,21 +116,31 @@
|
|||
"settings.profile" "PROFIL"
|
||||
"settings.password" "MOT DE PASSE"
|
||||
"settings.notifications" "NOTIFICATIONS"
|
||||
"settings.profile-saved" "Profil enregistré avec succès !"
|
||||
"settings.name-username-email" "Nom, nom d'utilisateur et adresse email"
|
||||
"settings.your-name" "Votre nom complet"
|
||||
"settings.your-username" "Votre nom d'utilisateur"
|
||||
"settings.your-email" "Votre adresse email"
|
||||
"settings.light-theme" "Thème Jour"
|
||||
"settings.dark-theme" "Thème Nuit"
|
||||
"settings.high-contrast-theme" "Thème Contraste élevé"
|
||||
"settings.your-avatar" "Votre avatar"
|
||||
"settings.password-saved" "Mot de passe enregistré avec succès !"
|
||||
"settings.wrong-old-password" "Ancien mot de passe incorrect"
|
||||
"settings.change-password" "Changement de mot de passe"
|
||||
"settings.old-password" "Ancien mot de passe"
|
||||
"settings.new-password" "Nouveau mot de passe"
|
||||
"settings.confirm-password" "Confirmez mot de passe"
|
||||
|
||||
"settings.profile.profile-saved" "Profil enregistré avec succès !"
|
||||
"settings.profile.profile.profile-saved" "Nom, nom d'utilisateur et adresse email"
|
||||
"settings.profile.your-name" "Votre nom complet"
|
||||
"settings.profile.your-username" "Votre nom d'utilisateur"
|
||||
"settings.profile.your-email" "Votre adresse email"
|
||||
"settings.profile.light-theme" "Thème Jour"
|
||||
"settings.profile.dark-theme" "Thème Nuit"
|
||||
"settings.profile.high-contrast-theme" "Thème Contraste élevé"
|
||||
"settings.profile.your-avatar" "Votre avatar"
|
||||
|
||||
"settings.password.password-saved" "Mot de passe enregistré avec succès !"
|
||||
"settings.password.wrong-old-password" "Ancien mot de passe incorrect"
|
||||
"settings.password.change-password" "Changement de mot de passe"
|
||||
"settings.password.old-password" "Ancien mot de passe"
|
||||
"settings.password.new-password" "Nouveau mot de passe"
|
||||
"settings.password.confirm-password" "Confirmez mot de passe"
|
||||
|
||||
"settings.notifications.notifications-saved" "Préférences de notifications enregistrées avec succès !"
|
||||
"settings.notifications.prototype-notifications" "Notifications de prototypage"
|
||||
"settings.notifications.description" "Obtenez un résumé des modifications apportées aux prototypes à votre adresse email."
|
||||
"settings.notifications.none" "Aucune"
|
||||
"settings.notifications.every-hour" "Chaque heure"
|
||||
"settings.notifications.every-day" "Chaque jour"
|
||||
|
||||
"settings.update-settings" "Mettre à jour les paramètres"
|
||||
|
||||
"history.alert-message" "Vous voyez la version %s"
|
||||
|
|
|
@ -24,25 +24,29 @@
|
|||
(header)
|
||||
[:section.dashboard-content.user-settings
|
||||
[:section.user-settings-content
|
||||
[:span.user-settings-label "Prototype notifications"]
|
||||
[:p "Get a roll up of prototype changes in your inbox."]
|
||||
[:span.user-settings-label (tr "settings.notifications.none")]
|
||||
[:p (tr "settings.notifications.description")]
|
||||
[:div.input-radio.radio-primary
|
||||
[:input {:type "radio"
|
||||
:id "notification-1"
|
||||
:name "notification"
|
||||
:value "none"}]
|
||||
[:label {:for "notification-1"
|
||||
:value "None"} "None"]
|
||||
:value (tr "settings.notifications.none")} (tr "settings.notifications.none")]
|
||||
[:input {:type "radio"
|
||||
:id "notification-2"
|
||||
:name "notification"
|
||||
:value "every-hour"}]
|
||||
[:label {:for "notification-2"
|
||||
:value "Every hour"} "Every hour"]
|
||||
:value (tr "settings.notifications.every-hour")} (tr "settings.notifications.every-hour")]
|
||||
[:input {:type "radio"
|
||||
:id "notification-3"
|
||||
:name "notification"
|
||||
:value "every-day"}]
|
||||
[:label {:for "notification-3" :value "Every day"} "Every day"]]
|
||||
[:input.btn-primary {:type "submit" :value "Update settings"}]
|
||||
[:label {:for "notification-3"
|
||||
:value (tr "settings.notifications.every-day")} (tr "settings.notifications.every-day")]]
|
||||
[:input.btn-primary {:type "submit"
|
||||
:class "btn-disabled"
|
||||
:disabled true
|
||||
:value (tr "settings.update-settings")}]
|
||||
]]])
|
||||
|
|
|
@ -49,11 +49,11 @@
|
|||
(let [value (dom/event->value event)]
|
||||
(st/emit! (assoc-value field value))))
|
||||
(on-success []
|
||||
(st/emit! (um/info (tr "settings.password-saved"))))
|
||||
(st/emit! (um/info (tr "settings.password.password-saved"))))
|
||||
(on-error [{:keys [code] :as payload}]
|
||||
(case code
|
||||
:uxbox.services.users/old-password-not-match
|
||||
(st/emit! (assoc-error :password-old (tr "settings.wrong-old-password")))
|
||||
(st/emit! (assoc-error :password-old (tr "settings.password.wrong-old-password")))
|
||||
|
||||
:else
|
||||
(throw (ex-info "unexpected" {:error payload}))))
|
||||
|
@ -62,27 +62,27 @@
|
|||
:on-success on-success
|
||||
:on-error on-error)))]
|
||||
[:form.password-form
|
||||
[:span.user-settings-label (tr "settings.change-password")]
|
||||
[:span.user-settings-label (tr "settings.password.change-password")]
|
||||
[:input.input-text
|
||||
{:type "password"
|
||||
:class (fm/error-class errors :password-old)
|
||||
:value (:password-old data "")
|
||||
:on-change (partial on-change :password-old)
|
||||
:placeholder (tr "settings.old-password")}]
|
||||
:placeholder (tr "settings.password.old-password")}]
|
||||
(fm/input-error errors :password-old)
|
||||
[:input.input-text
|
||||
{:type "password"
|
||||
:class (fm/error-class errors :password-1)
|
||||
:value (:password-1 data "")
|
||||
:on-change (partial on-change :password-1)
|
||||
:placeholder (tr "settings.new-password")}]
|
||||
:placeholder (tr "settings.password.new-password")}]
|
||||
(fm/input-error errors :password-1)
|
||||
[:input.input-text
|
||||
{:type "password"
|
||||
:class (fm/error-class errors :password-2)
|
||||
:value (:password-2 data "")
|
||||
:on-change (partial on-change :password-2)
|
||||
:placeholder (tr "settings.confirm-password")}]
|
||||
:placeholder (tr "settings.password.confirm-password")}]
|
||||
(fm/input-error errors :password-2)
|
||||
[:input.btn-primary
|
||||
{:type "button"
|
||||
|
|
|
@ -71,24 +71,24 @@
|
|||
(on-submit [event]
|
||||
(st/emit! (udu/update-profile data on-success on-error)))]
|
||||
[:form.profile-form
|
||||
[:span.user-settings-label (tr "settings.name-username-email")]
|
||||
[:span.user-settings-label (tr "settings.profile.profile.profile-saved")]
|
||||
[:input.input-text
|
||||
{:type "text"
|
||||
:on-change (partial on-change :fullname)
|
||||
:value (:fullname data "")
|
||||
:placeholder (tr "settings.your-name")}]
|
||||
:placeholder (tr "settings.profile.your-name")}]
|
||||
[:input.input-text
|
||||
{:type "text"
|
||||
:on-change (partial on-change :username)
|
||||
:value (:username data "")
|
||||
:placeholder (tr "settings.your-username")}]
|
||||
:placeholder (tr "settings.profile.your-username")}]
|
||||
(fm/input-error errors :username)
|
||||
|
||||
[:input.input-text
|
||||
{:type "email"
|
||||
:on-change (partial on-change :email)
|
||||
:value (:email data "")
|
||||
:placeholder (tr "settings.your-email")}]
|
||||
:placeholder (tr "settings.profile.your-email")}]
|
||||
(fm/input-error errors :email)
|
||||
|
||||
#_[:span.user-settings-label (tr "settings.choose-color-theme")]
|
||||
|
@ -99,7 +99,7 @@
|
|||
:id "light-theme"
|
||||
:name "theme"
|
||||
:value "light"}]
|
||||
[:label {:for "light-theme"} (tr "settings.light-theme")]
|
||||
[:label {:for "light-theme"} (tr "settings.profile.light-theme")]
|
||||
|
||||
[:input {:type "radio"
|
||||
:checked (when (= theme "dark") "checked")
|
||||
|
@ -107,7 +107,7 @@
|
|||
:id "dark-theme"
|
||||
:name "theme"
|
||||
:value "dark"}]
|
||||
[:label {:for "dark-theme"} (tr "settings.dark-theme")]
|
||||
[:label {:for "dark-theme"} (tr "settings.profile.dark-theme")]
|
||||
|
||||
[:input {:type "radio"
|
||||
:checked (when (= theme "high-contrast") "checked")
|
||||
|
@ -115,7 +115,7 @@
|
|||
:id "high-contrast-theme"
|
||||
:name "theme"
|
||||
:value "high-contrast"}]
|
||||
[:label {:for "high-contrast-theme"} (tr "settings.high-contrast-theme")]]
|
||||
[:label {:for "high-contrast-theme"} (tr "settings.profile.high-contrast-theme")]]
|
||||
|
||||
[:input.btn-primary
|
||||
{:type "button"
|
||||
|
@ -156,6 +156,6 @@
|
|||
(header)
|
||||
[:section.dashboard-content.user-settings
|
||||
[:section.user-settings-content
|
||||
[:span.user-settings-label (tr "settings.your-avatar")]
|
||||
[:span.user-settings-label (tr "settings.profile.your-avatar")]
|
||||
(profile-photo-form)
|
||||
(profile-form)]]])
|
||||
|
|
Loading…
Add table
Reference in a new issue