mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 18:50:11 +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 ""
|
||||
"创建一系列互相关联或依赖的对象时不需要指定将要创建的对象对应的类,因为这些将被创建的对象对应的类都实现了同一个接口。"
|
||||
"抽象工厂的使用者不需要关心对象的创建过程,它只需要知道这些对象是如何协调工作的。"
|
||||
|
@@ -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 ""
|
||||
"举个简单的例子,这些抽象类都仅仅是一个接口"
|
||||
|
||||
|
@@ -31,10 +31,9 @@ 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``。"
|
||||
|
@@ -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