mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 02:40:14 +01:00
🌍 : Updated Translations & AI Generation Scripts (#2666)
* chore: bun scripts * feat: comparisons * refactor: move scripts to own folder * feat: generated prompts script and Es output * feat: generated prompts * created prompts * feat: Russian localization prompts * translation setup * additional ES translations * additional ES translations * translation services * feat: additional translations * fix regex for parseParamPrompt * RU translations * remove stores from git * update gitignore * update gitignore * ZH translations * move gen prompt output location * ZH traditional translations * AR translations * chore: rename * JP * cleanup scripts * add additional instruction prompts * fix translation prompt and add DE * FR translations (rate limited so not complete) * chore: update translation comparisons * chore: remove unused AnthropicClient changes * refactor: use compositional styling for archive/delete buttons, fix manage archive table styling
This commit is contained in:
parent
978009787c
commit
2ec821ea4c
66 changed files with 51655 additions and 79 deletions
|
|
@ -13,14 +13,14 @@ type ArchiveButtonProps = {
|
|||
retainView: () => void;
|
||||
shouldArchive: boolean;
|
||||
icon: React.ReactNode;
|
||||
twcss?: string;
|
||||
className?: string;
|
||||
};
|
||||
export default function ArchiveButton({
|
||||
conversationId,
|
||||
retainView,
|
||||
shouldArchive,
|
||||
icon,
|
||||
twcss = undefined,
|
||||
className = '',
|
||||
}: ArchiveButtonProps) {
|
||||
const localize = useLocalize();
|
||||
const { newConversation } = useNewConvo();
|
||||
|
|
@ -58,14 +58,9 @@ export default function ArchiveButton({
|
|||
},
|
||||
);
|
||||
};
|
||||
const classProp: { className?: string } = {
|
||||
className: 'z-50 hover:text-black dark:hover:text-white',
|
||||
};
|
||||
if (twcss) {
|
||||
classProp.className = twcss;
|
||||
}
|
||||
|
||||
return (
|
||||
<button type="button" className={classProp.className} onClick={archiveHandler}>
|
||||
<button type="button" className={className} onClick={archiveHandler}>
|
||||
<TooltipProvider delayDuration={250}>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
|
|
|
|||
|
|
@ -155,10 +155,11 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
|
|||
renaming={renaming}
|
||||
title={title}
|
||||
appendLabel={true}
|
||||
className="mt-[3.5px]"
|
||||
className="group m-1.5 mt-[3.5px] flex w-full cursor-pointer items-center gap-2 rounded p-2.5 text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600"
|
||||
/>
|
||||
</EditMenuButton>
|
||||
<ArchiveButton
|
||||
className="z-50 hover:text-black dark:hover:text-white"
|
||||
conversationId={conversationId}
|
||||
retainView={retainView}
|
||||
shouldArchive={true}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import {
|
|||
import DialogTemplate from '~/components/ui/DialogTemplate';
|
||||
import { TrashIcon, CrossIcon } from '~/components/svg';
|
||||
import { useLocalize, useNewConvo } from '~/hooks';
|
||||
import { cn } from '~/utils';
|
||||
|
||||
export default function DeleteButton({
|
||||
conversationId,
|
||||
|
|
@ -59,7 +58,7 @@ export default function DeleteButton({
|
|||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span>
|
||||
<TrashIcon />
|
||||
<TrashIcon className="h-5 w-5" />
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" sideOffset={0}>
|
||||
|
|
@ -73,14 +72,7 @@ export default function DeleteButton({
|
|||
return (
|
||||
<Dialog>
|
||||
<DialogTrigger asChild>
|
||||
<button
|
||||
className={cn(
|
||||
'group m-1.5 flex w-full cursor-pointer items-center gap-2 rounded p-2.5 text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{renaming ? <CrossIcon /> : renderDeleteButton()}
|
||||
</button>
|
||||
<button className={className}>{renaming ? <CrossIcon /> : renderDeleteButton()}</button>
|
||||
</DialogTrigger>
|
||||
<DialogTemplate
|
||||
showCloseButton={false}
|
||||
|
|
|
|||
|
|
@ -79,19 +79,20 @@ export default function ArchivedChatsTable({ className }: { className?: string }
|
|||
{conversation.conversationId && (
|
||||
<>
|
||||
<ArchiveButton
|
||||
className="hover:text-black dark:hover:text-white"
|
||||
conversationId={conversation.conversationId}
|
||||
retainView={moveToTop}
|
||||
shouldArchive={false}
|
||||
icon={<ArchiveRestore className="h-4 w-4 hover:text-gray-300" />}
|
||||
/>
|
||||
<div className="h-4 w-4 hover:text-gray-300">
|
||||
<div className="h-5 w-5 hover:text-gray-300">
|
||||
<DeleteButton
|
||||
conversationId={conversation.conversationId}
|
||||
retainView={moveToTop}
|
||||
renaming={false}
|
||||
title={conversation.title}
|
||||
appendLabel={false}
|
||||
className="mx-3 flex items-center"
|
||||
className="group ml-4 flex w-full cursor-pointer items-center items-center gap-2 rounded text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600"
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
export default function TrashIcon() {
|
||||
import { cn } from '~/utils';
|
||||
|
||||
export default function TrashIcon({ className = '' }) {
|
||||
return (
|
||||
<svg
|
||||
fill="none"
|
||||
|
|
@ -6,7 +8,7 @@ export default function TrashIcon() {
|
|||
viewBox="0 0 24 24"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="icon-md"
|
||||
className={cn('icon-md', className)}
|
||||
height="1em"
|
||||
width="1em"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
@ -16,7 +18,7 @@ export default function TrashIcon() {
|
|||
clipRule="evenodd"
|
||||
d="M10.5555 4C10.099 4 9.70052 4.30906 9.58693 4.75114L9.29382 5.8919H14.715L14.4219 4.75114C14.3083 4.30906 13.9098 4 13.4533 4H10.5555ZM16.7799 5.8919L16.3589 4.25342C16.0182 2.92719 14.8226 2 13.4533 2H10.5555C9.18616 2 7.99062 2.92719 7.64985 4.25342L7.22886 5.8919H4C3.44772 5.8919 3 6.33961 3 6.8919C3 7.44418 3.44772 7.8919 4 7.8919H4.10069L5.31544 19.3172C5.47763 20.8427 6.76455 22 8.29863 22H15.7014C17.2354 22 18.5224 20.8427 18.6846 19.3172L19.8993 7.8919H20C20.5523 7.8919 21 7.44418 21 6.8919C21 6.33961 20.5523 5.8919 20 5.8919H16.7799ZM17.888 7.8919H6.11196L7.30423 19.1057C7.3583 19.6142 7.78727 20 8.29863 20H15.7014C16.2127 20 16.6417 19.6142 16.6958 19.1057L17.888 7.8919ZM10 10C10.5523 10 11 10.4477 11 11V16C11 16.5523 10.5523 17 10 17C9.44772 17 9 16.5523 9 16V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V16C15 16.5523 14.5523 17 14 17C13.4477 17 13 16.5523 13 16V11C13 10.4477 13.4477 10 14 10Z"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue