Skip to content

Commit c898ea4

Browse files
committed
Rename settings sections and translation files for API and Web for consistency
- rename 'web configurations section' to 'web section', 'api configurations section' to 'api section - some files in translations have incorrect names └── apps └── editor └── src └── views └── settings └── frontend ├── App.tsx ├── Home │ ├── Home.tsx │ ├── index.ts │ └── sections │ ├── ApiSection.tsx │ ├── GeneralSection.tsx │ └── WebSection.tsx ├── Settings.tsx ├── forms │ ├── EditModelProviderForm │ │ ├── EditModelProviderForm.module.scss │ │ ├── EditModelProviderForm.tsx │ │ └── index.ts │ └── EditTemplateForm │ ├── EditTemplateForm.module.scss │ ├── EditTemplateForm.tsx │ └── index.ts ├── hooks │ ├── use-api-configuration-editing.ts │ ├── use-model-provider-editing.ts │ ├── use-settings.ts │ └── use-web-configuration-editing.ts ├── i18n │ ├── translations │ │ ├── actions.ts │ │ ├── api.ts │ │ ├── common.ts │ │ ├── edit-model-provider-form.ts │ │ ├── edit-template-form.ts │ │ ├── general.ts │ │ ├── index.ts │ │ ├── sections.ts │ │ └── web.ts │ └── use-translation.tsx └── utils └── post-message.ts
1 parent d4548c3 commit c898ea4

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Layout as UiLayout } from '@ui/components/editor/settings/Layout'
33
import { NavigationSection as UiNavigationSection } from '@ui/components/editor/settings/NavigationSection'
44
import { NavigationItemSection as UiNavigationItemSection } from '@ui/components/editor/settings/NavigationItemSection'
55
import { NavigationItemGroup as UiNavigationItemGroup } from '@ui/components/editor/settings/NavigationItemGroup'
6-
import { ApiConfigurationsSection } from './sections/ApiConfigurationsSection'
6+
import { ApiSection } from './sections/ApiSection'
77
import {
88
ApiConfiguration,
99
Provider,
@@ -13,7 +13,7 @@ import { WebConfiguration } from '@shared/types/web-configuration'
1313
import { GeneralSection } from './sections/GeneralSection'
1414
import { ApiFeature } from '@/views/shared/types/api-features'
1515
import { use_translation, TranslationKey } from '../i18n/use-translation'
16-
import { WebConfigurationsSection } from './sections/WebConfigurationsSection'
16+
import { WebSection } from './sections/WebSection'
1717
import { commit_message_instructions as default_commit_message_instructions } from '@/constants/instructions'
1818
import { intelligent_search_task_instructions as default_intelligent_file_search_instructions } from '@/constants/instructions'
1919
import { agentic_search_task_instructions as default_agentic_file_search_instructions } from '@/constants/instructions'
@@ -635,7 +635,7 @@ export const Home: React.FC<Props> = (props) => {
635635
on_delete_template={props.on_delete_template}
636636
/>
637637

638-
<WebConfigurationsSection
638+
<WebSection
639639
ref={(el) => set_section_ref('section:web', el)}
640640
set_section_ref={set_section_ref}
641641
web_configurations={props.web_configurations}
@@ -655,7 +655,7 @@ export const Home: React.FC<Props> = (props) => {
655655
on_ai_studio_user_id_change={props.on_ai_studio_user_id_change}
656656
/>
657657

658-
<ApiConfigurationsSection
658+
<ApiSection
659659
ref={(el) => set_section_ref('section:api', el)}
660660
set_section_ref={set_section_ref}
661661
providers={props.providers}

apps/editor/src/views/settings/frontend/Home/sections/ApiConfigurationsSection.tsx renamed to apps/editor/src/views/settings/frontend/Home/sections/ApiSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type Props = {
5151
on_restore_edit_files_instructions: () => void
5252
}
5353

54-
export const ApiConfigurationsSection = forwardRef<HTMLDivElement, Props>(
54+
export const ApiSection = forwardRef<HTMLDivElement, Props>(
5555
(props, ref) => {
5656
const { t } = use_translation()
5757

@@ -466,4 +466,4 @@ export const ApiConfigurationsSection = forwardRef<HTMLDivElement, Props>(
466466
}
467467
)
468468

469-
ApiConfigurationsSection.displayName = 'ApiConfigurationsSection'
469+
ApiSection.displayName = 'ApiSection'

apps/editor/src/views/settings/frontend/Home/sections/WebConfigurationsSection.tsx renamed to apps/editor/src/views/settings/frontend/Home/sections/WebSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const chatbot_to_icon: Record<keyof typeof CHATBOTS, Icon.Variant> = {
5757
Z: 'Z_AI'
5858
}
5959

60-
export const WebConfigurationsSection = forwardRef<HTMLDivElement, Props>(
60+
export const WebSection = forwardRef<HTMLDivElement, Props>(
6161
(props, ref) => {
6262
const { t } = use_translation()
6363

@@ -333,4 +333,4 @@ export const WebConfigurationsSection = forwardRef<HTMLDivElement, Props>(
333333
}
334334
)
335335

336-
WebConfigurationsSection.displayName = 'WebConfigurationsSection'
336+
WebSection.displayName = 'WebSection'

apps/editor/src/views/settings/frontend/i18n/translations/api-calls.ts renamed to apps/editor/src/views/settings/frontend/i18n/translations/api.ts

File renamed without changes.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { translations as actions } from './actions'
22
import { translations as common } from './common'
33
import { translations as general } from './general'
44
import { translations as sections } from './sections'
5-
import { translations as api_calls } from './api-calls'
6-
import { translations as chatbots } from './chatbots'
5+
import { translations as api } from './api'
6+
import { translations as web } from './web'
77
import { translations as edit_model_provider_form } from './edit-model-provider-form'
88
import { translations as edit_template_form } from './edit-template-form'
99

@@ -12,8 +12,8 @@ export const translations = {
1212
...actions,
1313
...common,
1414
...general,
15-
...api_calls,
16-
...chatbots,
15+
...api,
16+
...web,
1717
...edit_model_provider_form,
1818
...edit_template_form
1919
}

apps/editor/src/views/settings/frontend/i18n/translations/chatbots.ts renamed to apps/editor/src/views/settings/frontend/i18n/translations/web.ts

File renamed without changes.

0 commit comments

Comments
 (0)