Chinese translation part two

finish AbstractFactory & FactoryMethod & SimpleFactory translattion

corret word translation & fix some typo error

finish Prototype translattion

finish Multiton translattion

correct words translation
This commit is contained in:
suxiaolin
2015-06-01 13:03:39 +08:00
committed by Faust
parent 9f385a30b4
commit 17ed60d8e6
5 changed files with 44 additions and 31 deletions

View File

@@ -28,7 +28,9 @@ msgid ""
"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."
msgstr "翻译。。。"
msgstr ""
"创建一系列互相关联或依赖的对象时不需要指定将要创建的对象对应的类,因为这些将被创建的对象对应的类都实现了同一个接口。"
"抽象工厂的使用者不需要关心对象的创建过程,它只需要知道这些对象是如何协调工作的。"
#: ../../Creational/AbstractFactory/README.rst:13
msgid "UML Diagram"

View File

@@ -13,45 +13,49 @@ msgstr ""
#: ../../Creational/FactoryMethod/README.rst:2
msgid "`Factory Method`__"
msgstr ""
msgstr "`工厂方法`__"
#: ../../Creational/FactoryMethod/README.rst:5
msgid "Purpose"
msgstr ""
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"
msgstr ""
"比简单工厂模式好的一点是工厂方法可以通过继承实现不同的创建对象的逻辑。"
#: ../../Creational/FactoryMethod/README.rst:10
msgid "For simple case, 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 S.O.L.I.D principles."
msgstr ""
"这个模式是一个 \"真正\" 的设计模式因为它遵循了依赖反转原则Dependency Inversion Principle 众所周知这个 \"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"
msgstr ""
msgstr "UML 图"
#: ../../Creational/FactoryMethod/README.rst:27
msgid "Code"
msgstr ""
msgstr "代码"
#: ../../Creational/FactoryMethod/README.rst:29
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "你可以在 `GitHub`_ 上找到这些代码"
#: ../../Creational/FactoryMethod/README.rst:31
msgid "FactoryMethod.php"
@@ -83,7 +87,7 @@ msgstr ""
#: ../../Creational/FactoryMethod/README.rst:74
msgid "Test"
msgstr ""
msgstr "测试"
#: ../../Creational/FactoryMethod/README.rst:76
msgid "Tests/FactoryMethodTest.php"

View File

@@ -13,52 +13,53 @@ msgstr ""
#: ../../Creational/Multiton/README.rst:2
msgid "Multiton"
msgstr ""
msgstr "多例"
#: ../../Creational/Multiton/README.rst:4
msgid ""
"**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND "
"MAINTAINABILITY USE DEPENDENCY INJECTION!**"
msgstr ""
"**多例模式已经被考虑列入到反模式中!请使用依赖注入获得更好的代码可测试性和可控性!**"
#: ../../Creational/Multiton/README.rst:8
msgid "Purpose"
msgstr ""
msgstr "目的"
#: ../../Creational/Multiton/README.rst:10
msgid ""
"To have only a list of named instances that are used, like a singleton but "
"with n instances."
msgstr ""
msgstr "使类仅有一个命名的对象的集合可供使用,像单例模式但是有多个实例。"
#: ../../Creational/Multiton/README.rst:14
msgid "Examples"
msgstr ""
msgstr "例子"
#: ../../Creational/Multiton/README.rst:16
msgid "2 DB Connectors, e.g. one for MySQL, the other for SQLite"
msgstr ""
msgstr "2 个数据库连接比如一个连接MySQL另一个连接SQLite"
#: ../../Creational/Multiton/README.rst:17
msgid "multiple Loggers (one for debug messages, one for errors)"
msgstr ""
msgstr "多个日志记录器(一个记录调试信息,另一个记录错误信息)"
#: ../../Creational/Multiton/README.rst:20
msgid "UML Diagram"
msgstr ""
msgstr "UML 图"
#: ../../Creational/Multiton/README.rst:27
msgid "Code"
msgstr ""
msgstr "代码"
#: ../../Creational/Multiton/README.rst:29
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "你可以在 `GitHub`_ 上找到这些代码"
#: ../../Creational/Multiton/README.rst:31
msgid "Multiton.php"
msgstr ""
#: ../../Creational/Multiton/README.rst:38
msgid "Test"
msgid "测试"
msgstr ""

View File

@@ -13,39 +13,41 @@ msgstr ""
#: ../../Creational/Prototype/README.rst:2
msgid "`Prototype`__"
msgstr ""
msgstr "`原型模式`__"
#: ../../Creational/Prototype/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "目的"
#: ../../Creational/Prototype/README.rst: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())。"
#: ../../Creational/Prototype/README.rst:11
msgid "Examples"
msgstr ""
msgstr "例子"
#: ../../Creational/Prototype/README.rst:13
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行数据库记录然后创建每一条记录对应的对象实体)"
#: ../../Creational/Prototype/README.rst:17
msgid "UML Diagram"
msgstr ""
msgstr "UML 图"
#: ../../Creational/Prototype/README.rst:24
msgid "Code"
msgstr ""
msgstr "代码"
#: ../../Creational/Prototype/README.rst:26
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "你可以在 `GitHub`_ 上找到这些代码"
#: ../../Creational/Prototype/README.rst:28
msgid "index.php"
@@ -65,4 +67,4 @@ msgstr ""
#: ../../Creational/Prototype/README.rst:53
msgid "Test"
msgstr ""
msgstr "测试"

View File

@@ -13,39 +13,43 @@ msgstr ""
#: ../../Creational/SimpleFactory/README.rst:2
msgid "Simple Factory"
msgstr ""
msgstr "简单工厂"
#: ../../Creational/SimpleFactory/README.rst:5
msgid "Purpose"
msgstr ""
msgstr "目的"
#: ../../Creational/SimpleFactory/README.rst:7
msgid "ConcreteFactory is a simple factory pattern."
msgstr ""
msgstr "简单的创建对象型工厂模式"
#: ../../Creational/SimpleFactory/README.rst:9
msgid ""
"It differs from the static factory because it is NOT static and as you know:"
" static => global => evil!"
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"
msgstr ""
msgstr "UML 图"
#: ../../Creational/SimpleFactory/README.rst:23
msgid "Code"
msgstr ""
msgstr "代码"
#: ../../Creational/SimpleFactory/README.rst:25
msgid "You can also find these code on `GitHub`_"
msgstr ""
msgstr "你可以在 `GitHub`_ 上找到这些代码"
#: ../../Creational/SimpleFactory/README.rst:27
msgid "ConcreteFactory.php"
@@ -65,7 +69,7 @@ msgstr ""
#: ../../Creational/SimpleFactory/README.rst:52
msgid "Test"
msgstr ""
msgstr "测试"
#: ../../Creational/SimpleFactory/README.rst:54
msgid "Tests/SimpleFactoryTest.php"