diff --git a/frontends/web/src/index.css b/frontends/web/src/index.css index 5eef55e1..d6a1fa77 100644 --- a/frontends/web/src/index.css +++ b/frontends/web/src/index.css @@ -127,3 +127,12 @@ h2.active { .btn-link:hover { color: #344854; } + +.rtl { + direction: rtl; + text-align: right; +} + +.ltr { + direction: ltr; +} diff --git a/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx b/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx index 803b768f..16ba4041 100644 --- a/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx +++ b/frontends/web/src/new_front/components/CreateSamples/CreateSamples/AnnotationInterfaces/Contexts/SelectMultipleTextMultipleTags.tsx @@ -14,6 +14,30 @@ import MultiSelect from "new_front/components/Lists/MultiSelect"; import generateLightRandomColor from "new_front/utils/helpers/functions/GenerateRandomLightColor"; +const RTLtexts = [ + "ara", + "ary", + "arz", + "ars", + "arb", + "aeb", + "aii", + "aze", + "azj", + "azb", + "div", + "heb", + "hbo", + "ckb", + "kur", + "kmr", + "sdh", + "nqo", + "fas", + "syc", + "urd", +]; + type MultipleTagsTypes = { preselectedTag?: string; }; @@ -62,6 +86,7 @@ const SelectMultipleTextMultipleTags: FC< const [contextId, setContextId] = useState(null); const [loading2, setLoading2] = useState(false); const [extraLabel, setExtraLabel] = useState({}); + const [rtl, setRTL] = useState(false); const submitButton: HTMLElement | null = document.getElementById("submit"); @@ -107,6 +132,7 @@ const SelectMultipleTextMultipleTags: FC< submitButton && (submitButton.hidden = false); setLoading2(true); setSelectionInfo([]); + setRTL(RTLtexts.includes(value as string)); fetch( `${process.env.REACT_APP_API_HOST_2}/context/get_random_context_from_key_value`, { @@ -306,7 +332,7 @@ const SelectMultipleTextMultipleTags: FC< /> -
+