mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-03-15 11:50:10 +01:00
docs: add Chinese translation of Null Object Pattern
This commit is contained in:
parent
032b041c5b
commit
53d08569f6
@ -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 <EMAIL@ADDRESS>\n"
|
||||
"Last-Translator: David Wan <autoloadone@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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 "测试"
|
||||
|
Loading…
x
Reference in New Issue
Block a user