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

Finish review the fuzzy entries translated from zh_CN in library/functions #26 #29

Open
wants to merge 3 commits into
base: 3.7
from

Conversation

@Nienzu
Copy link
Contributor

@Nienzu Nienzu commented Sep 30, 2018

Finish review the fuzzy entries translated from zh_CN in library/functions #26

Copy link
Collaborator

@adrianliaw adrianliaw left a comment

I'm in the middle of reviewing it, I haven't review all of them yet, but these are the comments regarding the first few entries.

library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
"式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:"
"`__index__` 方法返回一個整數。一些例子:"
"`__index__` 方法返回一個整數。一些例子:"

This comment has been minimized.

@adrianliaw

adrianliaw Oct 4, 2018
Collaborator

It may sound better to use some more common way of saying "for example" in Chinese, such as "舉例來說".

This comment has been minimized.

@adrianliaw

adrianliaw Oct 5, 2018
Collaborator

Another note for Traditional Chinese translation specifically: in our glossary, we defined that we simply don't translate the term "method" since it gets very confusing with the word "way" which both uses the same translation in Chinese. For these kind of terms, we should put something like __index__ method(方法) for translation in the first appearance of the term, and then for the rest of the appearances, we should just say something like "相同的 method", "定義 __call__ method" etc.

This comment has been minimized.

@Nienzu

Nienzu Oct 9, 2018
Author Contributor

@adrianliaw , thanks for the detailed review.
Should I use "subclass" instead of "子類別"?
And, should all the words in the glossary having the "form xxxx(XXXX)" not be translated?
For examples, int(整數)、boolean(布林)、dictionary(字典).
Or depends on the sentence?

This comment has been minimized.

@adrianliaw

adrianliaw Oct 16, 2018
Collaborator

@Nienzu It's the best to to include the brackets in its first appearance on a page, and omit the brackets for the rest of them. e.g. "This function takes a Boolean value as input, and returns a Boolean" should be translated to "這個函式的輸入是一個 Boolean(布林)值,並回傳一個 Boolean。"

Secondly, I think "subclass" should also follow the rule described above, keep the first appearance of the word as "subclass(子類別)", and the rest of them as just "subclass". But pay some attention on which "part of speech" the word "subclass" is used, it can be used as both a noun and a verb, when it's used as a verb, it makes more sense to me to translate it with the same translation as the word "inherit", which is "繼承".

By the way, this glossary as well as the whole translation guide are not fixed rules that nobody can break. If you don't agree with any part of them, please feel free to open an issue to discuss about certain vocabularies or anything.

library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
Copy link
Collaborator

@adrianliaw adrianliaw left a comment

Second batch of review, will continue in a bit

library/functions.po Show resolved Hide resolved
"數。:class:`bytes` 是 :class:`bytearray` 的不可變版本 - 它有其中不改變序列的"
"方法和相同的索引、切片操作。"
"返回一個新的 “bytes” 物件,會是一個不可變序列,包含範圍為 ``0 <= x < 256`` 的"
"整數。:class:`bytes` 是 :class:`bytearray` 的不可變版本 — 它具備和不變序列相"

This comment has been minimized.

@adrianliaw

adrianliaw Oct 5, 2018
Collaborator

The "non-mutating methods" described here is not the same as "methods of non-mutating sequences", but "methods of bytearray that is not mutating the bytearray".

library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
library/functions.po Show resolved Hide resolved
"Future 語句使用位元位來指定,多個語句可以通過按位或來指定。具體特性的位元位可"
"以通過 :mod:`__future__` 模組中的 :class:`~__future__._Feature` 類的例項的 :"
"attr:`~__future__._Feature.compiler_flag` 屬性來獲得。"
"Future 陳述式使用 bits 來指定,可以一起被位元操作 ORed 來指定複數的語句。需要"

This comment has been minimized.

@adrianliaw

adrianliaw Oct 5, 2018
Collaborator

This paragraph is rather difficult to translate (it actually took me about 10 minutes to really understand what this paragraph means). What this paragraph is saying is that the future statements (e.g. from __future__ import generators) are transformed into bits that constructs the flags argument for compile function, each feature in __future__ has its own representation in bits, e.g. nested_scopes is 0b10_000, division is 0b10_000_000_000_000, and you can use bitwise OR operator to combine these flags, so nested_scopes.compiler_flag | division.compiler_flag equals to 0b10_000_000_010_000, and that is the value you should pass as flags when you want to use both division feature and nested_scopes feature while using compile in earlier versions of Python.

@Nienzu Nienzu changed the title Review entry from zh_CN Finish review the fuzzy entries translated from zh_CN in library/functions #26 Oct 8, 2018
"O` 選項相同的優化級別。顯式級別為 ``0`` (沒有優化;``__debug__`` 為真)、"
"``1`` (斷言被刪除, ``__debug__`` 為假)或 ``2`` (文件字串也被刪除)。"
"引數 *optimize* 用來指定編譯器的最佳化級別;預設值 ``-1`` 選擇與直譯器的 :"
"option:`-O` 選項相同的最佳化級別。其他級別為 ``0`` (沒有最佳化;"

This comment has been minimized.

@adrianliaw

adrianliaw Oct 16, 2018
Collaborator

Notice there's a redundant space before the open parenthesis, and there are also redundant space before parenthesis on the next two lines.

"``1`` (斷言被刪除, ``__debug__`` 為假)或 ``2`` (文件字串也被刪除)。"
"引數 *optimize* 用來指定編譯器的最佳化級別;預設值 ``-1`` 選擇與直譯器的 :"
"option:`-O` 選項相同的最佳化級別。其他級別為 ``0`` (沒有最佳化;"
"``__debug__`` 為 True)、``1`` (斷言被刪除, ``__debug__`` 為 False)或 "

This comment has been minimized.

@adrianliaw

adrianliaw Oct 16, 2018
Collaborator

"asserts" here in the original message means the "assert statements", at least the keyword "assert" should be kept in English, a proper translation could be "assert 語句被刪除"


#: ../../library/functions.rst:266
#, fuzzy
msgid ""
"This function raises :exc:`SyntaxError` if the compiled source is invalid, "
"and :exc:`ValueError` if the source contains null bytes."
msgstr ""
"如果編譯的原始碼不合法,此函式會觸發 :exc:`SyntaxError` 異常;如果原始碼包含 "

This comment has been minimized.

@adrianliaw

adrianliaw Oct 16, 2018
Collaborator

As described in previous comments, the word "invalid" is better translated into "無效", and there's no need to add "異常" after pointing out the exception. Please apply these in the rest of the translations.

"式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:"
"`__index__` 方法返回一個整數。一些例子:"
"`__index__` 方法返回一個整數。一些例子:"

This comment has been minimized.

@adrianliaw

adrianliaw Oct 16, 2018
Collaborator

@Nienzu It's the best to to include the brackets in its first appearance on a page, and omit the brackets for the rest of them. e.g. "This function takes a Boolean value as input, and returns a Boolean" should be translated to "這個函式的輸入是一個 Boolean(布林)值,並回傳一個 Boolean。"

Secondly, I think "subclass" should also follow the rule described above, keep the first appearance of the word as "subclass(子類別)", and the rest of them as just "subclass". But pay some attention on which "part of speech" the word "subclass" is used, it can be used as both a noun and a verb, when it's used as a verb, it makes more sense to me to translate it with the same translation as the word "inherit", which is "繼承".

By the way, this glossary as well as the whole translation guide are not fixed rules that nobody can break. If you don't agree with any part of them, please feel free to open an issue to discuss about certain vocabularies or anything.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.