mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'hydralauncher:main' into main
This commit is contained in:
commit
5e5585e7eb
32 changed files with 183 additions and 59 deletions
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "اَلْعَرَبِيَّةُ",
|
||||
"home": {
|
||||
"featured": "مميّز",
|
||||
"trending": "شائع",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "беларуская мова",
|
||||
"home": {
|
||||
"featured": "Рэкамэндаванае",
|
||||
"trending": "Актуальнае",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Català",
|
||||
"app": {
|
||||
"successfully_signed_in": "Has entrat correctament"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Dansk",
|
||||
"home": {
|
||||
"featured": "Anbefalet",
|
||||
"trending": "Trender",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "English",
|
||||
"app": {
|
||||
"successfully_signed_in": "Successfully signed in"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Español",
|
||||
"app": {
|
||||
"successfully_signed_in": "Sesión iniciada correctamente"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "فارسی",
|
||||
"home": {
|
||||
"featured": "پیشنهادی",
|
||||
"trending": "پرطرفدار",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Français",
|
||||
"home": {
|
||||
"featured": "En vedette",
|
||||
"trending": "Tendance",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Magyar",
|
||||
"home": {
|
||||
"featured": "Featured",
|
||||
"trending": "Népszerű",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Bahasa Indonesia",
|
||||
"app": {
|
||||
"successfully_signed_in": "Berhasil masuk"
|
||||
},
|
||||
|
|
|
@ -1,22 +1,47 @@
|
|||
export { default as en } from "./en/translation.json";
|
||||
export { default as ptPT } from "./pt-PT/translation.json";
|
||||
export { default as ptBR } from "./pt-BR/translation.json";
|
||||
export { default as es } from "./es/translation.json";
|
||||
export { default as nl } from "./nl/translation.json";
|
||||
export { default as fr } from "./fr/translation.json";
|
||||
export { default as hu } from "./hu/translation.json";
|
||||
export { default as it } from "./it/translation.json";
|
||||
export { default as pl } from "./pl/translation.json";
|
||||
export { default as ru } from "./ru/translation.json";
|
||||
export { default as tr } from "./tr/translation.json";
|
||||
export { default as be } from "./be/translation.json";
|
||||
export { default as uk } from "./uk/translation.json";
|
||||
export { default as zh } from "./zh/translation.json";
|
||||
export { default as id } from "./id/translation.json";
|
||||
export { default as ko } from "./ko/translation.json";
|
||||
export { default as da } from "./da/translation.json";
|
||||
export { default as ar } from "./ar/translation.json";
|
||||
export { default as fa } from "./fa/translation.json";
|
||||
export { default as ro } from "./ro/translation.json";
|
||||
export { default as ca } from "./ca/translation.json";
|
||||
export { default as kk } from "./kk/translation.json";
|
||||
import en from "./en/translation.json";
|
||||
import ptPT from "./pt-PT/translation.json";
|
||||
import ptBR from "./pt-BR/translation.json";
|
||||
import es from "./es/translation.json";
|
||||
import nl from "./nl/translation.json";
|
||||
import fr from "./fr/translation.json";
|
||||
import hu from "./hu/translation.json";
|
||||
import it from "./it/translation.json";
|
||||
import pl from "./pl/translation.json";
|
||||
import ru from "./ru/translation.json";
|
||||
import tr from "./tr/translation.json";
|
||||
import be from "./be/translation.json";
|
||||
import uk from "./uk/translation.json";
|
||||
import zh from "./zh/translation.json";
|
||||
import id from "./id/translation.json";
|
||||
import ko from "./ko/translation.json";
|
||||
import da from "./da/translation.json";
|
||||
import ar from "./ar/translation.json";
|
||||
import fa from "./fa/translation.json";
|
||||
import ro from "./ro/translation.json";
|
||||
import ca from "./ca/translation.json";
|
||||
import kk from "./kk/translation.json";
|
||||
|
||||
export default {
|
||||
"pt-BR": ptBR,
|
||||
"pt-PT": ptPT,
|
||||
en,
|
||||
es,
|
||||
nl,
|
||||
fr,
|
||||
hu,
|
||||
it,
|
||||
pl,
|
||||
ru,
|
||||
tr,
|
||||
be,
|
||||
uk,
|
||||
zh,
|
||||
id,
|
||||
ko,
|
||||
da,
|
||||
ar,
|
||||
fa,
|
||||
ro,
|
||||
ca,
|
||||
kk,
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Italiano",
|
||||
"home": {
|
||||
"featured": "In primo piano",
|
||||
"trending": "Di tendenza",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "қазақ тілі",
|
||||
"app": {
|
||||
"successfully_signed_in": "Сәтті кіру"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "한국어",
|
||||
"home": {
|
||||
"featured": "추천",
|
||||
"trending": "인기",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Nederlands",
|
||||
"home": {
|
||||
"featured": "Uitgelicht",
|
||||
"trending": "Trending",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Polski",
|
||||
"home": {
|
||||
"featured": "Wyróżnione",
|
||||
"trending": "Trendujące",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Português (Brasil)",
|
||||
"app": {
|
||||
"successfully_signed_in": "Autenticado com sucesso"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Português (Portugal)",
|
||||
"app": {
|
||||
"successfully_signed_in": "Sessão iniciada com sucesso"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Română",
|
||||
"home": {
|
||||
"featured": "Recomandate",
|
||||
"trending": "Populare",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Русский",
|
||||
"app": {
|
||||
"successfully_signed_in": "Успешный вход"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Türkçe",
|
||||
"home": {
|
||||
"featured": "Öne çıkan",
|
||||
"trending": "Popüler",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "Українська",
|
||||
"app": {
|
||||
"successfully_signed_in": "Успішний вхід в систему"
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"language_name": "中文",
|
||||
"app": {
|
||||
"successfully_signed_in": "已成功登录"
|
||||
},
|
||||
|
|
Binary file not shown.
|
@ -7,7 +7,7 @@ import url from "node:url";
|
|||
import { electronApp, optimizer } from "@electron-toolkit/utils";
|
||||
import { logger, PythonInstance, WindowManager } from "@main/services";
|
||||
import { dataSource } from "@main/data-source";
|
||||
import * as resources from "@locales";
|
||||
import resources from "@locales";
|
||||
import { userPreferencesRepository } from "@main/repository";
|
||||
import { knexClient, migrationConfig } from "./knex-client";
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import {
|
|||
|
||||
import { store } from "./store";
|
||||
|
||||
import * as resources from "@locales";
|
||||
import resources from "@locales";
|
||||
import { User } from "./pages/user/user";
|
||||
|
||||
Sentry.init({});
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import { useContext, useEffect, useState } from "react";
|
||||
import languages from "@cospired/i18n-iso-languages";
|
||||
import languagesEn from "@cospired/i18n-iso-languages/langs/en.json";
|
||||
|
||||
import {
|
||||
TextField,
|
||||
Button,
|
||||
|
@ -9,11 +6,9 @@ import {
|
|||
SelectField,
|
||||
} from "@renderer/components";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { useAppSelector } from "@renderer/hooks";
|
||||
|
||||
import { changeLanguage } from "i18next";
|
||||
import * as languageResources from "@locales";
|
||||
import languageResources from "@locales";
|
||||
import { orderBy } from "lodash-es";
|
||||
import { settingsContext } from "@renderer/context";
|
||||
|
||||
|
@ -22,13 +17,6 @@ interface LanguageOption {
|
|||
nativeName: string;
|
||||
}
|
||||
|
||||
languages.registerLocale(languagesEn);
|
||||
|
||||
const customLanguageNames = {
|
||||
ptBR: "Português (Brasil)",
|
||||
ptPT: "Português (Portugal)",
|
||||
};
|
||||
|
||||
export function SettingsGeneral() {
|
||||
const { t } = useTranslation("settings");
|
||||
|
||||
|
@ -58,11 +46,9 @@ export function SettingsGeneral() {
|
|||
|
||||
setLanguageOptions(
|
||||
orderBy(
|
||||
Object.keys(languageResources).map((language) => {
|
||||
Object.entries(languageResources).map(([language, value]) => {
|
||||
return {
|
||||
nativeName:
|
||||
customLanguageNames[language] ||
|
||||
languages.getName(language, "en"),
|
||||
nativeName: value.language_name,
|
||||
option: language,
|
||||
};
|
||||
}),
|
||||
|
@ -103,8 +89,6 @@ export function SettingsGeneral() {
|
|||
|
||||
function updateFormWithUserPreferences() {
|
||||
if (userPreferences) {
|
||||
const parsedLanguage = userPreferences.language;
|
||||
|
||||
setForm((prev) => ({
|
||||
...prev,
|
||||
downloadsPath: userPreferences.downloadsPath ?? defaultDownloadsPath,
|
||||
|
@ -112,7 +96,7 @@ export function SettingsGeneral() {
|
|||
userPreferences.downloadNotificationsEnabled,
|
||||
repackUpdatesNotificationsEnabled:
|
||||
userPreferences.repackUpdatesNotificationsEnabled,
|
||||
language: parsedLanguage,
|
||||
language: userPreferences.language,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue