Skip to content

Commit

Permalink
fix language
Browse files Browse the repository at this point in the history
  • Loading branch information
heimoshuiyu committed Feb 7, 2025
1 parent f6427ed commit e0e580f
Show file tree
Hide file tree
Showing 14 changed files with 357 additions and 125 deletions.
2 changes: 1 addition & 1 deletion src/components/ImageGenDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export function ImageGenDrawer({ disableFactor }: Props) {
}
}}
>
{Tr("Generate")}
<Tr>Generate</Tr>
</Button>
</span>
</div>
Expand Down
14 changes: 10 additions & 4 deletions src/components/ListAPI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ function ToolsDropdownList() {

return (
<div className="flex items-center space-x-4 mx-3">
<p className="text-sm text-muted-foreground">{Tr(`Tools`)}</p>
<p className="text-sm text-muted-foreground">
<Tr>Tools</Tr>
</p>
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button variant="outline" className="w-[150px] justify-start">
Expand All @@ -164,15 +166,19 @@ function ToolsDropdownList() {
}
</>
) : (
<>+ {Tr(`Set tools`)}</>
<>
+ <Tr>Set tools</Tr>
</>
)}
</Button>
</PopoverTrigger>
<PopoverContent className="p-0" side="bottom" align="start">
<Command>
<CommandInput placeholder="You can search..." />
<CommandList>
<CommandEmpty>{Tr(`No results found.`)}</CommandEmpty>
<CommandEmpty>
<Tr>No results found.</Tr>
</CommandEmpty>
<CommandGroup>
{chatStore.toolsString && (
<CommandItem
Expand All @@ -188,7 +194,7 @@ function ToolsDropdownList() {
setOpen(false);
}}
>
<BrushIcon /> {Tr(`Clear tools`)}
<BrushIcon /> <Tr>Clear tools</Tr>
</CommandItem>
)}
{ctx.templateTools.map((t, index) => (
Expand Down
18 changes: 12 additions & 6 deletions src/components/MessageBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default function Message(props: { messageIndex: number }) {
try {
await navigator.clipboard.writeText(text);
toast({
description: Tr("Message copied to clipboard!"),
description: <Tr>Message copied to clipboard!</Tr>,
});
} catch (err) {
const textArea = document.createElement("textarea");
Expand All @@ -279,11 +279,11 @@ export default function Message(props: { messageIndex: number }) {
try {
document.execCommand("copy");
toast({
description: Tr("Message copied to clipboard!"),
description: <Tr>Message copied to clipboard!</Tr>,
});
} catch (err) {
toast({
description: Tr("Failed to copy to clipboard"),
description: <Tr>Failed to copy to clipboard</Tr>,
});
}
document.body.removeChild(textArea);
Expand Down Expand Up @@ -539,7 +539,9 @@ export default function Message(props: { messageIndex: number }) {
setChatStore({ ...chatStore });
}}
/>
<span className="text-sm font-medium">{Tr("example")}</span>
<span className="text-sm font-medium">
<Tr>example</Tr>
</span>
</label>
<label className="flex items-center gap-2">
<input
Expand All @@ -548,7 +550,9 @@ export default function Message(props: { messageIndex: number }) {
checked={renderMarkdown}
onChange={() => setRenderWorkdown(!renderMarkdown)}
/>
<span className="text-sm font-medium">{Tr("render")}</span>
<span className="text-sm font-medium">
<Tr>render</Tr>
</span>
</label>
<label className="flex items-center gap-2">
<input
Expand All @@ -557,7 +561,9 @@ export default function Message(props: { messageIndex: number }) {
checked={renderColor}
onChange={() => setRenderColor(!renderColor)}
/>
<span className="text-sm font-medium">{Tr("color")}</span>
<span className="text-sm font-medium">
<Tr>color</Tr>
</span>
</label>
{chat.response_model_name && (
<>
Expand Down
Loading

0 comments on commit e0e580f

Please sign in to comment.