From 8ebd85977f8e79ff705d2fe4b72afc0ea13ee5c9 Mon Sep 17 00:00:00 2001 From: aspirantzhang Date: Fri, 7 Jan 2022 17:43:13 +0800 Subject: [PATCH] docs: improve Chinese Translation of SimpleFactory --- .../Creational/SimpleFactory/README.po | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/locale/zh_CN/LC_MESSAGES/Creational/SimpleFactory/README.po b/locale/zh_CN/LC_MESSAGES/Creational/SimpleFactory/README.po index 2a11dfe..6bb1c68 100644 --- a/locale/zh_CN/LC_MESSAGES/Creational/SimpleFactory/README.po +++ b/locale/zh_CN/LC_MESSAGES/Creational/SimpleFactory/README.po @@ -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 \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2022-01-07 17:41+0800\n" +"Last-Translator: Aspirant Zhang \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"