Skip to content

Commit 036ddc8

Browse files
authored
ci: fix update locales action (#262)
* ci: fix update locales action This commit fixes the update locales action by making it compatible with the new ESM format. * chore: apply prettier
1 parent 6a7150a commit 036ddc8

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/update_supported_locals.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: "18"
19+
node-version: "20"
2020

2121
- name: Install dependencies
2222
run: npm ci

scripts/update_locales.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* and create a pull request if there are new languages.
44
*/
55

6-
const fs = require("fs/promises");
6+
import fs from "fs/promises";
77

88
const run = async () => {
99
console.log("Get current locales...");

src/components/ThemeSwitch/ThemeSwitch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const ThemeSwitch = styled(Switch)(({ theme }) => ({
2020
transform: "translateX(22px)",
2121
"& .MuiSwitch-thumb:before": {
2222
backgroundImage: `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 20 20"><path fill="${encodeURIComponent(
23-
"#fff"
23+
"#fff",
2424
)}" d="M4.2 2.5l-.7 1.8-1.8.7 1.8.7.7 1.8.6-1.8L6.7 5l-1.9-.7-.6-1.8zm15 8.3a6.7 6.7 0 11-6.6-6.6 5.8 5.8 0 006.6 6.6z"/></svg>')`,
2525
},
2626
"& + .MuiSwitch-track": {
@@ -43,7 +43,7 @@ export const ThemeSwitch = styled(Switch)(({ theme }) => ({
4343
backgroundRepeat: "no-repeat",
4444
backgroundPosition: "center",
4545
backgroundImage: `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 20 20"><path fill="${encodeURIComponent(
46-
"#fff"
46+
"#fff",
4747
)}" d="M9.305 1.667V3.75h1.389V1.667h-1.39zm-4.707 1.95l-.982.982L5.09 6.072l.982-.982-1.473-1.473zm10.802 0L13.927 5.09l.982.982 1.473-1.473-.982-.982zM10 5.139a4.872 4.872 0 00-4.862 4.86A4.872 4.872 0 0010 14.862 4.872 4.872 0 0014.86 10 4.872 4.872 0 0010 5.139zm0 1.389A3.462 3.462 0 0113.471 10a3.462 3.462 0 01-3.473 3.472A3.462 3.462 0 016.527 10 3.462 3.462 0 0110 6.528zM1.665 9.305v1.39h2.083v-1.39H1.666zm14.583 0v1.39h2.084v-1.39h-2.084zM5.09 13.928L3.616 15.4l.982.982 1.473-1.473-.982-.982zm9.82 0l-.982.982 1.473 1.473.982-.982-1.473-1.473zM9.305 16.25v2.083h1.389V16.25h-1.39z"/></svg>')`,
4848
},
4949
},

src/utils/getEmojiFlag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export function getEmojiFlag(
274274
VI: "🇻🇳",
275275
ZH: "🇨🇳",
276276
BE: "🇧🇾",
277-
}
277+
},
278278
) {
279279
const arr = countryCode.split("-");
280280
return countryFlagData[(arr[1] || arr[0]).toUpperCase()] || fallback;

src/utils/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const unifiedToUnicodeEmoji = (unified: string) => {
1111
if (!unified) return "";
1212

1313
return String.fromCodePoint(
14-
...unified.split("-").map((str: string) => parseInt(str, 16))
14+
...unified.split("-").map((str: string) => parseInt(str, 16)),
1515
);
1616
};
1717

0 commit comments

Comments
 (0)