From 705f6df10a6ce7cbc50e8c4cd2750baa0e67f098 Mon Sep 17 00:00:00 2001 From: LASER-Yi Date: Sun, 27 Mar 2022 16:05:01 +0800 Subject: [PATCH] no log: Cleanup imports --- .../modals/subtitle-tools/ColorTool.tsx | 2 +- .../modals/subtitle-tools/Translation.tsx | 2 +- .../components/modals/subtitle-tools/tools.ts | 177 ++++++++++++++++++ frontend/src/components/modals/toolOptions.ts | 177 ------------------ 4 files changed, 179 insertions(+), 179 deletions(-) delete mode 100644 frontend/src/components/modals/toolOptions.ts diff --git a/frontend/src/components/modals/subtitle-tools/ColorTool.tsx b/frontend/src/components/modals/subtitle-tools/ColorTool.tsx index b5ae20acc..f110164d4 100644 --- a/frontend/src/components/modals/subtitle-tools/ColorTool.tsx +++ b/frontend/src/components/modals/subtitle-tools/ColorTool.tsx @@ -3,8 +3,8 @@ import { useModal, withModal } from "@/modules/modals"; import { submodProcessColor } from "@/utilities"; import { FunctionComponent, useCallback, useState } from "react"; import { Button } from "react-bootstrap"; -import { colorOptions } from "../toolOptions"; import { useProcess } from "./ToolContext"; +import { colorOptions } from "./tools"; const ColorTool: FunctionComponent = () => { const [selection, setSelection] = useState>(null); diff --git a/frontend/src/components/modals/subtitle-tools/Translation.tsx b/frontend/src/components/modals/subtitle-tools/Translation.tsx index 5f87c3121..f759f5c29 100644 --- a/frontend/src/components/modals/subtitle-tools/Translation.tsx +++ b/frontend/src/components/modals/subtitle-tools/Translation.tsx @@ -3,8 +3,8 @@ import { useModal, withModal } from "@/modules/modals"; import { useEnabledLanguages } from "@/utilities/languages"; import { FunctionComponent, useCallback, useMemo, useState } from "react"; import { Button, Form } from "react-bootstrap"; -import { availableTranslation } from "../toolOptions"; import { useProcess } from "./ToolContext"; +import { availableTranslation } from "./tools"; const TranslationTool: FunctionComponent = () => { const { data: languages } = useEnabledLanguages(); diff --git a/frontend/src/components/modals/subtitle-tools/tools.ts b/frontend/src/components/modals/subtitle-tools/tools.ts index 4310e9791..3b2e86719 100644 --- a/frontend/src/components/modals/subtitle-tools/tools.ts +++ b/frontend/src/components/modals/subtitle-tools/tools.ts @@ -1,3 +1,4 @@ +import { SelectorOption } from "@/components"; import { faClock, faCode, @@ -78,3 +79,179 @@ export const tools: ToolOptions[] = [ modal: Translation, }, ]; + +export const availableTranslation = { + af: "afrikaans", + sq: "albanian", + am: "amharic", + ar: "arabic", + hy: "armenian", + az: "azerbaijani", + eu: "basque", + be: "belarusian", + bn: "bengali", + bs: "bosnian", + bg: "bulgarian", + ca: "catalan", + ceb: "cebuano", + ny: "chichewa", + zh: "chinese (simplified)", + zt: "chinese (traditional)", + co: "corsican", + hr: "croatian", + cs: "czech", + da: "danish", + nl: "dutch", + en: "english", + eo: "esperanto", + et: "estonian", + tl: "filipino", + fi: "finnish", + fr: "french", + fy: "frisian", + gl: "galician", + ka: "georgian", + de: "german", + el: "greek", + gu: "gujarati", + ht: "haitian creole", + ha: "hausa", + haw: "hawaiian", + iw: "hebrew", + hi: "hindi", + hmn: "hmong", + hu: "hungarian", + is: "icelandic", + ig: "igbo", + id: "indonesian", + ga: "irish", + it: "italian", + ja: "japanese", + jw: "javanese", + kn: "kannada", + kk: "kazakh", + km: "khmer", + ko: "korean", + ku: "kurdish (kurmanji)", + ky: "kyrgyz", + lo: "lao", + la: "latin", + lv: "latvian", + lt: "lithuanian", + lb: "luxembourgish", + mk: "macedonian", + mg: "malagasy", + ms: "malay", + ml: "malayalam", + mt: "maltese", + mi: "maori", + mr: "marathi", + mn: "mongolian", + my: "myanmar (burmese)", + ne: "nepali", + no: "norwegian", + ps: "pashto", + fa: "persian", + pl: "polish", + pt: "portuguese", + pa: "punjabi", + ro: "romanian", + ru: "russian", + sm: "samoan", + gd: "scots gaelic", + sr: "serbian", + st: "sesotho", + sn: "shona", + sd: "sindhi", + si: "sinhala", + sk: "slovak", + sl: "slovenian", + so: "somali", + es: "spanish", + su: "sundanese", + sw: "swahili", + sv: "swedish", + tg: "tajik", + ta: "tamil", + te: "telugu", + th: "thai", + tr: "turkish", + uk: "ukrainian", + ur: "urdu", + uz: "uzbek", + vi: "vietnamese", + cy: "welsh", + xh: "xhosa", + yi: "yiddish", + yo: "yoruba", + zu: "zulu", + fil: "Filipino", + he: "Hebrew", +}; + +export const colorOptions: SelectorOption[] = [ + { + label: "White", + value: "white", + }, + { + label: "Light Gray", + value: "light-gray", + }, + { + label: "Red", + value: "red", + }, + { + label: "Green", + value: "green", + }, + { + label: "Yellow", + value: "yellow", + }, + { + label: "Blue", + value: "blue", + }, + { + label: "Magenta", + value: "magenta", + }, + { + label: "Cyan", + value: "cyan", + }, + { + label: "Black", + value: "black", + }, + { + label: "Dark Red", + value: "dark-red", + }, + { + label: "Dark Green", + value: "dark-green", + }, + { + label: "Dark Yellow", + value: "dark-yellow", + }, + { + label: "Dark Blue", + value: "dark-blue", + }, + { + label: "Dark Magenta", + value: "dark-magenta", + }, + { + label: "Dark Cyan", + value: "dark-cyan", + }, + { + label: "Dark Grey", + value: "dark-grey", + }, +]; diff --git a/frontend/src/components/modals/toolOptions.ts b/frontend/src/components/modals/toolOptions.ts deleted file mode 100644 index 6acee1a6a..000000000 --- a/frontend/src/components/modals/toolOptions.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { SelectorOption } from ".."; - -export const availableTranslation = { - af: "afrikaans", - sq: "albanian", - am: "amharic", - ar: "arabic", - hy: "armenian", - az: "azerbaijani", - eu: "basque", - be: "belarusian", - bn: "bengali", - bs: "bosnian", - bg: "bulgarian", - ca: "catalan", - ceb: "cebuano", - ny: "chichewa", - zh: "chinese (simplified)", - zt: "chinese (traditional)", - co: "corsican", - hr: "croatian", - cs: "czech", - da: "danish", - nl: "dutch", - en: "english", - eo: "esperanto", - et: "estonian", - tl: "filipino", - fi: "finnish", - fr: "french", - fy: "frisian", - gl: "galician", - ka: "georgian", - de: "german", - el: "greek", - gu: "gujarati", - ht: "haitian creole", - ha: "hausa", - haw: "hawaiian", - iw: "hebrew", - hi: "hindi", - hmn: "hmong", - hu: "hungarian", - is: "icelandic", - ig: "igbo", - id: "indonesian", - ga: "irish", - it: "italian", - ja: "japanese", - jw: "javanese", - kn: "kannada", - kk: "kazakh", - km: "khmer", - ko: "korean", - ku: "kurdish (kurmanji)", - ky: "kyrgyz", - lo: "lao", - la: "latin", - lv: "latvian", - lt: "lithuanian", - lb: "luxembourgish", - mk: "macedonian", - mg: "malagasy", - ms: "malay", - ml: "malayalam", - mt: "maltese", - mi: "maori", - mr: "marathi", - mn: "mongolian", - my: "myanmar (burmese)", - ne: "nepali", - no: "norwegian", - ps: "pashto", - fa: "persian", - pl: "polish", - pt: "portuguese", - pa: "punjabi", - ro: "romanian", - ru: "russian", - sm: "samoan", - gd: "scots gaelic", - sr: "serbian", - st: "sesotho", - sn: "shona", - sd: "sindhi", - si: "sinhala", - sk: "slovak", - sl: "slovenian", - so: "somali", - es: "spanish", - su: "sundanese", - sw: "swahili", - sv: "swedish", - tg: "tajik", - ta: "tamil", - te: "telugu", - th: "thai", - tr: "turkish", - uk: "ukrainian", - ur: "urdu", - uz: "uzbek", - vi: "vietnamese", - cy: "welsh", - xh: "xhosa", - yi: "yiddish", - yo: "yoruba", - zu: "zulu", - fil: "Filipino", - he: "Hebrew", -}; - -export const colorOptions: SelectorOption[] = [ - { - label: "White", - value: "white", - }, - { - label: "Light Gray", - value: "light-gray", - }, - { - label: "Red", - value: "red", - }, - { - label: "Green", - value: "green", - }, - { - label: "Yellow", - value: "yellow", - }, - { - label: "Blue", - value: "blue", - }, - { - label: "Magenta", - value: "magenta", - }, - { - label: "Cyan", - value: "cyan", - }, - { - label: "Black", - value: "black", - }, - { - label: "Dark Red", - value: "dark-red", - }, - { - label: "Dark Green", - value: "dark-green", - }, - { - label: "Dark Yellow", - value: "dark-yellow", - }, - { - label: "Dark Blue", - value: "dark-blue", - }, - { - label: "Dark Magenta", - value: "dark-magenta", - }, - { - label: "Dark Cyan", - value: "dark-cyan", - }, - { - label: "Dark Grey", - value: "dark-grey", - }, -];