feat: Add Chinese translations for various components in DashAI#667
Open
Felipedino wants to merge 5 commits into
Open
feat: Add Chinese translations for various components in DashAI#667Felipedino wants to merge 5 commits into
Felipedino wants to merge 5 commits into
Conversation
- Created new JSON files for localization in Chinese for home tour, hub, models, models session tour, models tour, notebook tour, plugins, and prediction features. - Added translations for user interface elements, error messages, and instructional text to enhance user experience for Chinese-speaking users.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands DashAI’s internationalization support by adding Chinese (zh) translations across both backend component metadata (used to localize component registries/schemas) and frontend UI locale resources, and wires zh into the frontend language selector and i18n resource map.
Changes:
- Added
zhsupport to backendMultilingualStringand provided Chinese translations for many tasks, models, metrics, explorers, converters, optimizers, dataloaders, and dataset sources. - Added Chinese locale JSON resources on the frontend and registered them in the i18n initialization, including enabling
zhas a supported language. - Updated relevant frontend contexts to refetch localized task metadata when the active language changes.
Reviewed changes
Copilot reviewed 207 out of 207 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/ci_alembic_check.py | Import ordering cleanup (no functional change). |
| DashAI/front/src/utils/i18n/index.js | Registers zh resources and adds zh to supportedLngs. |
| DashAI/front/src/components/LanguageSelector.jsx | Adds zh option to the language selector. |
| DashAI/front/src/components/models/ModelsContext.jsx | Refetches tasks when language changes (dependency switch to i18n.language). |
| DashAI/front/src/components/generative/GenerativeContext.jsx | Refetches generative tasks on language change. |
| DashAI/front/src/utils/i18n/locales/zh/common.json | Adds Chinese UI strings (common namespace). |
| DashAI/front/src/utils/i18n/locales/zh/configurableObject.json | Adds Chinese UI strings (configurableObject namespace). |
| DashAI/front/src/utils/i18n/locales/zh/custom.json | Adds Chinese UI strings (custom namespace). |
| DashAI/front/src/utils/i18n/locales/zh/datasets.json | Adds Chinese UI strings (datasets namespace). |
| DashAI/front/src/utils/i18n/locales/zh/datasetsTour.json | Adds Chinese UI strings (datasets tour). |
| DashAI/front/src/utils/i18n/locales/zh/experiments.json | Adds Chinese UI strings (experiments namespace). |
| DashAI/front/src/utils/i18n/locales/zh/explainers.json | Adds Chinese UI strings (explainers namespace). |
| DashAI/front/src/utils/i18n/locales/zh/generative.json | Adds Chinese UI strings (generative namespace). |
| DashAI/front/src/utils/i18n/locales/zh/generativeTour.json | Adds Chinese UI strings (generative tour). |
| DashAI/front/src/utils/i18n/locales/zh/home.json | Adds Chinese UI strings (home namespace). |
| DashAI/front/src/utils/i18n/locales/zh/homeTour.json | Adds Chinese UI strings (home tour). |
| DashAI/front/src/utils/i18n/locales/zh/hub.json | Adds Chinese UI strings (hub/data file center). |
| DashAI/front/src/utils/i18n/locales/zh/models.json | Adds Chinese UI strings (models namespace). |
| DashAI/front/src/utils/i18n/locales/zh/modelsSessionTour.json | Adds Chinese UI strings (models session tour). |
| DashAI/front/src/utils/i18n/locales/zh/modelsTour.json | Adds Chinese UI strings (models tour). |
| DashAI/front/src/utils/i18n/locales/zh/notebookTour.json | Adds Chinese UI strings (notebook tour). |
| DashAI/front/src/utils/i18n/locales/zh/plugins.json | Adds Chinese UI strings (plugins namespace). |
| DashAI/front/src/utils/i18n/locales/zh/prediction.json | Adds Chinese UI strings (prediction namespace). |
| DashAI/back/core/utils.py | Adds zh field to MultilingualString and returns zh translation in get(). |
| DashAI/back/tasks/translation_task.py | Adds zh task description/display name. |
| DashAI/back/tasks/text_to_text_generation_task.py | Adds zh task display name/description. |
| DashAI/back/tasks/text_to_image_generation_task.py | Adds zh task display name/description. |
| DashAI/back/tasks/text_classification_task.py | Adds zh task display name/description. |
| DashAI/back/tasks/tabular_classification_task.py | Adds zh task display name/description. |
| DashAI/back/tasks/regression_task.py | Adds zh task display name/description. |
| DashAI/back/tasks/image_classification_task.py | Adds zh task display name/description. |
| DashAI/back/tasks/controlnet_task.py | Adds zh task display name/description. |
| DashAI/back/optimizers/optuna_optimizer.py | Adds zh schema field alias/description and optimizer metadata strings. |
| DashAI/back/optimizers/hyperopt_optimizer.py | Adds zh schema field alias/description and optimizer metadata strings. |
| DashAI/back/models/scikit_learn/tfidf_logreg_text_classification_model.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/svr.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/svc.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/sgd_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/ridge_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/random_forest_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/random_forest_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/mlp_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/mlp_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/logistic_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/linearSVR.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/linear_svc_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/linear_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/lasso_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/k_neighbors_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/k_neighbors_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/hist_gradient_boosting_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/hist_gradient_boosting_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/gradient_boosting_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/gradient_boosting_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/gaussian_nb.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/extra_trees_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/extra_trees_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/elastic_net_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/dummy_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/decision_tree_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/decision_tree_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/bow_text_classification_model.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/bayesian_ridge_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/bagging_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/adaboost_regression.py | Adds zh model display name/description. |
| DashAI/back/models/scikit_learn/adaboost_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/resnet50_image_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/resnet18_image_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/mlp_image_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/lenet5_image_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/efficientnet_b0_image_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/cnn_image_classifier.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/xlnet_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/xlm_roberta_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/tongyi_z_image_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/t5_small_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/stable_diffusion_xl_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/stable_diffusion_v3_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/stable_diffusion_v2_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/stable_diffusion_v1_depth_controlnet.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/smol_lm_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/sdxl_turbo_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/sdxl_canny_controlnet_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/sd15_openpose_controlnet_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/sd15_hed_controlnet_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/sd15_depth_controlnet_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/roberta_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/qwen_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/pixart_sigma_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/opus_mt_fr_en_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/opus_mt_es_en_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/opus_mt_en_pt_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/opus_mt_en_fr_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/opus_mt_en_es_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/opus_mt_en_de_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/nllb_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/multilingual_bert_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/modernbert_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/mixtral_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/mistral_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/minilm_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/m2m100_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/llama_model.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/electra_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/distilbert_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/deberta_v3_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/beto_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/bertin_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/bert_transformer.py | Adds zh model display name/description. |
| DashAI/back/models/hugging_face/albert_transformer.py | Adds zh model display name/description. |
| DashAI/back/metrics/translation/ter.py | Adds zh metric description. |
| DashAI/back/metrics/translation/chrf.py | Adds zh metric description. |
| DashAI/back/metrics/translation/bleu.py | Adds zh metric description. |
| DashAI/back/metrics/regression/rmse.py | Adds zh metric description. |
| DashAI/back/metrics/regression/r2.py | Adds zh metric description. |
| DashAI/back/metrics/regression/mse.py | Adds zh metric description. |
| DashAI/back/metrics/regression/median_absolute_error.py | Adds zh metric description. |
| DashAI/back/metrics/regression/mae.py | Adds zh metric description. |
| DashAI/back/metrics/regression/explained_variance.py | Adds zh metric description. |
| DashAI/back/metrics/classification/roc_auc.py | Adds zh metric description. |
| DashAI/back/metrics/classification/recall.py | Adds zh metric description. |
| DashAI/back/metrics/classification/precision.py | Adds zh metric description. |
| DashAI/back/metrics/classification/log_loss.py | Adds zh metric description. |
| DashAI/back/metrics/classification/hamming_distance.py | Adds zh metric description. |
| DashAI/back/metrics/classification/f1.py | Adds zh metric description. |
| DashAI/back/metrics/classification/cohen_kappa.py | Adds zh metric description. |
| DashAI/back/metrics/classification/accuracy.py | Adds zh metric description. |
| DashAI/back/exploration/statistical_explorer.py | Adds zh explorer display name. |
| DashAI/back/exploration/relationship_explorer.py | Adds zh explorer display name. |
| DashAI/back/exploration/preview_inspection_explorer.py | Adds zh explorer display name. |
| DashAI/back/exploration/multidimensional_explorer.py | Adds zh explorer display name. |
| DashAI/back/exploration/distribution_explorer.py | Adds zh explorer display name. |
| DashAI/back/exploration/explorers/wordcloud.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/scatter_plot.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/scatter_matrix.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/row_explorer.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/parallel_cordinates.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/parallel_categories.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/multibox_plot.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/histogram_plot.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/ecdf_plot.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/describe_explorer.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/density_heatmap.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/cov_matrix.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/corr_matrix.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/exploration/explorers/box_plot.py | Adds zh schema fields and explorer metadata. |
| DashAI/back/explainability/explainers/permutation_feature_importance.py | Adds zh schema fields and explainer metadata. |
| DashAI/back/explainability/explainers/partial_dependence.py | Adds zh schema fields and explainer metadata. |
| DashAI/back/explainability/explainers/kernel_shap.py | Adds zh schema fields and explainer metadata. |
| DashAI/back/dependencies/database/migrate.py | Removes extra blank line (formatting only). |
| DashAI/back/dataset_sources/base_dataset_source.py | Adds zh placeholders to base display name/description. |
| DashAI/back/dataset_sources/zenodo_dataset_source.py | Adds zh dataset source metadata. |
| DashAI/back/dataset_sources/openml_dataset_source.py | Adds zh dataset source metadata. |
| DashAI/back/dataset_sources/huggingface_dataset_source.py | Adds zh dataset source metadata. |
| DashAI/back/dataloaders/classes/dataloader.py | Adds zh dataloader category string. |
| DashAI/back/dataloaders/classes/json_dataloader.py | Adds zh schema fields and dataloader metadata. |
| DashAI/back/dataloaders/classes/image_dataloader.py | Adds zh dataloader metadata. |
| DashAI/back/dataloaders/classes/arff_dataloader.py | Adds zh dataloader metadata. |
| DashAI/back/converters/category/basic_preprocessing.py | Adds zh converter category label. |
| DashAI/back/converters/category/advanced_preprocessing.py | Adds zh converter category label. |
| DashAI/back/converters/category/dimensionality_reduction.py | Adds zh converter category label. |
| DashAI/back/converters/category/encoding.py | Adds zh converter category label. |
| DashAI/back/converters/category/feature_selection.py | Adds zh converter category label. |
| DashAI/back/converters/category/polynomial_kernel.py | Adds zh converter category label. |
| DashAI/back/converters/category/sampling.py | Adds zh converter category label. |
| DashAI/back/converters/category/scaling_and_normalization.py | Adds zh converter category label. |
| DashAI/back/converters/simple_converters/nan_remover.py | Adds zh converter metadata. |
| DashAI/back/converters/simple_converters/column_remover.py | Adds zh converter metadata. |
| DashAI/back/converters/simple_converters/character_replacer.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/hugging_face/embedding.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/hugging_face/tokenizer.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/imbalanced_learn/random_under_sampler_converter.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/imbalanced_learn/smote_converter.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/imbalanced_learn/smoteenn_converter.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/additive_chi_2_sampler.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/bag_of_words.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/binarizer.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/cca.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/fast_ica.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/generic_univariate_select.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/incremental_pca.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/knn_imputer.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/label_encoder.py | Adds zh converter metadata. |
| DashAI/back/converters/scikit_learn/max_abs_scaler.py | Adds zh converter metadata. |
| DashAI/back/converters/scikit_learn/min_max_scaler.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/missing_indicator.py | Adds zh converter metadata. |
| DashAI/back/converters/scikit_learn/normalizer.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/nystroem.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/one_hot_encoder.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/ordinal_encoder.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/pca.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/polynomial_features.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/rbf_sampler.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/select_fdr.py | Adds zh schema field description and converter metadata. |
| DashAI/back/converters/scikit_learn/select_fpr.py | Adds zh schema field description and converter metadata. |
| DashAI/back/converters/scikit_learn/select_fwe.py | Adds zh schema field description and converter metadata. |
| DashAI/back/converters/scikit_learn/select_k_best.py | Adds zh schema field description and converter metadata. |
| DashAI/back/converters/scikit_learn/select_percentile.py | Adds zh schema field description and converter metadata. |
| DashAI/back/converters/scikit_learn/simple_imputer.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/skewed_chi_2_sampler.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/standard_scaler.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/tf_idf.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/truncated_svd.py | Adds zh schema fields and converter metadata. |
| DashAI/back/converters/scikit_learn/variance_threshold.py | Adds zh schema field description and converter metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… normalization in MultilingualString
c791de4 to
46b8a8e
Compare
Exclude `migrate.py` and `ci_alembic_check.py` from ruff and ruff-format.
Irozuku
requested changes
Jun 4, 2026
Collaborator
Irozuku
left a comment
There was a problem hiding this comment.
It would be useful to use dashAI instead of DashAI for the new translations, since it will soon be changed across the entire application.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds Chinese (
zh) translations to the multilingual strings used throughout the converter modules in the backend. These updates improve internationalization support, making the user interface more accessible for Chinese-speaking users. The changes affect category definitions, schema field descriptions, and display names for various data processing and machine learning components.Internationalization Enhancements:
MultilingualStringfields for converter category classes, including basic/advanced preprocessing, dimensionality reduction, encoding, feature selection, polynomial kernel methods, sampling, and scaling/normalization (DashAI/back/converters/category/*.py). [1] [2] [3] [4] [5] [6] [7] [8]DashAI/back/converters/hugging_face/embedding.py,DashAI/back/converters/hugging_face/tokenizer.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]DashAI/back/converters/imbalanced_learn/*.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]DashAI/back/converters/scikit_learn/additive_chi_2_sampler.py,DashAI/back/converters/scikit_learn/bag_of_words.py). [1] [2] [3] [4]