Google Play 控制台 - 翻译服务:我可以在 xml 文件中描述我的字符串吗?

Google Play Console - Translation Service: Can I describe my strings inside xml file?

我想使用翻译服务。当我添加 strings.xml 文件时,我可以看到 "Provide descriptions for your strings to improve translation quality" 和按钮 "ADD DESCRIPTIONS"。但是,如果我向我的 strings.xml 文件添加一些评论 <!-- --> 并重新上传文件,则没有 "Provide descriptions for your strings to improve translation quality" 消息。

这是否意味着我可以通过在每个字符串上方添加注释来描述 strings.xml 文件中的字符串?官方有这方面的资料吗?

这个文档不太好找!

此服务的所有文档is here. The specific parts about helping the translators by providing descriptions and screenshots link to the Android localization checklist. If you click on "Manage your app's UI Strings" you get to this page。向下滚动到显示 "Provide sufficient context for declared strings" 的位置,然后显示:

为声明的字符串提供足够的上下文

当您在 strings.xml 文件中声明字符串时,请务必描述使用该字符串的上下文。这些信息对翻译人员来说非常宝贵,可以提高翻译质量。它还可以帮助您更有效地管理字符串。

这是一个例子:

<!-- The action for submitting a form. This text is on a button that can fit 30 chars -->
<string name="login_submit_button">Sign in</string>

考虑提供上下文信息,其中可能包括:

  • 这个字符串是做什么用的?它何时何地呈现给用户?
  • 这在布局中的什么位置?例如,按钮中的翻译不如文本框灵活。