|
文件扩展名 |
.qph |
|
API 扩展 |
qph |
|
导入 |
是 |
|
导出 |
是 |
|
复数形式支持 |
否 |
|
描述支持 |
否 |
Qt 术语表是一种基于 XML 的文件格式,用于 Qt 译员填充预翻译的内容。其单元元素是 <phrase>,嵌套有 <source> 和 <target> 元素。
Qt 术语表 (.QPH) 与 Qt 翻译源 (.TS) 的不同之处在于 .QPH 是一个术语表,而 .TS 是一种交换文件格式。 .TS 被 Qt 应用程序用于将本地化内容加载到软件中,而 .QPH 则作为 Qt 译员的术语库。
代码示例
<!DOCTYPE QPH>
<QPH language="en-GB">
<phrase>
<source>boolean_key</source>
<target>--- true
</target>
</phrase>
<phrase>
<source>empty_string_translation</source>
<target/>
</phrase>
<phrase>
<source>key_with_description</source>
<target>对这个键非常重要的描述!(至少在某些格式中)
</phrase>
<phrase>
<source>key_with_line-break</source>
<target>此翻译包含
一个换行符。</target>
</phrase>
<phrase>
<source>nested.deeply.key</source>
<target>哇,这个键嵌套得更深了。</target>
</phrase>
<phrase>
<source>嵌套的键</source>
<target>这个键嵌套在一个命名空间中。</target>
</phrase>
<phrase>
<source>null_translation</source>
<target/>
</phrase>
<phrase>
<source>pluralized_key_one</source>
<target>只找到一只小猫。</target>
</phrase>
<phrase>
<source>pluralized_key_other</source>
<target>哇,你有 %s 只小猫!</target>
</phrase>
<phrase>
<source>pluralized_key_zero</source>
<target>你没有小猫。</target>
</phrase>
<phrase>
<source>sample_collection</source>
<target>---
- 第一个条目
- 第二个条目
- 第三个条目
</target>
</phrase>
<phrase>
<source>simple_key</source>
<target>简单的键,简单的信息,太简单了。</target>
</phrase>
<phrase>
<source>unverified_key</source>
<target>此翻译尚未验证,正在等待验证。</target>(在某些格式中,我们也导出此状态)</target>
</phrase>
</QPH>