mirror of
https://github.com/penpot/penpot.git
synced 2026-06-01 21:20:18 +00:00
🔧 Add small adjustments and spanish translation
This commit is contained in:
parent
0efebc5e0e
commit
05cceab768
@ -1818,8 +1818,6 @@ test("User disables the current set but token still have resolved values shown i
|
||||
});
|
||||
|
||||
test.describe("User can't create groups that clash with token names", () => {
|
||||
const unknownError = "Unknown error";
|
||||
|
||||
const changeSetInput = async (sidebar, setName, finalKey = "Enter") => {
|
||||
const setInput = sidebar.locator("input:focus");
|
||||
await expect(setInput).toBeVisible();
|
||||
@ -1860,7 +1858,7 @@ test.describe("User can't create groups that clash with token names", () => {
|
||||
|
||||
// Check that the value has an error
|
||||
const errorNode =
|
||||
tokensUpdateCreateModal.getByText(unknownError);
|
||||
tokensUpdateCreateModal.getByText(`Group name of ${name} conflicts with a token of the same name in another active set.`);
|
||||
|
||||
await expect(errorNode).toBeVisible();
|
||||
|
||||
@ -2037,7 +2035,7 @@ test("User can't create Text Decoration token with group name that clashes with
|
||||
|
||||
await createSet(tokenThemesSetsSidebar, "Second set");
|
||||
|
||||
await createBadToken(page, "Text Decoration", "td1.bad", "Value", "underline");
|
||||
await createBadToken(page, "Text Decoration", "dec1.bad", "Value", "strike-through");
|
||||
});
|
||||
|
||||
test("User can't create Typography token with group name that clashes with existing token", async ({ page }) => {
|
||||
@ -2103,7 +2101,7 @@ test("User can't create Text Decoration token with group name that clashes with
|
||||
name: "Save",
|
||||
});
|
||||
|
||||
const errorNode = tokensUpdateCreateModal.getByText(unknownError);
|
||||
const errorNode = tokensUpdateCreateModal.getByText("Group name of typ1.bad conflicts with a token of the same name in another active set.");
|
||||
await expect(errorNode).toHaveCount(6);
|
||||
await expect(submitButton).toBeDisabled();
|
||||
});
|
||||
@ -2161,8 +2159,8 @@ test("User can't create Text Decoration token with group name that clashes with
|
||||
name: "Save",
|
||||
});
|
||||
|
||||
const errorNode = tokensUpdateCreateModal.getByText(unknownError);
|
||||
await expect(errorNode).toHaveCount(4);
|
||||
const errorNode = tokensUpdateCreateModal.getByText("Group name of sha1.bad conflicts with a token of the same name in another active set.");
|
||||
await expect(errorNode).toHaveCount(5);
|
||||
await expect(submitButton).toBeDisabled();
|
||||
});
|
||||
});
|
||||
|
||||
@ -566,16 +566,15 @@
|
||||
matching the expected behaviour in the issue. Resolved tokens are
|
||||
left untouched."
|
||||
[tokens resolved]
|
||||
(let [resolved-names (set (keys resolved))
|
||||
dropped (->> tokens
|
||||
(remove (fn [[k _]] (contains? resolved-names k)))
|
||||
(map (fn [[k token]]
|
||||
[k (assoc token
|
||||
:errors
|
||||
[(wte/error-with-value
|
||||
:error.token/name-collision
|
||||
(:name token))])]))
|
||||
(into {}))]
|
||||
(let [dropped (->> tokens
|
||||
(remove (fn [[k _]] (contains? resolved k)))
|
||||
(map (fn [[k token]]
|
||||
[k (assoc token
|
||||
:errors
|
||||
[(wte/error-with-value
|
||||
:error.token/name-collision
|
||||
(:name token))])]))
|
||||
(into {}))]
|
||||
(merge resolved dropped)))
|
||||
|
||||
(defn resolve-tokens
|
||||
|
||||
@ -8610,7 +8610,7 @@ msgstr "Invalid token value. The resolved value is too large: %s"
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:60
|
||||
msgid "errors.tokens.name-collision"
|
||||
msgstr "Token name %s conflicts with a token group of the same name in another active set."
|
||||
msgstr "Group name of %s conflicts with a token of the same name in another active set."
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:73, src/app/main/data/workspace/tokens/warnings.cljs:15
|
||||
msgid "errors.tokens.opacity-range"
|
||||
|
||||
@ -8371,6 +8371,10 @@ msgstr "%s sets activos"
|
||||
msgid "errors.tokens.number-too-large"
|
||||
msgstr "Valor de token no valido. El valor resuelto es muy grande: %s"
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:60
|
||||
msgid "errors.tokens.name-collision"
|
||||
msgstr "El grupo de %s colisiona con un token del mismo nombre en otro set activo."
|
||||
|
||||
#: src/app/main/data/workspace/tokens/errors.cljs:73, src/app/main/data/workspace/tokens/warnings.cljs:15
|
||||
msgid "errors.tokens.opacity-range"
|
||||
msgstr "La opacidad debe estar entre 0 y 100% o 0 y 1 (p.e. 50% o 0.5)."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user