Ian,

I'm at work too... so I cannot start right now...

j3d.

> -----Original Message-----
> From: Ian MacLean [mailto:[EMAIL PROTECTED] 
> Sent: mercoledì, 16 febbraio 2005 08:40
> To: Greco Giuseppe
> Cc: nant-developers@lists.sourceforge.net
> Subject: Re: [nant-dev] L16N
> 
> 
> 
> >The first step would be to create the resource files 
> >(NAnt.Core.en-US.resx, NAnt.DotNet.Task.en-US.resx, etc.),
> >
> we can just start with NAnt.Core.resx for the default ( US english ) 
> language.
> 
> > then replace hardcoded strings with
> >RM.GetString("Message_Id") - or whatever name you want, and 
> finally add 
> >the following target into the different NAnt build files:
> >
> >  <target
> >    name="build-resources"
> >    depends="init"
> >    description="Builds resource binaries">
> >    <foreach
> >      item="String"
> >      in="de-DE,en-US,es-ES,fr-FR,it-IT"
> >      delim=","
> >      property="culture">
> >      <mkdir
> >        dir="${build.dir}/${package.name}/lib/${culture}"
> >        failonerror="false" />
> >      <resgen
> >        input="${assembly}.${culture}.resx"
> > 
> >output="${build.dir}/${package.name}/lib/${culture}/${assembl
> y}.${cultu
> >r
> >e}.resources" />
> >    </foreach>
> >  </target>
> >
> >You should also modify the <build> target in order to let the C# 
> >compiler embed the default resource (en-US) in the NAnt 
> assemblies (for 
> >other languages
> >we generate satelite assemblies):
> >
> >  <target
> >    name="build"
> >    depends="init build-resources"
> >    description="Builds the binaries for the current configuration">
> >    ...
> >    <property
> >      name="default.resources"
> >      
> value="en-US/${assembly}.en-US.resources,${assembly}.resources" />
> >    <foreach
> >      item="String"
> >      in="de-DE,es-ES,fr-FR,it-IT"
> >      delim=","
> >      property="culture">
> >      <al
> >        target="library"
> > 
> >output="${build.dir}/${package.name}/lib/${culture}/${assembl
> y}.resourc
> >e
> >s.dll"
> >        culture="${culture}">
> >        <sources 
> basedir="${build.dir}/${package.name}/lib/${culture}">
> >          <include name="*.resources" />
> >        </sources>
> >      </al>
> >    </foreach>
> >    <csc ...>
> >      ...
> >      <arg
> >value="-res:${build.dir}/${package.name}/lib/${default.resources}" />
> >    </csc>
> >  
> >
> we can use the <resources> child element for this - thats 
> what its for 
> :). You can even add the resx files ( even the international 
> ones ) to 
> that and the <csc> task will do the right thing - ie create child 
> directories for each culture and run the <al> task.
> 
> >  </target>
> >
> >If you want I can help you... just let's coordinate. Have 
> you already 
> >run sed to extract all the hardcoded string from the code?
> >
> >  
> >
> Sure - thanks. I haven't got the NAnt source with me right 
> now ( at work 
> ) so no I haven't run sed. If you'd like to start on that - 
> by all means 
> go ahead.
> 
> Ian
> 
> 


---------------------------------- DISCLAIMER ----------------------------------
This message (including any attachments) is confidential and may be
privileged. If you have received it by mistake please notify the sender
by return e-mail and delete this message from your system.Any unauthorised
use or dissemination of this message in whole or in part is strictly
prohibited. Please note that e-mails are susceptible to change.
Banca del Gottardo (including its group companies) shall not be liable for
the improper or incomplete transmission of the information contained in this
communication nor for any delay in its receipt or damage to your system.
Under no circumstances this message can be considered as a written acceptance
or confirmation of an instruction/order given to Banca del Gottardo. 
Instructions and orders cannot be accepted or confirmed via e-mail.
Banca del Gottardo (or its group companies) does not guarantee that the 
integrity
of this communication has been maintained nor that this communication is free of
viruses, interceptions or interference.
---------------------------------------------------------------------------------


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to