gtxml: error with tags in Mallard-based PO files
Bug #1052399 reported by
Daniel Mustieles
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyG3T |
In Progress
|
Undecided
|
Ask Hjorth Larsen |
Bug Description
When analyzing some PO files based in Mallard format, gtxml doesn't detect errors in tags. For example, review this bug:
https:/
There were some errors in Spanish and French translations, which broke the compilation of the package, but usin gtxml to review the files, it found no errors.
Mallard is being used widely in GNOME, and we would really happy if we could check Mallard-based PO files with gtxml.
Could you please review it? If I can help you, please let me know.
Best regards
Changed in pyg3t: | |
status: | New → In Progress |
assignee: | nobody → Ask Hjorth Larsen (askhl) |
To post a comment you must log in.
Hi Daniel
Let's see. From the commit log somewhere in the other bug[1]
msgstr ""
"Cette Licence couvre tout manuel ou tout autre travail écrit contenant une "
"notice de copyright autorisant la redistribution selon les termes de cette "
-"Licence. Le mot <:quote-1/> se réfère ci-après à un tel manuel ou travail. "
+"Licence. Le mot <_:quote-1/> se réfère ci-après à un tel manuel ou travail. "
"Toute personne en est par définition concessionnaire et est référencée ci-"
"après par le terme <_:quote-2/>."
So the problem is that "<:quote-1/>" is wrong and "<_:quote-1/>" is correct.
The second one is not illegal xml, but clearly we want to identify it as a mistake in this case. Right now we just check that the msgstr is legal xml which might mean there could still be mistakes. We have the following options:
* We can check that the exact XML structure (all tags/nestings/etc.) is identical between msgid and msgstr. This is very aggressive as there may be legitimate reasons to, say, interchange words with markup in sentences. Thus it will lead to error reports for things that do not contain real errors.
* We can check that no XML tags are used in the msgstr if they are not also used in the msgid. This might be a worthy compromise.
* We can run the entire Mallard compilation which is the ultimate authority, but this is really a bit more than we would like to do
* We could somehow know all legal tags that can be used in Mallard documents. This will probably be a bit more nasty.
Comments, ideas, etc.?
[1] http:// git.gnome. org/browse/ gtk-doc/ commit/ ?id=8c0b13bbc32 c81d20c92a25d4f 8c3688291fcf8b