docs: improve Chinese translation of FactoryMethod

This commit is contained in:
aspirantzhang
2022-01-05 20:07:48 +08:00
parent adfb13a412
commit e326bf7fda

View File

@@ -4,12 +4,12 @@ msgstr ""
"Project-Id-Version: DesignPatternsPHP 1.0\n" "Project-Id-Version: DesignPatternsPHP 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-29 12:18+0200\n" "POT-Creation-Date: 2015-05-29 12:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2022-01-05 20:02+0800\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
#: ../../Creational/FactoryMethod/README.rst:2 #: ../../Creational/FactoryMethod/README.rst:2
msgid "`Factory Method`__" 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 " "The good point over the SimpleFactory is you can subclass it to implement different ways to create "
"objects." "objects."
msgstr "" msgstr ""
"简单工厂模式好的一点是工厂方法可以通过继承实现不同的创建对象的逻辑。" "相比 简单工厂模式SimpleFactory而言工厂方法模式Factory Method可以通过延伸出子类实现不同的方法创建对象。"
#: ../../Creational/FactoryMethod/README.rst:10 #: ../../Creational/FactoryMethod/README.rst:10
msgid "For simple cases, this abstract class could be just an interface." msgid "For simple cases, this abstract class could be just an interface."
msgstr "" msgstr ""
"举个简单的例子,这抽象类都仅仅是一个接口" "对于比较简单的情况,这抽象类可能只是一个接口"
#: ../../Creational/FactoryMethod/README.rst:12 #: ../../Creational/FactoryMethod/README.rst:12
msgid "" msgid ""
"This pattern is a \"real\" Design Pattern because it achieves the " "This pattern is a \"real\" Design Pattern because it achieves the "
"Dependency Inversion principle a.k.a the \"D\" in SOLID principles." "Dependency Inversion principle a.k.a the \"D\" in SOLID principles."
msgstr "" msgstr ""
"这个模式是一个 \"真正\" 的设计模式因为它遵循了依赖反转原则Dependency Inversion Principle 众所周知这个 \"D\" 代表了真正的面向对象程序设计。" "这是一个 \"真正\" 的设计模式,因为它遵循了\"依赖反转原则Dependency Inversion Principle\" 。"
"也就是 SOLID 原则中的\"D\"。"
#: ../../Creational/FactoryMethod/README.rst:15 #: ../../Creational/FactoryMethod/README.rst:15
msgid "" msgid ""
"It means the FactoryMethod class depends on abstractions, not concrete " "It means the FactoryMethod class depends on abstractions, not concrete "
"classes. This is the real trick compared to SimpleFactory or StaticFactory." "classes. This is the real trick compared to SimpleFactory or StaticFactory."
msgstr "" msgstr ""
"意味着工厂方法类依赖于类的抽象,而不是具体将被创建的类,这是工厂方法模式与简单工厂模式和静态工厂模式最重要的区别" "意味着工厂方法实现的类依赖于类的抽象,而不是具体的类。"
"这也是 工厂方法模式 与 简单工厂模式 和 静态工厂模式 之间最重要的区别。"
#: ../../Creational/FactoryMethod/README.rst:20 #: ../../Creational/FactoryMethod/README.rst:20
msgid "UML Diagram" msgid "UML Diagram"