From 239b4e1068898c2eba552de1a2e0f40fdce8f054 Mon Sep 17 00:00:00 2001 From: rgantzos <86856959+rgantzos@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:07:06 -0700 Subject: [PATCH] Localize `rotate-gradient` --- feature-locales/rotate-gradient/en.json | 3 +++ features/rotate-gradient/script.js | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 feature-locales/rotate-gradient/en.json diff --git a/feature-locales/rotate-gradient/en.json b/feature-locales/rotate-gradient/en.json new file mode 100644 index 00000000..b0da93e8 --- /dev/null +++ b/feature-locales/rotate-gradient/en.json @@ -0,0 +1,3 @@ +{ + "direction": "Direction" +} diff --git a/features/rotate-gradient/script.js b/features/rotate-gradient/script.js index 71f1a01d..edd0c772 100644 --- a/features/rotate-gradient/script.js +++ b/features/rotate-gradient/script.js @@ -21,11 +21,11 @@ export default async function ({ feature, console }) { let name = document.createElement("span"); name.className = "color-picker_label-name_17igY"; - name.textContent = "Direction"; + name.textContent = feature.msg("direction"); let value = document.createElement("span"); value.className = "color-picker_label-readout_9vjb2"; - value.textContent = "0deg"; + value.textContent = "0"; data.appendChild(name); data.appendChild(value); @@ -150,7 +150,7 @@ export default async function ({ feature, console }) { lastRotation = Math.floor((newLeft / 124) * 360) value.textContent = - Math.floor((newLeft / 124) * 360).toString() + "deg"; + Math.floor((newLeft / 124) * 360).toString() handle.style.left = newLeft + "px"; } @@ -183,7 +183,7 @@ export default async function ({ feature, console }) { lastRotation = Math.floor((newLeft / 124) * 360) value.textContent = - Math.floor((newLeft / 124) * 360).toString() + "deg"; + Math.floor((newLeft / 124) * 360).toString() handle.style.left = newLeft + "px"; }