通过此命令(文本列表类别),可与其他程序(如 Excel)进行数据交换。所用的数据格式为 .csv(逗号分隔值)。执行此命令时,将显示以下对话框:
导入/导出文本列表对话框
通过输入相应路径或利用输入助手 (...),可以指定要导入、导出或比较的文件。通过激活该对话框下部的相应条目,可以定义应执行的操作:
导入 |
导入外部文件时,将按照项目的数据集来放置该文件的数据集。项目中的数据集将根据以下规则进行调整: o如果数据内容相同,则数据集保持不变。 o如果将翻译添加到了外部文件,则也会将其添加到项目的数据集。 o如果修改了翻译中的文本,则也将在项目中进行这种修改。 o如果外部文件中缺少翻译文本,则不会修改项目中的数据集。 o如果将新行添加到了外部文件,则将把这个新数据记录合并到项目文件的数据集中。 o如果项目中包含附加的行,则该行将会保留。 o可以将缺省列中的一项修改视为新文本的插入。但是,如果有包含多个(而不是一个)空白的文本位置,则不会将此文本位置作为一项修改处理。 |
导入替换文件 |
在导入文本列表时,缺省列内的修改被视为新行的插入。原因是,缺省列用作导入/导出期间用于对行进行比较的键。注意:如果该列中的文本具有多个(而不是一个)空白,则不将该文本视为更改。 如果要修改缺省列内的文本(消除键入错误或对现有文本进行补充),则需要一个替换文件。 |
Default Old |
Default New |
命令 |
---|---|---|
取消? |
取消 |
替换 |
Do you want to register? |
Do you really want to register? |
REPLACE_AND_REMOVE |
Do you really want to register? |
Do you really want to register? |
REPLACE_AND_REMOVE |
将上/下执行替换文件。因此,可以说明更改历史的原因。
此命令定义文本行的用途。可用的仅有命令是“替换”。该命令具有以下作用:
通常,在缺省列中输入的文本将由新文本替换。在此示例中,取消?将替换为取消,而 Do you want to register? 将替换为 Do you really want to register?。同时,所有视图元素的文本都将调整,也就是,视图中的旧文本条目将被替换。
如果文本列表中另一行的缺省字段中已包含新的缺省文本,则包含要被替换的条目的行将被完全删除。涉及的视图元素会接收含有相同缺省条目的剩余行的相应条目。在此示例中,应由 Do you really want to register? 替换的默认条目 Do you really want to register?!会发生这种情况。由于更改历史,在执行相关“替换”命令时,已存在包含此缺省条目的行。为避免多次出现此键,将从文本列表中完全删除包含旧缺省文本Do you really want to register?的行。
o导出文本列表时,项目内的所有修改都将与一个外部文件进行比较。根据以下规则,将创建一个新的导出文件:
1 |
如果数据内容相同,则按原样导出数据集。 |
2 |
如果已将一个翻译添加到项目文件,则会将其包括进来。 |
3 |
如果修改了翻译中的文本,则也将在导出文件中进行项目中的这种修改。 |
4 |
如果项目文件中缺少翻译文本,则将该模板的翻译用于新数据集。 |
5 |
如果将新行添加到了项目,则将把这个新数据记录作为项目文件的新数据集进行合并。 |
6 |
如果外部文件包含附加的行,则会再次导出该文件。 |
7 |
可以将缺省列中的一项修改视为新文本的插入。 |
仅导出文本差异处
o如果激活了此选项,则只将与不同版本中相应的行不同的行包括在导出文件中。这种差异文件适合作为翻译用的输入。由于文件应保持尽可能小,因此实际文本列表中缺少的条目不被作为差异处理。
注意: 为了找到相应数据集,可将缺省列用于全局文本列表,并将 Id 列用于所有其他文本列表。因此,对于全局文本列表的所有数据集,Id 列是空的。
外部文件的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
Lenkrad |
Steering wheel |
TextList1 |
0 |
Cancel |
Abbrechen |
Cancel |
TextList1 |
1 |
Door |
- |
- |
TextList1 |
2 |
Light |
- |
- |
导入前项目的文本列表的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
- |
- |
TextList1 |
0 |
Cancel |
Abbrechen |
Abortion |
TextList1 |
1 |
Door |
Tür |
Door |
TextList2 |
3 |
Seat |
Sitz |
Seat |
导入期间,所有差异都将合并到项目中。这两个列表将会调整,这样将在项目中得到以下文本列表。
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
Lenkrad |
Steering wheel |
TextList1 |
0 |
Cancel |
Abbrechen |
Cancel |
TextList1 |
1 |
Door |
- |
- |
TextList1 |
2 |
Light |
- |
- |
TextList2 |
3 |
Seat |
Sitz |
Seat |
外部文件的数据集:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
- |
- |
TextList1 |
0 |
Cancel |
Abbrechen |
Abort |
TextList1 |
1 |
Door |
Tür |
Door |
TextList2 |
2 |
Seat |
Sitz |
Seat |
导出前项目的文本列表的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
Lenkrad |
Steering wheel |
TextList1 |
0 |
Cancel |
Abbrechen |
Cancel |
TextList1 |
1 |
Door |
- |
- |
TextList1 |
3 |
Light |
- |
- |
TextList2 |
- |
- |
- |
- |
导出过程中,所有差异都将合并到外部文件中。这两个列表将会调整,这样将会创建以下外部文件。
导出后项目的文本列表的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
Lenkrad |
Steering wheel |
TextList1 |
0 |
Cancel |
Abbrechen |
Cancel |
TextList1 |
1 |
Door |
Tür |
Door |
TextList1 |
3 |
Light |
- |
- |
TextList2 |
2 |
Seat |
Sitz |
Seat |
外部文件的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
- |
- |
TextList1 |
0 |
Cancel |
Abbrechen |
Abort |
TextList1 |
1 |
Door |
Tür |
Door |
TextList2 |
2 |
Seat |
Sitz |
Seat |
导出前项目的文本列表的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Automobile |
Automobil |
Automobile |
全局文本列表 |
- |
Steering wheel |
Lenkrad |
Steering wheel |
TextList1 |
0 |
Cancel |
Abbrechen |
Cancel |
TextList1 |
1 |
Door |
- |
- |
TextList1 |
3 |
Light |
- |
- |
TextList2 |
- |
- |
- |
- |
导出过程中,与相应的行不同的所有行(实际列表的第 2、3 和 5 行)都将包括在导出文件中。
导出后外部文件的数据内容:
文本列表 |
Id |
缺省 |
德语 |
英语 |
---|---|---|---|---|
全局文本列表 |
- |
Steering wheel |
Lenkrad |
Steering wheel |
TextList1 |
0 |
Cancel |
Abbrechen |
Cancel |
TextList1 |
3 |
Light |
- |
- |