You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/frontend/src/components/modals/subtitle-tools/tools.ts

258 lines
4.1 KiB

import { SelectorOption } from "@/components";
import {
faClock,
faCode,
faDeaf,
faExchangeAlt,
faFilm,
faImage,
faLanguage,
faMagic,
faPaintBrush,
faPlay,
faTextHeight,
} from "@fortawesome/free-solid-svg-icons";
import ColorTool from "./ColorTool";
import FrameRateTool from "./FrameRateTool";
import TimeTool from "./TimeTool";
import Translation from "./Translation";
import { ToolOptions } from "./types";
export const tools: ToolOptions[] = [
{
key: "sync",
icon: faPlay,
name: "Sync",
},
{
key: "remove_HI",
icon: faDeaf,
name: "Remove HI Tags",
},
{
key: "remove_tags",
icon: faCode,
name: "Remove Style Tags",
},
{
key: "OCR_fixes",
icon: faImage,
name: "OCR Fixes",
},
{
key: "common",
icon: faMagic,
name: "Common Fixes",
},
{
key: "fix_uppercase",
icon: faTextHeight,
name: "Fix Uppercase",
},
{
key: "reverse_rtl",
icon: faExchangeAlt,
name: "Reverse RTL",
},
{
key: "add_color",
icon: faPaintBrush,
name: "Add Color",
modal: ColorTool,
},
{
key: "change_frame_rate",
icon: faFilm,
name: "Change Frame Rate",
modal: FrameRateTool,
},
{
key: "adjust_time",
icon: faClock,
name: "Adjust Times",
modal: TimeTool,
},
{
key: "translation",
icon: faLanguage,
name: "Translate",
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<string>[] = [
{
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",
},
];