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/11/19 14:16:28 UTC

Internationalization of Bloodhound

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.

Here are a few comments but mostly it works ! ;-)

1) There a lot (around 300-400 I think) of duplicated strings with
Trac. With Transifex I just quickly copy-pasted the translation, but
ideally (Don't Repeat Yourself) we should mark these strings as
duplicates of Trac strings (big work)

2) So far I see 2 parts where the translation doesn't work:
  a) the test in the Seach box ("Search all produts. Try TracLinks").
I have no idea why it doesn't work
  b) In the Custom Query page, the checkboxes "accepted, assigned,
closed, needinfo, etc." are still in english (I don't know where the
names are defined)

3) In case of problem in the translation process, the stack trace is
very difficult to understand. For example I had a problem with a new
version of Babel and the result was something like
"NullTranslationsBabel has no attribute isactive". I will propose some
more try/request on trac/trac/util/translation.py in order to have a
more useful debug log

Regards,

On 15 November 2013 00:48, Olemis Lang <ol...@gmail.com> wrote:
> On Thu, Nov 14, 2013 at 6:04 PM, Saint Germain <sa...@gmail.com> wrote:
>
>> On Thu, 14 Nov 2013 13:52:13 -0500, Olemis Lang <ol...@gmail.com>
>> wrote :
>> > PS: I did not commit (--mq) these changes so feel free to follow the
>> > process and update the patch to work against current /trunk .
>> >
>>
>> Ok I tried my first pull request. Hope that it will be correct ! ;-)
>>
>
> Nice ! Changesets committed in MQ /trunk ... I did not merge the pull
> request because I'm afraid modifications will affect default branch and I
> want it clean . I'll experiment in a sandbox to see what happens before
> doing so .
>
> In the next few days I'll be contributing Spanish translations to start
> probing what you have made so far as well as Transifex workflow with 2
> languages (/me looking forward to your French translation as well ;).
>
> --
> Regards,
>
> Olemis - @olemislc

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
On Wed, 20 Nov 2013 03:51:08 +0900, Jun Omae <ju...@gmail.com> wrote :

> On Wed, Nov 20, 2013 at 3:46 AM, Ryan Ollos <ry...@wandisco.com>
> wrote:
> > On Tue, Nov 19, 2013 at 10:33 AM, Saint Germain
> > <sa...@gmail.com> wrote:
> >
> >> On Tue, 19 Nov 2013 12:40:50 -0500, Olemis Lang <ol...@gmail.com>
> >> wrote :
> >> > >   b) In the Custom Query page, the checkboxes "accepted,
> >> > > assigned, closed, needinfo, etc." are still in english (I
> >> > > don't know where the names are defined)
> >> > >
> >> >
> >> > I've spotted a situation that might require our attention during
> >> > i18n process. In many templates there are embedded widgets e.g.
> >> >
> >> > {{{#!xml
> >> >
> >> > <bh:widget urn="TicketFieldValues">
> >> >    <bh:args>
> >> >     <bh:arg name="title">Components</bh:arg>
> >> >     <bh:arg name="field">component</bh:arg>
> >> >     <bh:arg name="verbose">true</bh:arg>
> >> >     <bh:arg
> >> > name="query">product=${product.prefix}&amp;group=component</bh:arg>
> >> >    </bh:args>
> >> > </bh:widget>
> >> > }}}
> >> >
> >> > In such cases some parameters should be translated (e.g. `title`
> >> > in sample widget above) whereas other do not . Depending on the
> >> > behavior of the Genshi i18n extractor something should be done
> >> > about this in order to either :
> >> >
> >> > - Force detection of language-dependent strings e.g.
> >> > ''Components''
> >> > - Do not include neutral strings in translation catalog
> >> >
> >> > Have you noticed such issues in the dashboard ?
> >>
> >> No I haven't made a lot of test on the UI. I figured that I should
> >> try first to translate everything in the .po file and then see in
> >> the UI where the translations are missing. Agreed, it may not be
> >> the smartest way to proceed. ;-)
> >>
> >> I'll try to have a a look.
> >>
> >> There is also something wrong with the strings extractor. If you
> >> take a look at the remaining strings to translate in french in
> >> Transifex, you'll see that there are just some code/variables
> >> which don't need to be translated.
> >> I haven't managed so far to figure why they are extracted.
> >>
> >>
> >> > > 3) In case of problem in the translation process, the stack
> >> > > trace is very difficult to understand. For example I had a
> >> > > problem with a new version of Babel and the result was
> >> > > something like "NullTranslationsBabel has no attribute
> >> > > isactive". I will propose some more try/request on
> >> > > trac/trac/util/translation.py in order to have a more useful
> >> > > debug log
> >> > >
> >> >
> >> > @rjollos : will this be a useful addition to the Trac core ?
> >> >
> >>
> >> It is not something revolutionary.
> >> For instance (just a silly example):
> >>
> >> diff -r 15e5b368262d trac/trac/util/translation.py
> >> --- a/trac/trac/util/translation.py     Tue Nov 19 03:23:37 2013
> >> +0100 +++ b/trac/trac/util/translation.py     Tue Nov 19 19:29:01
> >> 2013 +0100 @@ -156,7 +156,10 @@
> >>                          domains =
> >> self._plugin_domains.get(env_path, {}) domains = domains.items()
> >>                      for domain, dirname in domains:
> >> -                        t.add(Translations.load(dirname, locale,
> >> domain))
> >> +                        try:
> >> +                            t.add(Translations.load(dirname,
> >> locale, domain))
> >> +                        except Exception:
> >> +                            raise ValueError("Error adding %s %s
> >> %s" % (dirname,locale,domain))
> >>              self._current.translations = t
> >>              self._activate_failed = False
> >>
> >> Indeed if there is no try/catch at this point and there is an
> >> error in Babel,
> >> then the property isactive of TranslationsProxy throw an exception
> >> and the result
> >> is an error message saying that isactive is not a property...
> >>
> >
> > Babel 0.9.6 is what is specified in the pip requirements file, is
> > that the version of Babel you are running? There is an issue with
> > later versions of Babel that looks similar to what you are
> > reporting, and it has been fixed for the forthcoming Trac 1.0.2:
> >
> > http://trac.edgewall.org/ticket/10903#comment:5
> 
> If using Babel 1.x, I've caught the same issue and filed in
> http://trac.edgewall.org/ticket/11345.
> 

Ah that is exactly the problem and also how I wanted to fix it !

Thanks,

Re: Internationalization of Bloodhound

Posted by Jun Omae <ju...@gmail.com>.
If using Babel 1.x, I've caught the same issue and filed in
http://trac.edgewall.org/ticket/11345.

On Wed, Nov 20, 2013 at 3:46 AM, Ryan Ollos <ry...@wandisco.com> wrote:
> On Tue, Nov 19, 2013 at 10:33 AM, Saint Germain <sa...@gmail.com> wrote:
>
>> On Tue, 19 Nov 2013 12:40:50 -0500, Olemis Lang <ol...@gmail.com>
>> wrote :
>> > >   b) In the Custom Query page, the checkboxes "accepted, assigned,
>> > > closed, needinfo, etc." are still in english (I don't know where the
>> > > names are defined)
>> > >
>> >
>> > I've spotted a situation that might require our attention during i18n
>> > process. In many templates there are embedded widgets e.g.
>> >
>> > {{{#!xml
>> >
>> > <bh:widget urn="TicketFieldValues">
>> >    <bh:args>
>> >     <bh:arg name="title">Components</bh:arg>
>> >     <bh:arg name="field">component</bh:arg>
>> >     <bh:arg name="verbose">true</bh:arg>
>> >     <bh:arg
>> > name="query">product=${product.prefix}&amp;group=component</bh:arg>
>> >    </bh:args>
>> > </bh:widget>
>> > }}}
>> >
>> > In such cases some parameters should be translated (e.g. `title` in
>> > sample widget above) whereas other do not . Depending on the behavior
>> > of the Genshi i18n extractor something should be done about this in
>> > order to either :
>> >
>> > - Force detection of language-dependent strings e.g. ''Components''
>> > - Do not include neutral strings in translation catalog
>> >
>> > Have you noticed such issues in the dashboard ?
>>
>> No I haven't made a lot of test on the UI. I figured that I should try
>> first to translate everything in the .po file and then see in the UI
>> where the translations are missing. Agreed, it may not be the smartest
>> way to proceed. ;-)
>>
>> I'll try to have a a look.
>>
>> There is also something wrong with the strings extractor. If you take a
>> look at the remaining strings to translate in french in Transifex,
>> you'll see that there are just some code/variables which don't need to
>> be translated.
>> I haven't managed so far to figure why they are extracted.
>>
>>
>> > > 3) In case of problem in the translation process, the stack trace is
>> > > very difficult to understand. For example I had a problem with a new
>> > > version of Babel and the result was something like
>> > > "NullTranslationsBabel has no attribute isactive". I will propose
>> > > some more try/request on trac/trac/util/translation.py in order to
>> > > have a more useful debug log
>> > >
>> >
>> > @rjollos : will this be a useful addition to the Trac core ?
>> >
>>
>> It is not something revolutionary.
>> For instance (just a silly example):
>>
>> diff -r 15e5b368262d trac/trac/util/translation.py
>> --- a/trac/trac/util/translation.py     Tue Nov 19 03:23:37 2013 +0100
>> +++ b/trac/trac/util/translation.py     Tue Nov 19 19:29:01 2013 +0100
>> @@ -156,7 +156,10 @@
>>                          domains = self._plugin_domains.get(env_path, {})
>>                          domains = domains.items()
>>                      for domain, dirname in domains:
>> -                        t.add(Translations.load(dirname, locale, domain))
>> +                        try:
>> +                            t.add(Translations.load(dirname, locale,
>> domain))
>> +                        except Exception:
>> +                            raise ValueError("Error adding %s %s %s" %
>> (dirname,locale,domain))
>>              self._current.translations = t
>>              self._activate_failed = False
>>
>> Indeed if there is no try/catch at this point and there is an error in
>> Babel,
>> then the property isactive of TranslationsProxy throw an exception and the
>> result
>> is an error message saying that isactive is not a property...
>>
>
> Babel 0.9.6 is what is specified in the pip requirements file, is that the
> version of Babel you are running? There is an issue with later versions of
> Babel that looks similar to what you are reporting, and it has been fixed
> for the forthcoming Trac 1.0.2:
>
> http://trac.edgewall.org/ticket/10903#comment:5



-- 
Jun Omae <ju...@gmail.com> (大前 潤)

Re: Internationalization of Bloodhound

Posted by Ryan Ollos <ry...@wandisco.com>.
On Tue, Nov 19, 2013 at 10:33 AM, Saint Germain <sa...@gmail.com> wrote:

> On Tue, 19 Nov 2013 12:40:50 -0500, Olemis Lang <ol...@gmail.com>
> wrote :
> > >   b) In the Custom Query page, the checkboxes "accepted, assigned,
> > > closed, needinfo, etc." are still in english (I don't know where the
> > > names are defined)
> > >
> >
> > I've spotted a situation that might require our attention during i18n
> > process. In many templates there are embedded widgets e.g.
> >
> > {{{#!xml
> >
> > <bh:widget urn="TicketFieldValues">
> >    <bh:args>
> >     <bh:arg name="title">Components</bh:arg>
> >     <bh:arg name="field">component</bh:arg>
> >     <bh:arg name="verbose">true</bh:arg>
> >     <bh:arg
> > name="query">product=${product.prefix}&amp;group=component</bh:arg>
> >    </bh:args>
> > </bh:widget>
> > }}}
> >
> > In such cases some parameters should be translated (e.g. `title` in
> > sample widget above) whereas other do not . Depending on the behavior
> > of the Genshi i18n extractor something should be done about this in
> > order to either :
> >
> > - Force detection of language-dependent strings e.g. ''Components''
> > - Do not include neutral strings in translation catalog
> >
> > Have you noticed such issues in the dashboard ?
>
> No I haven't made a lot of test on the UI. I figured that I should try
> first to translate everything in the .po file and then see in the UI
> where the translations are missing. Agreed, it may not be the smartest
> way to proceed. ;-)
>
> I'll try to have a a look.
>
> There is also something wrong with the strings extractor. If you take a
> look at the remaining strings to translate in french in Transifex,
> you'll see that there are just some code/variables which don't need to
> be translated.
> I haven't managed so far to figure why they are extracted.
>
>
> > > 3) In case of problem in the translation process, the stack trace is
> > > very difficult to understand. For example I had a problem with a new
> > > version of Babel and the result was something like
> > > "NullTranslationsBabel has no attribute isactive". I will propose
> > > some more try/request on trac/trac/util/translation.py in order to
> > > have a more useful debug log
> > >
> >
> > @rjollos : will this be a useful addition to the Trac core ?
> >
>
> It is not something revolutionary.
> For instance (just a silly example):
>
> diff -r 15e5b368262d trac/trac/util/translation.py
> --- a/trac/trac/util/translation.py     Tue Nov 19 03:23:37 2013 +0100
> +++ b/trac/trac/util/translation.py     Tue Nov 19 19:29:01 2013 +0100
> @@ -156,7 +156,10 @@
>                          domains = self._plugin_domains.get(env_path, {})
>                          domains = domains.items()
>                      for domain, dirname in domains:
> -                        t.add(Translations.load(dirname, locale, domain))
> +                        try:
> +                            t.add(Translations.load(dirname, locale,
> domain))
> +                        except Exception:
> +                            raise ValueError("Error adding %s %s %s" %
> (dirname,locale,domain))
>              self._current.translations = t
>              self._activate_failed = False
>
> Indeed if there is no try/catch at this point and there is an error in
> Babel,
> then the property isactive of TranslationsProxy throw an exception and the
> result
> is an error message saying that isactive is not a property...
>

Babel 0.9.6 is what is specified in the pip requirements file, is that the
version of Babel you are running? There is an issue with later versions of
Babel that looks similar to what you are reporting, and it has been fixed
for the forthcoming Trac 1.0.2:

http://trac.edgewall.org/ticket/10903#comment:5

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
On Tue, 19 Nov 2013 12:40:50 -0500, Olemis Lang <ol...@gmail.com>
wrote :
> >   b) In the Custom Query page, the checkboxes "accepted, assigned,
> > closed, needinfo, etc." are still in english (I don't know where the
> > names are defined)
> >
> 
> I've spotted a situation that might require our attention during i18n
> process. In many templates there are embedded widgets e.g.
> 
> {{{#!xml
> 
> <bh:widget urn="TicketFieldValues">
>    <bh:args>
>     <bh:arg name="title">Components</bh:arg>
>     <bh:arg name="field">component</bh:arg>
>     <bh:arg name="verbose">true</bh:arg>
>     <bh:arg
> name="query">product=${product.prefix}&amp;group=component</bh:arg>
>    </bh:args>
> </bh:widget>
> }}}
> 
> In such cases some parameters should be translated (e.g. `title` in
> sample widget above) whereas other do not . Depending on the behavior
> of the Genshi i18n extractor something should be done about this in
> order to either :
> 
> - Force detection of language-dependent strings e.g. ''Components''
> - Do not include neutral strings in translation catalog
> 
> Have you noticed such issues in the dashboard ?

No I haven't made a lot of test on the UI. I figured that I should try
first to translate everything in the .po file and then see in the UI
where the translations are missing. Agreed, it may not be the smartest
way to proceed. ;-)

I'll try to have a a look.

There is also something wrong with the strings extractor. If you take a
look at the remaining strings to translate in french in Transifex,
you'll see that there are just some code/variables which don't need to
be translated.
I haven't managed so far to figure why they are extracted.


> > 3) In case of problem in the translation process, the stack trace is
> > very difficult to understand. For example I had a problem with a new
> > version of Babel and the result was something like
> > "NullTranslationsBabel has no attribute isactive". I will propose
> > some more try/request on trac/trac/util/translation.py in order to
> > have a more useful debug log
> >
> 
> @rjollos : will this be a useful addition to the Trac core ?
> 

It is not something revolutionary.
For instance (just a silly example):

diff -r 15e5b368262d trac/trac/util/translation.py
--- a/trac/trac/util/translation.py	Tue Nov 19 03:23:37 2013 +0100
+++ b/trac/trac/util/translation.py	Tue Nov 19 19:29:01 2013 +0100
@@ -156,7 +156,10 @@
                         domains = self._plugin_domains.get(env_path, {})
                         domains = domains.items()
                     for domain, dirname in domains:
-                        t.add(Translations.load(dirname, locale, domain))
+                        try:
+                            t.add(Translations.load(dirname, locale, domain))
+                        except Exception:
+                            raise ValueError("Error adding %s %s %s" % (dirname,locale,domain))
             self._current.translations = t
             self._activate_failed = False

Indeed if there is no try/catch at this point and there is an error in Babel,
then the property isactive of TranslationsProxy throw an exception and the result
is an error message saying that isactive is not a property...

Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Dec 13, 2013 4:00 AM, "Saint Germain" <sa...@gmail.com> wrote:
>
> On 12 December 2013 17:32, Olemis Lang <ol...@gmail.com> wrote:
> >>> I have updated my repo on bitbucket to correct the patch for ticket
> >>> #694 and finished the french translation on Transifex.
> >>
> >> good !
> >> :)
> >
> > [...]
>
> >   - There  is a string in theme translations catalog saying
> >    "Standing on the shoulders of\n"
> >   " [1:Trac %(Trac)s],\n"
> >   " [2:%(Bloodhound)s]\n"
> >   " is a project hosted by the Apache Software Foundation's Incubator
> > project.\n"
> >   however reference to the Apache Incubator project is no longer needed
> > after graduation.
> >   I  have removed mentions to Incubator from the Spanish translation
> > catalog.
>
> Hello Olemis !
>
> I would have thought that it would be better to remove the sentence
> directly from the source code ?
> Otherwise we don't have consistency between english and your spanish
> translation ?
>

Yes, I'm just looking for feedback of PMC members (committers) before
creating a ticket for that.

> >   -  In relations plugin one of the strings to be translated is the
Apache
> > License
> > header included in notification e-mail template.
> >   *  Is this ok ?
> >   * Are there official (Spanish, French, ...) translations of the
license
> > ... ?
> >   * @SaintGermain ... and if so, shall we update the French translation
?
> >
>
> I quickly tried to find the official translation when I was
> translating everything but didn't find.
> I'll try again but I'm not optimistic to find an official one (and
> using a non-official translation may have legal problem ?).
>

Considering my experience, yes. May be I'm wrong

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 13/12/13 08:59, Saint Germain wrote:
> On 12 December 2013 17:32, Olemis Lang <ol...@gmail.com> wrote:
>>>> I have updated my repo on bitbucket to correct the patch for ticket
>>>> #694 and finished the french translation on Transifex.
>>> good !
>>> :)
>> [...]
>>    - There  is a string in theme translations catalog saying
>>     "Standing on the shoulders of\n"
>>    " [1:Trac %(Trac)s],\n"
>>    " [2:%(Bloodhound)s]\n"
>>    " is a project hosted by the Apache Software Foundation's Incubator
>> project.\n"
>>    however reference to the Apache Incubator project is no longer needed
>> after graduation.
>>    I  have removed mentions to Incubator from the Spanish translation
>> catalog.
> Hello Olemis !
>
> I would have thought that it would be better to remove the sentence
> directly from the source code ?
> Otherwise we don't have consistency between english and your spanish
> translation ?

Um, yes.. the source should definitely be fixed for that.

>
>>    -  In relations plugin one of the strings to be translated is the Apache
>> License
>> header included in notification e-mail template.
>>    *  Is this ok ?
>>    * Are there official (Spanish, French, ...) translations of the license
>> ... ?
>>    * @SaintGermain ... and if so, shall we update the French translation ?
>>
> I quickly tried to find the official translation when I was
> translating everything but didn't find.
> I'll try again but I'm not optimistic to find an official one (and
> using a non-official translation may have legal problem ?).
>
> Best regards,

I can investigate further but this is the only advice I know of at the 
moment:

http://www.apache.org/foundation/license-faq.html#Translation

The license header itself is probably not expected to be displayed in an 
email and probably should not be replaced. I don't know how much demand 
there would be for providing translations for convenience.

Incidentally I have had a bit more of a play with the patches. I noted 
that things work a bit differently between the olemis and saintgerman 
repositories. Meanwhile I note some interesting problems with getting 
any translations shown (particularly in dev mode). Do you have a method 
of getting the bloodhound translations displaying? Sorry if I am being a 
little lazy!

Cheers,
     Gary

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
On 12 December 2013 17:32, Olemis Lang <ol...@gmail.com> wrote:
>>> I have updated my repo on bitbucket to correct the patch for ticket
>>> #694 and finished the french translation on Transifex.
>>
>> good !
>> :)
>
> [...]

>   - There  is a string in theme translations catalog saying
>    "Standing on the shoulders of\n"
>   " [1:Trac %(Trac)s],\n"
>   " [2:%(Bloodhound)s]\n"
>   " is a project hosted by the Apache Software Foundation's Incubator
> project.\n"
>   however reference to the Apache Incubator project is no longer needed
> after graduation.
>   I  have removed mentions to Incubator from the Spanish translation
> catalog.

Hello Olemis !

I would have thought that it would be better to remove the sentence
directly from the source code ?
Otherwise we don't have consistency between english and your spanish
translation ?

>   -  In relations plugin one of the strings to be translated is the Apache
> License
> header included in notification e-mail template.
>   *  Is this ok ?
>   * Are there official (Spanish, French, ...) translations of the license
> ... ?
>   * @SaintGermain ... and if so, shall we update the French translation ?
>

I quickly tried to find the official translation when I was
translating everything but didn't find.
I'll try again but I'm not optimistic to find an official one (and
using a non-official translation may have legal problem ?).

Best regards,

Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Thu, Dec 12, 2013 at 11:32 AM, Olemis Lang <ol...@gmail.com> wrote:

>
> On Tue, Nov 19, 2013 at 12:40 PM, Olemis Lang <ol...@gmail.com> wrote:
>
[...]

>
> This is not all folks !
>

Other issues I've detected

   - The caption "[1:Tip] you may use [2:WikiFormatting] here" is
     detected twice apparently due to a subtle difference in the
     number of whitespaces

-- 
Regards,

Olemis - @olemislc

Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Thu, Dec 12, 2013 at 11:32 AM, Olemis Lang <ol...@gmail.com> wrote:
[...]

>
> Check translation status here
>

https://www.transifex.com/projects/p/bloodhound/language/es/

I've also sent my request to join the Spanish team of Trac l10n project @
transifex to improve the status of Trac Account Manager's Spanish
translation (... and others will follow ... ;) .

-- 
Regards,

Olemis - @olemislc

Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Tue, Nov 19, 2013 at 12:40 PM, Olemis Lang <ol...@gmail.com> wrote:

>
> On Tue, Nov 19, 2013 at 8:16 AM, 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.
>>
>
> good !
> :)
>
>

I'm working on a new patch (among other things ;) to contribute the
(initial) Spanish (es) translation. That language is very rich and has
noteworthy variations in multiple regions across the world (e.g. es_AR ,
es_MX , ...). Some comments follow .

In the .po files I'm preparing this side I have tagged multiple message IDs
with the following labels

  -  inherit=<value>
   *  Message translation hast to be retrieved from the i18n catalog
identified by <value>
  -  review
   *  Review source code because maybe the translation extraction
should not have retrieved this message at all
  -  missing
   *  The string belongs in an external messages catalog but there's
no suitable translation

Besides

  -  In relations plugin I've detected the use of both "Invalid ticket id."
and
   "Invalid ticket ID." IMO there's no good reason to keep them both so we'd
   rather keep one of them so as to simplify the translation process.
  *  Similar instances are :
   +  "Edit Product" vs "Edit product" in multi-product translations catalog
   +  "Has been created" vs "has been created" in theme js translations
catalog
  - There  is a string in theme translations catalog saying
   "Standing on the shoulders of\n"
  " [1:Trac %(Trac)s],\n"
  " [2:%(Bloodhound)s]\n"
  " is a project hosted by the Apache Software Foundation's Incubator
project.\n"
  however reference to the Apache Incubator project is no longer needed
after graduation.
  I  have removed mentions to Incubator from the Spanish translation
catalog.
  -  In relations plugin one of the strings to be translated is the Apache
License
header included in notification e-mail template.
  *  Is this ok ?
  * Are there official (Spanish, French, ...) translations of the license
... ?
  * @SaintGermain ... and if so, shall we update the French translation ?

This is not all folks ! Check translation status here

-- 
Regards,

Olemis - @olemislc

Re: Internationalization of Bloodhound

Posted by Olemis Lang <ol...@gmail.com>.
On Tue, Nov 19, 2013 at 8:16 AM, 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.
>

good !
:)


>
> I will create a separate branch/patch on Bitbucket which includes the
> french translation and make a pull request.
>

preferably a new patch (qnew) applied on top of the former


>
> Here are a few comments but mostly it works ! ;-)
>
> 1) There a lot (around 300-400 I think) of duplicated strings with
> Trac. With Transifex I just quickly copy-pasted the translation, but
> ideally (Don't Repeat Yourself) we should mark these strings as
> duplicates of Trac strings


yes , ideally i18n (BH) code should be changed to retrieve those from Trac
catalogs


> (big work)
>

:-/


> 2) So far I see 2 parts where the translation doesn't work:
>   a) the test in the Seach box ("Search all produts. Try TracLinks").
> I have no idea why it doesn't work
>

It seems that Genshi extractor is not detecting some attributes e.g. input
placeholder


>   b) In the Custom Query page, the checkboxes "accepted, assigned,
> closed, needinfo, etc." are still in english (I don't know where the
> names are defined)
>

I've spotted a situation that might require our attention during i18n
process. In many templates there are embedded widgets e.g.

{{{#!xml

<bh:widget urn="TicketFieldValues">
   <bh:args>
    <bh:arg name="title">Components</bh:arg>
    <bh:arg name="field">component</bh:arg>
    <bh:arg name="verbose">true</bh:arg>
    <bh:arg
name="query">product=${product.prefix}&amp;group=component</bh:arg>
   </bh:args>
</bh:widget>
}}}

In such cases some parameters should be translated (e.g. `title` in sample
widget above) whereas other do not . Depending on the behavior of the
Genshi i18n extractor something should be done about this in order to
either :

- Force detection of language-dependent strings e.g. ''Components''
- Do not include neutral strings in translation catalog

Have you noticed such issues in the dashboard ?


> 3) In case of problem in the translation process, the stack trace is
> very difficult to understand. For example I had a problem with a new
> version of Babel and the result was something like
> "NullTranslationsBabel has no attribute isactive". I will propose some
> more try/request on trac/trac/util/translation.py in order to have a
> more useful debug log
>

@rjollos : will this be a useful addition to the Trac core ?


> [...]

-- 
Regards,

Olemis - @olemislc

Re: Internationalization of Bloodhound

Posted by Ryan Ollos <ry...@wandisco.com>.
On Tue, Nov 19, 2013 at 12:51 PM, Saint Germain <sa...@gmail.com> wrote:

> On Tue, 19 Nov 2013 12:13:51 -0800, Ryan Ollos
> <ry...@wandisco.com> wrote :
>
> > On Tue, Nov 19, 2013 at 5:16 AM, 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.
> > >
> > > Here are a few comments but mostly it works ! ;-)
> > >
> > > 1) There a lot (around 300-400 I think) of duplicated strings with
> > > Trac. With Transifex I just quickly copy-pasted the translation, but
> > > ideally (Don't Repeat Yourself) we should mark these strings as
> > > duplicates of Trac strings (big work)
> > >
> > > 2) So far I see 2 parts where the translation doesn't work:
> > >   a) the test in the Seach box ("Search all produts. Try
> > > TracLinks"). I have no idea why it doesn't work
> > >   b) In the Custom Query page, the checkboxes "accepted, assigned,
> > > closed, needinfo, etc." are still in english (I don't know where the
> > > names are defined)
> > >
> > > 3) In case of problem in the translation process, the stack trace is
> > > very difficult to understand. For example I had a problem with a new
> > > version of Babel and the result was something like
> > > "NullTranslationsBabel has no attribute isactive". I will propose
> > > some more try/request on trac/trac/util/translation.py in order to
> > > have a more useful debug log
> > >
> >
> > Regarding (2a),
> >
> > The Genshi documentation says "The default is to consider the
> > attributes abbr, alt, label, prompt, standby, summary, and title,
> > which is a list that makes sense for HTML documents. Of course, you
> > can tell the translator to use a different set of attribute names, or
> > none at all."
> > http://genshi.edgewall.org/wiki/Documentation/i18n.html#id3
> >
> > It looks like the set of attributes is specified when instantiating
> > the Translator object:
> >
> http://genshi.edgewall.org/browser/tags/0.6.0/genshi/filters/i18n.py?marks=609-611,614-615#L596
> >
> > Since "placeholder" is a new HTML5 attribute, it probably hasn't been
> > considered in a release of Genshi. The latest Genshi release is 0.7,
> > and it is not included in the set yet.
> >
> http://genshi.edgewall.org/browser/tags/0.7.0/genshi/filters/i18n.py?marks=606-608#L596
> >
> > It seems like we have 2 options:
> >  1. Specify include_attrs when constructing the Translator object in
> > trac.web.chrome:
> >
> http://trac.edgewall.org/browser/branches/1.0-stable/trac/web/chrome.py?rev=12211&marks=951#L938
> >  2. Ask the Genshi team to include "placeholder" in the set.
> >
> > There doesn't seem to be much development activity with Genshi
> > lately, so (1) would probably be the faster solution. We could patch
> > our copy of Trac and open a ticket with Trac for pushing the change
> > to the core. We should consider whether there are any other HTML5
> > attributes we are utilizing or might utilize in the future that
> > should be included in the translatable set. We might even just expose
> > an INCLUDE_ATTRS variable in trac.web.chrome that a theme could set.
> >
> > Would you kindly test whether specifying `incl_attributes` in
> > trac.web.chrome:load_template makes the string translatable?
> >
>
> With the following patch:
> diff -r 15e5b368262d trac/trac/web/chrome.py
> --- a/trac/trac/web/chrome.py   Tue Nov 19 03:23:37 2013 +0100
> +++ b/trac/trac/web/chrome.py   Tue Nov 19 21:46:07 2013 +0100
> @@ -938,7 +938,7 @@
>                  max_cache_size=self.genshi_cache_size,
>                  default_encoding="utf-8",
>                  variable_lookup='lenient', callback=lambda template:
> -
>  Translator(translation.get_translations()).setup(template))
> +
>  Translator(translation.get_translations(),include_attrs=('placeholder')).setup(template))
>
>          if method == 'text':
>              cls = NewTextTemplate
>
> It works !
> Thanks for having taken the time for this _very_ detailed explanation.
>
> > Regarding (2b)
> >
> > I believe it is the case that the workflow states aren't translated,
> > and there is an open ticket for this:
> > http://trac.edgewall.org/ticket/9472
>
> Ok, it may be a bit difficult for my proficiency level of Trac but I'll
> see if I can do something.
>
> Thanks again !
>


Here's a Genshi ticket for adding the placeholder attribute:
http://genshi.edgewall.org/ticket/577

Please let us know if you spot any other new HTML5 attributes that need to
be translated.

I'm still looking into other more immediate fixes for this issue.

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
On Tue, 19 Nov 2013 12:13:51 -0800, Ryan Ollos
<ry...@wandisco.com> wrote :

> On Tue, Nov 19, 2013 at 5:16 AM, 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.
> >
> > Here are a few comments but mostly it works ! ;-)
> >
> > 1) There a lot (around 300-400 I think) of duplicated strings with
> > Trac. With Transifex I just quickly copy-pasted the translation, but
> > ideally (Don't Repeat Yourself) we should mark these strings as
> > duplicates of Trac strings (big work)
> >
> > 2) So far I see 2 parts where the translation doesn't work:
> >   a) the test in the Seach box ("Search all produts. Try
> > TracLinks"). I have no idea why it doesn't work
> >   b) In the Custom Query page, the checkboxes "accepted, assigned,
> > closed, needinfo, etc." are still in english (I don't know where the
> > names are defined)
> >
> > 3) In case of problem in the translation process, the stack trace is
> > very difficult to understand. For example I had a problem with a new
> > version of Babel and the result was something like
> > "NullTranslationsBabel has no attribute isactive". I will propose
> > some more try/request on trac/trac/util/translation.py in order to
> > have a more useful debug log
> >
> 
> Regarding (2a),
> 
> The Genshi documentation says "The default is to consider the
> attributes abbr, alt, label, prompt, standby, summary, and title,
> which is a list that makes sense for HTML documents. Of course, you
> can tell the translator to use a different set of attribute names, or
> none at all."
> http://genshi.edgewall.org/wiki/Documentation/i18n.html#id3
> 
> It looks like the set of attributes is specified when instantiating
> the Translator object:
> http://genshi.edgewall.org/browser/tags/0.6.0/genshi/filters/i18n.py?marks=609-611,614-615#L596
> 
> Since "placeholder" is a new HTML5 attribute, it probably hasn't been
> considered in a release of Genshi. The latest Genshi release is 0.7,
> and it is not included in the set yet.
> http://genshi.edgewall.org/browser/tags/0.7.0/genshi/filters/i18n.py?marks=606-608#L596
> 
> It seems like we have 2 options:
>  1. Specify include_attrs when constructing the Translator object in
> trac.web.chrome:
> http://trac.edgewall.org/browser/branches/1.0-stable/trac/web/chrome.py?rev=12211&marks=951#L938
>  2. Ask the Genshi team to include "placeholder" in the set.
> 
> There doesn't seem to be much development activity with Genshi
> lately, so (1) would probably be the faster solution. We could patch
> our copy of Trac and open a ticket with Trac for pushing the change
> to the core. We should consider whether there are any other HTML5
> attributes we are utilizing or might utilize in the future that
> should be included in the translatable set. We might even just expose
> an INCLUDE_ATTRS variable in trac.web.chrome that a theme could set.
> 
> Would you kindly test whether specifying `incl_attributes` in
> trac.web.chrome:load_template makes the string translatable?
> 

With the following patch:
diff -r 15e5b368262d trac/trac/web/chrome.py
--- a/trac/trac/web/chrome.py	Tue Nov 19 03:23:37 2013 +0100
+++ b/trac/trac/web/chrome.py	Tue Nov 19 21:46:07 2013 +0100
@@ -938,7 +938,7 @@
                 max_cache_size=self.genshi_cache_size,
                 default_encoding="utf-8",
                 variable_lookup='lenient', callback=lambda template:
-                Translator(translation.get_translations()).setup(template))
+                Translator(translation.get_translations(),include_attrs=('placeholder')).setup(template))
 
         if method == 'text':
             cls = NewTextTemplate

It works !
Thanks for having taken the time for this _very_ detailed explanation.

> Regarding (2b)
> 
> I believe it is the case that the workflow states aren't translated,
> and there is an open ticket for this:
> http://trac.edgewall.org/ticket/9472

Ok, it may be a bit difficult for my proficiency level of Trac but I'll see if I can do something.

Thanks again !

Re: Internationalization of Bloodhound

Posted by Ryan Ollos <ry...@wandisco.com>.
On Tue, Nov 19, 2013 at 5:16 AM, 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.
>
> Here are a few comments but mostly it works ! ;-)
>
> 1) There a lot (around 300-400 I think) of duplicated strings with
> Trac. With Transifex I just quickly copy-pasted the translation, but
> ideally (Don't Repeat Yourself) we should mark these strings as
> duplicates of Trac strings (big work)
>
> 2) So far I see 2 parts where the translation doesn't work:
>   a) the test in the Seach box ("Search all produts. Try TracLinks").
> I have no idea why it doesn't work
>   b) In the Custom Query page, the checkboxes "accepted, assigned,
> closed, needinfo, etc." are still in english (I don't know where the
> names are defined)
>
> 3) In case of problem in the translation process, the stack trace is
> very difficult to understand. For example I had a problem with a new
> version of Babel and the result was something like
> "NullTranslationsBabel has no attribute isactive". I will propose some
> more try/request on trac/trac/util/translation.py in order to have a
> more useful debug log
>

Regarding (2a),

The Genshi documentation says "The default is to consider the attributes
abbr, alt, label, prompt, standby, summary, and title, which is a list that
makes sense for HTML documents. Of course, you can tell the translator to
use a different set of attribute names, or none at all."
http://genshi.edgewall.org/wiki/Documentation/i18n.html#id3

It looks like the set of attributes is specified when instantiating the
Translator object:
http://genshi.edgewall.org/browser/tags/0.6.0/genshi/filters/i18n.py?marks=609-611,614-615#L596

Since "placeholder" is a new HTML5 attribute, it probably hasn't been
considered in a release of Genshi. The latest Genshi release is 0.7, and it
is not included in the set yet.
http://genshi.edgewall.org/browser/tags/0.7.0/genshi/filters/i18n.py?marks=606-608#L596

It seems like we have 2 options:
 1. Specify include_attrs when constructing the Translator object in
trac.web.chrome:
http://trac.edgewall.org/browser/branches/1.0-stable/trac/web/chrome.py?rev=12211&marks=951#L938
 2. Ask the Genshi team to include "placeholder" in the set.

There doesn't seem to be much development activity with Genshi lately, so
(1) would probably be the faster solution. We could patch our copy of Trac
and open a ticket with Trac for pushing the change to the core. We should
consider whether there are any other HTML5 attributes we are utilizing or
might utilize in the future that should be included in the translatable
set. We might even just expose an INCLUDE_ATTRS variable in trac.web.chrome
that a theme could set.

Would you kindly test whether specifying `incl_attributes` in
trac.web.chrome:load_template makes the string translatable?


Regarding (2b)

I believe it is the case that the workflow states aren't translated, and
there is an open ticket for this:
http://trac.edgewall.org/ticket/9472

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

Re: Internationalization of Bloodhound

Posted by Saint Germain <sa...@gmail.com>.
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 !