Skip to content

Conversation

@HynoR
Copy link
Contributor

@HynoR HynoR commented Nov 21, 2025

What this PR does / why we need it?

  1. 几乎所有的语言文件存在问题(yaml/yml 混淆不分)(yaml项目末尾带,),绝大部分语言包未正常加载,回落en类型
  2. 中间件 Usei18n 如果没有 accept language,每个请求就会查一次数据库
  3. i18n Init 被多次调用

Summary of your change

  • 从数据库加载系统语言到内存,每次从内存读来确认语言。
  • i18n 初始化逻辑变更,只会初始化一次,并且如果语言文件有问题会打印错误并直接进 panic (之前直接忽略错误,根本是不知道 i18n 加载了没有)
  • 修复文件 ms.yml 到 ms.yaml。 yml 根本没法 yaml 解析
  • 修复 @zhengkunwang223 的 commit feat: Support application migration to other nodes. #10832 出现的语言问题

Please indicate you've done the following:

  • [ x] Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Nov 21, 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 Nov 21, 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 wanghe-fit2cloud 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

@HynoR HynoR changed the title fix: fix bug and improve logic in i18n module fix: improve logic and fix bug in i18n module Nov 21, 2025
@zhengkunwang223
Copy link
Member

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm label Nov 21, 2025
@zhengkunwang223 zhengkunwang223 merged commit ef6d8bb into 1Panel-dev:dev-v2 Nov 21, 2025
0 of 3 checks passed
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.

2 participants