本页内容

C

–update-translations

说明

在 QmlProject 项目文件中,您可以使用TranslationFiles节点列出翻译文件(扩展名为.ts )。如果设置此命令行选项,qmlprojectexporter 将同步这些翻译文件中的字符串与其所指向的 Qml 源文件。

若未指定此命令行选项,qmlprojectexporter 默认不会更新翻译。但若在配置阶段至少缺失一个.ts 文件,则属于例外情况。

注意: 如果存在其他 QmlProject 文件使用相同的.ts 文件的可能性,则 不建议使用此选项仅更新单个模块的翻译。当对某个模块使用此选项时,同一文件中其他模块的已翻译字符串可能会失效。

用法

// Run qmlprojectexporter to only update translations.
qmlprojectexporter --no-export-cpp --no-export-configuration --no-export-modules --update-translations --outdir output-dir my_project.qmlproject

自

该选项是在 QmlProject API 1.3 中引入的。

另请参阅 --no-export-cpp、--no-export-configuration 和--no-export-modules。

在某些 Qt 许可下可用。
了解更多信息。