Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【术语表】请大家提出建议 #62

Closed
numbbbbb opened this issue Jun 8, 2014 · 58 comments
Closed

【术语表】请大家提出建议 #62

numbbbbb opened this issue Jun 8, 2014 · 58 comments

Comments

@numbbbbb
Copy link
Member

numbbbbb commented Jun 8, 2014

下面是我收集的术语表及其备选翻译,大家可以进行补充或者提出合适的翻译,这个表将被用于校对。

带“*”号的是争议比较大的,请大家重点关注。

术语 备选翻译
associatedtype 关联类型
range 区间
type property 类型属性
Unary operator 一元运算符
Binary operator 二元运算符
Ternary operator 三元运算符
Labeled Statement 具名语句
conform Protocol 遵循协议
availability-condition 可用性条件
fallthrough 贯穿
Branch Statement 分支语句
Control Transfer Statement 控制传递语句
Type Annotation 类型标注
Type Identifier 类型标识符
Metatype Type 元类型
Protocol Composition Type 复合协议类型
associated value 关联值
raw value 原始值
computed property 演算属性
stored property 寄存属性
calculate property 演算属性
operator 运算符
playground 代码预览
array 数组
dictionary 字典
list 列表
statement 语句
expression 表达式
* optional 可选
* Implicitly Unwrapped optional 隐式解析可选
* Optional Binding 可选绑定
* optional chaining 可选链
collection 集合
convention 约定
iterate 迭代
nest 嵌套
Inheritance 继承
override 重写
base class 基类
* Designated Initializer 指定构造器
* Convenience Initializer 便利构造器
Automatic Reference Counting 自动引用计数
type inference 类型推断
* Type Casting 类型检查
* unwrapped 解析
* wrapped 未解析
* note 注意
closure 闭包
tuple 元组
first-class 一等
* deinitializer 析构器
* Initializer 构造器
* initialization 构造过程
* deinitialization 析构过程
* getter 不翻译
* setter 不翻译
* subscript 下标脚本或下标
property 属性
attribute 如果指以@开头的语法,翻译为特性,其他情况翻译为属性
method 方法
Enumeration 枚举
Structure 结构体
Protocol 协议
Extension 扩展
Generic 泛型
* literal value 字面量
alias 别名
Assertion 断言
@ks1024
Copy link

ks1024 commented Jun 8, 2014

补充:
associated value:实例值 还是 关联值?
raw value :原始值
computed property:计算型属性

@numbbbbb
Copy link
Member Author

numbbbbb commented Jun 8, 2014

更新进去了,之后讨论吧

@lyuka
Copy link
Contributor

lyuka commented Jun 9, 2014

下面这几个术语,怎么定比较好?
类型标注(Type Annotation)
类型标识符(Type Identifier)
协议合成类型(Protocol Composition Type)
元类型(Metatype Type)

@coverxit
Copy link
Contributor

coverxit commented Jun 9, 2014

Branch Statement: 分支语句
Control Transfer Statement: 控制传递语句

@Hawstein
Copy link
Contributor

Initializer和deinitializer是不是翻译成构造器析构器会好一些,觉得不要强调函数二字比较好

@numbbbbb
Copy link
Member Author

嗯 我改下

@coverxit
Copy link
Contributor

还有就是fall through需要定一下,我翻译的时候用的是“贯穿”。
另外,为了和“协议”一节统一,当conform的宾语为protocol的时候,conform译为“遵循”吧。
(好像这本书里用到conform这个动词的时候宾语基本都是protocol)

@duquewu
Copy link
Contributor

duquewu commented Jun 10, 2014

subscript如果只用于arr[index]dic[key]这样的操作的话,还是统一为下标好了. 附属脚本很少见..

@coverxit
Copy link
Contributor

Labeled Statements: 带标签的语句

@lslxdx
Copy link

lslxdx commented Jun 11, 2014

Unary operators: 一元运算符
Binary operators: 二元运算符
Ternary operators: 三元运算符

@pp-prog
Copy link
Contributor

pp-prog commented Jun 11, 2014

type property 类型属性

@cncuckoo
Copy link

供参考:

Type Annotation 类型注解
computed value 计算的值?
stored value 存储的值?
iterate 迭代(traversal 遍历)
Convenience Initializer 便捷初始化器(constructor 构造器)
initialization 初始化
experiment 尝试(experience 经验)——这不是术语吧?

This was referenced Jun 12, 2014
@LieGroup
Copy link

initialization翻译成“初始化”比较好,attribute翻译成“属性”比较好,OOP中“对象初始化”和“对象属性”这两个表述基本上是约定俗成了

@JaySurplus
Copy link
Contributor

"Identical to"是否用等同比较好?

@LieGroup
Copy link

Type Casting翻译为“类型转换”基本上也是约定俗成的,而且cast译为“转换”也与“Type Casting”一节中“downcast”这个词的词意吻合。“类型推断”另有对应的英文:Type Inference

@LieGroup
Copy link

Control Transfer Statement: 在language guide的control flow中,“Control Transfer Statements”一节的标题翻译为“控制传递语句”,而正文翻译为“控制转移语句”,不统一。印象中“控制转移”的翻译更常见,也更匹配上下文“ change the order in which your code is executed”中的“change”

@LieGroup
Copy link

optional 是不是可以翻译为“或有”,取“也许有(有效)值”的意思,理由如下:

  1. language guide对optional的定义是:“有一个值或没有值(there isn't a value at all”
  2. language guide对nil的定义是:"You set an optional variable to a valueless state by assigning it the special value nil", "In Swift, nil is the absence of a value of a certain type" 也都是表达“一个变量或常量被设为nil意为无值”的意思

@numbbbbb
Copy link
Member Author

@LieGroup 非常感谢!type casting现在暂时翻译成了类型检查 之后我们统一进行一下修改

@numbbbbb
Copy link
Member Author

@LieGroup initialization翻译成构造过程主要是考虑下面还有一个deinitialization 如果翻译成初始化的话 deinitialization只能翻译成反初始化了 这个感觉比较难理解

attribute有两种 以@开头的是特性 并不是指对象的属性 这里我没写清楚 其他情况确实是属性

Optional目前还是比较难决定 我们继续讨论~

非常感谢您的建议!!

@numbbbbb
Copy link
Member Author

@JaySurplus 确实应该是等同 在哪里翻译出问题了?我改下

@jameslan
Copy link

Type Inference, 译文里作 “类型推测”, 我以为“类型推断”更好。“推测”有不太肯定的感觉。

@JaySurplus
Copy link
Contributor

@numbbbbb 2.9章中我最初用的是 “等价于” 和 “不等价于” ,后来考虑还是 “等同”更合适些

@xielingwang
Copy link
Contributor

第一章第二篇 一等公民不好理解, a first-class type. 按成第一级类型 一等类型会更好.

@aiiaji
Copy link

aiiaji commented Jun 13, 2014

感觉还是翻译的比较感性一点,毕竟我们学习也是一个增加感谢认知的过程。


Thanks and best regards!
王浩力

18581863091

E-mail: [email protected]

MSN:[email protected]

------------------ 原始邮件 ------------------
发件人: "Amin By"[email protected];
发送时间: 2014年6月13日(星期五) 中午12:42
收件人: "numbbbbb/the-swift-programming-language-in-chinese"the-swift-programming-language-in-chinese@noreply.github.com;
主题: Re: [the-swift-programming-language-in-chinese] 【术语表】请大家提出建议 (#62)

第一章第二篇 一等公民不好理解, a first-class type. 按成第一级类型 一等类型会更好.


Reply to this email directly or view it on GitHub.

@aiiaji
Copy link

aiiaji commented Jun 13, 2014

感觉还是翻译的比较感性一点好,毕竟我们学习也是一个增加感性认知的过程。


Thanks and best regards!
王浩力

18581863091

E-mail: [email protected]

MSN:[email protected]

------------------ 原始邮件 ------------------
发件人: "Amin By"[email protected];
发送时间: 2014年6月13日(星期五) 中午12:42
收件人: "numbbbbb/the-swift-programming-"the-swift-programming-language-in-chinese@noreply.github.com;
主题: Re: [the-swift-programming-language-in-chinese] 【术语表】请大家提出建议 (#62)

第一章第二篇 一等公民不好理解, a first-class type. 按成第一级类型 一等类型会更好.


Reply to this email directly or view it on GitHub.

@fxxing
Copy link

fxxing commented Jun 13, 2014

Labeled Statements 带标签语句 有"的"感觉不是一个词

  • Type Casting 类型转换
  • unwrapped 解包装
  • wrapped 包装
  • literal value 字面值

@yulingtianxia
Copy link
Contributor

Prefix前缀
Infix中缀
Postfix后缀
2.23中大量出现这三个术语,但是翻译成了前置中置后置,感觉不太合适

@numbbbbb
Copy link
Member Author

@yulingtianxia 我看了下,那章确实不太好翻译,如果翻译成前缀的话就变成“前缀运算符”,感觉也有点别扭。

不过那章确实问题比较多,需要仔细审一下。

@yulingtianxia
Copy link
Contributor

嗯,命名习惯不同,以前教材上有前缀表达式,中缀表达式和后缀表达式,运算符该如何称呼的确需要是个问题

@xielingwang
Copy link
Contributor

@yulingtianxia @numbbbbb 前置中置后置是我在翻译运算符章节的时候引进的, 当时参考了一些教程的翻译, 用的每多都用来跟表达式, 表示法, 如前缀表达式, 中缀表示法. 用于运算符虽然存在, 我还是觉得别扭.
其实我是前后比较了一下中置和中缀, 觉得用"置"字更好理解一些.

@xielingwang
Copy link
Contributor

@numbbbbb 语法总结那章的确错误比较多, 我不是故意的, 只是大多术语了, 而且单一个词有单数和复数要分开翻译, 时间比较紧, 确实有点乱来了.

@Lenhoon
Copy link

Lenhoon commented Jun 29, 2015

Type Annotation 感觉翻译成类型标注更好些吧,wiki上也是这样解释地

@athenaxing
Copy link

type property 类属性 是不是可以改成类型属性 与后面的翻译保持一致?

@athenaxing
Copy link

first-class 一等 翻译成 一级或第一类?

@numbbbbb
Copy link
Member Author

@athenaxing 类型属性确实更好些,一等的翻译主要是延续传统。

@Lenhoon
Copy link

Lenhoon commented Jun 30, 2015

Override是译为覆盖更好一些还是重写更好一些呢?

@aiiaji
Copy link

aiiaji commented Jun 30, 2015

重写吧,动词动作更加明显一点,覆盖更像是产生的效果


Thanks and best regards!
王浩力

18581863091

E-mail: [email protected]

MSN:[email protected]

程序构建是一门艺术,我在不断探寻.

------------------ 原始邮件 ------------------
发件人: "Lenhoon"[email protected];
发送时间: 2015年6月30日(星期二) 上午10:40
收件人: "numbbbbb/the-swift-programming-language-in-chinese"the-swift-programming-language-in-chinese@noreply.github.com;
抄送: "ABA"[email protected];
主题: Re: [the-swift-programming-language-in-chinese] 【术语表】请大家提出建议 (#62)

Override是译为覆盖更好一些还是重写更好一些呢?


Reply to this email directly or view it on GitHub.

@kaiya
Copy link

kaiya commented Jun 30, 2015

convention 是译为公约? 或者 惯例?

@LhiKien
Copy link

LhiKien commented Jun 30, 2015

是约定吧?

发自我的 iPhone

在 2015年6月30日,下午4:55,KevinHsiun [email protected] 写道:

convention 是译为公约? 或者 惯例?


Reply to this email directly or view it on GitHub.

@kaiya
Copy link

kaiya commented Jun 30, 2015

嗯,好的。我看前面的文章,翻译的也是约定。

@littledogboy
Copy link
Contributor

availability-condition 可用性条件
用来检查你想要使用的接口是否可用

@TJRoger
Copy link

TJRoger commented Jul 18, 2015

fallthrough (代碼)不翻譯
calculate property 計算(動詞)屬性(,定為術語合適麼)
playground (不太好翻譯)(代碼預覽 不如)代碼操場/代碼訓練場
optional 可選的(形容詞)
Type Casting 類型映射/類型轉換
first-class 初類/一級
initialization 構造
deinitialization 析構
getter/setter 代碼中不翻譯,getter (method) 取值(方法),setter(method) 設值
(方法)
assertion 斷點
另外術語請去掉各種變形(複數、過去式等)

@LhiKien
Copy link

LhiKien commented Jul 18, 2015

assertion 不是断点,是断言吧?

@LhiKien
Copy link

LhiKien commented Jul 18, 2015

playground可以不翻译的,本意就是演练场

@jameslan
Copy link

Playground 是游乐场。 不是那种大型游乐场,是给小孩玩的,比如幼儿园里面,比如公园里面,或者有些商场里面:有滑梯,攀登架等等设施

@TJRoger
Copy link

TJRoger commented Jul 21, 2015

刚刚搜索了下全书,first-class 在全书中出现三次,两次是 first-class type, 一次是first-class support.
个人觉得可以把·``first-class type定为术语,译为基础类型/第一类类型/元类型/第一阶类型,另外一处按照本意翻译成一流/顶级/一等支持`即可。
把`first-class`定为术语不太合适,在英文中用连字符连接形成形容词词性,基本上没有把形容词定为术语的吧
参考维基百科:
first-class citizen
In programming language design, a first-class citizen (also object, entity, or value) in a given programming language is an entity which supports all the operations generally available to other entities. These operations typically include being passed as a parameter, returned from a function, and assigned to a variable.
第一类对象
第一类物件(英语:First-class object)在电脑科学中指可以在执行期创造并作为参数传递给其他函数或存入一个变数的实体[1]。将一个实体变为第一类物件的过程叫做“物件化”(Reification)[2]。
“第一类物件”这一名称最早由Christopher Strachey在1960年代发明,原称“第一类公民”(First-class citizen),意指函数可作为电脑语言中的第一类公民。英文中也称“First-class entity”或“First-class value”。
first-class function
In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. Specifically, this means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures.[1] Some programming language theorists require support for anonymous functions (function literals) as well.[2] In languages with first-class functions, the names of functions do not have any special status; they are treated like ordinary variables with a function type.
头等函数
头等函数(first-class function)是指在程序设计语言中,函数被当作头等公民。这意味着,函数可以作为别的函数的参数、函数的返回值,赋值给变量或存储在数据结构中。

@LEOYoon-Tsaw
Copy link

原文 译文
labeled statements 具名语句
fallthrough 穿透
protocol composition type 复合协议类型
raw value 原值
computed property 演算属性
stored property 寄存属性
calculate property 演算属性
playground 游乐场
optional 或有
implicitly unwrapped optional 自解封或有
unwrapped 解封
optional binding 或有绑定
optional chaining 链式或有
iterate 遍历
override 覆盖
designated initializer 指定构造器
convenience initializer 轻构造器
observator 触发器
getter 读值器
setter 赋值器
subscript 下标
literal value 书写量

@sunshineclt
Copy link

个人觉得wrapped用封装翻译不太好吧。。。封装是面向对象的概念,而且词性也不对,wrapped应该翻译成“未解析”的比较好吧

@numbbbbb
Copy link
Member Author

@sunshineclt 已修改,和其他术语统一。

@WXGBridgeQ
Copy link
Contributor

enum 中的 case,感觉翻译成用例比较好,之前有人翻译成事件
@numbbbbb

@TJRoger
Copy link

TJRoger commented Oct 11, 2015

@sunshineclt wrapped你说词性不对我是认可的,但是你说翻译成未解析也不好吧,翻译成未解析的还差不多,关键是词性问题,翻译成已封装的也没什么问题 @numbbbbb

@TJRoger
Copy link

TJRoger commented Oct 11, 2015

@WXGBridgeQ enum中的case是关键字为什么要翻译啊?是准备做编译器么?

@WXGBridgeQ
Copy link
Contributor

@TJRoger 是我没说清楚,我指的是文档中出现的enumeration cases,翻译成枚举用例好一些。

@jasine
Copy link

jasine commented Mar 23, 2016

建议加入swift2.2 中增加的associatedtype关键字关联类型

@ApolloZhu
Copy link
Contributor

ApolloZhu commented Nov 17, 2017

建议
argument label 从 “参数标签” 改译为 “实参标签”
parameter name 从 “参数名称” 改译为 “形参名称”
Apollonyan/Developing-iOS-11-Apps-with-Swift#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests