Hello Massimo,

We'll try to have it at the end of the month. We had applied it to
production and is a 1.99.7 version and the trunk version has changed a lot.

One question, what do you mean with use "." instead of "app_name"?

Regards


2013/9/1 Massimo Di Pierro <massimo.dipie...@gmail.com>

> Hello Demetrio,
>
> sorry for the late response. Could you please resend your patch, make sure
> it applies to trunk, and use "." instead of "app_name"?
>
>
> On Thursday, 29 November 2012 06:17:22 UTC-6, demetrio wrote:
>
>> Hi everyone I post a reply in the web3py thread in this mailing list
>> asking for a site where make a wishlist, but thinking about what I would
>> want in web3py, I realized that I needed in web2py already so I have
>> make a patch for the actual translation system in the gluon/languages.py
>> file.
>>
>> One of the lacks that I see in the translation system is that is a
>> little difficult to maintain the language file in large applications
>> like the one I am developing at this moment. Think about modules that
>> you can plug or unplug of your application, and each have their own
>> strings, or something more common, the pluggin system.
>>
>> Actually if you want to install a plugin like plugin_wiki you have to do
>> your own translation because you cannot insert translation files (if
>> actually web2py supports this... do it I don't know how to make it xD).
>> It would be great to have a community where you can make plugins and add
>> the language files inside.
>>
>> This is what makes the patch:
>>
>> Allows to use a "namespace" parameter in the T() like this
>>
>> T("Hello World", namespace="plugin_wiki")
>>
>> So in the languages/ folder will appear this:
>>
>> - languages/
>>     - en_en.py
>>     - plugin_wiki/
>>         - en_en.py
>>
>> so if you use T("Hello World", namespace="plugin_wiki") it will go to
>> find the string into languates/plugin_wiki/*your_**lang*.py and if you
>> use
>> the common way T("Hello World") it will go as always to
>> languages/*your_lang*.py
>>
>> I haven't tested it enough but it works for me at now, and I haven't
>> written the part for the admin interface where you can push the button
>> for refreshing the lang files (I don't get on wiht the RegExp at all)
>>
>> My 2 cents
>> I hope that I can send the patch to the list
>>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to