mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-06 15:06:31 +02:00
Merge pull request #474 from aspirantzhang/ChineseTranslation
Improve Chinese translation of Creational
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
#
|
||||
# FULL NAME <EMAIL@ADDRESS>, 2015.
|
||||
#
|
||||
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: 2015-05-29 12:39+0200\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-05 20:02+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 2.91.6\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/AbstractFactory/README.rst:2
|
||||
msgid "`Abstract Factory`__"
|
||||
@@ -28,8 +25,9 @@ msgid ""
|
||||
"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 ""
|
||||
"创建一系列互相关联或依赖的对象时不需要指定将要创建的对象对应的类,因为这些将被创建的对象对应的类都实现了同一个接口。"
|
||||
"抽象工厂的使用者不需要关心对象的创建过程,它只需要知道这些对象是如何协调工作的。"
|
||||
"创建一系列互相关联或依赖的对象时,不指定他们具体的类。"
|
||||
"因为这些创建的类通常都实现了同一个接口。"
|
||||
"抽象工厂的客户端并不关心对象是如何创建的,而只知道它们是怎样组合的。"
|
||||
|
||||
#: ../../Creational/AbstractFactory/README.rst:13
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-07 14:40+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:2
|
||||
msgid "`Builder`__"
|
||||
@@ -21,29 +21,28 @@ msgstr "目的"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:7
|
||||
msgid "Builder is an interface that build parts of a complex object."
|
||||
msgstr "生成器的目的是将复杂对象的创建过程(流程)进行抽象,生成器表现为接口的形式。"
|
||||
msgstr "生成器模式(Builder,或称建造者模式)是一个接口,用于构建复杂对象的各个部分。"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:9
|
||||
msgid ""
|
||||
"Sometimes, if the builder has a better knowledge of what it builds, this "
|
||||
"interface could be an abstract class with default methods (aka adapter)."
|
||||
msgstr ""
|
||||
"在特定的情况下,比如如果生成器对将要创建的对象有足够多的了解,那么代表生成器的接口(interface)可以是"
|
||||
"一个抽象类(也就是说可以有一定的具体实现,就像众所周知的适配器模式)。"
|
||||
"在某些情况下,如果生成器对其构建的内容有很好的了解,那么这个接口可以是一个抽象类,并会有一个默认方法(也称适配器)。"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:12
|
||||
msgid ""
|
||||
"If you have a complex inheritance tree for objects, it is logical to have a "
|
||||
"complex inheritance tree for builders too."
|
||||
msgstr ""
|
||||
"如果对象有复杂的继承树,理论上创建对象的生成器也同样具有复杂的继承树。"
|
||||
"如果对象具有复杂的继承结构,那么按照的正常逻辑,生成器也应该有一个复杂的继承结构。"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:15
|
||||
msgid ""
|
||||
"Note: Builders have often a fluent interface, see the mock builder of "
|
||||
"PHPUnit for example."
|
||||
msgstr ""
|
||||
"提示:生成器通常具有流畅的接口,推荐阅读关于 PHPUnit 的mock生成器获取更好的理解。"
|
||||
"注意:生成器通常有都有一个完善的接口,例如 PHPUnit 的模拟生成器(Mock Builder)。"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:19
|
||||
msgid "Examples"
|
||||
@@ -52,7 +51,7 @@ msgstr "例子"
|
||||
#: ../../Creational/Builder/README.rst:21
|
||||
msgid "PHPUnit: Mock Builder"
|
||||
msgstr ""
|
||||
"PHPUnit: Mock 生成器"
|
||||
"PHPUnit: 模拟生成器(Mock Builder)"
|
||||
|
||||
#: ../../Creational/Builder/README.rst:24
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-05 20:02+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:2
|
||||
msgid "`Factory Method`__"
|
||||
@@ -24,26 +24,28 @@ msgid ""
|
||||
"The good point over the SimpleFactory is you can subclass it to implement different ways to create "
|
||||
"objects."
|
||||
msgstr ""
|
||||
"比简单工厂模式好的一点是工厂方法可以通过继承实现不同的创建对象的逻辑。"
|
||||
"相比 简单工厂模式(SimpleFactory)而言,工厂方法模式(Factory Method)可以通过延伸出子类,实现用不同的方法创建对象。"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:10
|
||||
msgid "For simple cases, this abstract class could be just an interface."
|
||||
msgstr ""
|
||||
"举个简单的例子,这些抽象类都仅仅是一个接口"
|
||||
"对于比较简单的情况,这个抽象类可能只是一个接口。"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:12
|
||||
msgid ""
|
||||
"This pattern is a \"real\" Design Pattern because it achieves the "
|
||||
"Dependency Inversion principle a.k.a the \"D\" in SOLID principles."
|
||||
msgstr ""
|
||||
"这个模式是一个 \"真正\" 的设计模式,因为它遵循了依赖反转原则(Dependency Inversion Principle) 众所周知这个 \"D\" 代表了真正的面向对象程序设计。"
|
||||
"这是一个 \"真正\" 的设计模式,因为它遵循了\"依赖反转原则(Dependency Inversion Principle)\" 。"
|
||||
"也就是 SOLID 原则中的\"D\"。"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:15
|
||||
msgid ""
|
||||
"It means the FactoryMethod class depends on abstractions, not concrete "
|
||||
"classes. This is the real trick compared to SimpleFactory or StaticFactory."
|
||||
msgstr ""
|
||||
"它意味着工厂方法类依赖于类的抽象,而不是具体将被创建的类,这是工厂方法模式与简单工厂模式和静态工厂模式最重要的区别"
|
||||
"这意味着工厂方法实现的类依赖于类的抽象,而不是具体的类。"
|
||||
"这也是 工厂方法模式 与 简单工厂模式 和 静态工厂模式 之间最重要的区别。"
|
||||
|
||||
#: ../../Creational/FactoryMethod/README.rst:20
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-07 15:00+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/Pool/README.rst:2
|
||||
msgid "`Pool`__"
|
||||
@@ -24,10 +24,9 @@ msgid ""
|
||||
"object. When the client has finished, it returns the object, which is a "
|
||||
"specific type of factory object, to the pool rather than destroying it."
|
||||
msgstr ""
|
||||
"**对象池设计模式** 是创建型设计模式,它会对新创建的对象应用一系列的初始化操作,让对象保持立即可使用的状态"
|
||||
" - 一个存放对象的 \"池子\" - 而不是对对象进行一次性的的使用(创建并使用,完成之后立即销毁)。对象池的使用者会对对象池发起请求,以期望"
|
||||
"获取一个对象,并使用获取到的对象进行一系列操作,当使用者对对象的使用完成之后,使用者会将由对象池的对象创建工厂创建的对象返回给对象池,而不是"
|
||||
"用完之后销毁获取到的对象。"
|
||||
"**对象池设计模式** 是一种创建型设计模式。它使用一组提前已准备完成可以使用的对象,而不是根据需要分配或销毁。这种来源被称为:“池”(pool)。"
|
||||
"池的使用者将从池中请求一个对象,并对返回的对象进行操作。"
|
||||
"在客户端处理完成后,它将返回一种特定类型的工厂对象。返回给池,而不是销毁。"
|
||||
|
||||
#: ../../Creational/Pool/README.rst:11
|
||||
msgid ""
|
||||
@@ -38,9 +37,9 @@ msgid ""
|
||||
"creation of the new objects (especially over network) may take variable "
|
||||
"time."
|
||||
msgstr ""
|
||||
"对象池在某些情况下会带来重要的性能提升,比如耗费资源的对象初始化操作,实例化类的代价很高,但每次实例化的数量较少的情况下。"
|
||||
"对象池中将被创建的对象会在真正被使用时被提前创建,避免在使用时让使用者浪费对象创建所需的大量时间(比如在对象某些操作需要访问网络资源的情况下)"
|
||||
"从池子中取得对象的时间是可预测的,但新建一个实例所需的时间是不确定。"
|
||||
"对象池模式在一些情景下可以带来明显的性能提升。如:类实例初始化成本较高、类的实例化率较高、或类实例同时使用率不高的情况下。"
|
||||
"当创建新对象(尤其是通过网络)的时间花费不确定时,池对象的获得时间却是可预测的。"
|
||||
|
||||
|
||||
#: ../../Creational/Pool/README.rst:18
|
||||
msgid ""
|
||||
@@ -50,9 +49,9 @@ msgid ""
|
||||
"simple object pooling (that hold no external resources, but only occupy "
|
||||
"memory) may not be efficient and could decrease performance."
|
||||
msgstr ""
|
||||
"总之,对象池会为你节省宝贵的程序执行时间,比如像数据库连接,socket连接,大量耗费资源的代表数字资源的对象,像字体或者位图。"
|
||||
"不过,在特定情况下,简单的对象创建池(没有请求外部的资源,仅仅将自身保存在内存中)或许并不会提升效率和性能,这时候,就需要使用者"
|
||||
"酌情考虑了。"
|
||||
"这些优点对于时间要求敏感的对象来说,是非常有用的。"
|
||||
"例如:数据库连接、套接字连接、线程和大型图形对象(如字体或位图)。"
|
||||
"但在某些情况下,简单的对象池(不包含外部资源,只占用内存)可能效率不高,并且会降低性能。"
|
||||
|
||||
#: ../../Creational/Pool/README.rst:25
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-06 17:00+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/Prototype/README.rst:2
|
||||
msgid "`Prototype`__"
|
||||
@@ -24,7 +24,7 @@ msgid ""
|
||||
"To avoid the cost of creating objects the standard way (new Foo()) and "
|
||||
"instead create a prototype and clone it."
|
||||
msgstr ""
|
||||
"通过创建一个原型对象,然后复制原型对象来避免通过标准的方式创建大量的对象产生的开销(new Foo())。"
|
||||
"避免以标准方式(new Foo())创建对象的成本,而是创建一个原型(prototype)并克隆它。"
|
||||
|
||||
#: ../../Creational/Prototype/README.rst:11
|
||||
msgid "Examples"
|
||||
@@ -35,7 +35,7 @@ msgid ""
|
||||
"Large amounts of data (e.g. create 1,000,000 rows in a database at once via "
|
||||
"a ORM)."
|
||||
msgstr ""
|
||||
"大量的数据对象(比如通过ORM获取1,000,000行数据库记录然后创建每一条记录对应的对象实体)"
|
||||
"大量数据(例如:通过 ORM 在数据库中创建百万行数据。)"
|
||||
|
||||
#: ../../Creational/Prototype/README.rst:17
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-06 15:00+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/README.rst:2
|
||||
msgid "`Creational`__"
|
||||
@@ -23,7 +23,6 @@ msgid ""
|
||||
" design problems or added complexity to the design. Creational design "
|
||||
"patterns solve this problem by somehow controlling this object creation."
|
||||
msgstr ""
|
||||
"在软件工程中,创建型设计模式承担着对象创建的职责,尝试创建"
|
||||
"适合程序上下文的对象,对象创建设计模式的产生是由于软件工程"
|
||||
"设计的问题,具体说是向设计中增加复杂度,创建型设计模式解决"
|
||||
"了程序设计中对象创建的问题。"
|
||||
"在软件工程中,创建型设计模式是处理<对象创建机制>的设计模式,试图根据实际情况,选择适当的方式创建对象。"
|
||||
"因为对象的创建时的状态,可能导致设计问题,或者提升设计的复杂度。"
|
||||
"创建型设计模式通过 以某种方式控制此对象的创建 来解决此问题。"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-07 17:41+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/SimpleFactory/README.rst:2
|
||||
msgid "Simple Factory"
|
||||
@@ -21,23 +21,18 @@ msgstr "目的"
|
||||
|
||||
#: ../../Creational/SimpleFactory/README.rst:7
|
||||
msgid "SimpleFactory is a simple factory pattern."
|
||||
msgstr "简单的创建对象型工厂模式"
|
||||
msgstr "SimpleFactory 是一个简单的工厂模式。"
|
||||
|
||||
#: ../../Creational/SimpleFactory/README.rst:9
|
||||
msgid ""
|
||||
"It differs from the static factory because it is NOT static and as you know:"
|
||||
" static => global => evil!"
|
||||
"It differs from the static factory because it is not static. Therefore, "
|
||||
"you can have multiple factories, differently parameterized, you can "
|
||||
"subclass it and you can mock it. It always should be preferred over a "
|
||||
"static factory!"
|
||||
msgstr ""
|
||||
"和静态工厂模式不同,简单工厂是非静态的,正如你了解的那样:"
|
||||
"静态 => 全局 => 恶魔"
|
||||
|
||||
#: ../../Creational/SimpleFactory/README.rst:12
|
||||
msgid ""
|
||||
"Therefore, you can have multiple factories, differently parametrized, you "
|
||||
"can subclass it and you can mock-up it."
|
||||
msgstr ""
|
||||
"因此,你可以使用该工厂的多个实例,通过传递参数使它们各不相同,"
|
||||
"你可以通过继承扩展工厂来改变工厂的行为,并用它来创建测试时会使用到的模拟对象(mock)"
|
||||
"它不同于静态工厂,因为它不是静态的。"
|
||||
"因此,您可以拥有多个工厂,可以有不同的参数,可以进行子类化,也可以模拟。"
|
||||
"它总是比静态工厂更受欢迎!"
|
||||
|
||||
#: ../../Creational/SimpleFactory/README.rst:16
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-06 13:00+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/Singleton/README.rst:2
|
||||
msgid "`Singleton`__"
|
||||
@@ -19,7 +19,7 @@ msgstr "`单例模式`__"
|
||||
msgid ""
|
||||
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
|
||||
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
|
||||
msgstr "**单例模式已经被考虑列入到反模式中!请使用依赖注入获得更好的代码可测试性和可控性!**"
|
||||
msgstr "**注:单例模式可能被认为是一种“反模式”。为了获得更好的可测试性和可维护性,建议使用依赖注入。**"
|
||||
|
||||
#: ../../Creational/Singleton/README.rst:8
|
||||
msgid "Purpose"
|
||||
@@ -29,7 +29,7 @@ msgstr "目标"
|
||||
msgid ""
|
||||
"To have only one instance of this object in the application that will handle"
|
||||
" all calls."
|
||||
msgstr "使应用中只存在一个对象的实例,并且使这个单实例负责所有对该对象的调用。"
|
||||
msgstr "让应用只存在一个对象的实例,处理所有的调用。"
|
||||
|
||||
#: ../../Creational/Singleton/README.rst:14
|
||||
msgid "Examples"
|
||||
@@ -48,7 +48,7 @@ msgstr "日志记录器"
|
||||
msgid ""
|
||||
"Lock file for the application (there is only one in the filesystem ...)"
|
||||
msgstr ""
|
||||
"应用锁文件 (理论上整个应用只有一个锁文件 ...)"
|
||||
"应用程序的锁定文件(Lock file,理论上整个应用应该只有一个锁文件)"
|
||||
|
||||
#: ../../Creational/Singleton/README.rst:23
|
||||
msgid "UML Diagram"
|
||||
|
@@ -4,12 +4,12 @@ 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: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-01-07 17:50+0800\n"
|
||||
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: ../../Creational/StaticFactory/README.rst:2
|
||||
msgid "Static Factory"
|
||||
@@ -27,8 +27,9 @@ msgid ""
|
||||
"method to create all types of objects it can create. It is usually named "
|
||||
"``factory`` or ``build``."
|
||||
msgstr ""
|
||||
"和抽象工厂类似,静态工厂模式用来创建一系列互相关联或依赖的对象,和抽象工厂模式不同的是静态工厂"
|
||||
"模式只用一个静态方法就解决了所有类型的对象创建,通常被命名为 ``工厂`` 或者 ``构建器``"
|
||||
"与 抽象工厂 类似,静态工厂模式用于创建一系列互相关联或依赖的对象。"
|
||||
"它与抽象工厂模式的区别在于,静态工厂模式仅使用 一个静态方法 来创建所有它可以创建的类型。"
|
||||
"通常,这个静态方法被命名为:``factory`` 或 ``build``。"
|
||||
|
||||
#: ../../Creational/StaticFactory/README.rst:20
|
||||
msgid "UML Diagram"
|
||||
|
Reference in New Issue
Block a user