配置 JSON 文件类型

您可以配置 JSON 设置,以便自定义在翻译或审校期间处理这种文件类型的方式。

过程

  1. Decide for which projects you want to configure file type settings:
    • For the active project, go to the Projects view, and on the Home tab, select Project Settings.
    • For all future projects, go to File > Options.
  2. 展开文件类型列表,然后选择 JSON 筛选条件。
  3. Select the Parser page, and then:
    1. Under String value extraction, choose one of the options:
      • Extract all string, to extract all string values that contain a key.
      • Specify rules for extracting, to extract values (numbers, boolean, strings, date time) from specific file paths. If the source file has no value, then that empty value becomes undefined in the target file.
    2. If you choose Specify rules for extracting (under String value extraction), select Add. In the Add JSON Path dialog, type a path, choose a value from the Document Structure Information list, and then select OK.
  4. Select the Writer page, and then:
    1. Under Writer:
      • Select Escape non-ASCII and control characters, so that all symbols are transformed to strings, including the Chinese or Arabic characters. For example, if the option is enabled, certain symbols will look like "\u63d0" (hexdecimal digits). If the option is disabled, the hexadecimal digits will be shown as Unicode characters and will be displayed as such in the target file.
      • Select Enable pretty printing in the target file, so that you avoid having all the content written inline. This option is enabled by default.
    2. Under Unicode UTF-8 byte order mark (BOM), choose when the SDL file support software should insert a UTF-8 BOM in the target file:
      • Preserve: don't add if not originally present
      • Preserve: add if not originally present
      • Remove if present
  5. 选择内嵌内容页面。
  6. 选择处理在文档结构信息中找到的内嵌内容,以处理 XML 内嵌内容。
  7. 选择添加,然后在添加内嵌内容处理器中,从内嵌处理器列表选择内嵌内容处理器。
  8. Select the QuickInsert page.
  9. Specify QuickInsert settings to insert tags and formatting, or to insert text and special characters.
  10. 选择确定