ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39688] New: - ReplaceTokens should allow properties files
Date Tue, 30 May 2006 19:58:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39688>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39688

           Summary: ReplaceTokens should allow properties files
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: cunningt@mac.com


I'm localizing a java project currently and I'm using ant's token replacement
feature to do substitutions on strings in javascript (.js) files.   Unlike java
classes, javascript files cannot import files and cannot use property bundles.

I've settled on using ReplaceTokens as my filterreader, but the problem I'm
having is that I have a large number of filter tokens that need replacement.   
They are already in a .properties file, so adding them into my build.xml would
be duplicating work.    I could also load the properties file and do the
replacement with them, but I am afraid that they might collide with an ant build
property that is already loaded.

What I would like to do is instead of  :

  <filterchain>
    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
      <param type="token" name="DATE" value="${TODAY}"/>
    </filterreader>
  </filterchain>

I would like to do :

  <filterchain>
    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
      <param type="propertiesfile" value="presentation_en.properties"/>
    </filterreader>
  </filterchain>

which would do token replacements on every token found in
presentation_en.properties.    This seemed an easy enough change to make, and
I'm supplying a patch based on current SVN.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message