You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bloodhound.apache.org by Saint Germain <sa...@gmail.com> on 2013/12/01 00:24:41 UTC

Re: Internationalization of Bloodhound

On Tue, 19 Nov 2013 14:16:28 +0100, Saint Germain <sa...@gmail.com>
wrote :

> I have updated my repo on bitbucket to correct the patch for ticket
> #694 and finished the french translation on Transifex.
> 
> I will create a separate branch/patch on Bitbucket which includes the
> french translation and make a pull request.
> 

Hello !

Here is the patch series giving the french translation:
https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n

However I put it on top of the previous i18n patch, it may not be what
Olemis wanted ?

I also have a question on Bloodhound translation: if we customize our
own bloodhound_theme.html template, and put it in the templates root
folder, how can we translate it after that ?

The process I am using only works on the source code of Bloodhound.

Thanks in advance !


Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Dec 5, 2013 11:36 AM, "Gary Martin" <ga...@wandisco.com> wrote:
>
> On 05/12/13 15:51, Saint Germain wrote:
>>
>> On 5 December 2013 16:28, Gary Martin <ga...@wandisco.com> wrote:
>>>>>>>
...
>
>
>> I will try to unofficially send a howto this week-end though (except
>> if Olemis post something before).
>> It may help others as well (I personnaly find this bitbucket/hq/MQ
>> very interesting).
>>

Please write an initial version and I'll edit it later if necessary.
Sometimes enlightment arrives after writing a howto
;-)

...

>
>
> I still wonder if the pot and po file solution is considered easy enough
for a site admin to work with. I would have thought that some of the more
common customisation would be "item.label = something" definitions in the
ini files for menu labels. I should probably delve deeper into Trac's
discussions on these topics.
>

IMO we already have folders for custom templates, htdocs, ... Why not
having a messages folder per-environment for custom translation files? The
only missing piece in the puzzle would be the i18n domain name to use for
custom messages ... Maybe prfix+filename?

Sent from Android

--
Regards

Olemis - @olemislc
Blog-ES : http://simelo-es.blogspot.com
Blog-EN : http://simelo-en.blogspot.com
Projects : http://blood-hound.net

Re: Internationalization of Bloodhound

Posted by Gary Martin <ga...@wandisco.com>.
On 05/12/13 15:51, Saint Germain wrote:
> On 5 December 2013 16:28, Gary Martin <ga...@wandisco.com> wrote:
>>>>>> Here is the patch series giving the french translation:
>>>>>>
>>>>> https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>>>>>> However I put it on top of the previous i18n patch, it may not be what
>>>>>> Olemis wanted ?
>>>>> Good!
>>>>> I just moved the patch to t694/ folder.  Please update from my patch
>>>>> queue
>>>>> repos
>>>>> ;)
>>>>>
>>>> However, I am writing as I have been trying to play with the patches from
>>>> the t694_bh_i18n branch. I may just be being a little too naive about how
>>>> to
>>>> apply the changes but I note a number of import errors from attempting
>>>> this.
>>>> They are certainly not hugely difficult to fix if they really do exist of
>>>> course. Are there any quick instructions on how to test what you have so
>>>> far?
>>>>
>>> I haven't checked (yet) how Olemis integrated my patch, but if you use
>>> my branch, then
>>> it should work without doing anything.
>>> I had also some import errors before, but I think I fixed them all.
>>> Can you give me
>>> an example of the import errors you have ?
>>
>> It is probably my misunderstanding at how bitbucket/hg works then. I found
>> that I got two patches out of the repo rather than the full repository.
>> Obviously I haven't been trying hard enough!
>>
> Hehe, I had a similar discussion on the mailing-list on month ago about the
> topic of creating a wiki page to explain how this mysterious
> bitbucket/hg/MQ works.
> It took me a while to really understand how it works (and I am still not sure).
>
> The problem is that this is completely off the official contribution guidelines
> for Trac/Bloodhound. Normally we should stick to SVN diff (or maybe
> use Github pull request).

It doesn't strictly need to be a patch resulting from an svn diff 
command, as long as the way to apply the patch(es) is discoverable! 
Updating the ticket with the current set of patches might work well enough.

> I will try to unofficially send a howto this week-end though (except
> if Olemis post something before).
> It may help others as well (I personnaly find this bitbucket/hq/MQ
> very interesting).
>
>>>>>> I also have a question on Bloodhound translation: if we customize our
>>>>>> own bloodhound_theme.html template, and put it in the templates root
>>>>>> folder, how can we translate it after that ?
>>>>> I honestly do not know what to say... Let's beter forward this question
>>>>> to
>>>>> trac-dev ml
>>>>>
>>>> Not sure I understand the problem you are seeking to solve there so I
>>>> won't
>>>> try to comment on that yet.
>>>>
>>> If you want customize Trac or Bloodhound for your website (change the
>>> layout for instance)
>>> then you have to define your own template (bloodhound_theme.html for
>>> Bloodhound) which will
>>> override the default template.
>>> See http://trac.edgewall.org/wiki/TracInterfaceCustomization
>>>
>>> However if you do that, and introduced a bunch of new sentences in the
>>> new template, then you
>>> have to find a way for them to be translated by Babel.
>>> Currently it is not really possible, even if I have found a dirty
>>> workaround (see trac-dev mailing-list).
>>
>> Per site customisation tends to happen in the %ENV/templates directory if I
>> remember correctly. I would have thought that it would be desirable for
>> internationalization to effectively extend to such customisations when they
>> are needed. Of course, not all customisations will imply new translatable
>> content.
>>
> I also think that it is desirable and I undestand some work are
> currently done in this
> direction, but we are not there yet. So if you have new translatable
> content in your
> customized templates, then you either have to wait or use my dirty hack.
>
> Best regards,

I still wonder if the pot and po file solution is considered easy enough 
for a site admin to work with. I would have thought that some of the 
more common customisation would be "item.label = something" definitions 
in the ini files for menu labels. I should probably delve deeper into 
Trac's discussions on these topics.

Cheers,
     Gary

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
On 5 December 2013 16:28, Gary Martin <ga...@wandisco.com> wrote:
>>>>> Here is the patch series giving the french translation:
>>>>>
>>>>
>>>> https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>>>>>
>>>>> However I put it on top of the previous i18n patch, it may not be what
>>>>> Olemis wanted ?
>>>>
>>>> Good!
>>>> I just moved the patch to t694/ folder.  Please update from my patch
>>>> queue
>>>> repos
>>>> ;)
>>>>
>>> However, I am writing as I have been trying to play with the patches from
>>> the t694_bh_i18n branch. I may just be being a little too naive about how
>>> to
>>> apply the changes but I note a number of import errors from attempting
>>> this.
>>> They are certainly not hugely difficult to fix if they really do exist of
>>> course. Are there any quick instructions on how to test what you have so
>>> far?
>>>
>> I haven't checked (yet) how Olemis integrated my patch, but if you use
>> my branch, then
>> it should work without doing anything.
>> I had also some import errors before, but I think I fixed them all.
>> Can you give me
>> an example of the import errors you have ?
>
>
> It is probably my misunderstanding at how bitbucket/hg works then. I found
> that I got two patches out of the repo rather than the full repository.
> Obviously I haven't been trying hard enough!
>

Hehe, I had a similar discussion on the mailing-list on month ago about the
topic of creating a wiki page to explain how this mysterious
bitbucket/hg/MQ works.
It took me a while to really understand how it works (and I am still not sure).

The problem is that this is completely off the official contribution guidelines
for Trac/Bloodhound. Normally we should stick to SVN diff (or maybe
use Github pull request).

I will try to unofficially send a howto this week-end though (except
if Olemis post something before).
It may help others as well (I personnaly find this bitbucket/hq/MQ
very interesting).

>>
>>>>> I also have a question on Bloodhound translation: if we customize our
>>>>> own bloodhound_theme.html template, and put it in the templates root
>>>>> folder, how can we translate it after that ?
>>>>
>>>> I honestly do not know what to say... Let's beter forward this question
>>>> to
>>>> trac-dev ml
>>>>
>>> Not sure I understand the problem you are seeking to solve there so I
>>> won't
>>> try to comment on that yet.
>>>
>> If you want customize Trac or Bloodhound for your website (change the
>> layout for instance)
>> then you have to define your own template (bloodhound_theme.html for
>> Bloodhound) which will
>> override the default template.
>> See http://trac.edgewall.org/wiki/TracInterfaceCustomization
>>
>> However if you do that, and introduced a bunch of new sentences in the
>> new template, then you
>> have to find a way for them to be translated by Babel.
>> Currently it is not really possible, even if I have found a dirty
>> workaround (see trac-dev mailing-list).
>
>
> Per site customisation tends to happen in the %ENV/templates directory if I
> remember correctly. I would have thought that it would be desirable for
> internationalization to effectively extend to such customisations when they
> are needed. Of course, not all customisations will imply new translatable
> content.
>

I also think that it is desirable and I undestand some work are
currently done in this
direction, but we are not there yet. So if you have new translatable
content in your
customized templates, then you either have to wait or use my dirty hack.

Best regards,

Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Dec 5, 2013 10:29 AM, "Gary Martin" <ga...@wandisco.com> wrote:
>
> On 05/12/13 15:16, Saint Germain wrote:
>>
>> Hello !
>>
>> On 5 December 2013 16:04, Gary Martin <ga...@wandisco.com> wrote:
>>>>>
>>>>> Here is the patch series giving the french translation:
>>>>>
>>>>
https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>>>>>
>>>>> However I put it on top of the previous i18n patch, it may not be what
>>>>> Olemis wanted ?
>>>>
>>>> Good!
>>>> I just moved the patch to t694/ folder.  Please update from my patch
queue
>>>> repos
>>>> ;)
>>>>
>>> However, I am writing as I have been trying to play with the patches
from
>>> the t694_bh_i18n branch. I may just be being a little too naive about
how to
>>> apply the changes but I note a number of import errors from attempting
this.
>>> They are certainly not hugely difficult to fix if they really do exist
of
>>> course. Are there any quick instructions on how to test what you have so
>>> far?
>>>
>> I haven't checked (yet) how Olemis integrated my patch, but if you use
>> my branch, then
>> it should work without doing anything.
>> I had also some import errors before, but I think I fixed them all.
>> Can you give me
>> an example of the import errors you have ?
>
>
> It is probably my misunderstanding at how bitbucket/hg works then. I
found that I got two patches out of the repo rather than the full
repository. Obviously I haven't been trying hard enough!
>

If you use hg qclone command then both the whole base repos + the patch
queue repos will be cloned / checked out. After that I could run the test
suite like shown in this snippet http://pastebin.com/urQsMENh  . Just
replace hg branch names accordingly. The whole sequence would look like this

hg qclone
hg update default
hg update --mq i18n-branch
hg qpush -a
cd multiproduct
setup.py test -m tests

...

Sent from Android

--
Regards

Olemis - @olemislc
Blog-ES : http://simelo-es.blogspot.com
Blog-EN : http://simelo-en.blogspot.com
Projects : http://blood-hound.net

Re: Internationalization of Bloodhound

Posted by Gary Martin <ga...@wandisco.com>.
On 05/12/13 15:16, Saint Germain wrote:
> Hello !
>
> On 5 December 2013 16:04, Gary Martin <ga...@wandisco.com> wrote:
>>>> Here is the patch series giving the french translation:
>>>>
>>> https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>>>> However I put it on top of the previous i18n patch, it may not be what
>>>> Olemis wanted ?
>>> Good!
>>> I just moved the patch to t694/ folder.  Please update from my patch queue
>>> repos
>>> ;)
>>>
>> However, I am writing as I have been trying to play with the patches from
>> the t694_bh_i18n branch. I may just be being a little too naive about how to
>> apply the changes but I note a number of import errors from attempting this.
>> They are certainly not hugely difficult to fix if they really do exist of
>> course. Are there any quick instructions on how to test what you have so
>> far?
>>
> I haven't checked (yet) how Olemis integrated my patch, but if you use
> my branch, then
> it should work without doing anything.
> I had also some import errors before, but I think I fixed them all.
> Can you give me
> an example of the import errors you have ?

It is probably my misunderstanding at how bitbucket/hg works then. I 
found that I got two patches out of the repo rather than the full 
repository. Obviously I haven't been trying hard enough!

>
>>>> I also have a question on Bloodhound translation: if we customize our
>>>> own bloodhound_theme.html template, and put it in the templates root
>>>> folder, how can we translate it after that ?
>>> I honestly do not know what to say... Let's beter forward this question to
>>> trac-dev ml
>>>
>> Not sure I understand the problem you are seeking to solve there so I won't
>> try to comment on that yet.
>>
> If you want customize Trac or Bloodhound for your website (change the
> layout for instance)
> then you have to define your own template (bloodhound_theme.html for
> Bloodhound) which will
> override the default template.
> See http://trac.edgewall.org/wiki/TracInterfaceCustomization
>
> However if you do that, and introduced a bunch of new sentences in the
> new template, then you
> have to find a way for them to be translated by Babel.
> Currently it is not really possible, even if I have found a dirty
> workaround (see trac-dev mailing-list).

Per site customisation tends to happen in the %ENV/templates directory 
if I remember correctly. I would have thought that it would be desirable 
for internationalization to effectively extend to such customisations 
when they are needed. Of course, not all customisations will imply new 
translatable content.

Cheers,
     Gary

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
Hello !

On 5 December 2013 16:04, Gary Martin <ga...@wandisco.com> wrote:
>>> Here is the patch series giving the french translation:
>>>
>>
>> https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>>>
>>> However I put it on top of the previous i18n patch, it may not be what
>>> Olemis wanted ?
>>
>> Good!
>> I just moved the patch to t694/ folder.  Please update from my patch queue
>> repos
>> ;)
>>
>
> However, I am writing as I have been trying to play with the patches from
> the t694_bh_i18n branch. I may just be being a little too naive about how to
> apply the changes but I note a number of import errors from attempting this.
> They are certainly not hugely difficult to fix if they really do exist of
> course. Are there any quick instructions on how to test what you have so
> far?
>

I haven't checked (yet) how Olemis integrated my patch, but if you use
my branch, then
it should work without doing anything.
I had also some import errors before, but I think I fixed them all.
Can you give me
an example of the import errors you have ?

>>> I also have a question on Bloodhound translation: if we customize our
>>> own bloodhound_theme.html template, and put it in the templates root
>>> folder, how can we translate it after that ?
>>
>> I honestly do not know what to say... Let's beter forward this question to
>> trac-dev ml
>>
>
> Not sure I understand the problem you are seeking to solve there so I won't
> try to comment on that yet.
>

If you want customize Trac or Bloodhound for your website (change the
layout for instance)
then you have to define your own template (bloodhound_theme.html for
Bloodhound) which will
override the default template.
See http://trac.edgewall.org/wiki/TracInterfaceCustomization

However if you do that, and introduced a bunch of new sentences in the
new template, then you
have to find a way for them to be translated by Babel.
Currently it is not really possible, even if I have found a dirty
workaround (see trac-dev mailing-list).

Re: Internationalization of Bloodhound

Posted by Gary Martin <ga...@wandisco.com>.
On 02/12/13 14:50, Olemis Lang wrote:
> On Nov 30, 2013 6:21 PM, "Saint Germain" <sa...@gmail.com> wrote:
>> On Tue, 19 Nov 2013 14:16:28 +0100, Saint Germain <sa...@gmail.com>
>> wrote :
>>
>>> I have updated my repo on bitbucket to correct the patch for ticket
>>> #694 and finished the french translation on Transifex.
>>>
>>> I will create a separate branch/patch on Bitbucket which includes the
>>> french translation and make a pull request.
>>>
>> Hello !
>>
>> Here is the patch series giving the french translation:
>>
> https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>> However I put it on top of the previous i18n patch, it may not be what
>> Olemis wanted ?
> Good!
> I just moved the patch to t694/ folder.  Please update from my patch queue
> repos
> ;)
>
>> I also have a question on Bloodhound translation: if we customize our
>> own bloodhound_theme.html template, and put it in the templates root
>> folder, how can we translate it after that ?
> I honestly do not know what to say... Let's beter forward this question to
> trac-dev ml
>

Not sure I understand the problem you are seeking to solve there so I 
won't try to comment on that yet.

However, I am writing as I have been trying to play with the patches 
from the t694_bh_i18n branch. I may just be being a little too naive 
about how to apply the changes but I note a number of import errors from 
attempting this. They are certainly not hugely difficult to fix if they 
really do exist of course. Are there any quick instructions on how to 
test what you have so far?

Cheers,
     Gary


Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Nov 30, 2013 6:21 PM, "Saint Germain" <sa...@gmail.com> wrote:
>
> On Tue, 19 Nov 2013 14:16:28 +0100, Saint Germain <sa...@gmail.com>
> wrote :
>
> > I have updated my repo on bitbucket to correct the patch for ticket
> > #694 and finished the french translation on Transifex.
> >
> > I will create a separate branch/patch on Bitbucket which includes the
> > french translation and make a pull request.
> >
>
> Hello !
>
> Here is the patch series giving the french translation:
>
https://bitbucket.org/saintgermain/bloodhound-mq/commits/branch/t694_bh_i18n
>
> However I put it on top of the previous i18n patch, it may not be what
> Olemis wanted ?

Good!
I just moved the patch to t694/ folder.  Please update from my patch queue
repos
;)

>
> I also have a question on Bloodhound translation: if we customize our
> own bloodhound_theme.html template, and put it in the templates root
> folder, how can we translate it after that ?

I honestly do not know what to say... Let's beter forward this question to
trac-dev ml

Sent from Android

--
Regards

Olemis - @olemislc
Blog-ES : http://simelo-es.blogspot.com
Blog-EN : http://simelo-en.blogspot.com
Projects : http://blood-hound.net