这是indexloc提供的服务,不要输入任何密码
Skip to content

Add missing localizations #3925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions frontend/src/components/LLMSelection/AzureAiOptions/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { useTranslation } from "react-i18next";

export default function AzureAiOptions({ settings }) {
const { t } = useTranslation();

return (
<div className="w-full flex flex-col gap-y-7 mt-1.5">
<div className="w-full flex items-center gap-[36px]">
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
Azure Service Endpoint
{t("llm.providers.azure_openai.azure_service_endpoint")}
</label>
<input
type="url"
Expand All @@ -20,7 +24,7 @@ export default function AzureAiOptions({ settings }) {

<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
API Key
{t("llm.providers.azure_openai.api_key")}
</label>
<input
type="password"
Expand All @@ -36,7 +40,7 @@ export default function AzureAiOptions({ settings }) {

<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
Chat Deployment Name
{t("llm.providers.azure_openai.chat_deployment_name")}
</label>
<input
type="text"
Expand All @@ -54,7 +58,7 @@ export default function AzureAiOptions({ settings }) {
<div className="w-full flex items-center gap-[36px]">
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
Chat Model Token Limit
{t("llm.providers.azure_openai.chat_model_token_limit")}
</label>
<select
name="AzureOpenAiTokenLimit"
Expand All @@ -76,16 +80,20 @@ export default function AzureAiOptions({ settings }) {

<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
Model Type
{t("llm.providers.azure_openai.model_type")}
</label>
<select
name="AzureOpenAiModelType"
defaultValue={settings?.AzureOpenAiModelType || "default"}
className="border-none bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5"
required={true}
>
<option value="default">Default</option>
<option value="reasoning">Reasoning</option>
<option value="default">
{t("llm.providers.azure_openai.default")}
</option>
<option value="reasoning">
{t("llm.providers.azure_openai.reasoning")}
</option>
</select>
</div>
</div>
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/components/UserMenu/AccountModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Tooltip } from "react-tooltip";

export default function AccountModal({ user, hideModal }) {
const { pfp, setPfp } = usePfp();
const { t } = useTranslation();

const handleFileUpload = async (event) => {
const file = event.target.files[0];
Expand All @@ -22,19 +23,19 @@ export default function AccountModal({ user, hideModal }) {
formData.append("file", file);
const { success, error } = await System.uploadPfp(formData);
if (!success) {
showToast(`Failed to upload profile picture: ${error}`, "error");
showToast(t("profile_settings.failed_upload", { error }), "error");
return;
}

const pfpUrl = await System.fetchPfp(user.id);
setPfp(pfpUrl);
showToast("Profile picture uploaded.", "success");
showToast(t("profile_settings.upload_success"), "success");
};

const handleRemovePfp = async () => {
const { success, error } = await System.removePfp();
if (!success) {
showToast(`Failed to remove profile picture: ${error}`, "error");
showToast(t("profile_settings.failed_remove", { error }), "error");
return;
}

Expand All @@ -59,13 +60,14 @@ export default function AccountModal({ user, hideModal }) {
storedUser.bio = data.bio;
localStorage.setItem(AUTH_USER, JSON.stringify(storedUser));
}
showToast("Profile updated.", "success", { clear: true });
showToast(t("profile_settings.profile_updated"), "success", {
clear: true,
});
hideModal();
} else {
showToast(`Failed to update user: ${error}`, "error");
showToast(t("profile_settings.failed_update_user", { error }), "error");
}
};
const { t } = useTranslation();
return (
<ModalWrapper isOpen={true}>
<div className="w-full max-w-2xl bg-theme-bg-secondary rounded-lg shadow border-2 border-theme-modal-border overflow-hidden">
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/UserMenu/UserButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { Person } from "@phosphor-icons/react";
import { useEffect, useRef, useState } from "react";
import AccountModal from "../AccountModal";
import { AUTH_TIMESTAMP, AUTH_TOKEN, AUTH_USER } from "@/utils/constants";
import { useTranslation } from "react-i18next";

export default function UserButton() {
const { t } = useTranslation();
const mode = useLoginMode();
const { user } = useUser();
const menuRef = useRef();
Expand Down Expand Up @@ -75,14 +77,14 @@ export default function UserButton() {
onClick={handleOpenAccountModal}
className="border-none text-white hover:bg-theme-action-menu-item-hover w-full text-left px-4 py-1.5 rounded-md"
>
Account
{t("profile_settings.account")}
</button>
)}
<a
href={supportEmail}
className="text-white hover:bg-theme-action-menu-item-hover w-full text-left px-4 py-1.5 rounded-md"
>
Support
{t("profile_settings.support")}
</a>
<button
onClick={() => {
Expand All @@ -94,7 +96,7 @@ export default function UserButton() {
type="button"
className="text-white hover:bg-theme-action-menu-item-hover w-full text-left px-4 py-1.5 rounded-md"
>
Sign out
{t("profile_settings.signout")}
</button>
</div>
</div>
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/ar/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,17 @@ const TRANSLATIONS = {
description:
"هذه هي بيانات الاعتماد والإعدادات الخاصة بنموذج التعلم العميق للمحادثة وموفر التضمين المفضلين لديك . من المهم أن تكون هذه المفاتيح حديثة وصحيحة وإلا فلن يعمل برنامج إني ثينك إلْلْم بشكل صحيح.",
provider: "موفر نموذج التعلم العميق",
providers: {
azure_openai: {
azure_service_endpoint: null,
api_key: null,
chat_deployment_name: null,
chat_model_token_limit: null,
model_type: null,
default: null,
reasoning: null,
},
},
},
transcription: {
title: "تفضيل نموذج النسخ",
Expand Down Expand Up @@ -711,6 +722,14 @@ const TRANSLATIONS = {
update_account: null,
theme: null,
language: null,
failed_upload: null,
upload_success: null,
failed_remove: null,
profile_updated: null,
failed_update_user: null,
account: null,
support: null,
signout: null,
},
customization: {
interface: {
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/da/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,17 @@ const TRANSLATIONS = {
description:
"Disse er legitimationsoplysningerne og indstillingerne for din foretrukne LLM chat- og indlejringsudbyder. Det er vigtigt, at disse nøgler er opdaterede og korrekte, ellers vil AnythingLLM ikke fungere korrekt.",
provider: "LLM-udbyder",
providers: {
azure_openai: {
azure_service_endpoint: null,
api_key: null,
chat_deployment_name: null,
chat_model_token_limit: null,
model_type: null,
default: null,
reasoning: null,
},
},
},
transcription: {
title: "Foretrukken transskriptionsmodel",
Expand Down Expand Up @@ -750,6 +761,14 @@ const TRANSLATIONS = {
update_account: "Opdater konto",
theme: "Tema-præference",
language: "Foretrukket sprog",
failed_upload: null,
upload_success: null,
failed_remove: null,
profile_updated: null,
failed_update_user: null,
account: null,
support: null,
signout: null,
},
customization: {
interface: {
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/de/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,17 @@ const TRANSLATIONS = {
description:
"Dies sind die Anmeldeinformationen und Einstellungen für Ihren bevorzugten LLM-Chat- und Einbettungsanbieter. Es ist wichtig, dass diese Schlüssel aktuell und korrekt sind, sonst wird AnythingLLM nicht richtig funktionieren.",
provider: "LLM-Anbieter",
providers: {
azure_openai: {
azure_service_endpoint: null,
api_key: null,
chat_deployment_name: null,
chat_model_token_limit: null,
model_type: null,
default: null,
reasoning: null,
},
},
},
transcription: {
title: "Transkriptionsmodell-Präferenz",
Expand Down Expand Up @@ -748,6 +759,14 @@ const TRANSLATIONS = {
update_account: "Account updaten",
theme: "Bevozugtes Design",
language: "Bevorzugte Sprache",
failed_upload: null,
upload_success: null,
failed_remove: null,
profile_updated: null,
failed_update_user: null,
account: null,
support: null,
signout: null,
},
customization: {
interface: {
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/en/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,17 @@ const TRANSLATIONS = {
description:
"These are the credentials and settings for your preferred LLM chat & embedding provider. It is important that these keys are current and correct, or else AnythingLLM will not function properly.",
provider: "LLM Provider",
providers: {
azure_openai: {
azure_service_endpoint: "Azure Service Endpoint",
api_key: "API Key",
chat_deployment_name: "Chat Deployment Name",
chat_model_token_limit: "Chat Model Token Limit",
model_type: "Model Type",
default: "Default",
reasoning: "Reasoning",
},
},
},

transcription: {
Expand Down Expand Up @@ -981,6 +992,14 @@ const TRANSLATIONS = {
update_account: "Update Account",
theme: "Theme Preference",
language: "Preferred language",
failed_upload: "Failed to upload profile picture: {{error}}",
upload_success: "Profile picture uploaded.",
failed_remove: "Failed to remove profile picture: {{error}}",
profile_updated: "Profile updated.",
failed_update_user: "Failed to update user: {{error}}",
account: "Account",
support: "Support",
signout: "Sign out",
},

"keyboard-shortcuts": {
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/es/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,17 @@ const TRANSLATIONS = {
description:
"Estas son las credenciales y configuraciones para tu proveedor preferido de chat y incrustación de LLM. Es importante que estas claves estén actualizadas y correctas, de lo contrario AnythingLLM no funcionará correctamente.",
provider: "Proveedor de LLM",
providers: {
azure_openai: {
azure_service_endpoint: null,
api_key: null,
chat_deployment_name: null,
chat_model_token_limit: null,
model_type: null,
default: null,
reasoning: null,
},
},
},
transcription: {
title: "Preferencia de modelo de transcripción",
Expand Down Expand Up @@ -710,6 +721,14 @@ const TRANSLATIONS = {
update_account: null,
theme: null,
language: null,
failed_upload: null,
upload_success: null,
failed_remove: null,
profile_updated: null,
failed_update_user: null,
account: null,
support: null,
signout: null,
},
customization: {
interface: {
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/fa/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,17 @@ const TRANSLATIONS = {
description:
"این‌ها اعتبارنامه‌ها و تنظیمات ارائه‌دهنده مدل زبانی و جاسازی انتخابی شما هستند. مهم است که این کلیدها به‌روز و صحیح باشند در غیر این صورت AnythingLLM به درستی کار نخواهد کرد.",
provider: "ارائه‌دهنده مدل زبانی",
providers: {
azure_openai: {
azure_service_endpoint: null,
api_key: null,
chat_deployment_name: null,
chat_model_token_limit: null,
model_type: null,
default: null,
reasoning: null,
},
},
},
transcription: {
title: "ترجیحات مدل رونویسی",
Expand Down Expand Up @@ -703,6 +714,14 @@ const TRANSLATIONS = {
update_account: null,
theme: null,
language: null,
failed_upload: null,
upload_success: null,
failed_remove: null,
profile_updated: null,
failed_update_user: null,
account: null,
support: null,
signout: null,
},
customization: {
interface: {
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/locales/fr/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,17 @@ const TRANSLATIONS = {
description:
"Voici les identifiants et les paramètres de votre fournisseur LLM de chat et d'intégration préféré. Il est important que ces clés soient actuelles et correctes, sinon AnythingLLM ne fonctionnera pas correctement.",
provider: "Fournisseur LLM",
providers: {
azure_openai: {
azure_service_endpoint: null,
api_key: null,
chat_deployment_name: null,
chat_model_token_limit: null,
model_type: null,
default: null,
reasoning: null,
},
},
},
transcription: {
title: "Préférence du modèle de transcription",
Expand Down Expand Up @@ -711,6 +722,14 @@ const TRANSLATIONS = {
update_account: null,
theme: null,
language: null,
failed_upload: null,
upload_success: null,
failed_remove: null,
profile_updated: null,
failed_update_user: null,
account: null,
support: null,
signout: null,
},
customization: {
interface: {
Expand Down
Loading