[Update] Adjust localization and design.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import styles from "./WordFilter.module.scss";
|
||||
import { _Entry } from "../_atoms/_entry/_Entry";
|
||||
import { useState } from "react";
|
||||
@@ -5,6 +6,8 @@ import { useStore_IsOpenedMicWordFilterList } from "@store";
|
||||
import { useMicWordFilterList } from "@logics_configs";
|
||||
|
||||
export const WordFilter = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [input_value, setInputValue] = useState("");
|
||||
const { currentMicWordFilterList, updateMicWordFilterList, setMicWordFilterList } = useMicWordFilterList();
|
||||
const { currentIsOpenedMicWordFilterList, updateIsOpenedMicWordFilterList } = useStore_IsOpenedMicWordFilterList();
|
||||
@@ -82,7 +85,7 @@ export const WordFilter = () => {
|
||||
}
|
||||
<div className={styles.entry_section_wrapper}>
|
||||
<_Entry width="30rem" onChange={onChangeEntry} ui_variable={input_value}/>
|
||||
<button className={styles.add_button} onClick={addWords}>Add</button>
|
||||
<button className={styles.add_button} onClick={addWords}>{t("config_page.transcription.mic_word_filter.add_button_label")}</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -121,8 +124,6 @@ const WordFilterItem = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||
export const WordFilterListToggleComponent = (props) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -56,7 +56,10 @@ const CTranslate2WeightType_Box = () => {
|
||||
return (
|
||||
<>
|
||||
<DownloadModelsContainer
|
||||
label={t("config_page.translation.ctranslate2_weight_type.label")}
|
||||
label={t(
|
||||
"config_page.translation.ctranslate2_weight_type.label",
|
||||
{ctranslate2: "CTranslate2"}
|
||||
)}
|
||||
desc={t(
|
||||
"config_page.translation.ctranslate2_weight_type.desc",
|
||||
{translator: t("main_page.translator")}
|
||||
@@ -89,10 +92,13 @@ const CTranslation2ComputeDevice_Box = () => {
|
||||
|
||||
|
||||
const { currentComputeMode } = useComputeMode();
|
||||
const ctranslate2_compute_device_label = t("config_page.translation.ctranslate2_compute_device.label", {
|
||||
ctranslate2: "Ctranslate2"
|
||||
});
|
||||
if (currentComputeMode.data === "cpu") {
|
||||
return (
|
||||
<ComputeDeviceContainer
|
||||
label={t("config_page.translation.ctranslate2_compute_device.label")}
|
||||
label={ctranslate2_compute_device_label}
|
||||
selected_id={target_index}
|
||||
list={list_for_ui}
|
||||
selectFunction={selectFunction}
|
||||
@@ -104,8 +110,7 @@ const CTranslation2ComputeDevice_Box = () => {
|
||||
return (
|
||||
<DropdownMenuContainer
|
||||
dropdown_id="ctranslate2_compute_device"
|
||||
label={t("config_page.translation.ctranslate2_compute_device.label")}
|
||||
// desc={t("config_page.translation.ctranslate2_compute_device.label")}
|
||||
label={ctranslate2_compute_device_label}
|
||||
selected_id={target_index}
|
||||
list={list_for_ui}
|
||||
selectFunction={selectFunction}
|
||||
|
||||
@@ -42,9 +42,16 @@ const Tab = (props) => {
|
||||
[styles["is_selected"]]: (currentSelectedConfigTabId.data === props.tab_id) ? true : false
|
||||
});
|
||||
|
||||
const getLabel = () => {
|
||||
if (props.tab_id === "vr") return "VR";
|
||||
if (props.tab_id === "supporters") return "Supporters";
|
||||
if (props.tab_id === "about_vrct") return "About VRCT";
|
||||
return t(`config_page.side_menu_labels.${props.tab_id}`);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={tab_container_class_names} onClick={onclickFunction}>
|
||||
<p className={styles.tab_text}>{t(`config_page.side_menu_labels.${props.tab_id}`)}</p>
|
||||
<p className={styles.tab_text}>{getLabel()}</p>
|
||||
<div className={switch_indicator_class_names}></div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -16,11 +16,12 @@ export const TranslatorSelectorOpenButton = () => {
|
||||
currentSelectedTranslationEngines,
|
||||
} = useLanguageSettings();
|
||||
|
||||
const new_labels = [
|
||||
{id: "CTranslate2", label: t("main_page.translator_ctranslate2")}
|
||||
];
|
||||
// const new_labels = [
|
||||
// {id: "CTranslate2", label: "AI\nCTranslate2"}
|
||||
// ];
|
||||
|
||||
const translation_engines = updateLabelsById(currentTranslationEngines.data, new_labels);
|
||||
const translation_engines = currentTranslationEngines.data;
|
||||
// const translation_engines = updateLabelsById(currentTranslationEngines.data, new_labels);
|
||||
|
||||
const selected_engine_id = currentSelectedTranslationEngines.data[currentSelectedPresetTabNumber.data];
|
||||
|
||||
@@ -74,7 +75,7 @@ export const TranslatorSelectorOpenButton = () => {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.translator_selector_button} onClick={openTranslatorSelector}>
|
||||
<p className={styles.label}>{t("main_page.translator")}: </p>
|
||||
<p className={styles.label}>{t("main_page.translator")}:</p>
|
||||
<p className={styles.label}>{selected_label}</p>
|
||||
{is_selected_same_language
|
||||
? <WarningSvg className={styles.warning_svg}/>
|
||||
|
||||
@@ -33,7 +33,7 @@ export const TranslatorSelector = ({selected_id, translation_engines, is_selecte
|
||||
{t("main_page.translator_selector.is_selected_same_language", {
|
||||
your_language: t("main_page.your_language"),
|
||||
target_language: t("main_page.target_language"),
|
||||
translator_ctranslate2: t("main_page.translator_ctranslate2"),
|
||||
ctranslate2: "CTranslate2",
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
$box_size: 6.8rem;
|
||||
$box_size: 6rem;
|
||||
.box {
|
||||
width: $box_size;
|
||||
width: 9.2rem;
|
||||
height: $box_size;
|
||||
background-color: var(--dark_875_color);
|
||||
display: flex;
|
||||
@@ -44,7 +44,7 @@ $box_size: 6.8rem;
|
||||
align-items: center;
|
||||
white-space: pre-wrap;
|
||||
text-align: center;
|
||||
border-radius: 0.6rem;
|
||||
border-radius: 0.2rem;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background-color: var(--dark_825_color);
|
||||
|
||||
@@ -54,11 +54,11 @@ export const ui_configs = {
|
||||
|
||||
export const translator_status = [
|
||||
{ id: "DeepL", label: "DeepL", is_available: false },
|
||||
{ id: "DeepL_API", label: `DeepL\nAPI`, is_available: false },
|
||||
{ id: "DeepL_API", label: `DeepL API`, is_available: false },
|
||||
{ id: "Google", label: "Google", is_available: false },
|
||||
{ id: "Bing", label: "Bing", is_available: false },
|
||||
{ id: "Papago", label: "Papago", is_available: false },
|
||||
{ id: "CTranslate2", label: `Internal\n(Default)`, is_available: false },
|
||||
{ id: "CTranslate2", label: `AI\nCTranslate2`, is_available: false, is_default: true },
|
||||
];
|
||||
|
||||
export const ctranslate2_weight_type_status = [
|
||||
|
||||
Reference in New Issue
Block a user