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: [email protected]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to