Giter VIP home page Giter VIP logo

Comments (6)

 avatar commented on June 21, 2024 1

曾经也遇见过同样的问题。

arcanist 的确是本地客户端, 但是arc diff的提交模版是来自于 服务端的Phabricator

image

请参考 arcanist 的 ArcanistWorkflow, 它是通过 'differential.getcommitmessage' api 获取的模版内容。

所以才会导致这个lz说的这个问题。

from phabricator_zh_hans.

ericyangpan avatar ericyangpan commented on June 21, 2024

将 dist/PhabricatorSimplifiedChineseTranslation.php 文件拷贝到 Phabricator 项目的 phabricator/src/extensions 目录中即可。

汉化未涉及 arcanist。只是针对 phabricator 进行的。不知道您是把汉化文件拷贝到哪里了导致 arcanist 也被汉化了?

from phabricator_zh_hans.

zxj963577494 avatar zxj963577494 commented on June 21, 2024

@arielyang 我如果在phabricator上选择中文,arcanist也会出现中文,比如在arc diff审核单,选择英文的时候这些也会变成英文, 难道arcanist也会拉phabricator的字典?

from phabricator_zh_hans.

ericyangpan avatar ericyangpan commented on June 21, 2024

arcanist 您操作是在本地做的吧,Phabricator 应该是跑在服务端,所以汉化应该在服务端发生的?为什么本地会变成中文?

from phabricator_zh_hans.

ericyangpan avatar ericyangpan commented on June 21, 2024

曾经也遇见过同样的问题。

arcanist 的确是本地客户端, 但是arc diff的提交模版是来自于 服务端的Phabricator

image

请参考 arcanist 的 ArcanistWorkflow, 它是通过 'differential.getcommitmessage' api 获取的模版内容。

所以才会导致这个lz说的这个问题。

谢谢指出问题。

  1. 最简单的办法:注释掉翻译文件 PhabricatorSimplifiedChineseTranslation.php 中包含 Differential Revision 的这一行。遗留的问题是其他地方的 Differential Revision 就不再被翻译了。
  2. 修改源代码的办法:找到文件 phabricator/src/applications/differential/field/DifferentialRevisionIDCommitMessageField.php ,在文件中找到:
 public function getFieldName() {
    return pht('Differential Revision');
  }

修改为:

 public function getFieldName() {
    return 'Differential Revision';
  }

此处的 Differential Revision 不再被翻译,但每次升级的时候需要重新修改。

from phabricator_zh_hans.

ericyangpan avatar ericyangpan commented on June 21, 2024

已经临时去掉了 Differential Revision 的翻译。后续给官方提一个 commit 来 fix 这个 bug。

from phabricator_zh_hans.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.