Support Mallard documents

Bug #540628 reported by Michael Terry
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Mallard is the new GNOME documentation format [1]. Unlike it's predecessor (docbook), it doesn't use .pot files, though it does use .po files. I'm a little curious how that would work with LP translations (I'm assuming it doesn't).

Basically, this is the layout that mallard uses, for a simple help document only translated into French and German:

help/C/index.page
help/de/de.po
help/de/index.page
help/fr/fr.po
help/fr/index.page

Mallard's autotools support (gnome-doc-utils) will generate the .po file from the source .page files.

So if I have a project with this format and I want LP to pull translations from my bzr, LP has to (1) somehow know what all the strings are from the source .page files and (2) pull/push .po files from individual directories, instead from a pooled directory like normal po/ directories. Is there any support for such a layout?

[1] http://projectmallard.org/

Revision history for this message
Данило Шеган (danilo) wrote :

It's the same layout that was used by gnome-doc-utils, and Mallard documentation is still using it for building translations. That relies on xml2po to extract PO/POT files, so nothing is different except the XML schema. It'd be nice to support it, along with native support for other XML formats (like DocBook), but it's a lot of effort and it's not happening anytime soon.

Launchpad doesn't support that layout, unfortunately (so, it didn't work for gnome-doc-utils DocBook documentation either). They are also two separate problems: we can add import queue support for such PO directory layout independently from adding support for the actual XML format extraction.

Changed in rosetta:
status: New → Triaged
importance: Undecided → Low
tags: added: feature
Revision history for this message
Данило Шеган (danilo) wrote :

FWIW, to clarify why it may seem I am taking an authoritative stance on the subject: I am also the primary author of xml2po and it's current maintainer (which is part of gnome-doc-utils, and is a tool used to extract/merge POT/PO files from XML documentation). I've also started a refactoring branch for xml2po on lp:~danilo/+junk/xml2po-ng that I hope will turn into a useable replacement for xml2po soon, and this branch will be easier to integrate into LP.

Revision history for this message
Michael Terry (mterry) wrote :

I agree that gnome-doc-utils with docbook also used the same directory layout. But one difference with mallard is that there is no source pot file.

Revision history for this message
Michael Terry (mterry) wrote :

I worked around this issue by adding the following Makefile.am-foo, and keeping all documentation translations in a 'translations' directory:

DOC_LINGUAS = POT $(REAL_LINGUAS)

$(_DOC_LC_DOCS) : po.stamp

po.stamp: $(wildcard translations/*.po)
 for p in $?; do cp -a $$p $$(basename $$p .po)/; done
 touch $@

update-pot: translations/deja-dup-help.pot
translations/deja-dup-help.pot: POT/POT.po
 cp -a $^ $@

Basically, it does two things: (1) copies po files from the translations directory to the individual language directories that gnome-doc-utils expects them and (2) keeps a fake language around (POT) and copies its generated .po file into the translations directory as a .pot file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.