[webbeans-commits] Webbeans SVN: r1474 - doc/trunk/reference/zh-CN.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Feb 9 22:19:40 EST 2009


Author: alartin
Date: 2009-02-09 22:19:40 -0500 (Mon, 09 Feb 2009)
New Revision: 1474

Modified:
   doc/trunk/reference/zh-CN/decorators.po
Log:


Modified: doc/trunk/reference/zh-CN/decorators.po
===================================================================
--- doc/trunk/reference/zh-CN/decorators.po	2009-02-09 21:39:49 UTC (rev 1473)
+++ doc/trunk/reference/zh-CN/decorators.po	2009-02-10 03:19:40 UTC (rev 1474)
@@ -3,11 +3,11 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: master.xml\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n"
 "POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2009-02-10 11:18+0800\n"
+"Last-Translator: Sean Wu <alartin at gmail.com>\n"
 "Language-Team: none\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -17,38 +17,25 @@
 #: decorators.xml:4
 #, no-c-format
 msgid "Decorators"
-msgstr ""
+msgstr "装饰器"
 
 #. Tag: para
 #: decorators.xml:6
 #, no-c-format
-msgid ""
-"Interceptors are a powerful way to capture and separate concerns which are "
-"<emphasis>orthogonal</emphasis> to the type system. Any interceptor is able "
-"to intercept invocations of any Java type. This makes them perfect for "
-"solving technical concerns such as transaction management and security. "
-"However, by nature, interceptors are unaware of the actual semantics of the "
-"events they intercept. Thus, interceptors aren't an appropriate tool for "
-"separating business-related concerns."
-msgstr ""
+msgid "Interceptors are a powerful way to capture and separate concerns which are <emphasis>orthogonal</emphasis> to the type system. Any interceptor is able to intercept invocations of any Java type. This makes them perfect for solving technical concerns such as transaction management and security. However, by nature, interceptors are unaware of the actual semantics of the events they intercept. Thus, interceptors aren't an appropriate tool for separating business-related concerns."
+msgstr "拦截器能够以一种强大的方式来捕获和分离关注点,拦截器和类型系统的关系是正交的。任何拦截器都能够拦截任何Java类型的调用。这种特性能够让拦截器很好的处理技术关注点,例如事务管理和安全。不过,拦截器无法领会其所拦截时间的真实语义。因此,拦截器并不是分离业务相关的关注点的好工具。"
 
 #. Tag: para
 #: decorators.xml:14
 #, no-c-format
-msgid ""
-"The reverse is true of <emphasis>decorators</emphasis>. A decorator "
-"intercepts invocations only for a certain Java interface, and is therefore "
-"aware of all the semantics attached to that interface. This makes decorators "
-"a perfect tool for modeling some kinds of business concerns. It also means "
-"that a decorator doesn't have the generality of an interceptor. Decorators "
-"aren't able to solve technical concerns that cut across many disparate types."
-msgstr ""
+msgid "The reverse is true of <emphasis>decorators</emphasis>. A decorator intercepts invocations only for a certain Java interface, and is therefore aware of all the semantics attached to that interface. This makes decorators a perfect tool for modeling some kinds of business concerns. It also means that a decorator doesn't have the generality of an interceptor. Decorators aren't able to solve technical concerns that cut across many disparate types."
+msgstr "对装饰器来说,反之亦然。一个装饰器只拦截特定Java接口的调用,因此它能够领会这个接口关联的语义。装饰器的特性使其成为某些业务关注点的理想的建模工具。这也意味着装饰器并不拥有一个拦截器的普遍性。装饰器无法解决跨越多个不同类型的技术关注点。"
 
 #. Tag: para
 #: decorators.xml:22
 #, no-c-format
 msgid "Suppose we have an interface that represents accounts:"
-msgstr ""
+msgstr "假定我们有一个表现帐户的接口:"
 
 #. Tag: programlisting
 #: decorators.xml:24
@@ -61,24 +48,24 @@
 "    public void deposit(BigDecimal amount);\n"
 "}]]>"
 msgstr ""
+"<![CDATA[public interface Account {\n"
+"    public BigDecimal getBalance();\n"
+"    public User getOwner();\n"
+"    public void withdraw(BigDecimal amount);\n"
+"    public void deposit(BigDecimal amount);\n"
+"}]]>"
 
 #. Tag: para
 #: decorators.xml:26
 #, no-c-format
-msgid ""
-"Several different Web Beans in our system implement the <literal>Account</"
-"literal> interface. However, we have a common legal requirement that, for "
-"any kind of account, large transactions must be recorded by the system in a "
-"special log. This is a perfect job for a decorator."
-msgstr ""
+msgid "Several different Web Beans in our system implement the <literal>Account</literal> interface. However, we have a common legal requirement that, for any kind of account, large transactions must be recorded by the system in a special log. This is a perfect job for a decorator."
+msgstr "我们系统实现中可以有多个不同的Web Beans实现 <literal>Account</literal> 接口。然而我们有一个通用的法律要求对于任何帐户,大的交易必须由系统在一个特定的日志中记录。装饰器非常适合处理这种工作。"
 
 #. Tag: para
 #: decorators.xml:32
 #, no-c-format
-msgid ""
-"A decorator is a simple Web Bean that implements the type it decorates and "
-"is annotated <literal>@Decorator</literal>."
-msgstr ""
+msgid "A decorator is a simple Web Bean that implements the type it decorates and is annotated <literal>@Decorator</literal>."
+msgstr "装饰器是一个简单的Web Bean,能够实现其装饰的类型。装饰器使用 <literal>@Decorator</literal> 注释。"
 
 #. Tag: programlisting
 #: decorators.xml:35
@@ -108,100 +95,107 @@
 "    \n"
 "}]]>"
 msgstr ""
+"<![CDATA[@Decorator\n"
+"public abstract class LargeTransactionDecorator \n"
+"        implements Account {\n"
+"    \n"
+"    @Decorates Account account;\n"
+"    \n"
+"    @PersistenceContext EntityManager em;\n"
+"    \n"
+"    public void withdraw(BigDecimal amount) {\n"
+"        account.withdraw(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedWithdrawl(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"    public void deposit(BigDecimal amount);\n"
+"        account.deposit(amount);\n"
+"        if ( amount.compareTo(LARGE_AMOUNT)>0 ) {\n"
+"            em.persist( new LoggedDeposit(amount) );\n"
+"        }\n"
+"    }\n"
+"    \n"
+"}]]>"
 
 #. Tag: para
 #: decorators.xml:37
 #, no-c-format
-msgid ""
-"Unlike other simple Web Beans, a decorator may be an abstract class. If "
-"there's nothing special the decorator needs to do for a particular method of "
-"the decorated interface, you don't need to implement that method."
-msgstr ""
+msgid "Unlike other simple Web Beans, a decorator may be an abstract class. If there's nothing special the decorator needs to do for a particular method of the decorated interface, you don't need to implement that method."
+msgstr "和其他简单的Web Beans不同,一个装饰器可以是一个抽象类。如果被装饰的接口中一个特殊方法对装饰器没有用处,那么装饰器可以不实现这个方法。"
 
 #. Tag: title
 #: decorators.xml:43
 #, no-c-format
 msgid "Delegate attributes"
-msgstr ""
+msgstr "委托属性"
 
 #. Tag: para
 #: decorators.xml:45
 #, no-c-format
-msgid ""
-"All decorators have a <emphasis>delegate attribute</emphasis>. The type and "
-"binding types of the delegate attribute determine which Web Beans the "
-"decorator is bound to. The delegate attribute type must implement or extend "
-"all interfaces implemented by the decorator."
-msgstr ""
+msgid "All decorators have a <emphasis>delegate attribute</emphasis>. The type and binding types of the delegate attribute determine which Web Beans the decorator is bound to. The delegate attribute type must implement or extend all interfaces implemented by the decorator."
+msgstr "所有装饰器都有一个 <emphasis>委托属性</emphasis> 。委托属性的类型和绑定类型决定了装饰器绑定到哪个Web Bean上。委托属性类型必须实现或者继承装饰器实现的所有接口。"
 
 #. Tag: para
 #: decorators.xml:50
 #, no-c-format
-msgid ""
-"This delegate attribute specifies that the decorator is bound to all Web "
-"Beans that implement <literal>Account</literal>:"
-msgstr ""
+msgid "This delegate attribute specifies that the decorator is bound to all Web Beans that implement <literal>Account</literal>:"
+msgstr "下面的委托属性指定了装饰器绑定到所有实现 <literal>Account</literal> 接口的Web Beans:"
 
 #. Tag: programlisting
 #: decorators.xml:53
 #, no-c-format
 msgid "<![CDATA[@Decorates Account account;]]>"
-msgstr ""
+msgstr "<![CDATA[@Decorates Account account;]]>"
 
 #. Tag: para
 #: decorators.xml:55
 #, no-c-format
-msgid ""
-"A delegate attribute may specify a binding annotation. Then the decorator "
-"will only be bound to Web Beans with the same binding."
-msgstr ""
+msgid "A delegate attribute may specify a binding annotation. Then the decorator will only be bound to Web Beans with the same binding."
+msgstr "一个委托属性能够指定一个绑定注释。装饰器只能绑定具有相同绑定的Web Beans。"
 
 #. Tag: programlisting
 #: decorators.xml:58
 #, no-c-format
 msgid "<![CDATA[@Decorates @Foreign Account account;]]>"
-msgstr ""
+msgstr "<![CDATA[@Decorates @Foreign Account account;]]>"
 
 #. Tag: para
 #: decorators.xml:60
 #, no-c-format
 msgid "A decorator is bound to any Web Bean which:"
-msgstr ""
+msgstr "一个装饰器可以绑定到任何符合下面条件的Web Bean上:"
 
 #. Tag: para
 #: decorators.xml:64
 #, no-c-format
 msgid "has the type of the delegate attribute as an API type, and"
-msgstr ""
+msgstr "有一个作为API类型的委托属性类型,以及"
 
 #. Tag: para
 #: decorators.xml:67
 #, no-c-format
 msgid "has all binding types that are declared by the delegate attribute."
-msgstr ""
+msgstr "具备委托属性声明的说有绑定类型。"
 
 #. Tag: para
 #: decorators.xml:71
 #, no-c-format
-msgid ""
-"The decorator may invoke the delegate attribute, which has much the same "
-"effect as calling <literal>InvocationContext.proceed()</literal> from an "
-"interceptor."
-msgstr ""
+msgid "The decorator may invoke the delegate attribute, which has much the same effect as calling <literal>InvocationContext.proceed()</literal> from an interceptor."
+msgstr "装饰器可以调用委托属性,这和从一个拦截器中调用 <literal>InvocationContext.proceed()</literal> 具有相同效果。"
 
 #. Tag: title
 #: decorators.xml:78
 #, no-c-format
 msgid "Enabling decorators"
-msgstr ""
+msgstr "激活装饰器"
 
 #. Tag: para
 #: decorators.xml:80
 #, no-c-format
-msgid ""
-"We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans."
-"xml</literal>."
-msgstr ""
+msgid "We need to <emphasis>enable</emphasis> our decorator in <literal>web-beans.xml</literal>."
+msgstr "我们需要在 <literal>web-beans.xml</literal> 文件中激活我们的装饰器。"
 
 #. Tag: programlisting
 #: decorators.xml:83
@@ -211,33 +205,31 @@
 "    <myapp:LargeTransactionDecorator/>\n"
 "</Decorators>]]>"
 msgstr ""
+"<![CDATA[<Decorators>\n"
+"    <myapp:LargeTransactionDecorator/>\n"
+"</Decorators>]]>"
 
 #. Tag: para
 #: decorators.xml:85
 #, no-c-format
-msgid ""
-"This declaration serves the same purpose for decorators that the "
-"<literal>&lt;Interceptors&gt;</literal> declaration serves for interceptors:"
-msgstr ""
+msgid "This declaration serves the same purpose for decorators that the <literal>&lt;Interceptors&gt;</literal> declaration serves for interceptors:"
+msgstr "这个声明对于装饰器来说和<literal>&lt;Interceptors&gt;</literal>声明对于拦截器来说是一样的:"
 
 #. Tag: para
 #: decorators.xml:90
 #, no-c-format
-msgid ""
-"it enables us to specify a total ordering for all decorators in our system, "
-"ensuring deterministic behavior, and"
-msgstr ""
+msgid "it enables us to specify a total ordering for all decorators in our system, ensuring deterministic behavior, and"
+msgstr "它能让我们在系统中指定所有装饰器的排序,确保具有确定的行为,并且"
 
 #. Tag: para
 #: decorators.xml:94
 #, no-c-format
 msgid "it lets us enable or disable decorator classes at deployment time."
-msgstr ""
+msgstr "它能让我们在部署时期中激活或者关闭装饰器类。"
 
 #. Tag: para
 #: decorators.xml:98
 #, no-c-format
-msgid ""
-"Interceptors for a method are called before decorators that apply to that "
-"method."
-msgstr ""
+msgid "Interceptors for a method are called before decorators that apply to that method."
+msgstr "一个方法的拦截器在这个方法的装饰器调用之前调用。"
+




More information about the weld-commits mailing list