[MonoDevelop] Translation question

Bojan Rajkovic severedcross at gmail.com
Sun Nov 29 04:26:19 EST 2009



On Nov 29, 2009, at 4:18 AM, Cyrille Colin <colin at univ-metz.fr> wrote:

> thanks michael,
> as you suggested i complete the rules to scan aspx files. it works for
> me i use C# in aspx, i don't know other language (VB,Boo) to complete
> rules for those language i guess someone can do this.
> You talk about Reflection to extract calls to Gettext, it's a pretty
> good idea, but in asp.net it seems many things are compiled at runtime
> (will it work ?)
> Whatever with Monodevelop + Gettext it's very easy to build localized
> application (thanks again)
> in the proposal patch i paste the CS rules (not a hard work) and add a
> rules to exclude html comments, i also removed redundant lines.
> Cyrille.
>
>
> Le samedi 28 novembre 2009 à 15:18 -0500, Michael Hutchinson a écrit 
>  :
>> On Sat, Nov 28, 2009 at 5:30 AM, Cyrille Colin <colin at univ-metz.fr>  
>> wrote:
>>> hi all,
>>> i would like to use Catalog.GetString() in inline code in that way :
>>>
>>> <H1><%= Catalog.GetString("Test") %></H1>
>>> this works, but the scan done by the translation project doesn't  
>>> find
>>> it.
>>>
>>> And in that other case I have an Exception for "code render is not
>>> allowed here" :
>>> <asp:RadioButtonList id="fileType" runat="server">
>>> <asp:ListItem><%= Catalog.GetString("Test") %></asp:ListItem>
>>>
>>> Do i need to used only codebehind, if someone could explain what's  
>>> the
>>> best way to do it.
>>
>> MD's gettext scanner extracts strings from files using regexes. You
>> can see the regexes here:
>> http://anonsvn.mono-project.com/viewvc/trunk/monodevelop/main/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml?view=markup
>>
>> Unfortunately there are no scanning rules defined yet for aspx,  
>> though
>> they should be straightforward to add. As a workaround, you could
>> indeed use CodeBehind.
>>
>> Long-term, I'd like to use reflection/cecil to extract all string  
>> that
>> are passed to GetString, directly from the compiled assemblies, so
>> that it would work for all compiled managed languages.
>

I think the idea was to make it work with reflection/Cecil for  
compiled parts and scan with regexen for the uncompiled parts. I could  
be misunderstanding though.

---Bojan

Sent from my iPod. 


More information about the Monodevelop-list mailing list