mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 01:40:15 +01:00
🌏 i18n: Improve clarity of English translation (#3154)
* 🌏 i18n: Improve clarity of English translation * 🔧 fix(useCategories): replace i18n string to `com_ui_select_a_category` * 🔨 refactor: avoid using placeholder strings where possible This commit simplifies the internationalization approach for English language strings by removing the placeholder ones where they are used only once. This makes proper localization possible for Russian language, and possibly others. Also renamed `com_ui_text_prompt` to `com_ui_prompt_text` to match the alphabetical order. * 🎨 style(CreatePromptForm): add missing margin-top to the submit button
This commit is contained in:
parent
e2867eecc9
commit
eef894e608
8 changed files with 22 additions and 20 deletions
|
|
@ -99,7 +99,7 @@ const CreatePromptForm = ({
|
|||
<Controller
|
||||
name="name"
|
||||
control={control}
|
||||
rules={{ required: localize('com_ui_is_required', localize('com_ui_prompt_name')) }}
|
||||
rules={{ required: localize('com_ui_prompt_name_required') }}
|
||||
render={({ field }) => (
|
||||
<div className="mb-1 flex items-center md:mb-0">
|
||||
<Input
|
||||
|
|
@ -127,13 +127,13 @@ const CreatePromptForm = ({
|
|||
<div className="w-full md:mt-[1.075rem]">
|
||||
<div>
|
||||
<h2 className="flex items-center justify-between rounded-t-lg border border-gray-300 py-2 pl-4 pr-1 text-base font-semibold dark:border-gray-600 dark:text-gray-200">
|
||||
{localize('com_ui_text_prompt')}*
|
||||
{localize('com_ui_prompt_text')}*
|
||||
</h2>
|
||||
<div className="mb-4 min-h-32 rounded-b-lg border border-gray-300 p-4 transition-all duration-150 dark:border-gray-600">
|
||||
<Controller
|
||||
name="prompt"
|
||||
control={control}
|
||||
rules={{ required: localize('com_ui_is_required', localize('com_ui_text_prompt')) }}
|
||||
rules={{ required: localize('com_ui_prompt_text_required') }}
|
||||
render={({ field }) => (
|
||||
<div>
|
||||
<TextareaAutosize
|
||||
|
|
@ -159,14 +159,14 @@ const CreatePromptForm = ({
|
|||
onValueChange={(value) => methods.setValue('oneliner', value)}
|
||||
tabIndex={3}
|
||||
/>
|
||||
<div className="flex justify-end">
|
||||
<div className="mt-4 flex justify-end">
|
||||
<Button
|
||||
tabIndex={5}
|
||||
type="submit"
|
||||
variant="default"
|
||||
disabled={!isDirty || isSubmitting || !isValid}
|
||||
>
|
||||
{localize('com_ui_create_var', localize('com_ui_prompt'))}
|
||||
{localize('com_ui_create_prompt')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue