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 <daniel.mustie...@gmail.com>:
> 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" <rafael.f...@gmail.com> 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 <EMAIL>, YEAR1, YEAR2
>> msgctxt "_"
>> msgid "translator-credits"
>> msgstr ""
>> "Enrico Nicoletto <live...@gmail.com>, 2012\n"
>> "Rafael Ferreira <rafael.f...@gmail.com>, 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" <rafael.f...@gmail.com> 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 <EMAIL>, YEAR1, YEAR2
>>>> msgctxt "_"
>>>> msgid "translator-credits"
>>>> msgstr "Rafael Ferreira <rafael.f...@gmail.com>, 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" <alexandre.fra...@gmail.com>
>>>>> escribió:
>>>>>
>>>>>> On Fri, May 9, 2014 at 5:14 PM, Daniel Mustieles García
>>>>>> <daniel.mustie...@gmail.com> 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

Reply via email to