flownative / neos-trados
Neos的XML导入/导出,适用于Trados翻译
2.2.0
2022-09-13 13:53 UTC
Requires
- php: ^7.4 || ^8.0
- ext-xmlreader: *
- ext-xmlwriter: *
- neos/neos: ^5.3 || ^7.0 || ^8.0
README
Neos的Trados支持
功能
- 将内容导出为Trados可以处理的XML格式,并只包含所需数据
- 将翻译导入特定语言
安装
composer require flownative/neos-trados
用法
导出命令
Export sites content (e.g. trados:export --filename "acme.com.xml" --source-language "en")
COMMAND:
flownative.neos.trados:trados:export
USAGE:
./flow trados:export [<options>] <starting point> <source language>
ARGUMENTS:
--starting-point The node with which to start the export, relative to the
site node. Optional.
--source-language The language to use as base for the export.
OPTIONS:
--target-language The target language for the translation, optional.
--filename Path and filename to the XML file to create.
--modified-after
--exclude-child-documents If child documents should not be included in the export.
导入命令
Import sites content (e.g. trados:import --filename "acme.com.xml" --workspace "czech-review")
COMMAND:
flownative.neos.trados:trados:import
USAGE:
./flow trados:import [<options>] <filename>
ARGUMENTS:
--filename Path and filename to the XML file to import.
OPTIONS:
--target-language The target language for the translation, optional if
included in XML.
--workspace A workspace to import into, optional but recommended
工作流程
工作流程通常如下
- 使用
trados:export
导出网站内容 - XML由某些翻译机构进行翻译
- 使用
trados:import
将翻译后的XML导入到新的工作区 - 在工作区模块中审查和发布更改
配置
命令通常导出类型为NodeTypes.yaml
文件中配置,如下所示
'TYPO3.Neos:Document':
options:
Flownative:
Neos:
Trados:
properties:
twitterCardType:
skip: true
为了配置哪个维度应该被翻译,可以使用Settings.yaml
进行配置
Flownative: Neos: Trados: languageDimension: 'language_country'
Trados配置
为了以仅显示应翻译的内容的方式配置Trados,您需要创建一个自定义XML文件类型作为过滤器。它需要指定应过滤的标签。这解释了:[链接](https://www.youtube.com/watch?v=TrxLLP5OaIc)
感谢Robin Clemens的提示!