fix: typo

This commit is contained in:
Ying-Shan Lin
2021-09-26 02:34:27 +08:00
parent 0bfe9fe9a1
commit 6febe59be1
7 changed files with 25 additions and 27 deletions

View File

@@ -24,10 +24,9 @@ msgstr "目的"
#: ../../Creational/AbstractFactory/README.rst:7 #: ../../Creational/AbstractFactory/README.rst:7
msgid "" msgid ""
"To create series of related or dependent objects without specifying their " "To create series of related or dependent objects without specifying their concrete classes. Usually "
"concrete classes. Usually the created classes all implement the same " "the created classes all implement the same interface. The client of the abstract factory does not "
"interface. The client of the abstract factory does not care about how these " "care about how these objects are created, it just knows how they go together."
"objects are created, he just knows how they go together."
msgstr "" msgstr ""
"创建一系列互相关联或依赖的对象时不需要指定将要创建的对象对应的类,因为这些将被创建的对象对应的类都实现了同一个接口。" "创建一系列互相关联或依赖的对象时不需要指定将要创建的对象对应的类,因为这些将被创建的对象对应的类都实现了同一个接口。"
"抽象工厂的使用者不需要关心对象的创建过程,它只需要知道这些对象是如何协调工作的。" "抽象工厂的使用者不需要关心对象的创建过程,它只需要知道这些对象是如何协调工作的。"

View File

@@ -21,13 +21,13 @@ msgstr "目的"
#: ../../Creational/FactoryMethod/README.rst:7 #: ../../Creational/FactoryMethod/README.rst:7
msgid "" msgid ""
"The good point over the SimpleFactory is you can subclass it to implement " "The good point over the SimpleFactory is you can subclass it to implement different ways to create "
"different ways to create objects" "objects."
msgstr "" msgstr ""
"比简单工厂模式好的一点是工厂方法可以通过继承实现不同的创建对象的逻辑。" "比简单工厂模式好的一点是工厂方法可以通过继承实现不同的创建对象的逻辑。"
#: ../../Creational/FactoryMethod/README.rst:10 #: ../../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 "" msgstr ""
"举个简单的例子,这些抽象类都仅仅是一个接口" "举个简单的例子,这些抽象类都仅仅是一个接口"

View File

@@ -31,10 +31,9 @@ msgstr "用例"
#: ../../Structural/DependencyInjection/README.rst:13 #: ../../Structural/DependencyInjection/README.rst:13
msgid "" msgid ""
"Configuration gets injected and ``Connection`` will get all that it needs " "``DatabaseConfiguration`` gets injected and ``DatabaseConnection`` will get all that it needs from "
"from ``$config``. Without DI, the configuration would be created directly in" "``$config``. Without DI, the configuration would be created directly in ``DatabaseConnection``, which is "
" ``Connection``, which is not very good for testing and extending " "not very good for testing and extending it."
"``Connection``."
msgstr "" msgstr ""
"通过配置需要注入的依赖,``Connection`` 能从 ``$config`` 中获取到所有它需要的依赖。如果没有" "通过配置需要注入的依赖,``Connection`` 能从 ``$config`` 中获取到所有它需要的依赖。如果没有"
"依赖注入,``Connection`` 会直接创建它需要的依赖,这样不利于测试和扩展 ``Connection``。" "依赖注入,``Connection`` 会直接创建它需要的依赖,这样不利于测试和扩展 ``Connection``。"

View File

@@ -21,9 +21,8 @@ msgstr "目的"
#: ../../Structural/Facade/README.rst:7 #: ../../Structural/Facade/README.rst:7
msgid "" msgid ""
"The primary goal of a Facade Pattern is not to avoid you having to read the" "The primary goal of a Facade Pattern is not to avoid you having to read the manual of a complex "
"manual of a complex API. It's only a side-effect. The first goal is to" "API. It's only a side-effect. The first goal is to reduce coupling and follow the Law of Demeter."
"reduce coupling and follow the Law of Demeter."
msgstr "" msgstr ""
"外观模式的目的不是为了让你避免阅读烦人的API文档当然它有这样的作用" "外观模式的目的不是为了让你避免阅读烦人的API文档当然它有这样的作用"
"它的主要目的是为了减少耦合并且遵循得墨忒耳定律Law of Demeter" "它的主要目的是为了减少耦合并且遵循得墨忒耳定律Law of Demeter"

View File

@@ -21,9 +21,10 @@ msgstr "目的"
#: ../../Structural/Registry/README.rst:7 #: ../../Structural/Registry/README.rst:7
msgid "" msgid ""
"To implement a central storage for objects often used throughout the " "To implement a central storage for objects often used throughout the application, is typically "
"application, is typically implemented using an abstract class with only " "implemented using an abstract class with only static methods (or using the Singleton pattern). "
"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 "" msgstr ""
"为应用中常用的对象实现一个中央存储,通常用一个只有静态方法的抽象类来实现" "为应用中常用的对象实现一个中央存储,通常用一个只有静态方法的抽象类来实现"
"(或者使用单例模式)" "(或者使用单例模式)"