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

fix: 1.翻译中文类名正则规则改成只要包含中文则匹配上 2、yarn.lock阿里内网地址改成公网taobao地址 #430

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhuSass
Copy link

@zhuSass zhuSass commented Apr 30, 2024

What kind of change does this PR introduce(这个 PR 引入了什么样的变化)?

  • Bugfix(修正错误)
  • Feature(新功能)
  • Refactor(重构)
  • Build-related changes(与构建相关的更改)
  • Other, please describe(其他,请描述):

Does this PR introduce a breaking change(这次 PR 引入了一个重大变化吗)?

  • Yes(是)
  • No(否)

If yes, please describe the impact and migration path for existing applications(如果是,请描述现有应用程序的影响和迁移路径):

The PR fulfills these requirements(PR 符合以下要求)

  • All tests are passing(所有测试都通过)

Other information(其他信息)

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zhuzengzhi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@z979054461
Copy link
Collaborator

z979054461 commented Apr 30, 2024

测试不通过。DataTransOutput被转换成了Datatransoutput
image
api-docs:
image
转换结果:
image

这样改影响很大。这只是一个最简单的用例,其他没考虑到的场景可能更多。
修改前后的匹配结果差异如下:
image

@zhuSass
Copy link
Author

zhuSass commented Apr 30, 2024

我认为这是应该兼顾的兼容,实用的工具应该能面对各种命名格式,而不是强加给后端那边进行规范,主要只是一个源数据字符包含特殊字符的场景它也不应该丢给应用者这块进行解决,我认为应该是pont内去解决的 @z979054461

@z979054461
Copy link
Collaborator

我认为这是应该兼顾的兼容,实用的工具应该能面对各种命名格式,而不是强加给后端那边进行规范,主要只是一个源数据字符包含特殊字符的场景它也不应该丢给应用者这块进行解决,我认为应该是pont内去解决的 @z979054461

兼容没有问题,比如匹配中文的时候可以包含_,但是翻译应该只翻译“«”前面的部分,比如同时存在这样几个类,应该只匹配到1、4和5,最终翻译只翻译“输出参数vo”和“中文类名”

  1. 输出参数vo
  2. DataTransOutput
  3. DataTransOutput«输出参数vo»
  4. 中文类名
  5. 中文类名«输出参数vo»

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants