Skip to content

Commit fe578fe

Browse files
committed
Refine system instruction translations and add hover state styling for the target switch
- add translations to [Fragment] - when hovering over target and moving onto dropdown, the target should stay in hovered state
1 parent 879af45 commit fe578fe

3 files changed

Lines changed: 48 additions & 44 deletions

File tree

‎apps/editor/src/views/settings/frontend/i18n/translations/api.ts‎

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -454,40 +454,39 @@ export const translations = {
454454
bg: 'Системни инструкции'
455455
},
456456
'api.system-instructions.edit-files.title': {
457-
en: 'Edit Files',
458-
pl: 'Edytuj pliki',
457+
en: 'Editing files',
458+
pl: 'Edytowanie plików',
459459
'zh-cn': '编辑文件',
460460
ja: 'ファイルの編集',
461461
'zh-tw': '編輯檔案',
462462
de: 'Dateien bearbeiten',
463-
es: 'Editar archivos',
464-
fr: 'Modifier les fichiers',
465-
'pt-br': 'Editar Arquivos',
466-
ru: 'Редактировать файлы',
463+
es: 'Edición de archivos',
464+
fr: 'Modification de fichiers',
465+
'pt-br': 'Edição de arquivos',
466+
ru: 'Редактирование файлов',
467467
ko: '파일 편집',
468468
it: 'Modifica file',
469-
tr: 'Dosyaları Düzenle',
470-
cs: 'Upravit soubory',
469+
tr: 'Dosyaları düzenleme',
470+
cs: 'Úprava souborů',
471471
hu: 'Fájlok szerkesztése',
472472
bg: 'Редактиране на файлове'
473473
},
474474
'api.system-instructions.edit-files.description': {
475-
en: "Tone and style instructions for the model when using the 'Edit Files' prompt type with API calls.",
476-
pl: 'Instrukcje dotyczące tonu i stylu dla modelu przy użyciu typu promptu Edycji Plików z zapytaniami API.',
477-
'zh-cn': '使用编辑上下文提示类型进行 API 调用时,模型的语气和样式说明。',
478-
ja: 'API 呼び出しでコンテキスト編集プロンプトタイプを使用する際のモデルのトーンとスタイルの指示。',
479-
'zh-tw': '使用編輯上下文提示類型進行 API 呼叫時,模型的語氣和樣式說明。',
480-
de: 'Ton- und Stilanweisungen für das Modell bei Verwendung des Kontextbearbeitungs-Prompt-Typs mit API-Aufrufen.',
481-
es: 'Instrucciones de tono y estilo para el modelo al usar el tipo de prompt de Edición de Contexto con llamadas a la API.',
482-
fr: "Instructions de ton et de style pour le modèle lors de l'utilisation du type de prompt d'édition de contexte avec les appels API.",
483-
'pt-br':
484-
'Instruções de tom e estilo para o modelo ao usar o tipo de prompt de Edição de Contexto com chamadas de API.',
485-
ru: 'Инструкции по тону и стилю для модели при использовании типа промпта редактирования контекста с вызовами API.',
486-
ko: 'API 호출과 함께 컨텍스트 편집 프롬프트 유형을 사용할 때 모델의 어조 및 스타일 지침입니다.',
487-
it: 'Istruzioni di tono e stile per il modello quando si usa il tipo di prompt di modifica del contesto con chiamate API.',
488-
tr: 'API çağrılarıyla Bağlam Düzenleme prompt türünü kullanırken model için ton ve stil talimatları.',
489-
cs: 'Instrukce tónu a stylu pro model při použití typu promptu úpravy kontextu s voláními API.',
490-
hu: 'Hangvétel és stílus utasítások a modell számára a kontextus szerkesztés prompt típusának API-hívásokkal történő használatakor.',
491-
bg: 'Инструкции за тон и стил към модела при използване на типа промпт за редактиране на контекст с API извиквания.'
475+
en: "Tone and style instructions for the model.",
476+
pl: 'Instrukcje dotyczące tonu i stylu dla modelu.',
477+
'zh-cn': '模型的语气和风格指令。',
478+
ja: 'モデルのトーンとスタイルの指示。',
479+
'zh-tw': '模型的語氣和風格指令。',
480+
de: 'Ton- und Stilanweisungen für das Modell.',
481+
es: 'Instrucciones de tono y estilo para el modelo.',
482+
fr: 'Instructions de ton et de style pour le modèle.',
483+
'pt-br': 'Instruções de tom e estilo para o modelo.',
484+
ru: 'Инструкции по тону и стилю для модели.',
485+
ko: '모델의 어조 및 스타일 지침.',
486+
it: 'Istruzioni di tono e stile per il modello.',
487+
tr: 'Model için ton ve stil talimatları.',
488+
cs: 'Pokyny pro tón a styl modelu.',
489+
hu: 'Hangnem és stílus utasítások a modellhez.',
490+
bg: 'Инструкции за тон и стил за модела.'
492491
}
493492
} as const

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.module.scss‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -223,25 +223,25 @@
223223
}
224224
}
225225

226-
&__target-switch {
227-
position: relative;
226+
&__target-switch {
227+
position: relative;
228228

229-
&__dropdown-wrapper {
230-
position: absolute;
231-
bottom: 100%;
232-
left: 50%;
233-
transform: translateX(-50%);
234-
padding-bottom: 4px;
235-
z-index: 1;
236-
}
229+
&__dropdown-wrapper {
230+
position: absolute;
231+
bottom: 100%;
232+
left: 50%;
233+
transform: translateX(-50%);
234+
padding-bottom: 4px;
235+
z-index: 1;
236+
}
237237

238-
&__dropdown {
239-
background-color: var(--cwc-bg-secondary);
240-
border-radius: 8px;
241-
display: flex;
242-
overflow: hidden;
243-
backdrop-filter: blur(12px);
244-
}
238+
&__dropdown {
239+
background-color: var(--cwc-bg-secondary);
240+
border-radius: 8px;
241+
display: flex;
242+
overflow: hidden;
243+
backdrop-filter: blur(12px);
244+
}
245245

246246
&__dropdown-item {
247247
@include accent-font;
@@ -302,7 +302,8 @@
302302
font-size: 16px;
303303
}
304304

305-
&:hover:enabled {
305+
&:hover:enabled,
306+
&--hovered {
306307
background-color: var(--cwc-bg-secondary);
307308
}
308309

‎packages/ui/src/components/editor/common/prompts/PromptField/PromptField.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,11 @@ export const PromptField: React.FC<PromptFieldProps> = (props) => {
706706
<button
707707
className={cn(
708708
styles['footer__right__submit__button'],
709-
styles['footer__right__target-switch__button']
709+
styles['footer__right__target-switch__button'],
710+
{
711+
[styles['footer__right__submit__button--hovered']]:
712+
is_target_dropdown_open
713+
}
710714
)}
711715
>
712716
<span

0 commit comments

Comments
 (0)