Skip to content

Conversation

@R3N3G
Copy link
Contributor

@R3N3G R3N3G commented Sep 12, 2025

This pull request adds support for Spanish (es-ES) localization throughout the backend and frontend of the application. The changes include updating data models, validation, language bundles, and frontend language selection, as well as adding a comprehensive Spanish translation file and improving the Spanish README documentation.

Backend internationalization and validation updates:

  • Added Es field to the Locale struct in agent/app/dto/app.go to support Spanish localization.
  • Updated the Login struct in core/app/dto/auth.go to include 'es-ES' in the allowed language options for validation.
  • Registered the Spanish language bundle in both agent/i18n/i18n.go and core/i18n/i18n.go by loading lang/es-ES.yaml. [1] [2]
  • Added a new Spanish translation file core/i18n/lang/es-ES.yaml containing all necessary keys for backend error messages, commands, and system notifications.

Frontend internationalization enhancements:

  • Imported Spanish locale from Element Plus and updated language selection logic in frontend/src/App.vue to support es-es. [1] [2]
  • Updated the App.Language type in frontend/src/api/interface/app.ts to include 'es-es'.
  • Registered Spanish translations in the frontend language module and made them available under the 'es-ES' key in frontend/src/lang/index.ts. [1] [2]

Documentation improvements:

  • Renamed the Spanish README file to README.es-es.md and improved translation quality and terminology for clarity and consistency. [1] [2]Created Spanish files es-ES Spain

First try

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 12, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Sep 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ssongliu for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

import ru from 'element-plus/es/locale/lang/ru';
import ko from 'element-plus/es/locale/lang/ko';
import tr from 'element-plus/es/locale/lang/tr';
import esES from 'element-plus/es/locale/lang/es-es';
Copy link
Member

@lan-yonghui lan-yonghui Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@R3N3G element-plus中的名称是es,这里引用有问题,保持一致都使用es作为语言的简写比较好

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, exists more references (es-ES, es-CA. es-AR...) . My target in my commits is es-ES from Spain traditional

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but the 'element-plus/es/local/lang/es-es' path does not exist. The correct reference is' element-plus/es/local/lang/es';

@wanghe-fit2cloud wanghe-fit2cloud changed the title Dev v2 spanish WIP: Dev v2 spanish Sep 16, 2025
@lan-yonghui
Copy link
Member

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm label Sep 17, 2025
@wanghe-fit2cloud wanghe-fit2cloud merged commit 1999f10 into 1Panel-dev:dev-v2 Sep 17, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants