Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Ask Hjorth Larsen
Hello everyone

First of all I am very willing to implement a mode in gtxml
specifically for this.

Fixing the translator-credits issue is obviously very easy.

I can make it so that gtxml will only complain about syntax errors,
i.e. strings that are not accepted by the xml parser.  This requires
that all msgids and msgstrs - except the header and translator-credits
- can be assumed to be XML.

The files also contain "media" links to images/videos with their md5
hashes.  Perhaps a special check should be made for those, since they
are probably not required to be legal XML.  Are there other classes of
strings to be aware of?  Is all this acceptable?  Also, who could
actually approve this and make it run on the server?

Right now gtxml can to various extents be "smarter" and detect more
errors - e.g. whether unexpected XML tags are used.  But some
translators tend to insert their own little xml things when they want,
which is fine by itself, but can lead to false positives when
attempting to be too smart.

What happens with placeholder tags (such as _:ulink-1, _:ulink-2 and
so on), how bad is it if those are messed up?

Of course the ultimate authority on whether the translations are valid
or not is the software that compiles the documentation.  So another
possible filter would be to actually compile the darn thing as soon as
it gets checked in and use that as a test.

Best regards
Ask

2014-05-09 19:40 GMT+02:00 Daniel Mustieles García :
> Pyg3t's maintainer is in Cc (Ask) so maybe he is the best option to fix it
> ;-)
>
> El 09/05/2014 18:51, "Rafael Ferreira"  escribió:
>
>> No, it is a false positive. My example had only one translator. But here
>> is another example, now with two translators in translator-credits:
>>
>> $ gtxml ~/Downloads//optimization-guide.master.pt_BR.po
>> At line 24: not well-formed (invalid token)
>> ---
>> #. Put one translator per line, in the form NAME , YEAR1, YEAR2
>> msgctxt "_"
>> msgid "translator-credits"
>> msgstr ""
>> "Enrico Nicoletto , 2012\n"
>> "Rafael Ferreira , 2013"
>>
>>
>> If someone that knows python3 could patch pyg3t to fix this, I think it
>> would be a great tool for this XML validation... Someone?
>>
>>
>>
>>
>> 2014-05-09 16:40 GMT+00:00 Daniel Mustieles García
>> :
>>>
>>> Maybe it is because of the newline character? Translator credits should
>>> be in one line per credit
>>>
>>> El 09/05/2014 18:01, "Rafael Ferreira"  escribió:
>>>
 The only false positive I know of gtxml is the 'translator-credits'
 string, returning exit code 1. For instance:

 $ gtxml platform-demos.master.pt_BR.po
 At line 23: not well-formed (invalid token)
 ---
 #. Put one translator per line, in the form NAME , YEAR1, YEAR2
 msgctxt "_"
 msgid "translator-credits"
 msgstr "Rafael Ferreira , 2013"




 2014-05-09 15:49 GMT+00:00 Daniel Mustieles García
 :
>
> No AFAIK, but I'm not 100% about it.
>
> Cc'ing Ask, maintainer of pyg3t, to hear his oppinion about this
> question.
>
> El 09/05/2014 17:37, "Alexandre Franke" 
> escribió:
>
>> On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
>>  wrote:
>> > Hi,
>>
>> Hi,
>>
>> > Could we implement a pre-commit hook to check XML syntax with gtxml
>> > [1]?
>>
>> Are there any false positives?
>>
>> --
>> Alexandre Franke
>> ___
>> gnome-i18n mailing list
>> gnome-i18n@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>
>
> ___
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>

>>
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Rūdolfs Mazurs
Pk, 2014.05.09. 16:51 +, Rafael Ferreira rakstīja:
> If someone that knows python3 could patch pyg3t to fix this, I think
> it would be a great tool for this XML validation... Someone?

specifically in "translator-credits" strings, the e-mail is often put in
angle brackets, which is not a valid XML.

If the translator-credits string is parsed with XML, that IS a bug.
Otherwise just skip the translator-credits string in the xml check.

-- 
Rūdolfs Mazurs 

___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Daniel Mustieles García
Pyg3t's maintainer is in Cc (Ask) so maybe he is the best option to fix it
;-)
El 09/05/2014 18:51, "Rafael Ferreira"  escribió:

> No, it is a false positive. My example had only one translator. But here
> is another example, now with two translators in translator-credits:
>
> $ gtxml ~/Downloads//optimization-guide.master.pt_BR.po
> At line 24: not well-formed (invalid token)
> ---
> #. Put one translator per line, in the form NAME , YEAR1, YEAR2
> msgctxt "_"
> msgid "translator-credits"
> msgstr ""
> "Enrico Nicoletto , 2012\n"
> "Rafael Ferreira , 2013"
>
>
> If someone that knows python3 could patch pyg3t to fix this, I think it
> would be a great tool for this XML validation... Someone?
>
>
>
>
> 2014-05-09 16:40 GMT+00:00 Daniel Mustieles García <
> daniel.mustie...@gmail.com>:
>
>> Maybe it is because of the newline character? Translator credits should
>> be in one line per credit
>> El 09/05/2014 18:01, "Rafael Ferreira"  escribió:
>>
>> The only false positive I know of gtxml is the 'translator-credits'
>>> string, returning exit code 1. For instance:
>>>
>>> $ gtxml platform-demos.master.pt_BR.po
>>> At line 23: not well-formed (invalid token)
>>> ---
>>> #. Put one translator per line, in the form NAME , YEAR1, YEAR2
>>> msgctxt "_"
>>> msgid "translator-credits"
>>>  msgstr "Rafael Ferreira , 2013"
>>>
>>>
>>>
>>>
>>> 2014-05-09 15:49 GMT+00:00 Daniel Mustieles García <
>>> daniel.mustie...@gmail.com>:
>>>
 No AFAIK, but I'm not 100% about it.

 Cc'ing Ask, maintainer of pyg3t, to hear his oppinion about this
 question.
 El 09/05/2014 17:37, "Alexandre Franke" 
 escribió:

  On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
>  wrote:
> > Hi,
>
> Hi,
>
> > Could we implement a pre-commit hook to check XML syntax with gtxml
> [1]?
>
> Are there any false positives?
>
> --
> Alexandre Franke
> ___
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>

 ___
 gnome-i18n mailing list
 gnome-i18n@gnome.org
 https://mail.gnome.org/mailman/listinfo/gnome-i18n


>>>
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Rafael Ferreira
No, it is a false positive. My example had only one translator. But here is
another example, now with two translators in translator-credits:

$ gtxml ~/Downloads//optimization-guide.master.pt_BR.po
At line 24: not well-formed (invalid token)
---
#. Put one translator per line, in the form NAME , YEAR1, YEAR2
msgctxt "_"
msgid "translator-credits"
msgstr ""
"Enrico Nicoletto , 2012\n"
"Rafael Ferreira , 2013"


If someone that knows python3 could patch pyg3t to fix this, I think it
would be a great tool for this XML validation... Someone?




2014-05-09 16:40 GMT+00:00 Daniel Mustieles García <
daniel.mustie...@gmail.com>:

> Maybe it is because of the newline character? Translator credits should be
> in one line per credit
> El 09/05/2014 18:01, "Rafael Ferreira"  escribió:
>
> The only false positive I know of gtxml is the 'translator-credits'
>> string, returning exit code 1. For instance:
>>
>> $ gtxml platform-demos.master.pt_BR.po
>> At line 23: not well-formed (invalid token)
>> ---
>> #. Put one translator per line, in the form NAME , YEAR1, YEAR2
>> msgctxt "_"
>> msgid "translator-credits"
>>  msgstr "Rafael Ferreira , 2013"
>>
>>
>>
>>
>> 2014-05-09 15:49 GMT+00:00 Daniel Mustieles García <
>> daniel.mustie...@gmail.com>:
>>
>>> No AFAIK, but I'm not 100% about it.
>>>
>>> Cc'ing Ask, maintainer of pyg3t, to hear his oppinion about this
>>> question.
>>> El 09/05/2014 17:37, "Alexandre Franke" 
>>> escribió:
>>>
>>>  On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
  wrote:
 > Hi,

 Hi,

 > Could we implement a pre-commit hook to check XML syntax with gtxml
 [1]?

 Are there any false positives?

 --
 Alexandre Franke
 ___
 gnome-i18n mailing list
 gnome-i18n@gnome.org
 https://mail.gnome.org/mailman/listinfo/gnome-i18n

>>>
>>> ___
>>> gnome-i18n mailing list
>>> gnome-i18n@gnome.org
>>> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>>>
>>>
>>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Daniel Mustieles García
Maybe it is because of the newline character? Translator credits should be
in one line per credit
El 09/05/2014 18:01, "Rafael Ferreira"  escribió:

> The only false positive I know of gtxml is the 'translator-credits'
> string, returning exit code 1. For instance:
>
> $ gtxml platform-demos.master.pt_BR.po
> At line 23: not well-formed (invalid token)
> ---
> #. Put one translator per line, in the form NAME , YEAR1, YEAR2
> msgctxt "_"
> msgid "translator-credits"
>  msgstr "Rafael Ferreira , 2013"
>
>
>
>
> 2014-05-09 15:49 GMT+00:00 Daniel Mustieles García <
> daniel.mustie...@gmail.com>:
>
>> No AFAIK, but I'm not 100% about it.
>>
>> Cc'ing Ask, maintainer of pyg3t, to hear his oppinion about this question.
>> El 09/05/2014 17:37, "Alexandre Franke" 
>> escribió:
>>
>>  On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
>>>  wrote:
>>> > Hi,
>>>
>>> Hi,
>>>
>>> > Could we implement a pre-commit hook to check XML syntax with gtxml
>>> [1]?
>>>
>>> Are there any false positives?
>>>
>>> --
>>> Alexandre Franke
>>> ___
>>> gnome-i18n mailing list
>>> gnome-i18n@gnome.org
>>> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>>>
>>
>> ___
>> gnome-i18n mailing list
>> gnome-i18n@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>>
>>
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Rafael Ferreira
The only false positive I know of gtxml is the 'translator-credits' string,
returning exit code 1. For instance:

$ gtxml platform-demos.master.pt_BR.po
At line 23: not well-formed (invalid token)
---
#. Put one translator per line, in the form NAME , YEAR1, YEAR2
msgctxt "_"
msgid "translator-credits"
msgstr "Rafael Ferreira , 2013"




2014-05-09 15:49 GMT+00:00 Daniel Mustieles García <
daniel.mustie...@gmail.com>:

> No AFAIK, but I'm not 100% about it.
>
> Cc'ing Ask, maintainer of pyg3t, to hear his oppinion about this question.
> El 09/05/2014 17:37, "Alexandre Franke" 
> escribió:
>
>  On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
>>  wrote:
>> > Hi,
>>
>> Hi,
>>
>> > Could we implement a pre-commit hook to check XML syntax with gtxml [1]?
>>
>> Are there any false positives?
>>
>> --
>> Alexandre Franke
>> ___
>> gnome-i18n mailing list
>> gnome-i18n@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>>
>
> ___
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Daniel Mustieles García
No AFAIK, but I'm not 100% about it.

Cc'ing Ask, maintainer of pyg3t, to hear his oppinion about this question.
El 09/05/2014 17:37, "Alexandre Franke" 
escribió:

> On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
>  wrote:
> > Hi,
>
> Hi,
>
> > Could we implement a pre-commit hook to check XML syntax with gtxml [1]?
>
> Are there any false positives?
>
> --
> Alexandre Franke
> ___
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Alexandre Franke
On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
 wrote:
> Hi,

Hi,

> Could we implement a pre-commit hook to check XML syntax with gtxml [1]?

Are there any false positives?

-- 
Alexandre Franke
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Daniel Mustieles García
Hi,

Could we implement a pre-commit hook to check XML syntax with gtxml [1]?

This is the tool I use to periodically check XML syntax from PO files, to
detecttypos in tags or not properly closed tags in PO files, so running it
before pushing changes into Git could help us to avoid this kind of
problems.

My 2 cents :-)

[1] https://launchpad.net/pyg3t


2014-05-09 17:02 GMT+02:00 Rafael Ferreira :

> Ekaterina,
>
> Rather than rely on the carefulness of the translators (which will
> possibly fail at some point and a few times), isn't it possible to
> implement some kind of verification before pushing from the module to the
> website? My idea would be something like: schedule the pushes to website
> and before doing so, run the XML validation, and if it fails, do not push
> to website - and notify (the maintainer?). -- i'm not a developer, just
> throwing ideas.
>
> Cheers,
> Rafael Ferreira
>
>
> 2014-05-09 10:05 GMT-03:00 Ekaterina Gerasimova :
>
> Hi all, the gnome-devel-docs module is now shown in
>> developer.gnome.org live from git, not from release tarballs. This
>> means that if the XML validation is broken in any of the files or a
>> translation, a few hours after the commit, it will be broken on the
>> website.
>>
>> I would appreciate it if anyone working on translations could verify
>> that their commit does not break validation.
>>
>> In docs, we just run "make" after making the changes/applying the
>> patch, but I'm not sure how that would fit into the translation
>> workflow. If anyone has better suggestions, please speak up.
>>
>> Having said that, there is a lot of work being done on gnome-user-docs
>> right now, so you may want to not translate it for a few more months.
>>
>> Happy translating,
>> Kat
>> ___
>> gnome-i18n mailing list
>> gnome-i18n@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>>
>
>
> ___
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Rafael Ferreira
Ekaterina,

Rather than rely on the carefulness of the translators (which will possibly
fail at some point and a few times), isn't it possible to implement some
kind of verification before pushing from the module to the website? My idea
would be something like: schedule the pushes to website and before doing
so, run the XML validation, and if it fails, do not push to website - and
notify (the maintainer?). -- i'm not a developer, just throwing ideas.

Cheers,
Rafael Ferreira


2014-05-09 10:05 GMT-03:00 Ekaterina Gerasimova :

> Hi all, the gnome-devel-docs module is now shown in
> developer.gnome.org live from git, not from release tarballs. This
> means that if the XML validation is broken in any of the files or a
> translation, a few hours after the commit, it will be broken on the
> website.
>
> I would appreciate it if anyone working on translations could verify
> that their commit does not break validation.
>
> In docs, we just run "make" after making the changes/applying the
> patch, but I'm not sure how that would fit into the translation
> workflow. If anyone has better suggestions, please speak up.
>
> Having said that, there is a lot of work being done on gnome-user-docs
> right now, so you may want to not translate it for a few more months.
>
> Happy translating,
> Kat
> ___
> gnome-i18n mailing list
> gnome-i18n@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnome-i18n
>
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


gnome-devel-docs on developer.gnome.org

2014-05-09 Thread Ekaterina Gerasimova
Hi all, the gnome-devel-docs module is now shown in
developer.gnome.org live from git, not from release tarballs. This
means that if the XML validation is broken in any of the files or a
translation, a few hours after the commit, it will be broken on the
website.

I would appreciate it if anyone working on translations could verify
that their commit does not break validation.

In docs, we just run "make" after making the changes/applying the
patch, but I'm not sure how that would fit into the translation
workflow. If anyone has better suggestions, please speak up.

Having said that, there is a lot of work being done on gnome-user-docs
right now, so you may want to not translate it for a few more months.

Happy translating,
Kat
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n