Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #244

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Dev #244

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/locales/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Adding a New Language Configuration

To add a new language configuration, follow these steps:

1. **Duplicate an Existing Language Directory**

- Choose any existing language directory that you are familiar with, and duplicate it.
- Name the new directory according to the `lang` attribute specified in `lang-config-map.tsx`.

2. **Create a New `.ts` File in the Current Directory**

- In the `locales` directory, create a `.ts` file named to align with the new directory.
- Copy the contents of the `en-US.ts` file into this new `.ts` file.
- Update the following line to match your new language directory:
```ts
const requireContext = require.context(
`./{new-language-directory}`,
false,
/\.ts$/
);
```

3. **Translate Each Attribute Value**

- Open the `.ts` file in the **new directory**.
- Translate the value of each key into your target language.

4. **Finalize the Configuration**
- Review and ensure all translations are complete.
- Your new language configuration is now ready for use!
2 changes: 1 addition & 1 deletion src/pages/llmodels/components/advance-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
{
label: 'vox-box',
value: backendOptionsMap.voxBox,
disabled: false
disabled: source === modelSourceMap.ollama_library_value
}
]}
disabled={
Expand Down
3 changes: 1 addition & 2 deletions src/pages/llmodels/components/table-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,12 @@ const Models: React.FC<ModelsProps> = ({
..._.omit(data, result.omits)
}
});
console.log('modelData:', modelData);
setOpenDeployModal({
...openDeployModal,
show: false
});
setTimeout(() => {
updateExpandedRowKeys([modelData.id]);
updateExpandedRowKeys([modelData.id, ...expandedRowKeys]);
}, 300);
message.success(intl.formatMessage({ id: 'common.message.success' }));
} catch (error) {}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/playground/config/params-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export const ImageParamsConfig: ParamsSchema[] = [
name: 'size',
options: [
{ label: 'playground.params.custom', value: 'custom', locale: true },
{ label: '256x256', value: '256x256' },
{ label: '512x512', value: '512x512' },
{ label: '768x1024', value: '768x1024' },
{ label: '1024x1024', value: '1024x1024' }
],
description: {
Expand Down