html tool

2012年6月6日星期三

Dive into python 的我的翻译 IX




 [原文]P117
Combined with some string formatting, you've taken the name of a dialect and transformed it into the name of the corresponding Dialectizer class. If dialectName is the string 'chef', parserName will be the string 'ChefDialectizer'.
[pope译]绑定一些字符格式,你将命名一个方言(dialect)并且 重新格式化(transformed) 它到与其名称一致的Dialectizer 类中。如果方言名(dialectName)是 字符串'chef',语法分析器名字(parserName)将会是'ChefDialectizer'

[net 译 来源:http://woodpecker.org.cn/diveintopython/html_processing/all_together.html ]
再使用字符串格式化,我们就得到了一种方言的名字,并将它转化为了相应的方言变换器类的名字。如果 dialectName 是字符串 'chef'parserName 将是字符串 'ChefDialectizer'

【popexizhi:
1.combined with 翻译成“再使用”在这里很ok,上文提到的先captalize 先大小写格式化了一下,这里是它后面的操作,“再”是一定要用的,后面的some string formatting 说的是“%sDialectizer” % dialectName的部分,链接的位置是string的“%s” % string 的使用方式。这个“再”很清楚的表达了,程序在这里是先执行dialectName.captalize()部分,之后执行"%sDialectizer" % 部分的顺序含义。对比自己当初的翻译--太烂了,不只没有说明白doing what ,对顺序也没有体现,嘻嘻,检讨一下。
2.先说 the name of ,这里使用了两次,都是直接翻译就ok的事,自己在第一次的the name of a dialect中变成名词动用的翻译了,而第二次的 the name of the cprrespanding Dialectizer class 中。。。自己是没有翻译的,这个“其名称一致的”从语法上是it的定语,不是the corresponding Dialectizer class的。这里的翻译自己把所属者都弄错了,难怪看一下自己翻译的句子,不知说什么呢!:)
3.这个说的是 transformed .. into.. ,直译为“转换..到..”,自己的翻译是“重新格式化”,当初这样选择是没有看到transformed..into..的词组,并且先当然的把transformed  理解成 translate ,所以就意义了一个“重新格式化”出来。
】 

没有评论:

发表评论