在对大文本值进行小幅编辑时如何有效地使用 gettext PO 文件 [英] How to efficiently work with gettext PO files when making small edits to large text values

查看:17
本文介绍了在对大文本值进行小幅编辑时如何有效地使用 gettext PO 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找有关在对大型 msgid 值进行小幅编辑时如何有效使用 gettext PO 文件的提示和/或工具.

Looking for tips and/or tools on how to efficiently work with gettext PO files when making small edits to large msgid values.

示例:我们的 PO 消息目录文件中存储了许多多句/多段消息.如果我们对消息进行非常小的更改,可能是编辑单个句子甚至更正标点符号,那么当我们运行 msgmerge 实用程序时,我们就会丢失原始翻译.

Example: We have lots of multi-sentence/multi-paragraph messages that are stored in our PO message catalog files. If we make a very minor change to a message, perhaps editing a single sentence or even correcting punctuation, we lose our original translation when we run the msgmerge utility.

我们的翻译人员不会从头开始重新翻译长消息(已经通过编辑审批流程),而是返回其 PO 文件的备份副本,并手动搜索他们最后一个 msgid/msgstr 翻译对的文本然后比较当前的 msgid 值以查看发生了什么变化,然后复制并粘贴最后一个翻译,然后他们对其进行编辑以反映更新的 msgid 值.

Rather than re-translate long messages (that have already gone through an editorial approval process) from scratch, our translators return to backup copies of their PO files and manually search for the text of the last msgid/msgstr translation pair which they then diff against the current msgid values to see what has changed, followed by a copy and paste of the last translation which they then edit to reflect the updated msgid value.

这是很多工作!当然必须有更好的方法来处理这种类型的工作流?

That's a lot of work! Certainly there must be a better way of handling this type of workflow?

是否有最佳实践方法来存档和查找不再在 PO 文件中的先前翻译?想到的一个想法是在我们的消息文本或消息之前的评论中存储一个唯一的 msg id,并使用此 id 检索以前的 msgid/msgstr 翻译对以供审阅.或者是否有 PO 编辑器或在线服务可以提高此流程的效率?

Is there a best practice way to archive and find previous translations that are no longer in a PO file? One idea that comes to mind is to store a unique msg id in the text of our messages or in the comments that precede our message and use this id to retrieve previous msgid/msgstr translation pairs for review. Or are there PO editors or online services that make this process more efficient?

谢谢你,马尔科姆

推荐答案

Virtaal的翻译记忆库支持可以可能对此有所帮助.如果您的原始单位在翻译记忆库中,它将在一定的变化范围内(基于 Levenshtein 距离)显示(有差异).它仍将包含原始(未修改的)翻译,但至少原始文本更易于访问并且差异突出.

Virtaal's translation memory support can probably help with this. If your original units are in the translation memory, it will be shown (with differences) within a certain margin of change (based on Levenshtein distance). It will still contain the original (unmodified) translation, but at least the original text is more easily accessible and the differences highlighted.

我不是 100% 确定,但 Pootle 也可能提供基于网络的解决方案.如果您需要任何帮助,请在 FreeNode 上的#pootle 中提问.

I'm not 100% sure, but Pootle might also offer a web based solution. If you need any help, ask in #pootle on FreeNode.

当然,更普遍的改进是尽可能地分离/分割单元.

The more general improvement is, of course, to separate/segment the units as far as possible.

这篇关于在对大文本值进行小幅编辑时如何有效地使用 gettext PO 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆