diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/ChainOfResponsibilities/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/ChainOfResponsibilities/README.po index 9b3329b..bc0469b 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/ChainOfResponsibilities/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/ChainOfResponsibilities/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Command/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Command/README.po index 016914e..cc924b6 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Command/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Command/README.po @@ -51,11 +51,9 @@ msgstr "例子" #: ../../Behavioral/Command/README.rst:23 msgid "" -"A text editor : all events are Command which can be undone, stacked and " -"saved." +"A text editor : all events are commands which can be undone, stacked and saved." msgstr "" -"文本编辑器:所有事件都可以撤销、堆放、保存的" -"命令。" +"文本编辑器:所有事件都可以撤销、堆放、保存的命令。" #: ../../Behavioral/Command/README.rst:27 msgid "" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Interpreter/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Interpreter/README.po new file mode 100644 index 0000000..c293ab2 --- /dev/null +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Interpreter/README.po @@ -0,0 +1,55 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: DesignPatternsPHP 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-05-29 12:18+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: David Wan \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../Behavioral/Interpreter/README.rst:2 +msgid "`Interpreter`__" +msgstr "`解释器模式`__" + +#: ../../Behavioral/Interpreter/README.rst:5 +msgid "Purpose" +msgstr "目的" + +#: ../../Behavioral/Interpreter/README.rst:7 +msgid "" +"For a given language, it defines the representation of its grammar as " +"\"No Terminal Expression" and \"Terminal Expression", " +"as well as an interpreter for the sentences of that language." +msgstr "" +"对于给定的语言,它定义了其语法的表示为【非终结符表达式】和【终结符达式】," +"以及改语言的句子解释器。" + +#: ../../Behavioral/Interpreter/README.rst:12 +msgid "Examples" +msgstr "例子" + +#: ../../Behavioral/Interpreter/README.rst:14 +msgid "" +"An example of a binary logic interpreter, each definition is defined by its own class" +msgstr "" +"一个二进制逻辑解释器的例子,每个定义都是由它自己的类定义的" + +#: ../../Behavioral/Interpreter/README.rst:17 +msgid "UML Diagram" +msgstr "UML 图" + +#: ../../Behavioral/Interpreter/README.rst:24 +msgid "Code" +msgstr "代码" + +#: ../../Behavioral/Interpreter/README.rst:26 +msgid "You can also find this code on `GitHub`_" +msgstr "在 `GitHub`_ 上查看代码" + +#: ../../Behavioral/Interpreter/README.rst:62 +msgid "Test" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Iterator/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Iterator/README.po index 043f4f3..9bee5a8 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Iterator/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Iterator/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,18 +13,18 @@ msgstr "" #: ../../Behavioral/Iterator/README.rst:2 msgid "`Iterator`__" -msgstr "" +msgstr "`迭代器模式`__" #: ../../Behavioral/Iterator/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Iterator/README.rst:7 msgid "To make an object iterable and to make it appear like a collection of objects." -msgstr "" +msgstr "使一个对象可迭代,并使它看起来像对象集合。" #: ../../Behavioral/Iterator/README.rst:11 -msgid "Examples" +msgid "例子" msgstr "" #: ../../Behavioral/Iterator/README.rst:13 @@ -32,10 +32,11 @@ msgid "" "to process a file line by line by just running over all lines (which have an" " object representation) for a file (which of course is an object, too)" msgstr "" +"通过遍历文件的所有行(对象表现形式的)来逐行处理文件(也是对象)" #: ../../Behavioral/Iterator/README.rst:18 msgid "Note" -msgstr "" +msgstr "注意" #: ../../Behavioral/Iterator/README.rst:20 msgid "" @@ -43,19 +44,21 @@ msgid "" "suited for this! Often you would want to implement the Countable interface " "too, to allow ``count($object)`` on your iterable object" msgstr "" +"标准PHP库(SPL)定义了一个最适合这种模式的接口迭代器! " +"通常也要实现Countable接口,允许在iterable对象上使用count($object)" #: ../../Behavioral/Iterator/README.rst:25 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Iterator/README.rst:32 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Iterator/README.rst:34 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Iterator/README.rst:61 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Mediator/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Mediator/README.po index ee15462..a6fb304 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Mediator/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Mediator/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,11 +13,11 @@ msgstr "" #: ../../Behavioral/Mediator/README.rst:2 msgid "`Mediator`__" -msgstr "" +msgstr "`中介者模式`__" #: ../../Behavioral/Mediator/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Mediator/README.rst:7 msgid "" @@ -25,6 +25,9 @@ msgid "" "together. It is a good alternative to Observer IF you have a \"central " "intelligence\", like a controller (but not in the sense of the MVC)." msgstr "" +"这种模式提供了一种简单的解耦多组件之间的协同工作方式。" +"如果你有一个“智能中心”,比如控制器(但不是 MVC 的意义上)," +"它是观察者的一个很好的替代品。" #: ../../Behavioral/Mediator/README.rst:11 msgid "" @@ -32,19 +35,22 @@ msgid "" "and it is a good thing because in OOP, one good friend is better than many. " "This is the key-feature of this pattern." msgstr "" +"所有组件(称为同事)仅与 Mediator 接口耦合," +"这是一件好事,因为在 OOP 中,一个好朋友胜过多个。" +"这是这种模式的关键特征。" #: ../../Behavioral/Mediator/README.rst:16 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Mediator/README.rst:23 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Mediator/README.rst:25 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Mediator/README.rst:64 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Memento/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Memento/README.po index 361a5f9..7a20a52 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Memento/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Memento/README.po @@ -11,7 +11,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-06-03 23:59+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -20,25 +20,28 @@ msgstr "" #: ../../Behavioral/Memento/README.rst:2 msgid "`Memento`__" -msgstr "" +msgstr "`备忘录模式`__" #: ../../Behavioral/Memento/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Memento/README.rst:7 msgid "" -"It provides the ability to restore an object to it's previous state (undo" -" via rollback) or to gain access to state of the object, without " -"revealing it's implementation (i.e., the object is not required to have a" -" functional for return the current state)." +"It provides the ability to restore an object to it's previous state (undo " +"via rollback) or to gain access to state of the object, without revealing " +"it's implementation (i.e., the object is not required to have a function " +"to return the current state)." msgstr "" +"它提供了将对象恢复到之前状态(通过回滚撤销)或访问对象状态的能力," +"而不需要揭示它的实现(对象不需要具有返回当前状态的函数)。" #: ../../Behavioral/Memento/README.rst:12 msgid "" "The memento pattern is implemented with three objects: the Originator, a " "Caretaker and a Memento." msgstr "" +"memento模式由三个对象实现:Originator, Caretaker, Memento。" #: ../../Behavioral/Memento/README.rst:15 msgid "" @@ -51,6 +54,11 @@ msgid "" "reference* to the original object. The Memento object is a \"opaque " "object\" (the object that no one can or should change)." msgstr "" +"Memento – 包含任何对象或资源状态的具体唯一快照的对象:字符串、数字、数组、" +"类的实例等。 这种情况下的唯一性并不意味着禁止在不同的快照中存在相似的状态。 " +"这意味着可以将状态提取为独立克隆。 存储在 Memento 中的任何对象都应该是原始对" +"象的完整副本,而不是对原始对象的引用。 Memento 对象是一个“不透明对象”" +"(没有人可以或不应该更改的对象)。" #: ../../Behavioral/Memento/README.rst:24 msgid "" @@ -63,6 +71,11 @@ msgid "" "type of object. Originator may (but not should) have any methods, but " "they *they can't make changes to the saved object state*." msgstr "" +"Originator—它是一个包含外部对象实际状态的对象,是严格指定的类型。" +"Originator能够创建此状态的唯一副本,并将其包裹在Memento中返回。 " +"Originator不知道变化的历史。 您可以从外部将具体状态设置为Originator," +"这将被视为实际状态。 Originator必须确保给定的状态对应于允许的对象类型。" +"Originator可能(但不应该)有任何方法,但他们不能对保存的对象状态进行更改。" #: ../../Behavioral/Memento/README.rst:33 msgid "" @@ -71,38 +84,41 @@ msgid "" "Originator; ask from the Originator snapshot of the current state; or set" " the Originator state to equivalence with some snapshot from history." msgstr "" +"Caretaker控制着状态的历史。 他可以对一个对象进行更改; 决定在Originator中保存外部对象的状态;" +"从当前状态的Originator快照中询问; 或将Originator状态设置为与历史记录中的某些快照等效。" #: ../../Behavioral/Memento/README.rst:39 msgid "Examples" -msgstr "" +msgstr "例子" #: ../../Behavioral/Memento/README.rst:41 msgid "The seed of a pseudorandom number generator" -msgstr "" +msgstr "发送一个随机数" #: ../../Behavioral/Memento/README.rst:42 msgid "The state in a finite state machine" -msgstr "" +msgstr "并将这个随机数存在时序机中" #: ../../Behavioral/Memento/README.rst:43 msgid "" "Control for intermediate states of `ORM Model " "`_ before saving" msgstr "" +"保存之前控制 ORM Model 中的状态" #: ../../Behavioral/Memento/README.rst:46 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Memento/README.rst:53 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Memento/README.rst:55 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Memento/README.rst:76 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/NullObject/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/NullObject/README.po index 71c2810..82e9f96 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/NullObject/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/NullObject/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,29 +13,30 @@ msgstr "" #: ../../Behavioral/NullObject/README.rst:2 msgid "`Null Object`__" -msgstr "" +msgstr "`空对象模式`__" #: ../../Behavioral/NullObject/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/NullObject/README.rst:7 msgid "" "NullObject is not a GoF design pattern but a schema which appears frequently" " enough to be considered a pattern. It has the following benefits:" msgstr "" +"空对象模式不是一个GoF设计模式,但是它出现非常频繁足以被认为是设计模式。它的好处如下:" #: ../../Behavioral/NullObject/README.rst:11 msgid "Client code is simplified" -msgstr "" +msgstr "简化客户端代码" #: ../../Behavioral/NullObject/README.rst:12 msgid "Reduces the chance of null pointer exceptions" -msgstr "" +msgstr "减少空指针异常的次数" #: ../../Behavioral/NullObject/README.rst:13 msgid "Fewer conditionals require less test cases" -msgstr "" +msgstr "减少测试用例的复杂性" #: ../../Behavioral/NullObject/README.rst:15 msgid "" @@ -45,35 +46,38 @@ msgid "" "``$obj->callSomething();`` by eliminating the conditional check in client " "code." msgstr "" +"返回一个对象或null的方法应该返回一个对象或NullObject。NullObjects简化了样板代码," +"如if (!is_null($obj)) {$obj->callSomething();}只需要$obj->callSomething();" +"通过消除客户端代码中的条件签入。" #: ../../Behavioral/NullObject/README.rst:22 msgid "Examples" -msgstr "" +msgstr "例子" #: ../../Behavioral/NullObject/README.rst:24 msgid "Null logger or null output to preserve a standard way of interaction between objects, even if the shouldn't do anything" -msgstr "" +msgstr "Null logger或Null输出以保持对象之间交互的标准方式,即使他们不做任何事情" #: ../../Behavioral/NullObject/README.rst:26 msgid "null handler in a Chain of Responsibilities pattern" -msgstr "" +msgstr "责任链模式中的空处理程序" #: ../../Behavioral/NullObject/README.rst:27 msgid "null command in a Command pattern" -msgstr "" +msgstr "命令模式中的空命令" #: ../../Behavioral/NullObject/README.rst:30 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/NullObject/README.rst:37 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/NullObject/README.rst:39 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/NullObject/README.rst:66 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Observer/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Observer/README.po index a1b786a..7f64396 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Observer/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Observer/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,11 +13,11 @@ msgstr "" #: ../../Behavioral/Observer/README.rst:2 msgid "`Observer`__" -msgstr "" +msgstr "`观察者模式`__" #: ../../Behavioral/Observer/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Observer/README.rst:7 msgid "" @@ -26,38 +26,42 @@ msgid "" "notified. It is used to shorten the amount of coupled objects and uses loose" " coupling instead." msgstr "" +"要实现对象的发布/订阅行为,只要[Subject]对象改变它的状态,就会通知附加的[observer]。" +"它用于减轻对象的耦合度,并使用松耦合代替。" #: ../../Behavioral/Observer/README.rst:13 msgid "Examples" -msgstr "" +msgstr "例子" #: ../../Behavioral/Observer/README.rst:15 msgid "" "a message queue system is observed to show the progress of a job in a GUI" msgstr "" +"通过观察消息队列系统,可以在GUI中显示作业的进度" #: ../../Behavioral/Observer/README.rst:19 msgid "Note" -msgstr "" +msgstr "注意" #: ../../Behavioral/Observer/README.rst:21 msgid "" "PHP already defines two interfaces that can help to implement this pattern: " "SplObserver and SplSubject." msgstr "" +"PHP已经定义了两个接口来帮助实现这个模式:SplObserver和SplSubject。" #: ../../Behavioral/Observer/README.rst:25 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Observer/README.rst:32 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Observer/README.rst:34 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Observer/README.rst:49 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/README.po index 54041d9..4baaa0a 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Specification/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Specification/README.po index 64e14a8..6685633 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Specification/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Specification/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,11 +13,11 @@ msgstr "" #: ../../Behavioral/Specification/README.rst:2 msgid "`Specification`__" -msgstr "" +msgstr "`规格模式`__" #: ../../Behavioral/Specification/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Specification/README.rst:7 msgid "" @@ -26,10 +26,12 @@ msgid "" "``isSatisfiedBy`` that returns either true or false depending on whether the" " given object satisfies the specification." msgstr "" +"构建清晰的业务规则规范,在其中可以对对象进行检查。每个规范类有一个名为[isSatisfiedBy]" +"的方法,根据给定对象是否满足规范返回true或false。" #: ../../Behavioral/Specification/README.rst:13 msgid "Examples" -msgstr "" +msgstr "例子" #: ../../Behavioral/Specification/README.rst:15 msgid "`RulerZ `__" @@ -37,16 +39,16 @@ msgstr "" #: ../../Behavioral/Specification/README.rst:18 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Specification/README.rst:25 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Specification/README.rst:27 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Specification/README.rst:72 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/State/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/State/README.po index 8dfd381..112d89f 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/State/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/State/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,11 +13,11 @@ msgstr "" #: ../../Behavioral/State/README.rst:2 msgid "`State`__" -msgstr "" +msgstr "`状态模式`__" #: ../../Behavioral/State/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/State/README.rst:7 msgid "" @@ -25,19 +25,21 @@ msgid "" "state. This can be a cleaner way for an object to change its behavior at " "runtime without resorting to large monolithic conditional statements." msgstr "" +"根据对象的状态封装一种事务的不同行为。 这更简洁的方式可以在对象在运行时更改其行为," +"而无需求助于大型的判断条件语句。" #: ../../Behavioral/State/README.rst:12 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/State/README.rst:19 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/State/README.rst:21 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/State/README.rst:54 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Strategy/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Strategy/README.po index 0b60661..f7f72e4 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Strategy/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Strategy/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,27 +13,27 @@ msgstr "" #: ../../Behavioral/Strategy/README.rst:2 msgid "`Strategy`__" -msgstr "" +msgstr "`策略模式`__" #: ../../Behavioral/Strategy/README.rst:5 msgid "Terminology:" -msgstr "" +msgstr "术语" #: ../../Behavioral/Strategy/README.rst:7 msgid "Context" -msgstr "" +msgstr "上下文" #: ../../Behavioral/Strategy/README.rst:8 msgid "Strategy" -msgstr "" +msgstr "策略" #: ../../Behavioral/Strategy/README.rst:9 msgid "Concrete Strategy" -msgstr "" +msgstr "具体的策略" #: ../../Behavioral/Strategy/README.rst:12 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Strategy/README.rst:14 msgid "" @@ -41,32 +41,36 @@ msgid "" "pattern is a good alternative to inheritance (instead of having an abstract " "class that is extended)." msgstr "" +"分开策略,并使它们之间能够快速切换。" +"此外,这种模式也是继承的一种很好的替代方法(而不是扩展抽象类)" + #: ../../Behavioral/Strategy/README.rst:19 msgid "Examples" -msgstr "" +msgstr "例子" #: ../../Behavioral/Strategy/README.rst:21 msgid "sorting a list of objects, one strategy by date, the other by id" -msgstr "" +msgstr "对对象列表进行排序,一种策略是根据日期,另一种策略是根据id" #: ../../Behavioral/Strategy/README.rst:22 msgid "" "simplify unit testing: e.g. switching between file and in-memory storage" msgstr "" +"简化单元测试:例如在文件和内存存储之间切换" #: ../../Behavioral/Strategy/README.rst:26 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Strategy/README.rst:33 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Strategy/README.rst:35 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Strategy/README.rst:62 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/TemplateMethod/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/TemplateMethod/README.po index 66e4e9b..154bfc6 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/TemplateMethod/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/TemplateMethod/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,15 +13,15 @@ msgstr "" #: ../../Behavioral/TemplateMethod/README.rst:2 msgid "`Template Method`__" -msgstr "" +msgstr "`模板方法模式`__" #: ../../Behavioral/TemplateMethod/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/TemplateMethod/README.rst:7 msgid "Template Method is a behavioral design pattern." -msgstr "" +msgstr "模板方法是一种行为设计模式。" #: ../../Behavioral/TemplateMethod/README.rst:9 msgid "" @@ -29,6 +29,8 @@ msgid "" "subclasses of this abstract template \"finish\" the behavior of an " "algorithm." msgstr "" +"你可能已经遇到过很多次了。" +"它的思想是让这个抽象模板的子类【完成】算法的行为策略。" #: ../../Behavioral/TemplateMethod/README.rst:13 msgid "" @@ -36,6 +38,8 @@ msgid "" "class is not called by subclasses but the inverse. How? With abstraction of " "course." msgstr "" +"也就是【好莱坞原则】:【别打给我们,我们打给你】。" +"这个类不是由子类调用的,而是由相反的子类调用的。怎么样?当然是抽象的。" #: ../../Behavioral/TemplateMethod/README.rst:17 msgid "" @@ -43,25 +47,29 @@ msgid "" "libraries. The user has just to implement one method and the superclass do " "the job." msgstr "" +"换句话说,这是一个算法框架,非常适合框架库。" +"用户只需要实现一个方法,超类就可以完成这项工作。" #: ../../Behavioral/TemplateMethod/README.rst:21 msgid "" "It is an easy way to decouple concrete classes and reduce copy-paste, that's" " why you'll find it everywhere." msgstr "" +"它是解耦具体类和减少复制黏贴的一种简单方法," +"这就是为什么你会发现它无处不在。" #: ../../Behavioral/TemplateMethod/README.rst:25 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/TemplateMethod/README.rst:32 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/TemplateMethod/README.rst:34 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/TemplateMethod/README.rst:55 msgid "Test" -msgstr "" +msgstr "测试" diff --git a/locale/zh_CN/LC_MESSAGES/Behavioral/Visitor/README.po b/locale/zh_CN/LC_MESSAGES/Behavioral/Visitor/README.po index 62f65e1..423f8cd 100644 --- a/locale/zh_CN/LC_MESSAGES/Behavioral/Visitor/README.po +++ b/locale/zh_CN/LC_MESSAGES/Behavioral/Visitor/README.po @@ -5,7 +5,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-05-29 12:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: David Wan \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -13,11 +13,11 @@ msgstr "" #: ../../Behavioral/Visitor/README.rst:2 msgid "`Visitor`__" -msgstr "" +msgstr "`访问者模式`__" #: ../../Behavioral/Visitor/README.rst:5 msgid "Purpose" -msgstr "" +msgstr "目的" #: ../../Behavioral/Visitor/README.rst:7 msgid "" @@ -26,6 +26,9 @@ msgid "" " classes have to define a contract to allow visitors (the ``Role::accept`` " "method in the example)." msgstr "" +"访问者模式允许将对象上的操作外包给其他对象。" +"这样做的主要原因是保持关注数据结构和数据操作的分离。" +"但是类必须定义一个允许访问的契约(示例中的Role::accept方法)。" #: ../../Behavioral/Visitor/README.rst:12 msgid "" @@ -33,19 +36,21 @@ msgid "" "In that case, each Visitor has to choose itself which method to invoke on " "the visitor." msgstr "" +"契约是一个抽象类,但你也可以就是一个接口。" +"在这种情况下,每个Visitor必须自己选择要调用哪个方法。" #: ../../Behavioral/Visitor/README.rst:17 msgid "UML Diagram" -msgstr "" +msgstr "UML 图" #: ../../Behavioral/Visitor/README.rst:24 msgid "Code" -msgstr "" +msgstr "代码" #: ../../Behavioral/Visitor/README.rst:26 msgid "You can also find this code on `GitHub`_" -msgstr "" +msgstr "在 `GitHub`_ 上查看代码" #: ../../Behavioral/Visitor/README.rst:59 msgid "Test" -msgstr "" +msgstr "测试"