Author: sflanigan
Date: 2008-11-26 01:33:55 -0500 (Wed, 26 Nov 2008)
New Revision: 12063
Modified:
trunk/i18n/build.xml
trunk/i18n/feature.xsl
trunk/i18n/i18n.properties
Log:
Tidied up i18n.properties and handling of PLUGIN_VERSION/FEATURE_VERSION. Changed plugins
task so that it can generate an empty plugin even if there are no files to include (so
that features won't reference non-existent plugins).
Modified: trunk/i18n/build.xml
===================================================================
--- trunk/i18n/build.xml 2008-11-26 05:05:39 UTC (rev 12062)
+++ trunk/i18n/build.xml 2008-11-26 06:33:55 UTC (rev 12063)
@@ -220,26 +220,32 @@
<delete dir="${jardir}/plugins" />
<mkdir dir="${jardir}/plugins" />
<!-- for each plugin directory -->
- <for param="plugindir">
+ <for param="pluginsrcdir">
<path>
- <dirset dir="${propdir}" includes="*/*" />
+ <dirset dir="${jbt.srcdir}" includes="*/plugins/*" />
</path>
<sequential>
- <echo message="@{plugindir}" />
+ <echo message="@{pluginsrcdir}" />
<!-- TODO avoid property override if possible -->
<!-- work out the plugin ID -->
+ <var name="module" unset="true" />
+ <propertyregex override="true" property="module"
+ input="@{pluginsrcdir}"
+ regexp="^${jbt.srcdir}[/\\]([^/\\]+)[/\\].*"
+ select="\1" />
+ <checkprop name="module"/>
<var name="plugin" unset="true" />
<propertyregex override="true" property="plugin"
- input="@{plugindir}"
- regexp="^${propdir}[/\\][^/\\]+[/\\]([^/\\]+).*"
+ input="@{pluginsrcdir}"
+ regexp="^${jbt.srcdir}[/\\][^/\\]+[/\\]plugins[/\\]([^/\\]+).*"
select="\1" />
<checkprop name="plugin"/>
- <echo level="verbose" message="@{plugindir} contains props for
plugin ${plugin}"/>
+ <echo level="verbose" message="@{pluginsrcdir} contains source for
plugin ${plugin} in module ${module}"/>
<!-- making sure these values are available to -plugin -->
<checkprop name="PLUGIN_VERSION"/>
<checkprop name="PLUGIN_VENDOR"/>
- <var name="plugindir" value="@{plugindir}" />
+ <var name="plugindir" value="${propdir}/${module}/${plugin}"
/>
<foreachlocale task="-plugin"/>
</sequential>
</for>
@@ -247,14 +253,14 @@
<target name="-plugin" >
<!-- Jars up one fragment plugin. -->
+ <echo message="${plugindir}"/>
<jar
destfile="${jardir}/plugins/${plugin}.nl-${locale}_${PLUGIN_VERSION}.jar"
filesonly="true"
update="false"
whenmanifestonly="create"
- basedir="${plugindir}"
- duplicate="fail"
- includes="**/*_${locale}.properties">
+ duplicate="fail">
+ <fileset dir="${plugindir}"
includes="**/*_${locale}.properties" erroronmissingdir="false"/>
<manifest>
<attribute name="Manifest-Version"
value="1.0"/>
@@ -346,13 +352,13 @@
<!-- create langpack feature element for site.xml -->
<!-- ugly -->
<echo append="true" file="${temp.file.sitefeatures}"
- message="<feature
url="features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
- id="${feature}.nl-${locale}"
version="${PLUGIN_VERSION}">
+ message="<feature
url="features/${feature}.nl-${locale}_${FEATURE_VERSION}.jar"
+ id="${feature}.nl-${locale}"
version="${FEATURE_VERSION}">
<category name="${locale}"/>
</feature>" />
<!-- demunged, that looks like:
- <feature url="features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
- id="${feature}.nl-${locale}" version="${PLUGIN_VERSION}">
+ <feature url="features/${feature}.nl-${locale}_${FEATURE_VERSION}.jar"
+ id="${feature}.nl-${locale}"
version="${FEATURE_VERSION}">
<category name="${locale}"/>
</feature>
-->
@@ -360,11 +366,12 @@
<xslt
style="feature.xsl"
in="${featurexml}"
- out="${propdir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}/feature.xml"
+ out="${propdir}/features/${feature}.nl-${locale}_${FEATURE_VERSION}/feature.xml"
- <param name="feature"
expression="${feature}" />
<param name="locale" expression="${locale}" />
<param name="localename" expression="${localename}" />
+ <param name="feature" expression="${feature}" />
+ <param name="featureversion" expression="${FEATURE_VERSION}"
/>
<param name="pluginversion" expression="${PLUGIN_VERSION}"
/>
</xslt>
Modified: trunk/i18n/feature.xsl
===================================================================
--- trunk/i18n/feature.xsl 2008-11-26 05:05:39 UTC (rev 12062)
+++ trunk/i18n/feature.xsl 2008-11-26 06:33:55 UTC (rev 12063)
@@ -5,8 +5,9 @@
<xsl:param name="feature">FEATURE</xsl:param>
<xsl:param name="locale">LOCALE</xsl:param>
- <xsl:param name="localename">LOCNAME</xsl:param>
- <xsl:param name="pluginversion">VERSION</xsl:param>
+ <xsl:param name="localename">LOCALE_NAME</xsl:param>
+ <xsl:param name="featureversion">FEATURE_VERSION</xsl:param>
+ <xsl:param name="pluginversion">PLUGIN_VERSION</xsl:param>
<xsl:template match="/feature">
<feature provider-name="%providerName">
@@ -22,7 +23,7 @@
<xsl:attribute name="label">JBoss Tools Language Pack for
<xsl:value-of select="@label" /> in <xsl:value-of
select="$localename" />
</xsl:attribute>
<xsl:attribute name="version">
- <xsl:value-of select="$pluginversion" />
+ <xsl:value-of select="$featureversion" />
</xsl:attribute>
<copyright>
%copyright
Modified: trunk/i18n/i18n.properties
===================================================================
--- trunk/i18n/i18n.properties 2008-11-26 05:05:39 UTC (rev 12062)
+++ trunk/i18n/i18n.properties 2008-11-26 06:33:55 UTC (rev 12063)
@@ -2,7 +2,7 @@
# (assuming their po directories exist).
# Please separate locale IDs with commas (",") and no spaces.
#
-#locales: en,qps,zh_CN,pt_BR,es_ES,fr_FR,de_DE
+#locales: en,en_AA,qps,zh_CN,pt_BR,es_ES,fr_FR,de_DE
locales: en,en_AA,qps
#we don't care about .properties/.meta in these places:
@@ -27,11 +27,8 @@
BUILD_NUMBER=0
PLUGIN_VERSION=0.1.${BUILD_NUMBER}
-LANGPACK_VERSION=${PLUGIN_VERSION}
+FEATURE_VERSION=${PLUGIN_VERSION}
PLUGIN_VENDOR=JBoss
-WORK=${basedir}
-FRAGDIR=${WORK}/prop
-JARDIR=${WORK}/plugins
NAME_en=English
NAME_qps=Pseudo Locale (qps)