Files
gpustack-ui/src/locales
Yuxing Deng fcd1d01e83 feat(cluster): update K8s cluster form for new k8s_options API
Align the Kubernetes cluster create/edit page with the backend's
promotion of operator/K8s knobs out of worker_config and the removal
of gpuVendorOverrides.

- k8s_options: drop gpuVendorOverrides; add operatorImage, namespace,
  and gpuInstanceOptions (presence = GPU instances enabled, carrying an
  optional gpuInstancesAccessStaticAddress).
- Add a top-level system_default_container_registry to the cluster type
  (promoted out of worker_config on the backend).
- Group all k8s_options fields into a new top-level "K8s Deployment
  Options" collapsible section (sibling of Advanced, rendered above it),
  with namespace first followed by volume mounts, image credentials,
  node selector, operator image, and GPU instances.
- Drive the GPU instances toggle from local state instead of
  Form.useWatch (an unregistered nested path never re-rendered, leaving
  the switch unresponsive); use antd's borderless Switch and keep the
  label/switch grouped together. Namespace gains a gpustack-system
  placeholder.
- Remove the gpuVendorOverrides validation from the form and the stale
  operator_image / namespace / gpu_instances_access_static_address hints
  from the worker_config YAML template and JSON schema.
- Add-worker GPU picker: always allow multi-select for K8s clusters
  (runtime node selectors are now auto-derived), dropping the
  override-gating, cluster fetch, and single-only hint.
- Update locales (en/zh/ja/ru/tr) for the removed and added keys.
2026-05-29 17:56:01 +08:00
..
2025-03-28 19:15:57 +08:00
2024-11-22 10:00:34 +08:00
2025-03-28 15:03:37 +08:00
2026-04-24 14:28:30 +08:00
2025-03-04 18:01:29 +08:00
2026-04-24 14:28:30 +08:00
2024-11-22 10:00:34 +08:00

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:
    const requireContext = require.context(
      `./{new-language-directory}`,
      false,
      /\.ts$/
    );
    

3. Translate Each Attribute Value

  • Open the .ts file in the new directory.

  • For each key-value pair:

    • If a translation is available, replace the value with the translated text.
    • If no translation is available, keep the English value as default.
  • Note: Keeping the English text as the default ensures the application remains functional even if some translations are missing.

4. Finalize the Configuration

  • Review and ensure all translations are complete.
  • If any translations are missing, they will default to English.
  • Your new language configuration is now ready for use!

5. Verify that all language keys are consistent.

npm run check:locales