mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
Fix: style and translation issues (#1172)
* Update Chinese Translation * Update * Update * Update Anthropic UI
This commit is contained in:
parent
e383ecba85
commit
037ea8cc0b
3 changed files with 34 additions and 27 deletions
|
|
@ -4,6 +4,7 @@ import { useRecoilState } from 'recoil';
|
||||||
import { Button } from '~/components';
|
import { Button } from '~/components';
|
||||||
import { cn } from '~/utils/';
|
import { cn } from '~/utils/';
|
||||||
import store from '~/store';
|
import store from '~/store';
|
||||||
|
import { useLocalize } from '~/hooks';
|
||||||
|
|
||||||
type TPopoverButton = {
|
type TPopoverButton = {
|
||||||
label: string;
|
label: string;
|
||||||
|
|
@ -21,6 +22,7 @@ export default function PopoverButtons({
|
||||||
buttonClass?: string;
|
buttonClass?: string;
|
||||||
iconClass?: string;
|
iconClass?: string;
|
||||||
}) {
|
}) {
|
||||||
|
const localize = useLocalize();
|
||||||
const [optionSettings, setOptionSettings] = useRecoilState(store.optionSettings);
|
const [optionSettings, setOptionSettings] = useRecoilState(store.optionSettings);
|
||||||
const [showAgentSettings, setShowAgentSettings] = useRecoilState(store.showAgentSettings);
|
const [showAgentSettings, setShowAgentSettings] = useRecoilState(store.showAgentSettings);
|
||||||
const { showExamples, isCodeChat } = optionSettings;
|
const { showExamples, isCodeChat } = optionSettings;
|
||||||
|
|
@ -30,7 +32,7 @@ export default function PopoverButtons({
|
||||||
const buttons: { [key: string]: TPopoverButton[] } = {
|
const buttons: { [key: string]: TPopoverButton[] } = {
|
||||||
google: [
|
google: [
|
||||||
{
|
{
|
||||||
label: (showExamples ? 'Hide' : 'Show') + ' Examples',
|
label: (showExamples ? localize('com_endpoint_hide') : localize('com_endpoint_show')) + localize('com_endpoint_examples'),
|
||||||
buttonClass: isCodeChat ? 'disabled' : '',
|
buttonClass: isCodeChat ? 'disabled' : '',
|
||||||
handler: triggerExamples,
|
handler: triggerExamples,
|
||||||
icon: <MessagesSquared className={cn('mr-1 w-[14px]', iconClass)} />,
|
icon: <MessagesSquared className={cn('mr-1 w-[14px]', iconClass)} />,
|
||||||
|
|
@ -38,7 +40,7 @@ export default function PopoverButtons({
|
||||||
],
|
],
|
||||||
gptPlugins: [
|
gptPlugins: [
|
||||||
{
|
{
|
||||||
label: `Show ${showAgentSettings ? 'Completion' : 'Agent'} Settings`,
|
label: localize('com_endpoint_show_what_settings', showAgentSettings ? localize('com_endpoint_completion') : localize('com_endpoint_agent')),
|
||||||
buttonClass: '',
|
buttonClass: '',
|
||||||
handler: () => setShowAgentSettings((prev) => !prev),
|
handler: () => setShowAgentSettings((prev) => !prev),
|
||||||
icon: <GPTIcon className={cn('mr-1 mt-[2px] w-[14px]', iconClass)} size={14} />,
|
icon: <GPTIcon className={cn('mr-1 mt-[2px] w-[14px]', iconClass)} size={14} />,
|
||||||
|
|
|
||||||
|
|
@ -122,10 +122,12 @@ export default function Settings({ conversation, setOption, models, readonly }:
|
||||||
<HoverCard openDelay={300}>
|
<HoverCard openDelay={300}>
|
||||||
<HoverCardTrigger className="grid w-full items-center gap-2">
|
<HoverCardTrigger className="grid w-full items-center gap-2">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
|
<Label htmlFor="top-p-int" className="text-left text-sm font-medium">
|
||||||
{localize('com_endpoint_top_p')}{' '}
|
{localize('com_endpoint_top_p')}{' '}
|
||||||
<small className="opacity-40">
|
<small className="opacity-40">
|
||||||
({localize('com_endpoint_default_with_num', '0.7')})
|
({localize('com_endpoint_default_with_num', '0.7')})
|
||||||
</small>
|
</small>
|
||||||
|
</Label>
|
||||||
<InputNumber
|
<InputNumber
|
||||||
id="top-p-int"
|
id="top-p-int"
|
||||||
disabled={readonly}
|
disabled={readonly}
|
||||||
|
|
@ -201,10 +203,12 @@ export default function Settings({ conversation, setOption, models, readonly }:
|
||||||
<HoverCard openDelay={300}>
|
<HoverCard openDelay={300}>
|
||||||
<HoverCardTrigger className="grid w-full items-center gap-2">
|
<HoverCardTrigger className="grid w-full items-center gap-2">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
|
<Label htmlFor="max-tokens-int" className="text-left text-sm font-medium">
|
||||||
{localize('com_endpoint_max_output_tokens')}{' '}
|
{localize('com_endpoint_max_output_tokens')}{' '}
|
||||||
<small className="opacity-40">
|
<small className="opacity-40">
|
||||||
({localize('com_endpoint_default_with_num', '4000')})
|
({localize('com_endpoint_default_with_num', '4000')})
|
||||||
</small>
|
</small>
|
||||||
|
</Label>
|
||||||
<InputNumber
|
<InputNumber
|
||||||
id="max-tokens-int"
|
id="max-tokens-int"
|
||||||
disabled={readonly}
|
disabled={readonly}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export default {
|
||||||
com_ui_use_prompt: '使用提示词',
|
com_ui_use_prompt: '使用提示词',
|
||||||
com_ui_prev: '上一页',
|
com_ui_prev: '上一页',
|
||||||
com_ui_next: '下一页',
|
com_ui_next: '下一页',
|
||||||
|
com_ui_stop: '停止',
|
||||||
com_ui_prompt_templates: '对话模板',
|
com_ui_prompt_templates: '对话模板',
|
||||||
com_ui_hide_prompt_templates: '隐藏对话模板',
|
com_ui_hide_prompt_templates: '隐藏对话模板',
|
||||||
com_ui_showing: '显示',
|
com_ui_showing: '显示',
|
||||||
|
|
@ -116,10 +117,10 @@ export default {
|
||||||
com_endpoint_bing_system_message_placeholder:
|
com_endpoint_bing_system_message_placeholder:
|
||||||
'警告:滥用此功能可能导致你被禁止使用必应!点击“系统消息”查看完整的使用指南,如果你忽略了默认消息,那么将会使用被视为安全的“Sydney”预设。',
|
'警告:滥用此功能可能导致你被禁止使用必应!点击“系统消息”查看完整的使用指南,如果你忽略了默认消息,那么将会使用被视为安全的“Sydney”预设。',
|
||||||
com_endpoint_system_message: '系统消息',
|
com_endpoint_system_message: '系统消息',
|
||||||
com_endpoint_default_blank: '初始值: 空',
|
com_endpoint_default_blank: '初始值: 空白',
|
||||||
com_endpoint_default_false: '初始值: false',
|
com_endpoint_default_false: '初始值: 否',
|
||||||
com_endpoint_default_creative: '初始值: creative',
|
com_endpoint_default_creative: '初始值: 创意',
|
||||||
com_endpoint_default_empty: '初始值: empty',
|
com_endpoint_default_empty: '初始值: 空',
|
||||||
com_endpoint_default_with_num: '初始值: {0}',
|
com_endpoint_default_with_num: '初始值: {0}',
|
||||||
com_endpoint_context: '上下文',
|
com_endpoint_context: '上下文',
|
||||||
com_endpoint_tone_style: '语气',
|
com_endpoint_tone_style: '语气',
|
||||||
|
|
@ -134,7 +135,7 @@ export default {
|
||||||
com_endpoint_google_maxoutputtokens:
|
com_endpoint_google_maxoutputtokens:
|
||||||
' 响应生成中可以使用的最大词元数。指定较低的值会得到更短的响应,而指定较高的值则会得到更长的响应。',
|
' 响应生成中可以使用的最大词元数。指定较低的值会得到更短的响应,而指定较高的值则会得到更长的响应。',
|
||||||
com_endpoint_google_custom_name_placeholder: '为PaLM2设置一个名称',
|
com_endpoint_google_custom_name_placeholder: '为PaLM2设置一个名称',
|
||||||
com_endpoint_google_prompt_prefix_placeholder: '自定义指令和上下文,默认为空。',
|
com_endpoint_prompt_prefix_placeholder: '自定义提示词和上下文,默认为空',
|
||||||
com_endpoint_custom_name: '自定义名称',
|
com_endpoint_custom_name: '自定义名称',
|
||||||
com_endpoint_prompt_prefix: '对话前缀',
|
com_endpoint_prompt_prefix: '对话前缀',
|
||||||
com_endpoint_temperature: '随机性',
|
com_endpoint_temperature: '随机性',
|
||||||
|
|
@ -149,9 +150,9 @@ export default {
|
||||||
com_endpoint_openai_topp:
|
com_endpoint_openai_topp:
|
||||||
'相较于随机性的另一个取样方法,称为核采样,模型选取输出词元中大于P值(概率密度在整个概率分布中的比例)的结果。比如 top_p=0.1 表示只有概率占比为前10%的词元才会被考虑作为输出。建议不要同时改变此值和随机性。',
|
'相较于随机性的另一个取样方法,称为核采样,模型选取输出词元中大于P值(概率密度在整个概率分布中的比例)的结果。比如 top_p=0.1 表示只有概率占比为前10%的词元才会被考虑作为输出。建议不要同时改变此值和随机性。',
|
||||||
com_endpoint_openai_freq:
|
com_endpoint_openai_freq:
|
||||||
'值介于-2.0到2.0之间。正值表示根据已有词元的频率惩罚重复词元结果, 从而减少模型输出重复词。',
|
'值介于-2.0到2.0之间。正值将惩罚当前已频繁使用的词元,从而降低重复用词的可能性。',
|
||||||
com_endpoint_openai_pres:
|
com_endpoint_openai_pres:
|
||||||
'值介于-2.0到2.0之间。正值表示根据出现词元惩罚重复词元结果, 从而增加模型提出新话题的可能性。',
|
'值介于-2.0到2.0之间。正值将惩罚当前已经使用的词元,从而增加讨论新话题的可能性。',
|
||||||
com_endpoint_openai_custom_name_placeholder: '为ChatGPT设置一个名称',
|
com_endpoint_openai_custom_name_placeholder: '为ChatGPT设置一个名称',
|
||||||
com_endpoint_openai_prompt_prefix_placeholder:
|
com_endpoint_openai_prompt_prefix_placeholder:
|
||||||
'在消息开头添加系统级提示词,默认为空',
|
'在消息开头添加系统级提示词,默认为空',
|
||||||
|
|
@ -184,7 +185,7 @@ export default {
|
||||||
com_endpoint_examples: ' 预设',
|
com_endpoint_examples: ' 预设',
|
||||||
com_endpoint_completion: '补全',
|
com_endpoint_completion: '补全',
|
||||||
com_endpoint_agent: '代理',
|
com_endpoint_agent: '代理',
|
||||||
com_endpoint_show_what_settings: '显示{0}的设置',
|
com_endpoint_show_what_settings: '显示{0}设置',
|
||||||
com_endpoint_save: '保存',
|
com_endpoint_save: '保存',
|
||||||
com_endpoint_export: '导出',
|
com_endpoint_export: '导出',
|
||||||
com_endpoint_save_as_preset: '保存为预设',
|
com_endpoint_save_as_preset: '保存为预设',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue