重复的字符串

配置重复字符串的设置,实现最高的本地化流程效率并节约成本。

概述

Crowdin 企业的本地化流程基于将源字符串翻译为所定义的目标语言。 源字符串以本地化文件形式上传到系统。 在 Crowdin Enterprise 中首次上传或添加(对于 CSV 和其他支持字符串编辑的格式)的每个唯一源字符串都被视为主字符串。 所有其他与主字符串相同,但上传或创建时间较晚的字符串都被视为重复字符串。

重复字符串管理

在 Crowdin Enterprise 中,有六种处理重复字符串的可选选项:

  • 显示 – 翻译员将分别翻译每个实例。
  • 显示,但自动翻译它们。
  • 在版本分支内显示(常规检测)– 重复项只会在版本分支之间隐藏。
  • 在版本分支内显示(严格检测)– 重复项只会在版本分支之间隐藏。
  • 隐藏(常规检测)– 所有重复项将共享相同的翻译。
  • 隐藏(严格检测)– 所有重复项将共享相同的翻译。

常规重复项检测 – 比较字符串时,Crowdin Enterprise 仅考虑源文本。
严格重复项检测 – 比较字符串时,Crowdin Enterprise 同时考虑字符串标识符(键)和源文本。

重复项选项

显示所有重复项

选择此选项后,翻译人员将看到所有重复的字符串。 每个重复项都需要单独翻译。

使用案例:在项目中,同样的词语可能会根据上下文的不同而有不同的含义,这种情况下,它就能完美地发挥作用。

显示,但自动翻译重复项

When this option is selected, all duplicate strings are shown and automatically translated. Once the master string is translated, its translation is automatically shared among all duplicates. This allows translators to review and re-translate duplicate strings if necessary.

Use case: works excellently if you want to save time but still require automatic translations to be reviewed.

To better illustrate how the Show, but auto-translate them option works, consider the following five-string JSON file: two strings are unique, and three strings have identical source text.

{
    "hello": "Hello",
    "welcome": "Welcome!",
    "save1": "Save",
    "save2": "Save",
    "save3": "Save"
}

Upon importing this file, the system marks the first of these identical strings ("save1": "Save") as the master string with the “Master” marking, while the subsequent two identical strings ("save2": "Save" and "save3": "Save") are labeled as duplicates of this master string with the “Duplicate” marking.

Once you set the Duplicate strings option to Show, but auto-translate them, the system keeps all five strings visible to translators and for the master string and its two duplicates, automatic translation propagation is enabled. This means that translations are automatically shared from the master string to its duplicates.

Let’s consider the following scenarios:

  • Master string is translated first – the system immediately propagates the translation of the master string to its duplicates. As a result, all three identical strings (the master string and its two duplicates) are displayed with translations. However, translators can review and re-translate each duplicate with their own translation as needed. If a unique translation is provided for a specific duplicate, it will override the shared translation for that string alone, allowing for precise context-specific translations without affecting the other duplicates. If a translator removes a duplicate’s unique translation, it will be automatically translated with a translation from a master string.

  • One of the duplicates is translated first – the system does not propagate the translation of the duplicate to the master string or the other duplicate. Consequently, one duplicate string is displayed with a translation, while the master string and the other duplicate remain untranslated.

在版本分支内显示。 仅在版本分支之间隐藏重复内容

选择该选项后,只有最初上传到系统的主字符串才可用于翻译。 所有重复字符串将自动获得原始字符串的翻译,并在所有版本分支中隐藏。 此选项有两个版本可用:常规重复项检测、严格重复项检测。 如果您的源文件包含具有明显标识符(键)的字符串,最好使用此选项的严格版本。 在其他情况下,请随意使用常规版本。

这里有几点需要注意:

  • 系统始终检查整个分支中字符串的路径。 例如,即使不同版本分支(branch1branch2)中的字符串相同,但它们的路径不同(branch1 - /localization/android.xml 和 branch2 - /localization/apps/android.xml),它们不会被识别为重复项。
  • 此选项仅适用于位于具有相同格式的文件中的字符串。 例如,如果 android.xmlios.strings 文件中存在相同的字符串,则不会将其识别为重复项。

用例:非常适合具有各种版本分支的连续项目。 允许翻译员在不同的分支中使用唯一的字符串。

隐藏所有重复项

选择该选项后,系统会发现所有文件中的重复字符串。 只有最初上传的主字符串才可见并且应被翻译。 隐藏的重复字符串将自动共享相应主字符串的翻译。 此选项有两个版本可用:常规重复项检测、严格重复项检测。 如果您的源文件包含具有明显标识符(键)的字符串,最好使用此选项的严格版本。 在其他情况下,请随意使用常规版本。

使用案例:适用于范围较窄的项目,在这些项目中,所有重复字符串都共享相同的上下文。

另请参阅

本文是否有帮助?