mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 02:30:20 +02:00
fix: typo
This commit is contained in:
@@ -24,10 +24,9 @@ msgstr "目的"
|
||||
|
||||
#: ../../Creational/AbstractFactory/README.rst:7
|
||||
msgid ""
|
||||
"To create series of related or dependent objects without specifying their "
|
||||
"concrete classes. Usually the created classes all implement the same "
|
||||
"interface. The client of the abstract factory does not care about how these "
|
||||
"objects are created, he just knows how they go together."
|
||||
"To create series of related or dependent objects without specifying their concrete classes. Usually "
|
||||
"the created classes all implement the same interface. The client of the abstract factory does not "
|
||||
"care about how these objects are created, it just knows how they go together."
|
||||
msgstr ""
|
||||
"创建一系列互相关联或依赖的对象时不需要指定将要创建的对象对应的类,因为这些将被创建的对象对应的类都实现了同一个接口。"
|
||||
"抽象工厂的使用者不需要关心对象的创建过程,它只需要知道这些对象是如何协调工作的。"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: DesignPatternsPHP 1.0\n"
|
||||
@@ -21,13 +21,13 @@ msgstr "目的"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:7
|
||||
msgid ""
|
||||
"The good point over the SimpleFactory is you can subclass it to implement "
|
||||
"different ways to create objects"
|
||||
"The good point over the SimpleFactory is you can subclass it to implement different ways to create "
|
||||
"objects."
|
||||
msgstr ""
|
||||
"比简单工厂模式好的一点是工厂方法可以通过继承实现不同的创建对象的逻辑。"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:10
|
||||
msgid "For simple case, this abstract class could be just an interface"
|
||||
msgid "For simple cases, this abstract class could be just an interface."
|
||||
msgstr ""
|
||||
"举个简单的例子,这些抽象类都仅仅是一个接口"
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: DesignPatternsPHP 1.0\n"
|
||||
@@ -28,7 +28,7 @@ msgid ""
|
||||
"``factory`` or ``build``."
|
||||
msgstr ""
|
||||
"和抽象工厂类似,静态工厂模式用来创建一系列互相关联或依赖的对象,和抽象工厂模式不同的是静态工厂"
|
||||
"模式只用一个静态方法就解决了所有类型的对象创建,通常被命名为``工厂`` 或者 ``构建器``"
|
||||
"模式只用一个静态方法就解决了所有类型的对象创建,通常被命名为 ``工厂`` 或者 ``构建器``"
|
||||
|
||||
#: ../../Creational/StaticFactory/README.rst:20
|
||||
msgid "UML Diagram"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: DesignPatternsPHP 1.0\n"
|
||||
@@ -33,9 +33,9 @@ msgid ""
|
||||
"a form class instance handles all its form elements like a single instance "
|
||||
"of the form, when ``render()`` is called, it subsequently runs through all "
|
||||
"its child elements and calls ``render()`` on them"
|
||||
msgstr ""
|
||||
msgstr ""
|
||||
"form类的实例包含多个子元素,而它也像单个子元素那样响应render()请求,当"
|
||||
"调用``render()``方法时,它会历遍所有的子元素,调用``render()``方法"
|
||||
"调用 ``render()`` 方法时,它会历遍所有的子元素,调用 ``render()`` 方法"
|
||||
|
||||
#: ../../Structural/Composite/README.rst:20
|
||||
msgid "UML Diagram"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: DesignPatternsPHP 1.0\n"
|
||||
@@ -31,13 +31,12 @@ msgstr "用例"
|
||||
|
||||
#: ../../Structural/DependencyInjection/README.rst:13
|
||||
msgid ""
|
||||
"Configuration gets injected and ``Connection`` will get all that it needs "
|
||||
"from ``$config``. Without DI, the configuration would be created directly in"
|
||||
" ``Connection``, which is not very good for testing and extending "
|
||||
"``Connection``."
|
||||
"``DatabaseConfiguration`` gets injected and ``DatabaseConnection`` will get all that it needs from "
|
||||
"``$config``. Without DI, the configuration would be created directly in ``DatabaseConnection``, which is "
|
||||
"not very good for testing and extending it."
|
||||
msgstr ""
|
||||
"通过配置需要注入的依赖,``Connection`` 能从 ``$config`` 中获取到所有它需要的依赖。如果没有"
|
||||
"依赖注入,``Connection`` 会直接创建它需要的依赖,这样不利于测试和扩展``Connection``。"
|
||||
"依赖注入,``Connection`` 会直接创建它需要的依赖,这样不利于测试和扩展 ``Connection``。"
|
||||
|
||||
#: ../../Structural/DependencyInjection/README.rst:18
|
||||
msgid ""
|
||||
@@ -65,7 +64,7 @@ msgid ""
|
||||
"``Connection`` object"
|
||||
msgstr ""
|
||||
"Doctrine2 ORM 使用了依赖注入,它通过配置注入了 ``Connection`` 对象。为了达到方便测试的目的,"
|
||||
"可以很容易的通过配置创建一个mock的``Connection`` 对象。"
|
||||
"可以很容易的通过配置创建一个mock的 ``Connection`` 对象。"
|
||||
|
||||
#: ../../Structural/DependencyInjection/README.rst:32
|
||||
msgid ""
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: DesignPatternsPHP 1.0\n"
|
||||
@@ -21,9 +21,8 @@ msgstr "目的"
|
||||
|
||||
#: ../../Structural/Facade/README.rst:7
|
||||
msgid ""
|
||||
"The primary goal of a Facade Pattern is not to avoid you having to read the"
|
||||
"manual of a complex API. It's only a side-effect. The first goal is to"
|
||||
"reduce coupling and follow the Law of Demeter."
|
||||
"The primary goal of a Facade Pattern is not to avoid you having to read the manual of a complex "
|
||||
"API. It's only a side-effect. The first goal is to reduce coupling and follow the Law of Demeter."
|
||||
msgstr ""
|
||||
"外观模式的目的不是为了让你避免阅读烦人的API文档(当然,它有这样的作用),"
|
||||
"它的主要目的是为了减少耦合并且遵循得墨忒耳定律(Law of Demeter)"
|
||||
|
@@ -21,9 +21,10 @@ msgstr "目的"
|
||||
|
||||
#: ../../Structural/Registry/README.rst:7
|
||||
msgid ""
|
||||
"To implement a central storage for objects often used throughout the "
|
||||
"application, is typically implemented using an abstract class with only "
|
||||
"static methods (or using the Singleton pattern)"
|
||||
"To implement a central storage for objects often used throughout the application, is typically "
|
||||
"implemented using an abstract class with only static methods (or using the Singleton pattern). "
|
||||
"Remember that this introduces global state, which should be avoided at all times! Instead "
|
||||
"implement it using Dependency Injection!"
|
||||
msgstr ""
|
||||
"为应用中常用的对象实现一个中央存储,通常用一个只有静态方法的抽象类来实现"
|
||||
"(或者使用单例模式)"
|
||||
|
Reference in New Issue
Block a user