Dear all,

I am relatively new to Ant using, so may I may miss something obvious but I
tried to follow guidelines and search documentation without success.

When I add the <target name="build-lang">...</target-lang> I get an
IllegalArgumentException related to the lang.dir. Ant however does
something, it creates an English version (but not any other translation)
Language_en.properties, and says "build successful" after this exception.
In case this matters, I am using the JDK 1.8.0 (C:\Program
Files\Java\jdk1.8.0_25)

The build.xml is










*<project name="product-registration-TT-portlet" basedir="."
default="deploy"> <import file="../build-common-portlet.xml" /> <target
name="build-lang">  <antcall target="build-lang-cmd">   <param
name="lang.dir" value="docroot/WEB-INF/src/content" />   <param
name="lang.file" value="Language" />   <param name="lang.translate"
value="true" />  </antcall> </target></project>*

And the output is :


*F:\COEProjects\plugins\plugins-lia\portlets\product-registration-TT-portlet>antbuild-langBuildfile:
F:\COEProjects\plugins\plugins-lia\portlets\product-registration-TT-portlet\build.xml*
*build-lang:*





*build-lang-cmd:     [java] Exception in thread "main"
java.lang.IllegalArgumentException: Bad argument
docroot/WEB-INF/src/content     [java]     at
com.liferay.portal.tools.ArgumentsUtil.parseArguments(ArgumentsUtil.java:32)
[java]     at
com.liferay.portal.tools.LangBuilder.main(LangBuilder.java:57)     [java]
Java Result: 1*

*BUILD SUCCESSFULTotal time: 0 seconds*

Of course, the folder name is correct (and it somehow finds my files as it
creates the Language_en.properties file. I also tried to put backslashes
instead of foreward slashes, I tried to add in front or after the folder
name, to escape them etc. but nothing helps.

Please note that I searched on internet for example build.xml files, and as
I saw a parameter called "build-lang-cmd" I tried to add it. Though I have
no idea what it exactly tells, In that case strangely, I don't get the
exception, but I get lot of errors telling the client-id argument is
missing. As a result, all translation files are created, but they all
contain the original English content.

The build file in this example would be :























*<project name="product-registration-TT-portlet" basedir="."
default="deploy"> <import file="../build-common-portlet.xml" /> <target
name="build-lang">  <antcall target="build-lang-cmd">   <param
name="lang.dir" value="docroot/WEB-INF/src/content" />   <param
name="lang.file" value="Language" />   <param name="lang.translate"
value="true" />  </antcall> </target> <target name="build-lang-cmd"> <java
classname="com.liferay.portal.tools.LangBuilder"
classpathref="portal.classpath" fork="true" newenvironment="true">  <jvmarg
value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties"
/>  <jvmarg value="-Dfile.encoding=UTF-8" />  <jvmarg
value="-Duser.country=US" />  <jvmarg value="-Duser.language=en" />  <arg
value="lang.dir=${lang.dir}" />  <arg value="lang.file=${lang.file}"
/>  <arg value="lang.plugin=true" />  <arg
value="lang.translate=${lang.translate}" /> </java> <copy
file="${lang.dir}/${lang.file}.properties"
tofile="${lang.dir}/${lang.file}_en.properties" /> </target></project>*
I would get as output a lot of text such as :







*     [java] Correlation ID: 3c2e5a07-204a-47a3-a413-316ab512277c
[java] Timestamp: 2015-01-03 17:33:50Z     [java] Translating en_es
where-purchased-required Please tell us where youpurchased the product
[java]
com.liferay.portal.kernel.microsofttranslator.MicrosoftTranslatorException:
ACS90011: The required field 'client_id' is missing.     [java] Trace ID:
2ce232f9-4ada-4901-b61e-a8a65ae7d4d6*

I mainly would like to understand what goes wrong, I can use with or
without this extra "build-lang-cmd" but I would like to understand also
what I am doing by adding or omitting this.

Thank you very much for your help, and happy new year to whoever reads this
:)

-- 
Tanguy Thomas

Reply via email to