mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-29 13:46:18 +01:00
Add localization support for endpoint pages components (#667)
* init localization * Update defaul to en * Fix merge issue and import path. * Set default to en * Change jsx to tsx * Update the password max length string. * Remove languageContext as using the recoil instead. * Add localization to component endpoints pages * Revert default to en after testing. * Update LoginForm.tsx * Fix translation. * Make lint happy
This commit is contained in:
parent
4148c6d219
commit
b64273957a
15 changed files with 212 additions and 67 deletions
|
|
@ -5,6 +5,10 @@ import CrossIcon from '../svg/CrossIcon';
|
|||
import { Save } from 'lucide-react';
|
||||
import { cn } from '~/utils/';
|
||||
|
||||
import store from '~/store';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { localize } from '~/localization/Translation';
|
||||
|
||||
function EndpointOptionsPopover({
|
||||
content,
|
||||
visible,
|
||||
|
|
@ -12,6 +16,7 @@ function EndpointOptionsPopover({
|
|||
switchToSimpleMode,
|
||||
additionalButton = null,
|
||||
}) {
|
||||
const lang = useRecoilValue(store.lang);
|
||||
const cardStyle =
|
||||
'shadow-md rounded-md min-w-[75px] font-normal bg-white border-black/10 border dark:bg-gray-700 text-black dark:text-white';
|
||||
|
||||
|
|
@ -37,7 +42,7 @@ function EndpointOptionsPopover({
|
|||
onClick={saveAsPreset}
|
||||
>
|
||||
<Save className="mr-1 w-[14px]" />
|
||||
Save as preset
|
||||
{localize(lang, 'com_endpoint_save_as_preset')}
|
||||
</Button>
|
||||
{additionalButton && (
|
||||
<Button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue