gpt4 book ai didi

translation - po 翻译文件 : what are automatic comments for?

转载 作者:行者123 更新时间:2023-12-04 16:47:02 24 4
gpt4 key购买 nike

当我翻译一些东西时,有时会有一些字符串放在注释中并保留在其他所有内容之后。这些评论有什么用?

例如:

#~ msgid ""
#~ "You tried to register but your email is already known.\n"
#~ "To try again to login, click on the following link:\n"
#~ "{}{}"
#~ msgstr ""
#~ "Vous avez essayé de vous enregistrer, mais votre email est déjà connu."
#~ "Pour vous connecter, cliquez sur le lien suivant :\n"
#~ "{}{}"

~ 有什么用?有时会有这样的管道:

#~| msgid "Show your activity"
#~ msgid "your activities"
#~ msgstr "Montrer mon activité"

| 有什么用?

最佳答案

#~ 注释是过时 字符串。当一个字符串有翻译但没有出现在当前模板(.pot)中时,msgmerge工具会用#~注释掉它,但把它留在里面。

如果该字符串以后再次出现,它会再次取消对翻译的注释,因此您不必重新翻译它。它还将使用这样评论的条目作为通过模糊匹配的建议来源。


#~| 是注释掉 #| 注释的结果。 #| 注释是通过模糊匹配创建建议时的原始文本。例如,如果目录有

msgid "Open"
msgstr "Otevři"

模板有

msgid "Open!"
msgstr ""

然后 msgmerge 将创建:

#,fuzzy
#| msgid "Open"
msgid "Open!"
msgstr "Otevři"

像 poedit、pootle 或 weblate 这样的 po 编辑器应该在固定字符串并移除模糊标志时移除 #| 注释。但是,如果有人在文本编辑器中编辑 .po,他们可能会错误地将其留在其中。

关于translation - po 翻译文件 : what are automatic comments for?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39505103/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com