Hi Louis-Philippe, Yes, it will be a challenge trying to get every single string :-( And it's actually worse than you mentioned - they are also spread across multiple projects!
My original work in this space was purely to translate the templates and their contents. This will cover both the .vm and the .cs files. Yes, it uses a .resx for the actual translations. Basically I'm adding a new property to the NVelocity properties called translations. This has a single method - Translate() which handles the actual translation (via the .resx file). Now to your questions: 1) Yes, some of the strings are embedded within the code - hence the approach above. 2) Not only is this possible, but it is done in several places. The original developers only had English in mind :-( 3) The web dashboard (and CC.NET in general) is poorly documented. My main focus at the moment has been updating the documentation, but there still needs to be a lot of work on it. My blog has some stuff on how the dashboard works - http://csut017.wordpress.com - although it has been a while since I've written anything on the dashboard specially. Feel free to post any questions and I'll do my best to answer them. In terms of the translations, it's pretty much just a matter of picking any of the strings and translating them. I've put a very, very rough French translation into the codebase (via Google translation so please don't laugh too much). Hopefully this will give you an idea of how the translation works. Craig -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Louis-Philippe Carignan Sent: Monday, 14 December 2009 5:09 p.m. To: ccnet-user Subject: [ccnet-user] Re: WebDashboard in French Hi Craig, Sure, I'm up translating it in French. Whenever you're ready, send me the list of strings to translate and I'll put them in French. Were you planning on using the .resx files for multi-lingual? I would be interested to see how you will centralized all the strings as they seem scathered all across the board (in templates, css, c# and js files). Altough, I've hit a couple of problems with templates (.vm files) being translated in French. It seems like the strings in the templates are tied in with the server code? As silly as this sound, would this be possible in Web Dashboard? Is it me or is Web Dashboard not very well documented? Hard to get an idea of the workflow by just looking at the code... Anyway, let me know how you were planning the translation and where I can jump along. Louis-Philippe On Dec 13, 1:38 pm, Craig Sutherland <[email protected]> wrote: > Hi Louis-Philippe, > > We did look into making it multi-lingual as part of 1.5, but nobody was interested in helping with the translations, so it died a slow death :-( > > If you are interested in providing some french translations I can dig up the multi-lingual changes for Remote and put them back in. > > Craig > > ________________________________ > From: Louis-Philippe Carignan <[email protected]> > To: ccnet-user <[email protected]> > Sent: Sat, 12 December, 2009 4:02:16 AM > Subject: [ccnet-user] Re: WebDashboard in French > > Hi Craig, > > Thanks for the info. It works on 1.5.0.6121. > > It seems though that some strings are really hardcoded like project > activity (Running, Sleeping, Unknown) in the Visual Studio Remote > project. To bad CC NET wasn't really made to be globalized at the > start :-( > > Thanks for your time, > > Louis-Philippe > > On 10 déc, 17:31, Craig Sutherland <[email protected]> wrote:> Hi Louis, > > > I've had a quick play - it is possible to do this farily easily - assuming you have CC.NET 1.4.4 or later. > > > In 1.4.4 we introduced a customTemplates setting to dashboard.config. This allows you to change the templates used, without impacting the rest of the functionality. The following is an example of how to do this: > > > <dashboard> > > <remoteServices> > > <servers> > > <!-- Define servers --> > > </servers> > > </remoteServices> > > <plugins> > > <customTemplates>templates/french</customTemplates> > > <farmPlugins> > > <!-- Define farm plug-ins --> > > </farmPlugins> > > <serverPlugins> > > <!-- Define server plug-ins --> > > </serverPlugins> > > <projectPlugins> > > <!-- Define project plug-ins --> > > </projectPlugins> > > <buildPlugins> > > <!-- Define build plug-ins --> > > </buildPlugins> > > </plugins> > > </dashboard> > > > A few points to note: > > > 1. This change will affect all users - it does not detect the user's preferred language > > 2. The path is relative to the web dashboard location (e.g. C:\Program Files\CruiseControl.NET\webdashboard in the default install) > > 3. If a template does not exist, it will "fall back" to the templates folder - this is useful if you only want to translate some templates > > > Hope this helps, > > > Craig > > > ________________________________ > > From: Louis-Philippe Carignan <[email protected]> > > To: ccnet-user <[email protected]> > > Sent: Fri, 11 December, 2009 10:56:50 AM > > Subject: [ccnet-user] Re: WebDashboard in French > > > Hi Craig, > > > It seems that most (approx: 80 %) of the strings for the web dashboard > > are coming out of the .vm files (templates ???)... > > > These files are used all across the board in code. Could I just put > > the language in front of them (ex: fr/)? I would have the standard > > files in the folder templates and a child folder named "fr" with the > > French translation. A setting could then be added in web.config to > > point on the right set of files. > > > Could this be a convenient way of doing it? Or am I missing the bigger > > picture? > > > Louis > > > On 10 déc, 13:23, Craig Sutherland <[email protected]> wrote: > > > > Hi Louis-Philippe, > > > > Unfortunately the dashboard cannot be localised. There was a project to add this, but there was a lack of support for it, so it was removed. > > > > Craig > > > > ________________________________ > > > From: Louis-Philippe Carignan <[email protected]> > > > To: ccnet-user <[email protected]> > > > Sent: Fri, 11 December, 2009 4:52:27 AM > > > Subject: [ccnet-user] WebDashboard in French > > > > Hi all, > > > > I was wondering if there's a setting so WebDashboard can output its > > > pages in French. Looking in the bin folder, I can see some localized > > > librairies for WebDashboard so I assume the French strings are there. > > > I can't figure out where to activate it. Would somebody be so kind as > > > pointing me in the right direction? > > > > Also, will I have to translate the templages (.vm files) and > > > stylesheets (.xsl files)? > > > > Thanks for your help, > > > > Louis-Philippe
