alibaba / pont

🌉数据服务层解决方案
MIT License
3.03k stars 254 forks source link

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

Open zhuSass opened 4 months ago

zhuSass commented 4 months ago

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

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

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

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

Other information(其他信息)

CLAassistant commented 4 months ago

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 commented 4 months ago

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

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

zhuSass commented 4 months ago

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

z979054461 commented 4 months ago

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

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

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