~chromium-team/chromium-browser/translations-pump

« back to all changes in this revision

Viewing changes to fileformats/xtb.py

  • Committer: Chad MILLER
  • Date: 2015-10-19 18:42:18 UTC
  • Revision ID: chad.miller@canonical.com-20151019184218-benco7vjulfva1lc
.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
__all__ = [ "load_xtb" ]
2
2
 
3
3
import logging
4
 
import xml.etree.ElementTree as ET
 
4
from .utils import OrderedXMLParser, ET
5
5
 
6
6
class UnknownTag(ValueError): pass
7
7
 
9
9
    if "content/third_party/launchpad_translations/" in xtb_filename:
10
10
        xtb_filename = xtb_filename.replace("content/third_party/launchpad_translations/", "third_party/launchpad_translations/")
11
11
    logging.debug("Parsing %s because referenced by %s", xtb_filename, grd_filename)
12
 
    tree = ET.parse(xtb_filename)
 
12
    tree = ET.parse(xtb_filename, parser=OrderedXMLParser())
13
13
    root = tree.getroot()
14
14
    parsextb_walker(lang, txln_info, grd_filename, xtb_filename, root, conditions)
15
15