CSV / XLSX 文件配置

上传 CSV 或 XLSX 文件到基于文件的项目后,需要进行额外配置,系统才能导入这些文件的内容。

要在基于文件的项目中配置 CSV 或 XLSX 文件,请按照以下步骤操作:

  1. 打开您的项目并转到 原文 > 文件
  2. 点击文件旁边的 配置,打开配置窗口。

配置文件

在基于字符串的项目中,配置过程也类似。 CSV 或 XLSX 文件在上传到项目之前需要进行额外的配置。

要在基于字符串的项目中配置 CSV 或 XLSX 文件,请按照以下步骤操作:

  1. 打开您的项目并转到 上传 选项卡。
  2. 从您的设备拖放文件。
  3. 点击文件旁边的 配置,打开配置窗口。

Configure File (String-based)

本条中提到的相同配置也适用于 TSV 文件格式。 CSV 和 TSV 文件之间的主要区别在于它们在列之间使用不同的分隔符(即 CSV 中的逗号和 TSV 中的制表符)。

XLSX 文件的配置选项

配置 XLSX 文件时,将提供以下选项:

  • 导入所有单元格——将每个单独的单元格作为独立的源字符串导入。 此外,您可以使用内容分割将源文件的内容分割为较短的文字内容,主要是句子和短段落。 这有助于翻译包含若干句子的内容单元,因为翻译较小篇幅的文本更加容易些。 将使用 Segmentation Rules eXchange (SRX) 进行自动的内容分割。

  • 配置导入的列——指定首选的列顺序。

XLSX 配置选项

配置 XLSX 和 CSV 文件导入的列

使用 配置要导入的列 选项配置 CSV 或 XLSX 文件时,您可以指定以下列类型:

  • – 列包含字符串标识符。 通常是字母数字值。
  • 源字符串 – 列包含应翻译的源字符串。
  • 源字符串/译文 – 列包含源字符串,但文件导出时同一列将填充译文。 上传现有译文时,此列的值将用作译文。
  • 译文 – 导出时添加的结果译文列。 导入和上传现有译文时,系统将检查此列中是否存在现有译文并将其上传到项目中。
  • 语境 – 列包含源字符串的评论或语境信息。
  • 标记 – 列包含源字符串的标记。 You can add multiple labels to each string, separating them with commas.
  • Max. Length – Column contains max.length limit values for the translations of the strings.
  • Not chosen – Column that will be skipped on import.

CSV 配置

Automatic Column Identification

Once you open the configuration dialog for source files in CSV or XLSX formats, the system automatically detects the file scheme based on the column names specified in the first row. The identification is performed in a case-insensitive manner. Columns that weren’t detected automatically will be left as Not chosen for manual configuration. Automatic column identification is especially helpful when you upload multiple multilingual spreadsheets that contain many languages and additional columns (e.g., Context, Labels, Max. Length).

To get the most out of the automatic column detection, we recommend that you name the columns in your CSV or XLSX source files using the values displayed in the table below:

Column type Expected value
键名 identifier, key
源字符串 source phrase, source_phrase, source string, source_string
Source String/Translation source or translation, source_or_translation, source/translation
翻译 译文
语境 context
标记 标记
Max. 长度 max. length, max_length
语言(用于多语言文件) 语言名称 (例如:简体中文), Crowdin 语言代码,语言代码(例如:zh-CN),带下划线的语言代码(例如:zh_CN) 语言代码 ISO 639-1(例如:zh),语言代码 ISO 639-2/T(例如:zho)

By default, during scheme configuration, the system treats CSV and XLSX source files as monolingual. To autodetect file scheme for multilingual source files, follow these steps:

  1. 选择 多语言电子表格
  2. Click More and select Detect Configuration.

配置模板

If multiple files have the same configuration scheme, save your current configuration as a template by clicking Templates > Save as template, then specify the template name and click Save. You’ll be able to apply the template to the newly imported files.

列标题

If you don’t want to translate the column headers, select Do not import the first row (header).

Note: The Do not import the first row (header) option is automatically selected if the automatic scheme detection identifies all columns in the source file.

列标题

重置电子表格配置

If you’d like to start the spreadsheet configuration over, click More and select Reset Configuration.

多语言电子表格

If your file contains several columns with translations into different languages, select Multilingual Spreadsheet and map the languages to the appropriate columns.

By default, when you configure the multilingual spreadsheets, the Import translations option is selected. If you’d like not to import the existing translations from the file, you can clear this option.

如果您的多语言源文件没有足够的列用于所有项目目标语言,请单击添加列。 To remove one of the added columns, click More and select Delete Selected Column.

多语言 CSV

同时配置多个文件

To configure several selected CSV or XLSX files, right-click and select Configure files.

CSV 配置

To configure all CSV or all XLSX files at once, click Configure All.

CSV 配置

在配置窗口中,您将能够在所选文件之间切换以预览并验证应用的配置是否对所有文件都正确。

Changing Scheme for CSV and XLSX Files

You might want to update CSV or XLSX files and change the initially configured scheme. The scheme update might be needed when you add a new target language to your Crowdin project.

To change the scheme for your source file, follow these steps:

  1. Right-click on the needed files and select Change scheme.
  2. 选择您机器上的新文件。
  3. Set the new configuration/template for the file correspondingly.
Note: You can't edit the existing configuration template. 相反,您可以删除它或新建一个。

另请参阅

本文是否有帮助?