feat: refactor and i18n

This commit is contained in:
Zamitto
2025-03-10 20:29:12 -03:00
parent 1aa3bb1ad2
commit 6a8da74bcf
6 changed files with 10 additions and 14 deletions

View File

@@ -335,7 +335,8 @@
"import_theme_description": "You will import {{theme}} from the theme store",
"error_importing_theme": "Error importing theme",
"theme_imported": "Theme imported successfully",
"enable_friend_request_notifications": "When a friend request is received"
"enable_friend_request_notifications": "When a friend request is received",
"enable_auto_install": "Download updates automatically"
},
"notifications": {
"download_complete": "Download complete",

View File

@@ -335,7 +335,8 @@
"torbox_description": "TorBox es tu servicio premium de seedbox que rivaliza incluso a los mejores servidores del mercado.",
"unset_theme": "Desactivar tema",
"web_store": "Tienda Web",
"enable_friend_request_notifications": "Cuando se recibe una solicitud de amistad"
"enable_friend_request_notifications": "Cuando se recibe una solicitud de amistad",
"enable_auto_install": "Descargar actualizaciones automáticamente"
},
"notifications": {
"download_complete": "Descarga completada",

View File

@@ -322,7 +322,8 @@
"import_theme_description": "Você irá importar {{theme}} da loja de temas",
"error_importing_theme": "Erro ao importar tema",
"theme_imported": "Tema importado com sucesso",
"enable_friend_request_notifications": "Quando um pedido de amizade é recebido"
"enable_friend_request_notifications": "Quando um pedido de amizade é recebido",
"enable_auto_install": "Baixar atualizações automaticamente"
},
"notifications": {
"download_complete": "Download concluído",

View File

@@ -333,7 +333,8 @@
"import_theme_description": "Вы импортируете {{theme}} из магазина тем",
"error_importing_theme": "Ошибка при импорте темы",
"theme_imported": "Тема успешно импортирована",
"enable_friend_request_notifications": "При получении запроса на добавление в друзья"
"enable_friend_request_notifications": "При получении запроса на добавление в друзья",
"enable_auto_install": "Загружать обновления автоматически"
},
"notifications": {
"download_complete": "Загрузка завершена",

View File

@@ -18,10 +18,7 @@ export class DatanodesApi {
const pathSegments = parsedUrl.pathname.split("/").filter(Boolean);
const fileCode = pathSegments[0];
await this.jar.setCookie(
"lang=english;",
"https://datanodes.to"
);
await this.jar.setCookie("lang=english;", "https://datanodes.to");
const payload = new URLSearchParams({
op: "download2",

View File

@@ -12,7 +12,6 @@ export function SettingsBehavior() {
);
const [showRunAtStartup, setShowRunAtStartup] = useState(false);
const [showAutoInstall, setShowAutoInstall] = useState(true);
const { updateUserPreferences } = useContext(settingsContext);
@@ -49,10 +48,6 @@ export function SettingsBehavior() {
window.electron.isPortableVersion().then((isPortableVersion) => {
setShowRunAtStartup(!isPortableVersion);
});
if (window.electron.platform === "linux") {
setShowAutoInstall(true);
}
}, []);
const handleChange = (values: Partial<typeof form>) => {
@@ -106,7 +101,7 @@ export function SettingsBehavior() {
</div>
)}
{showAutoInstall && (
{window.electron.platform === "linux" && (
<CheckboxField
label={t("enable_auto_install")}
checked={form.enableAutoInstall}