mirror of
https://github.com/penpot/penpot.git
synced 2026-11-17 07:30:35 +00:00
- The Text section shows writing mode, orientation and Distribute when the text has a CJK profile. - A Language section picks the profile of the selected texts. Its options open in a view of their own, grouped in Selected text, Layout and Ruby. - A compact menu at the selected text opens readings, emphasis marks and other options of the selection. - File and Preferences menus and the account settings set the file and the default profiles. New texts take the last profile used, else the file one. The board size presets share the new grouped dropdown. Add English, Spanish and Japanese translations. AI-assisted-by: claude-opus-5-5
27 lines
1.1 KiB
Clojure
27 lines
1.1 KiB
Clojure
;; This Source Code Form is subject to the terms of the Mozilla Public
|
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
;;
|
|
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
|
|
|
(ns frontend-tests.ui.settings-text-language-test
|
|
(:require
|
|
["react-dom/server" :as rds]
|
|
[app.main.ui.hooks :as hooks]
|
|
[app.main.ui.settings.options :as options]
|
|
[cljs.test :as t :include-macros true]
|
|
[cuerdas.core :as str]
|
|
[rumext.v2 :as mf]))
|
|
|
|
(defn- render
|
|
[language]
|
|
(with-redefs [hooks/use-portal-container (fn ([] nil) ([_] nil))]
|
|
(rds/renderToStaticMarkup
|
|
(mf/element @#'options/text-language-settings* (mf/props {:language language})))))
|
|
|
|
(t/deftest profile-text-language-shows-the-chosen-language
|
|
(t/is (str/includes? (render nil) "dashboard.text-language.none"))
|
|
(t/is (str/includes? (render nil) "dashboard.text-language.label"))
|
|
(t/is (str/includes? (render "zh-Hant-TW") "workspace.options.text-options.language-chinese-taiwan"))
|
|
(t/is (str/includes? (render "ja") "workspace.options.text-options.language-japanese")))
|