From hibernate-commits at lists.jboss.org Tue Jul 6 15:35:14 2010 Content-Type: multipart/mixed; boundary="===============8183226849031871589==" MIME-Version: 1.0 From: hibernate-commits at lists.jboss.org To: hibernate-commits at lists.jboss.org Subject: [hibernate-commits] Hibernate SVN: r19905 - validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules. Date: Tue, 06 Jul 2010 15:35:14 -0400 Message-ID: <201007061935.o66JZERZ032515@svn01.web.mwc.hst.phx2.redhat.com> --===============8183226849031871589== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: stliu Date: 2010-07-06 15:35:13 -0400 (Tue, 06 Jul 2010) New Revision: 19905 Modified: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/getti= ngstarted.po validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/prefa= ce.po Log: HV-351 first chapter Modified: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/module= s/gettingstarted.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/gett= ingstarted.po 2010-07-06 15:18:26 UTC (rev 19904) +++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/gett= ingstarted.po 2010-07-06 19:35:13 UTC (rev 19905) @@ -6,8 +6,8 @@ "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-07-06 14:46+0000\n" -"PO-Revision-Date: 2010-07-06 14:46+0000\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2010-07-07 03:33+0830\n" +"Last-Translator: Strong Liu \n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=3DUTF-8\n" @@ -17,43 +17,37 @@ #: gettingstarted.xml:25 #, no-c-format msgid "Getting started" -msgstr "" +msgstr "=E5=BC=80=E5=A7=8B=E5=85=A5=E9=97=A8" = #. Tag: para #: gettingstarted.xml:27 #, no-c-format -msgid "" -"This chapter will show you how to get started with Hibernate Validator, t= he " -"reference implementation (RI) of Bean Validation. For the following " -"quickstart you need:" -msgstr "" +msgid "This chapter will show you how to get started with Hibernate Valida= tor, the reference implementation (RI) of Bean Validation. For the followin= g quickstart you need:" +msgstr "=E6=9C=AC=E7=AB=A0=E5=B0=86=E4=BC=9A=E5=91=8A=E8=AF=89=E4=BD=A0=E5= =A6=82=E4=BD=95=E4=BD=BF=E7=94=A8Hibernate Validator, =E5=9C=A8=E5=BC=80=E5= =A7=8B=E4=B9=8B=E5=89=8D,=E4=BD=A0=E9=9C=80=E8=A6=81=E5=87=86=E5=A4=87=E5= =A5=BD=E4=B8=8B=E9=9D=A2=E7=9A=84=E7=8E=AF=E5=A2=83:" = #. Tag: para #: gettingstarted.xml:33 #, no-c-format msgid "A JDK >=3D 5" -msgstr "" +msgstr "A JDK >=3D 5" = #. Tag: ulink #: gettingstarted.xml:37 #, no-c-format msgid "Apache Maven" -msgstr "" +msgstr "Apache Maven" = #. Tag: para #: gettingstarted.xml:41 #, no-c-format msgid "An Internet connection (Maven has to download all required librarie= s)" -msgstr "" +msgstr "=E7=BD=91=E7=BB=9C=E8=BF=9E=E6=8E=A5 ( Maven=E9=9C=80=E8=A6=81=E9= =80=9A=E8=BF=87=E4=BA=92=E8=81=94=E7=BD=91=E4=B8=8B=E8=BD=BD=E6=89=80=E9=9C= =80=E7=9A=84=E7=B1=BB=E5=BA=93)" = #. Tag: para #: gettingstarted.xml:46 #, no-c-format msgid "" -"A properly configured remote repository. Add the following to your " -"settings.xml: Configuring the JBoss= " -"Maven repository in <filename>settings.xml</filename> " -"<repositories>\n" +"A properly configured remote repository. Add the following to your settings.xml: Configuring the JBoss Maven r= epository in <filename>settings.xml</filename> <= repositories>\n" " <repository>\n" " <id>jboss</id>\n" " <url>http://repository.jboss.com/maven2</url>\n" @@ -64,21 +58,26 @@ " <enabled>false</enabled>\n" " </snapshots>\n" " </repository>\n" -"</repositories> More information about " -"settings.xml can be found in the Maven Local " -"Settings Model." +"</repositories> More information about <= filename>settings.xml can be found in the Maven Local Setti= ngs Model." msgstr "" +"=E9=85=8D=E7=BD=AE=E8=BF=9C=E7=AB=AFmaven=E4=BB=93=E5=BA=93. =E6=B7=BB=E5= =8A=A0=E4=B8=8B=E9=9D=A2=E7=9A=84=E5=86=85=E5=AE=B9=E5=88=B0=E4=BD=A0=E7=9A= =84settings.xml=E4=B8=AD: Configuring = the JBoss Maven repository in <filename>settings.xml</filename> <repositories>\n" +" <repository>\n" +" <id>jboss</id>\n" +" <url>http://repository.jboss.com/maven2</url>\n" +" <releases>\n" +" <enabled>true</enabled>\n" +" </releases>\n" +" <snapshots>\n" +" <enabled>false</enabled>\n" +" </snapshots>\n" +" </repository>\n" +"</repositories> =E6=9B=B4=E5=A4=9A=E5=85= =B3=E4=BA=8Esettings.xml =E7=9A=84=E4=BF=A1=E6=81=AF= =E8=AF=B7=E5=8F=82=E8=80=83Maven Local Settings Model." = #. Tag: para #: gettingstarted.xml:60 #, no-c-format msgid "" -"Hibernate Validator uses JAXB for XML parsing. JAXB is part of the Java " -"Class Library since Java 6 which means that if you run Hibernate Validato= r " -"with Java 5 you will have to add additional JAXB dependencies. Using mave= n " -"you have to add the following dependencies:<" -"dependency>\n" +"Hibernate Validator uses JAXB for XML parsing. JAXB is part of the Java C= lass Library since Java 6 which means that if you run Hibernate Validator w= ith Java 5 you will have to add additional JAXB dependencies. Using maven y= ou have to add the following dependencies:<dependency>= ;\n" " <groupId>javax.xml.bind</groupId>\n" " <artifactId>jaxb-api</artifactId>\n" " <version>2.2</version>\n" @@ -88,89 +87,89 @@ " <artifactId>jaxb-impl</artifactId>\n" " <version>2.1.12</version>\n" "</dependency>\n" -" if you are using the SourceForge package you find the " -"necessary libraries in the lib/jdk5 directory. In ca= se " -"you are not using the XML configuration you can also disable it explicitl= y " -"by calling Configuration.ignoreXmlConfiguration() " -"during ValidationFactory creation. In this case th= e " -"JAXB dependencies are not needed." +" if you are using the SourceForge package you find the n= ecessary libraries in the lib/jdk5 directory. In case = you are not using the XML configuration you can also disable it explicitly = by calling Configuration.ignoreXmlConfiguration() = during ValidationFactory creation. In this case the = JAXB dependencies are not needed." msgstr "" +"Hibernate Validator =E4=BD=BF=E7=94=A8JAXB =E6=9D=A5=E8=A7=A3=E6=9E=90XML= . JAXB =E5=B7=B2=E7=BB=8F=E8=A2=AB=E9=9B=86=E6=88=90=E8=BF=9BJava 6=E4=BA= =86, =E6=89=80=E4=BB=A5,=E5=A6=82=E6=9E=9C=E4=BD=A0=E8=A6=81=E5=9C=A8Java 5= =E4=B8=8A=E4=BD=BF=E7=94=A8Hibernate Validator=E7=9A=84=E8=AF=9D, =E9=82=A3= =E4=B9=88,=E8=BF=98=E9=9C=80=E8=A6=81=E6=B7=BB=E5=8A=A0=E9=A2=9D=E5=A4=96= =E7=9A=84JAXB=E7=9A=84=E4=BE=9D=E8=B5=96. =E5=A6=82=E6=9E=9C=E4=BD=A0=E4=BD= =BF=E7=94=A8Maven=E7=9A=84=E8=AF=9D,=E4=BD=A0=E5=8F=AF=E4=BB=A5=E6=8A=8A=E4= =B8=8B=E9=9D=A2=E7=9A=84=E5=86=85=E5=AE=B9=E6=B7=BB=E5=8A=A0=E5=88=B0pom=E5= =BD=93=E4=B8=AD:<dependency>\n" +" <groupId>javax.xml.bind</groupId>\n" +" <artifactId>jaxb-api</artifactId>\n" +" <version>2.2</version>\n" +"</dependency>\n" +"<dependency>\n" +" <groupId>com.sun.xml.bind</groupId>\n" +" <artifactId>jaxb-impl</artifactId>\n" +" <version>2.1.12</version>\n" +"</dependency>\n" +"" = #. Tag: title #: gettingstarted.xml:73 #, no-c-format msgid "Setting up a new Maven project" -msgstr "" +msgstr "=E7=AC=AC=E4=B8=80=E4=B8=AAMaven=E9=A1=B9=E7=9B=AE" = #. Tag: para #: gettingstarted.xml:75 #, no-c-format -msgid "" -"Start by creating new Maven project using the Maven archetype plugin as " -"follows:" -msgstr "" +msgid "Start by creating new Maven project using the Maven archetype plugi= n as follows:" +msgstr "=E4=BD=BF=E7=94=A8Maven archetype=E6=8F=92=E4=BB=B6=E6=9D=A5=E5=88= =9B=E5=BB=BA=E4=B8=80=E4=B8=AA=E6=96=B0=E7=9A=84Maven =E9=A1=B9=E7=9B=AE" = #. Tag: title #: gettingstarted.xml:79 #, no-c-format -msgid "" -"Using Maven's archetype plugin to create a sample project using Hibernate= " -"Validator" -msgstr "" +msgid "Using Maven's archetype plugin to create a sample project using Hib= ernate Validator" +msgstr "=E4=BD=BF=E7=94=A8Maven archetype =E6=8F=92=E4=BB=B6=E6=9D=A5=E5= =88=9B=E5=BB=BA=E4=B8=80=E4=B8=AA=E7=AE=80=E5=8D=95=E7=9A=84=E5=9F=BA=E4=BA= =8EHibernate Validator=E7=9A=84=E9=A1=B9=E7=9B=AE" = #. Tag: programlisting #: gettingstarted.xml:82 #, no-c-format msgid "" "mvn archetype:create -DarchetypeGroupId=3Dorg.hibernate \\\n" -" -DarchetypeArtifactId=3Dhibernate-validator-quicksta= rt-" -"archetype \\\n" +" -DarchetypeArtifactId=3Dhibernate-validator-quicksta= rt-archetype \\\n" " -DarchetypeVersion=3D&version; \\\n" " -DgroupId=3Dcom.mycompany \n" " -DartifactId=3Dhv-quickstart" msgstr "" +"mvn archetype:create -DarchetypeGroupId=3Dorg.hibernate \\\n" +" -DarchetypeArtifactId=3Dhibernate-validator-quicksta= rt-archetype \\\n" +" -DarchetypeVersion=3D&version; \\\n" +" -DgroupId=3Dcom.mycompany \n" +" -DartifactId=3Dhv-quickstart" = #. Tag: para #: gettingstarted.xml:85 #, no-c-format -msgid "" -"Maven will create your project in the directory hv-quickstart. Change int= o " -"this directory and run:" -msgstr "" +msgid "Maven will create your project in the directory hv-quickstart. Chan= ge into this directory and run:" +msgstr "Maven =E5=B0=86=E4=BC=9A=E6=8A=8A=E4=BD=A0=E7=9A=84=E9=A1=B9=E7=9B= =AE=E5=88=9B=E5=BB=BA=E5=9C=A8hv-quickstart=E7=9B=AE=E5=BD=95=E4=B8=AD. =E8= =BF=9B=E5=85=A5=E8=BF=99=E4=B8=AA=E7=9B=AE=E5=BD=95=E5=B9=B6=E4=B8=94=E6=89= =A7=E8=A1=8C:" = #. Tag: programlisting #: gettingstarted.xml:88 #, no-c-format msgid "mvn test" -msgstr "" +msgstr "mvn test" = #. Tag: para #: gettingstarted.xml:88 #, no-c-format -msgid "" -"Maven will compile the example code and run the implemented unit tests. " -"Let's have a look at the actual code." -msgstr "" +msgid "Maven will compile the example code and run the implemented unit te= sts. Let's have a look at the actual code." +msgstr "=E8=BF=99=E6=A0=B7, Maven=E4=BC=9A=E7=BC=96=E8=AF=91=E7=A4=BA=E4= =BE=8B=E4=BB=A3=E7=A0=81=E5=B9=B6=E4=B8=94=E8=BF=90=E8=A1=8C=E5=8D=95=E5=85= =83=E6=B5=8B=E8=AF=95, =E6=8E=A5=E4=B8=8B=E6=9D=A5,=E8=AE=A9=E6=88=91=E4=BB= =AC=E7=9C=8B=E7=9C=8B=E7=94=9F=E6=88=90=E7=9A=84=E4=BB=A3=E7=A0=81." = #. Tag: title #: gettingstarted.xml:94 #, no-c-format msgid "Applying constraints" -msgstr "" +msgstr "=E6=B7=BB=E5=8A=A0=E7=BA=A6=E6=9D=9F" = #. Tag: para #: gettingstarted.xml:96 #, no-c-format -msgid "" -"Open the project in the IDE of your choice and have a look at the class " -"Car:" -msgstr "" +msgid "Open the project in the IDE of your choice and have a look at the c= lass Car:" +msgstr "=E5=9C=A8=E4=BD=A0=E5=96=9C=E6=AC=A2=E7=9A=84IDE=E4=B8=AD=E6=89=93= =E5=BC=80=E8=BF=99=E4=B8=AA=E9=A1=B9=E7=9B=AE=E4=B8=AD=E7=9A=84C= ar=E7=B1=BB:" = #. Tag: title #: gettingstarted.xml:100 #, no-c-format msgid "Class Car annotated with constraints" -msgstr "" +msgstr "=E5=B8=A6=E7=BA=A6=E6=9D=9F=E6=80=A7=E6=A0=87=E6=B3=A8(annotated w= ith constraints)=E7=9A=84Car =E7=B1=BB" = #. Tag: programlisting #: gettingstarted.xml:102 @@ -203,57 +202,74 @@ " //getters and setters ...\n" "}" msgstr "" +"package com.mycompany;\n" +"\n" +"import javax.validation.constraints.Min;\n" +"import javax.validation.constraints.NotNull;\n" +"import javax.validation.constraints.Size;\n" +"\n" +"public class Car {\n" +"\n" +" @NotNull\n" +" private String manufacturer;\n" +"\n" +" @NotNull\n" +" @Size(min =3D 2, max =3D 14)\n" +" private String licensePlate;\n" +"\n" +" @Min(2)\n" +" private int seatCount;\n" +" \n" +" public Car(String manufacturer, String licencePlate, int seatCount) {= \n" +" this.manufacturer =3D manufacturer;\n" +" this.licensePlate =3D licencePlate;\n" +" this.seatCount =3D seatCount;\n" +" }\n" +"\n" +" //getters and setters ...\n" +"}" = #. Tag: para #: gettingstarted.xml:105 #, no-c-format -msgid "" -"@NotNull, @Size and " -"@Min are so-called constraint annotations, that we= " -"use to declare constraints, which shall be applied to the fields of a " -"Car instance:" -msgstr "" +msgid "@NotNull, @Size and <= classname>@Min are so-called constraint annotations, that we us= e to declare constraints, which shall be applied to the fields of a Car instance:" +msgstr "@NotNull, @Size and = @Min=E5=B0=B1=E6=98=AF=E4=B8=8A=E9=9D=A2=E6=89=80=E5= =B1=9E=E7=9A=84=E7=BA=A6=E6=9D=9F=E6=80=A7=E6=A0=87=E6=B3=A8( constraint an= notations), =E6=88=91=E4=BB=AC=E5=B0=B1=E6=98=AF=E4=BD=BF=E7=94=A8=E5=AE=83= =E4=BB=AC=E6=9D=A5=E5=A3=B0=E6=98=8E=E7=BA=A6=E6=9D=9F, =E4=BE=8B=E5=A6=82= =E5=9C=A8Car=E7=9A=84=E5=AD=97=E6=AE=B5=E4=B8=AD=E6= =88=91=E4=BB=AC=E5=8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0:" = #. Tag: para #: gettingstarted.xml:112 #, no-c-format msgid "manufacturer shall never be null" -msgstr "" +msgstr "manufacturer=E6=B0=B8=E8=BF=9C=E4=B8=8D=E8=83= =BD=E4=B8=BAnull" = #. Tag: para #: gettingstarted.xml:116 #, no-c-format -msgid "" -"licensePlate shall never be null and must be between= 2 " -"and 14 characters long" -msgstr "" +msgid "licensePlate shall never be null and must be b= etween 2 and 14 characters long" +msgstr "licensePlate=E6=B0=B8=E8=BF=9C=E4=B8=8D=E8=83= =BD=E4=B8=BAnull,=E5=B9=B6=E4=B8=94=E5=AE=83=E7=9A=84=E5=80=BC=E5=AD=97=E7= =AC=A6=E4=B8=B2=E7=9A=84=E9=95=BF=E5=BA=A6=E8=A6=81=E5=9C=A82=E5=88=B014=E4= =B9=8B=E9=97=B4" = #. Tag: para #: gettingstarted.xml:121 #, no-c-format msgid "seatCount shall be at least 2." -msgstr "" +msgstr "seatCount=E7=9A=84=E5=80=BC=E8=A6=81=E4=B8=8D= =E8=83=BD=E5=B0=8F=E4=BA=8E2" = #. Tag: title #: gettingstarted.xml:127 #, no-c-format msgid "Validating constraints" -msgstr "" +msgstr "=E6=A0=A1=E9=AA=8C=E7=BA=A6=E6=9D=9F" = #. Tag: para #: gettingstarted.xml:129 #, no-c-format -msgid "" -"To perform a validation of these constraints, we use a Validat= or instance. Let's have a look at the CarTest " -"class:" -msgstr "" +msgid "To perform a validation of these constraints, we use a V= alidator instance. Let's have a look at the CarTest<= /classname> class:" +msgstr "=E6=88=91=E4=BB=AC=E9=9C=80=E8=A6=81=E4=BD=BF=E7=94=A8V= alidator=E6=9D=A5=E5=AF=B9=E4=B8=8A=E9=9D=A2=E7=9A=84=E9=82=A3= =E4=BA=9B=E7=BA=A6=E6=9D=9F=E8=BF=9B=E8=A1=8C=E6=A0=A1=E9=AA=8C. =E8=AE=A9= =E6=88=91=E4=BB=AC=E6=9D=A5=E7=9C=8B=E7=9C=8BCarTest= =E8=BF=99=E4=B8=AA=E7=B1=BB:" = #. Tag: title #: gettingstarted.xml:134 #, no-c-format msgid "Class CarTest showing validation examples" -msgstr "" +msgstr "=E5=9C=A8CarTest=E4=B8=AD=E4=BD=BF=E7=94=A8=E6=A0=A1=E9=AA=8C" = #. Tag: programlisting #: gettingstarted.xml:136 @@ -279,8 +295,7 @@ "\n" " @BeforeClass\n" " public static void setUp() {\n" -" ValidatorFactory factory =3D Validation.buildDefaultValidatorFact= ory" -"();\n" +" ValidatorFactory factory =3D Validation.buildDefaultValidatorFact= ory();\n" " validator =3D factory.getValidator();\n" " }\n" "\n" @@ -292,8 +307,7 @@ " validator.validate(car);\n" "\n" " assertEquals(1, constraintViolations.size());\n" -" assertEquals(\"may not be null\", constraintViolations.iterator()= ." -"next().getMessage());\n" +" assertEquals(\"may not be null\", constraintViolations.iterator()= .next().getMessage());\n" " }\n" "\n" " @Test\n" @@ -304,8 +318,7 @@ " validator.validate(car);\n" "\n" " assertEquals(1, constraintViolations.size());\n" -" assertEquals(\"size must be between 2 and 14\", constraintViolati= ons." -"iterator().next().getMessage());\n" +" assertEquals(\"size must be between 2 and 14\", constraintViolati= ons.iterator().next().getMessage());\n" " }\n" " \n" " @Test\n" @@ -316,8 +329,7 @@ " validator.validate(car);\n" "\n" " assertEquals(1, constraintViolations.size());\n" -" assertEquals(\"must be greater than or equal to 2\", " -"constraintViolations.iterator().next().getMessage());\n" +" assertEquals(\"must be greater than or equal to 2\", constraintVi= olations.iterator().next().getMessage());\n" " }\n" "\n" " @Test\n" @@ -331,85 +343,125 @@ " }\n" "}" msgstr "" +"package com.mycompany;\n" +"\n" +"import static org.junit.Assert.*;\n" +"\n" +"import java.util.Set;\n" +"\n" +"import javax.validation.ConstraintViolation;\n" +"import javax.validation.Validation;\n" +"import javax.validation.Validator;\n" +"import javax.validation.ValidatorFactory;\n" +"\n" +"import org.junit.BeforeClass;\n" +"import org.junit.Test;\n" +"\n" +"public class CarTest {\n" +"\n" +" private static Validator validator;\n" +"\n" +" @BeforeClass\n" +" public static void setUp() {\n" +" ValidatorFactory factory =3D Validation.buildDefaultValidatorFact= ory();\n" +" validator =3D factory.getValidator();\n" +" }\n" +"\n" +" @Test\n" +" public void manufacturerIsNull() {\n" +" Car car =3D new Car(null, \"DD-AB-123\", 4);\n" +"\n" +" Set<ConstraintViolation<Car>> constraintViolations = =3D\n" +" validator.validate(car);\n" +"\n" +" assertEquals(1, constraintViolations.size());\n" +" assertEquals(\"may not be null\", constraintViolations.iterator()= .next().getMessage());\n" +" }\n" +"\n" +" @Test\n" +" public void licensePlateTooShort() {\n" +" Car car =3D new Car(\"Morris\", \"D\", 4);\n" +"\n" +" Set<ConstraintViolation<Car>> constraintViolations = =3D \n" +" validator.validate(car);\n" +"\n" +" assertEquals(1, constraintViolations.size());\n" +" assertEquals(\"size must be between 2 and 14\", constraintViolati= ons.iterator().next().getMessage());\n" +" }\n" +" \n" +" @Test\n" +" public void seatCountTooLow() {\n" +" Car car =3D new Car(\"Morris\", \"DD-AB-123\", 1);\n" +"\n" +" Set<ConstraintViolation<Car>> constraintViolations = =3D\n" +" validator.validate(car);\n" +"\n" +" assertEquals(1, constraintViolations.size());\n" +" assertEquals(\"must be greater than or equal to 2\", constraintVi= olations.iterator().next().getMessage());\n" +" }\n" +"\n" +" @Test\n" +" public void carIsValid() {\n" +" Car car =3D new Car(\"Morris\", \"DD-AB-123\", 2);\n" +"\n" +" Set<ConstraintViolation<Car>> constraintViolations = =3D\n" +" validator.validate(car);\n" +"\n" +" assertEquals(0, constraintViolations.size());\n" +" }\n" +"}" = #. Tag: para #: gettingstarted.xml:139 #, no-c-format -msgid "" -"In the setUp() method we get a " -"Validator instance from the " -"ValidatorFactory. A Validator " -"instance is thread-safe and may be reused multiple times. For this reason= we " -"store it as field of our test class. We can use the Validator<= /" -"classname> now to validate the different car instances in the test method= s." -msgstr "" +msgid "In the setUp() method we get a = Validator instance from the ValidatorFactory. A Validator instance is thread-safe and may be= reused multiple times. For this reason we store it as field of our test cl= ass. We can use the Validator now to validate the di= fferent car instances in the test methods." +msgstr "=E5=9C=A8setUp()=E6=96=B9=E6=B3=95=E4=B8= =AD,=E6=88=91=E4=BB=AC=E9=80=9A=E8=BF=87ValidatorFactory=E5=BE=97=E5=88=B0=E4=BA=86=E4=B8=80=E4=B8=AAValidator=E7=9A=84=E5=AE=9E=E4=BE=8B. Validator=E6=98= =AF=E7=BA=BF=E7=A8=8B=E5=AE=89=E5=85=A8=E7=9A=84,=E5=B9=B6=E4=B8=94=E5=8F= =AF=E4=BB=A5=E9=87=8D=E5=A4=8D=E4=BD=BF=E7=94=A8, =E6=89=80=E4=BB=A5=E6=88= =91=E4=BB=AC=E6=8A=8A=E5=AE=83=E4=BF=9D=E5=AD=98=E6=88=90=E4=B8=80=E4=B8=AA= =E7=B1=BB=E5=8F=98=E9=87=8F. =E7=8E=B0=E5=9C=A8=E6=88=91=E4=BB=AC=E5=8F=AF= =E4=BB=A5=E5=9C=A8test=E6=96=B9=E6=B3=95=E4=B8=AD=E4=BD=BF=E7=94=A8=E8=BF= =99=E4=B8=AAvalidator=E7=9A=84=E5=AE=9E=E4=BE=8B=E6=9D=A5=E6=A0=A1=E9=AA=8C= =E4=B8=8D=E5=90=8C=E7=9A=84car=E5=AE=9E=E4=BE=8B=E4=BA=86." = #. Tag: para #: gettingstarted.xml:147 #, no-c-format -msgid "" -"The validate() method returns a set of " -"ConstraintViolation instances, which we can iterat= e " -"in order to see which validation errors occurred. The first three test " -"methods show some expected constraint violations:" -msgstr "" +msgid "The validate() method returns a set of ConstraintViolation instances, which we can iterate in = order to see which validation errors occurred. The first three test methods= show some expected constraint violations:" +msgstr "validate()=E6=96=B9=E6=B3=95=E4=BC=9A=E8= =BF=94=E5=9B=9E=E4=B8=80=E4=B8=AAset=E7=9A=84ConstraintViolation= =E7=9A=84=E5=AE=9E=E4=BE=8B=E7=9A=84=E9=9B=86=E5=90=88, =E6=88= =91=E4=BB=AC=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87=E9=81=8D=E5=8E=86=E5=AE=83= =E6=9D=A5=E6=9F=A5=E7=9C=8B=E6=9C=89=E5=93=AA=E4=BA=9B=E9=AA=8C=E8=AF=81=E9= =94=99=E8=AF=AF. =E5=89=8D=E9=9D=A2=E4=B8=89=E4=B8=AA=E6=B5=8B=E8=AF=95=E7= =94=A8=E4=BE=8B=E6=98=BE=E7=A4=BA=E4=BA=86=E4=B8=80=E4=BA=9B=E9=A2=84=E6=9C= =9F=E7=9A=84=E6=A0=A1=E9=AA=8C=E7=BA=A6=E6=9D=9F:" = #. Tag: para #: gettingstarted.xml:154 #, no-c-format -msgid "" -"The @NotNull constraint on manufacturer is violate= d " -"in manufacturerIsNull()" -msgstr "" +msgid "The @NotNull constraint on manufacturer is v= iolated in manufacturerIsNull()" +msgstr "=E5=9C=A8manufacturerIsNull()=E4=B8=AD=E5= =8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0manufacturer=E8=BF=9D=E5=8F=8D=E4=BA=86@NotNull=E7=BA=A6=E6=9D=9F" = #. Tag: para #: gettingstarted.xml:159 #, no-c-format -msgid "" -"The @Size constraint on licensePlate is violated i= n " -"licensePlateTooShort()" -msgstr "" +msgid "The @Size constraint on licensePlate is viol= ated in licensePlateTooShort()" +msgstr "licensePlateTooShort()=E4=B8=AD=E7=9A=84l= icensePlate=E8=BF=9D=E5=8F=8D=E4=BA=86@Size=E7=BA=A6= =E6=9D=9F" = #. Tag: para #: gettingstarted.xml:164 #, no-c-format -msgid "" -"The @Min constraint on seatCount is violated in " -"seatCountTooLow()" -msgstr "" +msgid "The @Min constraint on seatCount is violated= in seatCountTooLow()" +msgstr "=E8=80=8CseatCountTooLow()=E4=B8=AD=E5=88= =99=E5=AF=BC=E8=87=B4seatCount=E8=BF=9D=E5=8F=8D=E4=BA=86@Min=E7=BA=A6=E6=9D=9F" = #. Tag: para #: gettingstarted.xml:169 #, no-c-format -msgid "" -"If the object validates successfully, validate()= " -"returns an empty set." -msgstr "" +msgid "If the object validates successfully, validate() returns an empty set." +msgstr " =E5=A6=82=E6=9E=9C=E4=B8=80=E4=B8=AA=E5=AF=B9=E8=B1=A1=E6=B2=A1= =E6=9C=89=E6=A0=A1=E9=AA=8C=E5=87=BA=E9=97=AE=E9=A2=98=E7=9A=84=E8=AF=9D,= =E9=82=A3=E4=B9=88validate() =E4=BC=9A=E8=BF=94=E5= =9B=9E=E4=B8=80=E4=B8=AA=E7=A9=BA=E7=9A=84set=E5=AF=B9=E8=B1=A1." = #. Tag: para #: gettingstarted.xml:172 #, no-c-format -msgid "" -"Note that we only use classes from the package javax.validation<= /" -"package> from the Bean Validation API. As we don't reference any classes = of " -"the RI directly, it would be no problem to switch to another implementati= on " -"of the API, should that need arise." -msgstr "" +msgid "Note that we only use classes from the package javax.valid= ation from the Bean Validation API. As we don't reference any cla= sses of the RI directly, it would be no problem to switch to another implem= entation of the API, should that need arise." +msgstr "=E6=B3=A8=E6=84=8F,=E6=88=91=E4=BB=AC=E5=8F=AA=E4=BD=BF=E7=94=A8= =E4=BA=86Bean Validation API=E4=B8=AD=E7=9A=84package javax.valida= tion=E4=B8=AD=E7=9A=84=E7=B1=BB, =E5=B9=B6=E6=B2=A1=E6=9C=89=E7= =9B=B4=E6=8E=A5=E8=B0=83=E7=94=A8=E5=8F=82=E8=80=83=E5=AE=9E=E7=8E=B0=E4=B8= =AD=E7=9A=84=E4=BB=BB=E4=BD=95=E7=B1=BB,=E6=89=80=E4=BB=A5, =E6=B2=A1=E6=9C= =89=E4=BB=BB=E4=BD=95=E9=97=AE=E9=A2=98=E5=A6=82=E6=9E=9C=E5=88=87=E6=8D=A2= =E5=88=B0=E5=85=B6=E4=BB=96=E7=9A=84=E5=AE=9E=E7=8E=B0." = #. Tag: title #: gettingstarted.xml:180 #, no-c-format msgid "Where to go next?" -msgstr "" +msgstr "=E6=9B=B4=E8=BF=9B=E4=B8=80=E6=AD=A5" = #. Tag: para #: gettingstarted.xml:182 #, no-c-format -msgid "" -"That concludes our 5 minute tour through the world of Hibernate Validator= . " -"Continue exploring the code examples or look at further examples referenc= ed " -"in . To deepen your understa= nding " -"of Hibernate Validator just continue reading . In case your application has specific validation " -"requirements have a look at ." -msgstr "" +msgid "That concludes our 5 minute tour through the world of Hibernate Val= idator. Continue exploring the code examples or look at further examples re= ferenced in . To deepen your u= nderstanding of Hibernate Validator just continue reading . In case your application has specific valida= tion requirements have a look at ." +msgstr "=E5=9C=A8=E6=9C=AC=E7=AB=A0=E4=B8=AD, =E6=82=A8=E4=BA=86=E8=A7=A3= =E4=BA=86=E4=B8=80=E4=B8=AA=E5=9F=BA=E4=BA=8EHibernate Validator=E7=9A=84= =E7=AE=80=E5=8D=95=E4=BE=8B=E5=AD=90. =E6=9B=B4=E5=A4=9A=E7=9A=84=E7=A4=BA= =E4=BE=8B=E8=AF=B7=E5=8F=82=E8=80=83 . =E5=A6=82=E6=9E=9C=E6=83=B3=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BA=86=E8= =A7=A3Hibenate Validator, =E8=AF=B7=E7=BB=A7=E7=BB=AD=E9=98=85=E8=AF=BB. =E5=A6=82=E6=9E=9C=E6=82=A8=E7= =9A=84=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F=E6=9C=89=E7=89=B9=E6=AE=8A=E7=9A= =84=E6=A0=A1=E9=AA=8C=E9=9C=80=E6=B1=82,=E8=AF=B7=E5=8F=82=E8=80=83 ." + Modified: validator/trunk/hibernate-validator/src/main/docbook/zh-CN/module= s/preface.po =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/pref= ace.po 2010-07-06 15:18:26 UTC (rev 19904) +++ validator/trunk/hibernate-validator/src/main/docbook/zh-CN/modules/pref= ace.po 2010-07-06 19:35:13 UTC (rev 19905) @@ -6,8 +6,8 @@ "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2010-07-06 14:46+0000\n" -"PO-Revision-Date: 2010-07-06 14:46+0000\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2010-07-06 23:46+0830\n" +"Last-Translator: Strong Liu \n" "Language-Team: none\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=3DUTF-8\n" @@ -17,36 +17,23 @@ #: preface.xml:25 #, no-c-format msgid "Preface" -msgstr "" +msgstr "=E5=BA=8F=E8=A8=80" = #. Tag: para #: preface.xml:27 #, no-c-format -msgid "" -"Validating data is a common task that occurs throughout any application, " -"from the presentation layer to the persistence layer. Often the same " -"validation logic is implemented in each layer, proving time consuming and= " -"error-prone. To avoid duplication of these validations in each layer, " -"developers often bundle validation logic directly into the domain model, " -"cluttering domain classes with validation code which is really metadata " -"about the class itself." -msgstr "" +msgid "Validating data is a common task that occurs throughout any applica= tion, from the presentation layer to the persistence layer. Often the same = validation logic is implemented in each layer, proving time consuming and e= rror-prone. To avoid duplication of these validations in each layer, develo= pers often bundle validation logic directly into the domain model, clutteri= ng domain classes with validation code which is really metadata about the c= lass itself." +msgstr "=E6=95=B0=E6=8D=AE=E6=A0=A1=E9=AA=8C=E6=98=AF=E4=BB=BB=E4=BD=95=E4= =B8=80=E4=B8=AA=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F=E9=83=BD=E4=BC=9A=E7=94= =A8=E5=88=B0=E7=9A=84=E5=8A=9F=E8=83=BD,=E6=97=A0=E8=AE=BA=E6=98=AF=E6=98= =BE=E7=A4=BA=E5=B1=82=E8=BF=98=E6=98=AF=E6=8C=81=E4=B9=85=E5=B1=82. =E9=80= =9A=E5=B8=B8,=E7=9B=B8=E5=90=8C=E7=9A=84=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE= =91=E4=BC=9A=E5=88=86=E6=95=A3=E5=9C=A8=E5=90=84=E4=B8=AA=E5=B1=82=E4=B8=AD= , =E8=BF=99=E6=A0=B7,=E4=B8=8D=E4=BB=85=E6=B5=AA=E8=B4=B9=E4=BA=86=E6=97=B6= =E9=97=B4=E8=BF=98=E4=BC=9A=E5=AF=BC=E8=87=B4=E9=94=99=E8=AF=AF=E7=9A=84=E5= =8F=91=E7=94=9F(=E8=AF=91=E6=B3=A8: =E9=87=8D=E5=A4=8D=E4=BB=A3=E7=A0=81). = =E4=B8=BA=E4=BA=86=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D, =E5=BC=80=E5=8F=91= =E4=BA=BA=E5=91=98=E7=BB=8F=E5=B8=B8=E4=BC=9A=E6=8A=8A=E8=BF=99=E4=BA=9B=E6= =A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=E7=9B=B4=E6=8E=A5=E5=86=99=E5=9C=A8=E9=A2= =86=E5=9F=9F=E6=A8=A1=E5=9E=8B=E9=87=8C=E9=9D=A2, =E4=BD=86=E6=98=AF=E8=BF= =99=E6=A0=B7=E5=8F=88=E6=8A=8A=E9=A2=86=E5=9F=9F=E6=A8=A1=E5=9E=8B=E4=BB=A3= =E7=A0=81=E5=92=8C=E6=A0=A1=E9=AA=8C=E4=BB=A3=E7=A0=81=E6=B7=B7=E6=9D=82=E5= =9C=A8=E4=BA=86=E4=B8=80=E8=B5=B7, =E8=80=8C=E8=BF=99=E4=BA=9B=E6=A0=A1=E9= =AA=8C=E9=80=BB=E8=BE=91=E6=9B=B4=E5=BA=94=E8=AF=A5=E6=98=AF=E6=8F=8F=E8=BF= =B0=E9=A2=86=E5=9F=9F=E6=A8=A1=E5=9E=8B=E7=9A=84=E5=85=83=E6=95=B0=E6=8D=AE= ." = #. Tag: para #: preface.xml:46 #, no-c-format -msgid "" -"JSR 303 - Bean Validation - defines a metadata model and API for entity " -"validation. The default metadata source is annotations, with the ability = to " -"override and extend the meta-data through the use of XML. The API is not " -"tied to a specific application tier or programming model. It is specifica= lly " -"not tied to either the web tier or the persistence tier, and is available= " -"for both server-side application programming, as well as rich client Swin= g " -"application developers." -msgstr "" +msgid "JSR 303 - Bean Validation - defines a metadata model and API for en= tity validation. The default metadata source is annotations, with the abili= ty to override and extend the meta-data through the use of XML. The API is = not tied to a specific application tier or programming model. It is specifi= cally not tied to either the web tier or the persistence tier, and is avail= able for both server-side application programming, as well as rich client S= wing application developers." +msgstr "JSR 303 - Bean Validation - =E4=B8=BA=E5=AE=9E=E4=BD=93=E9=AA=8C= =E8=AF=81=E5=AE=9A=E4=B9=89=E4=BA=86=E5=85=83=E6=95=B0=E6=8D=AE=E6=A8=A1=E5= =9E=8B=E5=92=8CAPI. =E9=BB=98=E8=AE=A4=E7=9A=84=E5=85=83=E6=95=B0=E6=8D=AE= =E6=A8=A1=E5=9E=8B=E6=98=AF=E9=80=9A=E8=BF=87Annotations=E6=9D=A5=E6=8F=8F= =E8=BF=B0=E7=9A=84,=E4=BD=86=E6=98=AF=E4=B9=9F=E5=8F=AF=E4=BB=A5=E4=BD=BF= =E7=94=A8XML=E6=9D=A5=E9=87=8D=E8=BD=BD=E6=88=96=E8=80=85=E6=89=A9=E5=B1=95= . Bean Validation API =E5=B9=B6=E4=B8=8D=E5=B1=80=E9=99=90=E4=BA=8E=E5=BA= =94=E7=94=A8=E7=A8=8B=E5=BA=8F=E7=9A=84=E6=9F=90=E4=B8=80=E5=B1=82=E6=88=96= =E8=80=85=E5=93=AA=E7=A7=8D=E7=BC=96=E7=A8=8B=E6=A8=A1=E5=9E=8B, =E4=BE=8B= =E5=A6=82,=E5=A6=82=E5=9B=BE=E6=89=80=E7=A4=BA, Bean Validation =E5=8F=AF= =E4=BB=A5=E8=A2=AB=E7=94=A8=E5=9C=A8=E4=BB=BB=E4=BD=95=E4=B8=80=E5=B1=82, = =E6=88=96=E8=80=85=E6=98=AF=E5=83=8F=E7=B1=BB=E4=BC=BCSwing=E7=9A=84=E5=AF= =8C=E5=AE=A2=E6=88=B7=E7=AB=AF=E7=A8=8B=E5=BA=8F=E4=B8=AD." = #. Tag: para #: preface.xml:65 #, no-c-format msgid "Hibernate Validator is the reference implementation of this JSR." -msgstr "" +msgstr "Hibernate Validator =E6=98=AF=E8=BF=99=E4=B8=AAJSR=E7=9A=84=E5=8F= =82=E8=80=83=E5=AE=9E=E7=8E=B0." + --===============8183226849031871589==--