在 Git 下翻译项目
我在 Git 存储库中有一个小型 Python 项目(几百行)。我自己开始写,并用法语写。即所有标识符、注释和文本字符串。
现在,为了让其他非法语人士能够使用它,我正在考虑将该项目翻译成英语。这样做的好策略是什么?
- 我应该在主分支的顶端创建额外的提交,然后翻译整个内容吗?
- 或者我应该重新创建历史记录并单独翻译每个提交?如果是这样,您会推荐什么工作流程?
不管怎样,到目前为止我一直保持着历史的线性。另外,我很确定除了我的计算机和我的 Gitorious 帐户上的存储库之外,没有任何存储库的克隆。因此,就这一点而言,我认为重写历史不会是一个问题。
欢迎所有意见:评论、建议、问题。 谢谢 !
I have a small Python project (a few hundred lines) in a Git repository. I started it myself, and wrote it in French. That is, all identifiers, comments, and text strings.
Now, in order for other, non-French speaking people, to be able to use it, I am thinking of translating the project in English. What would be a good strategy to do so ?
- Should I just create extra commit(s) at the tip of my main branch, and translate the whole thing?
- Or should I re-create the history and translate each commit separately? If so, what workflow would you recommend ?
For what it is worth, I have kept the history linear until now. Also, I'm pretty sure there are no clones of the repository other that the ones on my computer and on my Gitorious account. So, for that matter, I don't think it would be a problem to rewrite history.
All input is welcome: remarks, suggestions, questions.
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我只会使用第一个选项并创建额外的提交。
IMO,代码的当前状态对于当前的开发至关重要。如果当前版本的代码都是英文的,谁会在乎历史上是否有法语变量名的旧版本呢?
我能想到的唯一问题是,当一个非法语开发人员必须浏览旧的“法语”提交时(试图理解某些东西是如何工作的,或者为什么它是这样完成的......无论如何) ).
法语变量名称和注释(甚至提交消息!)将使开发人员更难理解正在发生的事情。
另一方面......谁知道这是否会发生?如果项目现在没那么大,法国人可能不会做出那么多承诺。因此,如果遇到任何问题,不会说法语的人必须浏览法国历史,他们可以要求您进行澄清。
I think I would just use the first option and create extra commits.
IMO, the current state of the code is what counts for current development. If the current version of the code is all in English, who cares if there are old versions with French variable names in the history?
The only issue that I can think of would be when a non-French speaking developer will have to browse through the old "French" commits (trying to understand how something certain works, or why it was done the way it is...whatever).
French variable names and comments (or even commit messages!) will make it harder for that developer to understand what's going on.
On the other hand...who knows if this will ever happen? If the project is not that big now, there will probably not be that much French commits. So if there will ever be any issue where someone who does not speak French will have to browse the French history, they can just ask you for clarification.