Anonymous avatar Anonymous committed 8011f8d

prepare for release 0.4.2

Comments (0)

Files changed (20)

+Version 0.4.2 (2009/06/05)
+--------------------------
+    * fixed issue #0007: use the codecs module to open files,
+    * fixed issue #0014: plural forms are not saved correctly in the mo file
+      (thanks lorenzo.gil.sanchez for the patch),
+    * fixed issue #0015: no LICENSE file included in tarball,  
+    * removed Version/Date from README,
+    * added test pot files to MANIFEST.in,
+    * performance improvment in find() method (thanks Thomas !).
+
 Version 0.4.1 (2009/03/04)
 --------------------------
     * fixed issue #0006: plural msgstrs were saved unsorted,

docs/api/api-objects.txt

 polib	polib-module.html
 polib.unescape	polib-module.html#unescape
-polib.mofile	polib-module.html#mofile
+polib.__package__	polib-module.html#__package__
+polib.escape	polib-module.html#escape
 polib.default_encoding	polib-module.html#default_encoding
 polib.pofile	polib-module.html#pofile
 polib.detect_encoding	polib-module.html#detect_encoding
-polib.escape	polib-module.html#escape
+polib.mofile	polib-module.html#mofile
 polib.MOEntry	polib.MOEntry-class.html
 polib.MOEntry.__str__	polib.MOEntry-class.html#__str__
 polib._BaseEntry.__repr__	polib._BaseEntry-class.html#__repr__
 polib._BaseEntry._str_field	polib._BaseEntry-class.html#_str_field
-polib._BaseEntry._decode	polib._BaseEntry-class.html#_decode
 polib._BaseEntry.__init__	polib._BaseEntry-class.html#__init__
 polib.MOFile	polib.MOFile-class.html
 polib.MOFile.translated_entries	polib.MOFile-class.html#translated_entries
 polib._BaseEntry.__repr__	polib._BaseEntry-class.html#__repr__
 polib._BaseEntry._str_field	polib._BaseEntry-class.html#_str_field
 polib.POEntry.translated	polib.POEntry-class.html#translated
-polib._BaseEntry._decode	polib._BaseEntry-class.html#_decode
 polib.POEntry.__init__	polib.POEntry-class.html#__init__
 polib.POFile	polib.POFile-class.html
 polib.POFile.translated_entries	polib.POFile-class.html#translated_entries
 polib._BaseFile.ordered_metadata	polib._BaseFile-class.html#ordered_metadata
 polib._BaseFile.metadata_as_entry	polib._BaseFile-class.html#metadata_as_entry
 polib._BaseFile.to_binary	polib._BaseFile-class.html#to_binary
+polib.POFile.untranslated_entries	polib.POFile-class.html#untranslated_entries
+polib.POFile.fuzzy_entries	polib.POFile-class.html#fuzzy_entries
 polib._BaseFile.find	polib._BaseFile-class.html#find
-polib.POFile.fuzzy_entries	polib.POFile-class.html#fuzzy_entries
 polib.POFile.obsolete_entries	polib.POFile-class.html#obsolete_entries
-polib.POFile.untranslated_entries	polib.POFile-class.html#untranslated_entries
+polib._BaseFile.__init__	polib._BaseFile-class.html#__init__
 polib._BaseFile.save	polib._BaseFile-class.html#save
 polib.POFile.percent_translated	polib.POFile-class.html#percent_translated
 polib.POFile.save_as_mofile	polib.POFile-class.html#save_as_mofile
 polib.POFile.merge	polib.POFile-class.html#merge
 polib._BaseFile.__repr__	polib._BaseFile-class.html#__repr__
-polib._BaseFile.__init__	polib._BaseFile-class.html#__init__
 polib._BaseEntry	polib._BaseEntry-class.html
-polib._BaseEntry._decode	polib._BaseEntry-class.html#_decode
+polib._BaseEntry.__str__	polib._BaseEntry-class.html#__str__
 polib._BaseEntry.__repr__	polib._BaseEntry-class.html#__repr__
 polib._BaseEntry._str_field	polib._BaseEntry-class.html#_str_field
-polib._BaseEntry.__str__	polib._BaseEntry-class.html#__str__
 polib._BaseEntry.__init__	polib._BaseEntry-class.html#__init__
 polib._BaseFile	polib._BaseFile-class.html
 polib._BaseFile.__str__	polib._BaseFile-class.html#__str__

docs/api/class-tree.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Sun Mar  1 13:19:32 2009
+    Generated by Epydoc 3.0.1 on Fri Jun  5 14:32:06 2009
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/api/help.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Sun Mar  1 13:19:32 2009
+    Generated by Epydoc 3.0.1 on Fri Jun  5 14:32:06 2009
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/api/identifier-index.html

 <tr>
 <td width="33%" class="link-index"><a href="polib.POEntry-class.html#__cmp__">__cmp__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib-module.html#__package__">__package__</a><br />
+<span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__str__">__str__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="polib.MOFile-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__repr__">__repr__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html">_BaseEntry</a><br />
 <span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="polib.MOFile-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.MOFile-class.html">MOFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POEntry-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__repr__">__repr__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html">_BaseFile</a><br />
 <span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
-<td width="33%" class="link-index"><a href="polib.POEntry-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib.MOEntry-class.html#__str__">__str__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib.MOEntry-class.html">MOEntry</a>)</span></td>
-<td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#_decode">_decode()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
-</tr>
-<tr>
-<td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__init__">__init__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
-<td width="33%" class="link-index"><a href="polib.POEntry-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._MOFileParser-class.html">_MOFileParser</a><br />
 <span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
-<td width="33%" class="link-index"><a href="polib.POFile-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POEntry-class.html#__str__">__str__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POEntry-class.html">POEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._POFileParser-class.html">_POFileParser</a><br />
 <span class="index-where">(in&nbsp;<a href="polib-module.html">polib</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
-<td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib.POFile-class.html#__str__">__str__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib.POFile-class.html">POFile</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._MOFileParser-class.html#_readbinary">_readbinary()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._MOFileParser-class.html" onclick="show_private();">_MOFileParser</a>)</span></td>
 </tr>
 <tr>
 <td width="33%" class="link-index"><a href="polib._POFileParser-class.html#__init__">__init__()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._POFileParser-class.html" onclick="show_private();">_POFileParser</a>)</span></td>
-<td width="33%" class="link-index"><a href="polib._BaseFile-class.html#__str__">__str__()</a><br />
-<span class="index-where">(in&nbsp;<a href="polib._BaseFile-class.html" onclick="show_private();">_BaseFile</a>)</span></td>
+<td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#__str__">__str__()</a><br />
+<span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 <td width="33%" class="link-index"><a href="polib._BaseEntry-class.html#_str_field">_str_field()</a><br />
 <span class="index-where">(in&nbsp;<a href="polib._BaseEntry-class.html" onclick="show_private();">_BaseEntry</a>)</span></td>
 </tr>
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Sun Mar  1 13:19:32 2009
+    Generated by Epydoc 3.0.1 on Fri Jun  5 14:32:06 2009
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/api/module-tree.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Sun Mar  1 13:19:32 2009
+    Generated by Epydoc 3.0.1 on Fri Jun  5 14:32:06 2009
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/api/polib-module.html

 
 <hr />
 <div class="fields">      <p><strong>Version:</strong>
-        0.4.1
+        0.4.2
       </p>
       <p><strong>Author:</strong>
         David JEAN LOUIS &lt;izimobil@gmail.com&gt;
     </td><td class="summary">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
-          <td><span class="summary-sig"><a href="polib-module.html#detect_encoding" class="summary-sig-name">detect_encoding</a>(<span class="summary-sig-arg">fpath</span>)</span><br />
+          <td><span class="summary-sig"><a href="polib-module.html#detect_encoding" class="summary-sig-name">detect_encoding</a>(<span class="summary-sig-arg">fpath</span>,
+        <span class="summary-sig-arg">binary_mode</span>=<span class="summary-sig-default">False</span>)</span><br />
       Try to detect the encoding used by the file *fpath*.</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="polib-pysrc.html#detect_encoding">source&nbsp;code</a></span>
         <a name="default_encoding"></a><span class="summary-name">default_encoding</span> = <code title="'utf-8'"><code class="variable-quote">'</code><code class="variable-string">utf-8</code><code class="variable-quote">'</code></code>
     </td>
   </tr>
+<tr class="private">
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">&nbsp;</span>
+    </td><td class="summary">
+        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code><br />
+      hash(x)
+    </td>
+  </tr>
 </table>
 <!-- ==================== FUNCTION DETAILS ==================== -->
 <a name="section-FunctionDetails"></a>
 <tr><td>
   <table width="100%" cellpadding="0" cellspacing="0" border="0">
   <tr valign="top"><td>
-  <h3 class="epydoc"><span class="sig"><span class="sig-name">detect_encoding</span>(<span class="sig-arg">fpath</span>)</span>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">detect_encoding</span>(<span class="sig-arg">fpath</span>,
+        <span class="sig-arg">binary_mode</span>=<span class="sig-default">False</span>)</span>
   </h3>
   </td><td align="right" valign="top"
     ><span class="codelink"><a href="polib-pysrc.html#detect_encoding">source&nbsp;code</a></span>&nbsp;
 <span class="py-output">utf-8</span>
 <span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_utf8.po'</span>))
 <span class="py-output">UTF-8</span>
-<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_utf8.mo'</span>))
+<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_utf8.mo'</span>, True))
 <span class="py-output">UTF-8</span>
 <span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_iso-8859-15.po'</span>))
 <span class="py-output">ISO_8859-15</span>
-<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_iso-8859-15.mo'</span>))
+<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span>(detect_encoding(<span class="py-string">'tests/test_iso-8859-15.mo'</span>, True))
 <span class="py-output">ISO_8859-15</span></pre>
   <dl class="fields">
   </dl>
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Sun Mar  1 13:19:32 2009
+    Generated by Epydoc 3.0.1 on Fri Jun  5 14:32:06 2009
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/api/polib-pysrc.html

 <h1 class="epydoc">Source Code for <a href="polib-module.html">Module polib</a></h1>
 <pre class="py-src">
 <a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
-<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
-<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
-<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># License: MIT (see LICENSE file provided)</tt> </tt>
-<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:</tt> </tt>
-<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
+<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-comment"># -*- coding: utf-8 -*-</tt> </tt>
+<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
+<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"><tt class="py-comment"># License: MIT (see LICENSE file provided)</tt> </tt>
+<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-comment"># vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:</tt> </tt>
+<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"> </tt>
 <a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 <a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-docstring">**polib** allows you to manipulate, create, modify gettext files (pot, po</tt> </tt>
 <a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line"><tt class="py-docstring">and mo files).  You can load existing files, iterate through it's entries,</tt> </tt>
 <a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 <a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line"> </tt>
 <a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line"><tt class="py-name">__author__</tt>    <tt class="py-op">=</tt> <tt class="py-string">'David JEAN LOUIS &lt;izimobil@gmail.com&gt;'</tt> </tt>
-<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt class="py-name">__version__</tt>   <tt class="py-op">=</tt> <tt class="py-string">'0.4.1'</tt> </tt>
+<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line"><tt class="py-name">__version__</tt>   <tt class="py-op">=</tt> <tt class="py-string">'0.4.2'</tt> </tt>
 <a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line"><tt class="py-name">__all__</tt>       <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'pofile'</tt><tt class="py-op">,</tt> <tt class="py-string">'POFile'</tt><tt class="py-op">,</tt> <tt class="py-string">'POEntry'</tt><tt class="py-op">,</tt> <tt class="py-string">'mofile'</tt><tt class="py-op">,</tt> <tt class="py-string">'MOFile'</tt><tt class="py-op">,</tt> <tt class="py-string">'MOEntry'</tt><tt class="py-op">,</tt> </tt>
 <a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">                 <tt class="py-string">'detect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-string">'escape'</tt><tt class="py-op">,</tt> <tt class="py-string">'unescape'</tt><tt class="py-op">]</tt> </tt>
 <a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line"> </tt>
-<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
-<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">textwrap</tt> </tt>
-<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">warnings</tt> </tt>
+<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">codecs</tt> </tt>
+<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
+<a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">textwrap</tt> </tt>
 <a name="L44"></a><tt class="py-lineno">  44</tt>  <tt class="py-line"> </tt>
 <a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable polib.default_encoding=polib-module.html#default_encoding"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-0', 'default_encoding', 'link-0');">default_encoding</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'utf-8'</tt> </tt>
 <a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line"> </tt>
 <a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line"><tt class="py-comment"># function pofile() {{{</tt> </tt>
-<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
+<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line"> </tt>
 <a name="pofile"></a><div id="pofile-def"><a name="L49"></a><tt class="py-lineno">  49</tt> <a class="py-toggle" href="#" id="pofile-toggle" onclick="return toggle('pofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#pofile">pofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 </div><div id="pofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="pofile-expanded"><a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
 <a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the po/pot file *fpath* and return</tt> </tt>
 <a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-1" class="py-name" targets="Function polib.detect_encoding()=polib-module.html#detect_encoding"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-1', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
 <a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
 <a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'encoding'</tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-2', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt> </tt>
-<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name" targets="Class polib._POFileParser=polib._POFileParser-class.html"><a title="polib._POFileParser" class="py-name" href="#" onclick="return doclink('link-3', '_POFileParser', 'link-3');">_POFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
+<a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name" targets="Class polib._POFileParser=polib._POFileParser-class.html"><a title="polib._POFileParser" class="py-name" href="#" onclick="return doclink('link-3', '_POFileParser', 'link-3');">_POFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-name">enc</tt><tt class="py-op">)</tt> </tt>
 <a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line">    <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method polib._MOFileParser.parse()=polib._MOFileParser-class.html#parse,Method polib._POFileParser.parse()=polib._POFileParser-class.html#parse"><a title="polib._MOFileParser.parse
 polib._POFileParser.parse" class="py-name" href="#" onclick="return doclink('link-4', 'parse', 'link-4');">parse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
 <a name="L92"></a><tt class="py-lineno">  92</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'wrapwidth'</tt><tt class="py-op">,</tt> <tt class="py-number">78</tt><tt class="py-op">)</tt> </tt>
-<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt>  <tt class="py-op">=</tt> <tt class="py-name">enc</tt> </tt>
-<a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
-</div><a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"> </tt>
-<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># function mofile() {{{</tt> </tt>
-<a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="mofile"></a><div id="mofile-def"><a name="L99"></a><tt class="py-lineno">  99</tt> <a class="py-toggle" href="#" id="mofile-toggle" onclick="return toggle('mofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#mofile">mofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="mofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="mofile-expanded"><a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the mo file *fpath* and return</tt> </tt>
-<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line"><tt class="py-docstring">    a MOFile instance.</tt> </tt>
-<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword arguments**:</tt> </tt>
-<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the mo file to parse</tt> </tt>
-<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line"><tt class="py-docstring">      - *wrapwidth*: integer, the wrap width, only useful when -w option was</tt> </tt>
-<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"><tt class="py-docstring">        passed to xgettext to generate the po file that was used to format</tt> </tt>
-<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring">        the mo file (optional, default to 78)</tt> </tt>
-<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring">      - *autodetect_encoding*: boolean, if set to False the function will</tt> </tt>
-<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">        not try to detect the po file encoding (optional, default to True)</tt> </tt>
-<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"><tt class="py-docstring">      - *encoding*: string, an encoding, only relevant if autodetect_encoding</tt> </tt>
-<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"><tt class="py-docstring">        is set to False</tt> </tt>
-<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
-<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo = polib.mofile('tests/test_utf8.mo')</tt> </tt>
-<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo #doctest: +ELLIPSIS</tt> </tt>
-<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;MOFile instance at ...&gt;</tt> </tt>
-<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import os, tempfile</tt> </tt>
-<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; for fname in ['test_iso-8859-15.mo', 'test_utf8.mo']:</tt> </tt>
-<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo = polib.mofile('tests/'+fname)</tt> </tt>
-<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"><tt class="py-docstring">    ...     tmpf = tempfile.NamedTemporaryFile().name</tt> </tt>
-<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo.save(tmpf)</tt> </tt>
-<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"><tt class="py-docstring">    ...     try:</tt> </tt>
-<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"><tt class="py-docstring">    ...         new_mo = polib.mofile(tmpf)</tt> </tt>
-<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"><tt class="py-docstring">    ...         for old, new in zip(orig_mo, new_mo):</tt> </tt>
-<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgid != new.msgid:</tt> </tt>
-<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgstr</tt> </tt>
-<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgstr</tt> </tt>
-<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line"><tt class="py-docstring">    ...     finally:</tt> </tt>
-<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"><tt class="py-docstring">    ...         os.unlink(tmpf)</tt> </tt>
-<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'autodetect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
-<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-5', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'encoding'</tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-6', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt> </tt>
-<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name" targets="Class polib._MOFileParser=polib._MOFileParser-class.html"><a title="polib._MOFileParser" class="py-name" href="#" onclick="return doclink('link-7', '_MOFileParser', 'link-7');">_MOFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">    <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="polib._MOFileParser.parse
+<a name="L93"></a><tt class="py-lineno">  93</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
+</div><a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line"> </tt>
+<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line"><tt class="py-comment"># function mofile() {{{</tt> </tt>
+<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line"> </tt>
+<a name="mofile"></a><div id="mofile-def"><a name="L98"></a><tt class="py-lineno">  98</tt> <a class="py-toggle" href="#" id="mofile-toggle" onclick="return toggle('mofile');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#mofile">mofile</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="mofile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="mofile-expanded"><a name="L99"></a><tt class="py-lineno">  99</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line"><tt class="py-docstring">    Convenience function that parse the mo file *fpath* and return</tt> </tt>
+<a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"><tt class="py-docstring">    a MOFile instance.</tt> </tt>
+<a name="L102"></a><tt class="py-lineno"> 102</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword arguments**:</tt> </tt>
+<a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the mo file to parse</tt> </tt>
+<a name="L105"></a><tt class="py-lineno"> 105</tt>  <tt class="py-line"><tt class="py-docstring">      - *wrapwidth*: integer, the wrap width, only useful when -w option was</tt> </tt>
+<a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line"><tt class="py-docstring">        passed to xgettext to generate the po file that was used to format</tt> </tt>
+<a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"><tt class="py-docstring">        the mo file (optional, default to 78)</tt> </tt>
+<a name="L108"></a><tt class="py-lineno"> 108</tt>  <tt class="py-line"><tt class="py-docstring">      - *autodetect_encoding*: boolean, if set to False the function will</tt> </tt>
+<a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line"><tt class="py-docstring">        not try to detect the po file encoding (optional, default to True)</tt> </tt>
+<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line"><tt class="py-docstring">      - *encoding*: string, an encoding, only relevant if autodetect_encoding</tt> </tt>
+<a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"><tt class="py-docstring">        is set to False</tt> </tt>
+<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L113"></a><tt class="py-lineno"> 113</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
+<a name="L114"></a><tt class="py-lineno"> 114</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo = polib.mofile('tests/test_utf8.mo')</tt> </tt>
+<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo #doctest: +ELLIPSIS</tt> </tt>
+<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;MOFile instance at ...&gt;</tt> </tt>
+<a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; import os, tempfile</tt> </tt>
+<a name="L120"></a><tt class="py-lineno"> 120</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; for fname in ['test_iso-8859-15.mo', 'test_utf8.mo']:</tt> </tt>
+<a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo = polib.mofile('tests/'+fname)</tt> </tt>
+<a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"><tt class="py-docstring">    ...     tmpf = tempfile.NamedTemporaryFile().name</tt> </tt>
+<a name="L123"></a><tt class="py-lineno"> 123</tt>  <tt class="py-line"><tt class="py-docstring">    ...     orig_mo.save(tmpf)</tt> </tt>
+<a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line"><tt class="py-docstring">    ...     try:</tt> </tt>
+<a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"><tt class="py-docstring">    ...         new_mo = polib.mofile(tmpf)</tt> </tt>
+<a name="L126"></a><tt class="py-lineno"> 126</tt>  <tt class="py-line"><tt class="py-docstring">    ...         for old, new in zip(orig_mo, new_mo):</tt> </tt>
+<a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line"><tt class="py-docstring">    ...             if old.msgid != new.msgid:</tt> </tt>
+<a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 old.msgstr</tt> </tt>
+<a name="L129"></a><tt class="py-lineno"> 129</tt>  <tt class="py-line"><tt class="py-docstring">    ...                 new.msgstr</tt> </tt>
+<a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line"><tt class="py-docstring">    ...     finally:</tt> </tt>
+<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line"><tt class="py-docstring">    ...         os.unlink(tmpf)</tt> </tt>
+<a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L133"></a><tt class="py-lineno"> 133</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'autodetect_encoding'</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
+<a name="L134"></a><tt class="py-lineno"> 134</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="polib.detect_encoding" class="py-name" href="#" onclick="return doclink('link-5', 'detect_encoding', 'link-1');">detect_encoding</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
+<a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">        <tt class="py-name">enc</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'encoding'</tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-6', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt> </tt>
+<a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt id="link-7" class="py-name" targets="Class polib._MOFileParser=polib._MOFileParser-class.html"><a title="polib._MOFileParser" class="py-name" href="#" onclick="return doclink('link-7', '_MOFileParser', 'link-7');">_MOFileParser</a></tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-name">enc</tt><tt class="py-op">)</tt> </tt>
+<a name="L138"></a><tt class="py-lineno"> 138</tt>  <tt class="py-line">    <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="polib._MOFileParser.parse
 polib._POFileParser.parse" class="py-name" href="#" onclick="return doclink('link-8', 'parse', 'link-4');">parse</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'wrapwidth'</tt><tt class="py-op">,</tt> <tt class="py-number">78</tt><tt class="py-op">)</tt> </tt>
-<a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt class="py-name">enc</tt> </tt>
-<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
-</div><a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"> </tt>
-<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L145"></a><tt class="py-lineno"> 145</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># function detect_encoding() {{{</tt> </tt>
-<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="detect_encoding"></a><div id="detect_encoding-def"><a name="L147"></a><tt class="py-lineno"> 147</tt> <a class="py-toggle" href="#" id="detect_encoding-toggle" onclick="return toggle('detect_encoding');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#detect_encoding">detect_encoding</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="detect_encoding-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="detect_encoding-expanded"><a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-docstring">    Try to detect the encoding used by the file *fpath*. The function will</tt> </tt>
-<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-docstring">    return polib default *encoding* if it's unable to detect it.</tt> </tt>
-<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword argument**:</tt> </tt>
-<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the mo file to parse.</tt> </tt>
+<a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">    <tt class="py-name">instance</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'wrapwidth'</tt><tt class="py-op">,</tt> <tt class="py-number">78</tt><tt class="py-op">)</tt> </tt>
+<a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
+</div><a name="L141"></a><tt class="py-lineno"> 141</tt>  <tt class="py-line"> </tt>
+<a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"><tt class="py-comment"># function detect_encoding() {{{</tt> </tt>
+<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"> </tt>
+<a name="detect_encoding"></a><div id="detect_encoding-def"><a name="L145"></a><tt class="py-lineno"> 145</tt> <a class="py-toggle" href="#" id="detect_encoding-toggle" onclick="return toggle('detect_encoding');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#detect_encoding">detect_encoding</a><tt class="py-op">(</tt><tt class="py-param">fpath</tt><tt class="py-op">,</tt> <tt class="py-param">binary_mode</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="detect_encoding-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="detect_encoding-expanded"><a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line"><tt class="py-docstring">    Try to detect the encoding used by the file *fpath*. The function will</tt> </tt>
+<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"><tt class="py-docstring">    return polib default *encoding* if it's unable to detect it.</tt> </tt>
+<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-docstring">    **Keyword argument**:</tt> </tt>
+<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring">      - *fpath*: string, full or relative path to the mo file to parse.</tt> </tt>
+<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">    **Examples**:</tt> </tt>
 <a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring">    **Examples**:</tt> </tt>
-<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_noencoding.po'))</tt> </tt>
-<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring">    utf-8</tt> </tt>
-<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_utf8.po'))</tt> </tt>
+<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_noencoding.po'))</tt> </tt>
+<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">    utf-8</tt> </tt>
+<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_utf8.po'))</tt> </tt>
+<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring">    UTF-8</tt> </tt>
+<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_utf8.mo', True))</tt> </tt>
 <a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line"><tt class="py-docstring">    UTF-8</tt> </tt>
-<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_utf8.mo'))</tt> </tt>
-<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line"><tt class="py-docstring">    UTF-8</tt> </tt>
-<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_iso-8859-15.po'))</tt> </tt>
+<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_iso-8859-15.po'))</tt> </tt>
+<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line"><tt class="py-docstring">    ISO_8859-15</tt> </tt>
+<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_iso-8859-15.mo', True))</tt> </tt>
 <a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line"><tt class="py-docstring">    ISO_8859-15</tt> </tt>
-<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(detect_encoding('tests/test_iso-8859-15.mo'))</tt> </tt>
-<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line"><tt class="py-docstring">    ISO_8859-15</tt> </tt>
-<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
-<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line">    <tt class="py-name">rx</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'"?Content-Type:.+? charset=([\w_\-:\.]+)'</tt><tt class="py-op">)</tt> </tt>
-<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line">    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">)</tt> </tt>
-<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">l</tt> <tt class="py-keyword">in</tt> <tt class="py-name">f</tt><tt class="py-op">:</tt> </tt>
-<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line">        <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">rx</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-name">l</tt><tt class="py-op">)</tt> </tt>
-<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
-<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line">    <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-9" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-9', 'default_encoding', 'link-0');">default_encoding</a></tt> </tt>
-</div><a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"> </tt>
-<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># function escape() {{{</tt> </tt>
-<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="escape"></a><div id="escape-def"><a name="L182"></a><tt class="py-lineno"> 182</tt> <a class="py-toggle" href="#" id="escape-toggle" onclick="return toggle('escape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#escape">escape</a><tt class="py-op">(</tt><tt class="py-param">st</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="escape-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="escape-expanded"><a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line"><tt class="py-docstring">    Escape special chars and return the given string *st*.</tt> </tt>
-<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"><tt class="py-docstring">    **Examples**:</tt> </tt>
+<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">re</tt> </tt>
+<a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line">    <tt class="py-name">rx</tt> <tt class="py-op">=</tt> <tt class="py-name">re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'"?Content-Type:.+? charset=([\w_\-:\.]+)'</tt><tt class="py-op">)</tt> </tt>
+<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">binary_mode</tt><tt class="py-op">:</tt> </tt>
+<a name="L169"></a><tt class="py-lineno"> 169</tt>  <tt class="py-line">        <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-string">'rb'</tt> </tt>
+<a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line">        <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-string">'r'</tt> </tt>
+<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line">    <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt>
+<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">l</tt> <tt class="py-keyword">in</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">readlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line">        <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">rx</tt><tt class="py-op">.</tt><tt class="py-name">search</tt><tt class="py-op">(</tt><tt class="py-name">l</tt><tt class="py-op">)</tt> </tt>
+<a name="L175"></a><tt class="py-lineno"> 175</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">:</tt> </tt>
+<a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line">            <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line">    <tt class="py-name">f</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-9" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-9', 'default_encoding', 'link-0');">default_encoding</a></tt> </tt>
+</div><a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line"> </tt>
+<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line"><tt class="py-comment"># function escape() {{{</tt> </tt>
+<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line"> </tt>
+<a name="escape"></a><div id="escape-def"><a name="L184"></a><tt class="py-lineno"> 184</tt> <a class="py-toggle" href="#" id="escape-toggle" onclick="return toggle('escape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#escape">escape</a><tt class="py-op">(</tt><tt class="py-param">st</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="escape-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="escape-expanded"><a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line"><tt class="py-docstring">    Escape special chars and return the given string *st*.</tt> </tt>
 <a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; escape('\\t and \\n and \\r and " and \\\\')</tt> </tt>
-<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"><tt class="py-docstring">    '\\\\t and \\\\n and \\\\r and \\\\" and \\\\\\\\'</tt> </tt>
-<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\\'</tt><tt class="py-op">)</tt> </tt>
-<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\t'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\t'</tt><tt class="py-op">)</tt> </tt>
-<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\r'</tt><tt class="py-op">)</tt> </tt>
-<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\n'</tt><tt class="py-op">)</tt> </tt>
-<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\"'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\"'</tt><tt class="py-op">)</tt> </tt>
-<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">st</tt> </tt>
-</div><a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line"> </tt>
-<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># function unescape() {{{</tt> </tt>
-<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="unescape"></a><div id="unescape-def"><a name="L201"></a><tt class="py-lineno"> 201</tt> <a class="py-toggle" href="#" id="unescape-toggle" onclick="return toggle('unescape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#unescape">unescape</a><tt class="py-op">(</tt><tt class="py-param">st</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="unescape-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="unescape-expanded"><a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line"><tt class="py-docstring">    Unescape special chars and return the given string *st*.</tt> </tt>
-<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"><tt class="py-docstring">    **Examples**:</tt> </tt>
+<a name="L188"></a><tt class="py-lineno"> 188</tt>  <tt class="py-line"><tt class="py-docstring">    **Examples**:</tt> </tt>
+<a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; escape('\\t and \\n and \\r and " and \\\\')</tt> </tt>
+<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line"><tt class="py-docstring">    '\\\\t and \\\\n and \\\\r and \\\\" and \\\\\\\\'</tt> </tt>
+<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\\'</tt><tt class="py-op">)</tt> </tt>
+<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\t'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\t'</tt><tt class="py-op">)</tt> </tt>
+<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\r'</tt><tt class="py-op">)</tt> </tt>
+<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\n'</tt><tt class="py-op">)</tt> </tt>
+<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\"'</tt><tt class="py-op">,</tt> <tt class="py-string">r'\"'</tt><tt class="py-op">)</tt> </tt>
+<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">st</tt> </tt>
+</div><a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line"> </tt>
+<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line"><tt class="py-comment"># function unescape() {{{</tt> </tt>
+<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line"> </tt>
+<a name="unescape"></a><div id="unescape-def"><a name="L203"></a><tt class="py-lineno"> 203</tt> <a class="py-toggle" href="#" id="unescape-toggle" onclick="return toggle('unescape');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="polib-module.html#unescape">unescape</a><tt class="py-op">(</tt><tt class="py-param">st</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="unescape-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="unescape-expanded"><a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line"><tt class="py-docstring">    Unescape special chars and return the given string *st*.</tt> </tt>
 <a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; unescape('\\\\t and \\\\n and \\\\r and \\\\" and \\\\\\\\')</tt> </tt>
-<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line"><tt class="py-docstring">    '\\t and \\n and \\r and " and \\\\'</tt> </tt>
-<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\"'</tt><tt class="py-op">,</tt> <tt class="py-string">'"'</tt><tt class="py-op">)</tt> </tt>
-<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
-<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">'\r'</tt><tt class="py-op">)</tt> </tt>
-<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\t'</tt><tt class="py-op">,</tt> <tt class="py-string">'\t'</tt><tt class="py-op">)</tt> </tt>
-<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\'</tt><tt class="py-op">)</tt> </tt>
-<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">st</tt> </tt>
-</div><a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line"> </tt>
-<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># class _BaseFile {{{</tt> </tt>
-<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="_BaseFile"></a><div id="_BaseFile-def"><a name="L220"></a><tt class="py-lineno"> 220</tt> <a class="py-toggle" href="#" id="_BaseFile-toggle" onclick="return toggle('_BaseFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="polib._BaseFile-class.html">_BaseFile</a><tt class="py-op">(</tt><tt class="py-base-class">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_BaseFile-expanded"><a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line"><tt class="py-docstring">    Common parent class for POFile and MOFile classes.</tt> </tt>
-<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line"><tt class="py-docstring">    This class must **not** be instanciated directly.</tt> </tt>
-<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.__init__"></a><div id="_BaseFile.__init__-def"><a name="L226"></a><tt class="py-lineno"> 226</tt> <a class="py-toggle" href="#" id="_BaseFile.__init__-toggle" onclick="return toggle('_BaseFile.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">wrapwidth</tt><tt class="py-op">=</tt><tt class="py-number">78</tt><tt class="py-op">,</tt> <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt id="link-10" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-10', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.__init__-expanded"><a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line"><tt class="py-docstring">        Constructor.</tt> </tt>
-<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
-<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line"><tt class="py-docstring">          - *fpath*: string, path to po or mo file</tt> </tt>
-<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"><tt class="py-docstring">          - *wrapwidth*: integer, the wrap width, only useful when -w option</tt> </tt>
-<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line"><tt class="py-docstring">            was passed to xgettext to generate the po file that was used to</tt> </tt>
-<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"><tt class="py-docstring">            format the mo file, default to 78 (optional).</tt> </tt>
-<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line">        <tt class="py-name">list</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method polib.MOFile.__init__()=polib.MOFile-class.html#__init__,Method polib.POEntry.__init__()=polib.POEntry-class.html#__init__,Method polib._BaseEntry.__init__()=polib._BaseEntry-class.html#__init__,Method polib._BaseFile.__init__()=polib._BaseFile-class.html#__init__,Method polib._MOFileParser.__init__()=polib._MOFileParser-class.html#__init__,Method polib._POFileParser.__init__()=polib._POFileParser-class.html#__init__"><a title="polib.MOFile.__init__
+<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line"><tt class="py-docstring">    **Examples**:</tt> </tt>
+<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; unescape('\\\\t and \\\\n and \\\\r and \\\\" and \\\\\\\\')</tt> </tt>
+<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line"><tt class="py-docstring">    '\\t and \\n and \\r and " and \\\\'</tt> </tt>
+<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\"'</tt><tt class="py-op">,</tt> <tt class="py-string">'"'</tt><tt class="py-op">)</tt> </tt>
+<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
+<a name="L214"></a><tt class="py-lineno"> 214</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">'\r'</tt><tt class="py-op">)</tt> </tt>
+<a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\t'</tt><tt class="py-op">,</tt> <tt class="py-string">'\t'</tt><tt class="py-op">)</tt> </tt>
+<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">    <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">r'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\'</tt><tt class="py-op">)</tt> </tt>
+<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">st</tt> </tt>
+</div><a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line"> </tt>
+<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line"><tt class="py-comment"># class _BaseFile {{{</tt> </tt>
+<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile"></a><div id="_BaseFile-def"><a name="L222"></a><tt class="py-lineno"> 222</tt> <a class="py-toggle" href="#" id="_BaseFile-toggle" onclick="return toggle('_BaseFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="polib._BaseFile-class.html">_BaseFile</a><tt class="py-op">(</tt><tt class="py-base-class">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="_BaseFile-expanded"><a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line"><tt class="py-docstring">    Common parent class for POFile and MOFile classes.</tt> </tt>
+<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line"><tt class="py-docstring">    This class must **not** be instanciated directly.</tt> </tt>
+<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.__init__"></a><div id="_BaseFile.__init__-def"><a name="L228"></a><tt class="py-lineno"> 228</tt> <a class="py-toggle" href="#" id="_BaseFile.__init__-toggle" onclick="return toggle('_BaseFile.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">wrapwidth</tt><tt class="py-op">=</tt><tt class="py-number">78</tt><tt class="py-op">,</tt> <tt class="py-param">encoding</tt><tt class="py-op">=</tt><tt id="link-10" class="py-name"><a title="polib.default_encoding" class="py-name" href="#" onclick="return doclink('link-10', 'default_encoding', 'link-0');">default_encoding</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.__init__-expanded"><a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line"><tt class="py-docstring">        Constructor.</tt> </tt>
+<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
+<a name="L233"></a><tt class="py-lineno"> 233</tt>  <tt class="py-line"><tt class="py-docstring">          - *fpath*: string, path to po or mo file</tt> </tt>
+<a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line"><tt class="py-docstring">          - *wrapwidth*: integer, the wrap width, only useful when -w option</tt> </tt>
+<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line"><tt class="py-docstring">            was passed to xgettext to generate the po file that was used to</tt> </tt>
+<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line"><tt class="py-docstring">            format the mo file, default to 78 (optional).</tt> </tt>
+<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line">        <tt class="py-name">list</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method polib.MOFile.__init__()=polib.MOFile-class.html#__init__,Method polib.POEntry.__init__()=polib.POEntry-class.html#__init__,Method polib._BaseEntry.__init__()=polib._BaseEntry-class.html#__init__,Method polib._BaseFile.__init__()=polib._BaseFile-class.html#__init__,Method polib._MOFileParser.__init__()=polib._MOFileParser-class.html#__init__,Method polib._POFileParser.__init__()=polib._POFileParser-class.html#__init__"><a title="polib.MOFile.__init__
 polib.POEntry.__init__
 polib._BaseEntry.__init__
 polib._BaseFile.__init__
 polib._MOFileParser.__init__
 polib._POFileParser.__init__" class="py-name" href="#" onclick="return doclink('link-11', '__init__', 'link-11');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
-<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line">        <tt class="py-comment"># the opened file handle</tt> </tt>
-<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fpath</tt> <tt class="py-op">=</tt> <tt class="py-name">fpath</tt> </tt>
-<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">        <tt class="py-comment"># the width at which lines should be wrapped</tt> </tt>
-<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">wrapwidth</tt> </tt>
-<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">        <tt class="py-comment"># the file encoding</tt> </tt>
-<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt class="py-name">encoding</tt> </tt>
-<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">        <tt class="py-comment"># header</tt> </tt>
-<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
-<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">        <tt class="py-comment"># both po and mo files have metadata</tt> </tt>
-<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metadata</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
-<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metadata_is_fuzzy</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-</div><a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.__str__"></a><div id="_BaseFile.__str__-def"><a name="L249"></a><tt class="py-lineno"> 249</tt> <a class="py-toggle" href="#" id="_BaseFile.__str__-toggle" onclick="return toggle('_BaseFile.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.__str__-expanded"><a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">        <tt class="py-docstring">"""String representation of the file."""</tt> </tt>
-<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">        <tt class="py-name">entries</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method polib._BaseFile.metadata_as_entry()=polib._BaseFile-class.html#metadata_as_entry"><a title="polib._BaseFile.metadata_as_entry" class="py-name" href="#" onclick="return doclink('link-12', 'metadata_as_entry', 'link-12');">metadata_as_entry</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> \ </tt>
-<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line">                  <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
-<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">entries</tt><tt class="py-op">:</tt> </tt>
-<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">            <tt class="py-name">ret</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method polib.MOEntry.__str__()=polib.MOEntry-class.html#__str__,Method polib.POEntry.__str__()=polib.POEntry-class.html#__str__,Method polib.POFile.__str__()=polib.POFile-class.html#__str__,Method polib._BaseEntry.__str__()=polib._BaseEntry-class.html#__str__,Method polib._BaseFile.__str__()=polib._BaseFile-class.html#__str__"><a title="polib.MOEntry.__str__
+<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line">        <tt class="py-comment"># the opened file handle</tt> </tt>
+<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fpath</tt> <tt class="py-op">=</tt> <tt class="py-name">fpath</tt> </tt>
+<a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line">        <tt class="py-comment"># the width at which lines should be wrapped</tt> </tt>
+<a name="L242"></a><tt class="py-lineno"> 242</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt> <tt class="py-op">=</tt> <tt class="py-name">wrapwidth</tt> </tt>
+<a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">        <tt class="py-comment"># the file encoding</tt> </tt>
+<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt> <tt class="py-op">=</tt> <tt class="py-name">encoding</tt> </tt>
+<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line">        <tt class="py-comment"># header</tt> </tt>
+<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
+<a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line">        <tt class="py-comment"># both po and mo files have metadata</tt> </tt>
+<a name="L248"></a><tt class="py-lineno"> 248</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metadata</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
+<a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metadata_is_fuzzy</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+</div><a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.__str__"></a><div id="_BaseFile.__str__-def"><a name="L251"></a><tt class="py-lineno"> 251</tt> <a class="py-toggle" href="#" id="_BaseFile.__str__-toggle" onclick="return toggle('_BaseFile.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.__str__-expanded"><a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line">        <tt class="py-docstring">"""String representation of the file."""</tt> </tt>
+<a name="L253"></a><tt class="py-lineno"> 253</tt>  <tt class="py-line">        <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">        <tt class="py-name">entries</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method polib._BaseFile.metadata_as_entry()=polib._BaseFile-class.html#metadata_as_entry"><a title="polib._BaseFile.metadata_as_entry" class="py-name" href="#" onclick="return doclink('link-12', 'metadata_as_entry', 'link-12');">metadata_as_entry</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> \ </tt>
+<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line">                  <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
+<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">entries</tt><tt class="py-op">:</tt> </tt>
+<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">            <tt class="py-name">ret</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method polib.MOEntry.__str__()=polib.MOEntry-class.html#__str__,Method polib.POEntry.__str__()=polib.POEntry-class.html#__str__,Method polib.POFile.__str__()=polib.POFile-class.html#__str__,Method polib._BaseEntry.__str__()=polib._BaseEntry-class.html#__str__,Method polib._BaseFile.__str__()=polib._BaseFile-class.html#__str__"><a title="polib.MOEntry.__str__
 polib.POEntry.__str__
 polib.POFile.__str__
 polib._BaseEntry.__str__
 polib._BaseFile.__str__" class="py-name" href="#" onclick="return doclink('link-13', '__str__', 'link-13');">__str__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method polib.MOFile.obsolete_entries()=polib.MOFile-class.html#obsolete_entries,Method polib.POFile.obsolete_entries()=polib.POFile-class.html#obsolete_entries"><a title="polib.MOFile.obsolete_entries
+<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method polib.MOFile.obsolete_entries()=polib.MOFile-class.html#obsolete_entries,Method polib.POFile.obsolete_entries()=polib.POFile-class.html#obsolete_entries"><a title="polib.MOFile.obsolete_entries
 polib.POFile.obsolete_entries" class="py-name" href="#" onclick="return doclink('link-14', 'obsolete_entries', 'link-14');">obsolete_entries</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">            <tt class="py-name">ret</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="polib.MOEntry.__str__
+<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line">            <tt class="py-name">ret</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="polib.MOEntry.__str__
 polib.POEntry.__str__
 polib.POFile.__str__
 polib._BaseEntry.__str__
 polib._BaseFile.__str__" class="py-name" href="#" onclick="return doclink('link-15', '__str__', 'link-13');">__str__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">wrapwidth</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">ret</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.__repr__"></a><div id="_BaseFile.__repr__-def"><a name="L260"></a><tt class="py-lineno"> 260</tt> <a class="py-toggle" href="#" id="_BaseFile.__repr__-toggle" onclick="return toggle('_BaseFile.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.__repr__-expanded"><a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the official string representation of the object."""</tt> </tt>
-<a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;%s instance at %x&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.metadata_as_entry"></a><div id="_BaseFile.metadata_as_entry-def"><a name="L264"></a><tt class="py-lineno"> 264</tt> <a class="py-toggle" href="#" id="_BaseFile.metadata_as_entry-toggle" onclick="return toggle('_BaseFile.metadata_as_entry');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#metadata_as_entry">metadata_as_entry</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.metadata_as_entry-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.metadata_as_entry-expanded"><a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the metadata as an entry"""</tt> </tt>
-<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line">        <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name" targets="Class polib.POEntry=polib.POEntry-class.html"><a title="polib.POEntry" class="py-name" href="#" onclick="return doclink('link-16', 'POEntry', 'link-16');">POEntry</a></tt><tt class="py-op">(</tt><tt class="py-name">msgid</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
-<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">        <tt class="py-name">mdata</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method polib._BaseFile.ordered_metadata()=polib._BaseFile-class.html#ordered_metadata"><a title="polib._BaseFile.ordered_metadata" class="py-name" href="#" onclick="return doclink('link-17', 'ordered_metadata', 'link-17');">ordered_metadata</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mdata</tt><tt class="py-op">:</tt> </tt>
-<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">            <tt class="py-name">strs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mdata</tt><tt class="py-op">:</tt> </tt>
-<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">                <tt class="py-comment"># Strip whitespace off each line in a multi-line entry</tt> </tt>
-<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">v</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">                <tt class="py-name">strs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'%s: %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">            <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">strs</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'\n'</tt> </tt>
-<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">e</tt> </tt>
-</div><a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.save"></a><div id="_BaseFile.save-def"><a name="L277"></a><tt class="py-lineno"> 277</tt> <a class="py-toggle" href="#" id="_BaseFile.save-toggle" onclick="return toggle('_BaseFile.save');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#save">save</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">repr_method</tt><tt class="py-op">=</tt><tt class="py-string">'__str__'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.save-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.save-expanded"><a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line"><tt class="py-docstring">        Save the po file to file *fpath* if no file handle exists for</tt> </tt>
-<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line"><tt class="py-docstring">        the object. If there's already an open file and no fpath is</tt> </tt>
-<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line"><tt class="py-docstring">        provided, then the existing file is rewritten with the modified</tt> </tt>
-<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line"><tt class="py-docstring">        data.</tt> </tt>
-<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
-<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"><tt class="py-docstring">          - *fpath*: string, full or relative path to the file.</tt> </tt>
-<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line"><tt class="py-docstring">          - *repr_method*: string, the method to use for output.</tt> </tt>
-<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fpath</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">fpath</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">'You must provide a file path to save() method'</tt><tt class="py-op">)</tt> </tt>
-<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line">        <tt class="py-name">contents</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">repr_method</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">fpath</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">            <tt class="py-name">fpath</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fpath</tt> </tt>
-<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line">        <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-string">'w'</tt> </tt>
-<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">repr_method</tt> <tt class="py-op">==</tt> <tt class="py-string">'to_binary'</tt><tt class="py-op">:</tt> </tt>
-<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line">            <tt class="py-name">mode</tt> <tt class="py-op">+=</tt> <tt class="py-string">'b'</tt> </tt>
-<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line">        <tt class="py-name">fhandle</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt>
-<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">        <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-name">contents</tt><tt class="py-op">)</tt> </tt>
-<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line">        <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.find"></a><div id="_BaseFile.find-def"><a name="L300"></a><tt class="py-lineno"> 300</tt> <a class="py-toggle" href="#" id="_BaseFile.find-toggle" onclick="return toggle('_BaseFile.find');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#find">find</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">st</tt><tt class="py-op">,</tt> <tt class="py-param">by</tt><tt class="py-op">=</tt><tt class="py-string">'msgid'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.find-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.find-expanded"><a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line"><tt class="py-docstring">        Find entry which msgid (or property identified by the *by*</tt> </tt>
-<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line"><tt class="py-docstring">        attribute) matches the string *st*.</tt> </tt>
-<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
-<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line"><tt class="py-docstring">          - *st*: string, the string to search for</tt> </tt>
-<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line"><tt class="py-docstring">          - *by*: string, the comparison attribute</tt> </tt>
-<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line"><tt class="py-docstring">        **Examples**:</tt> </tt>
+<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">ret</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.__repr__"></a><div id="_BaseFile.__repr__-def"><a name="L262"></a><tt class="py-lineno"> 262</tt> <a class="py-toggle" href="#" id="_BaseFile.__repr__-toggle" onclick="return toggle('_BaseFile.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.__repr__-expanded"><a name="L263"></a><tt class="py-lineno"> 263</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the official string representation of the object."""</tt> </tt>
+<a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;%s instance at %x&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.metadata_as_entry"></a><div id="_BaseFile.metadata_as_entry-def"><a name="L266"></a><tt class="py-lineno"> 266</tt> <a class="py-toggle" href="#" id="_BaseFile.metadata_as_entry-toggle" onclick="return toggle('_BaseFile.metadata_as_entry');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#metadata_as_entry">metadata_as_entry</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.metadata_as_entry-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.metadata_as_entry-expanded"><a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the metadata as an entry"""</tt> </tt>
+<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line">        <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name" targets="Class polib.POEntry=polib.POEntry-class.html"><a title="polib.POEntry" class="py-name" href="#" onclick="return doclink('link-16', 'POEntry', 'link-16');">POEntry</a></tt><tt class="py-op">(</tt><tt class="py-name">msgid</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
+<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line">        <tt class="py-name">mdata</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method polib._BaseFile.ordered_metadata()=polib._BaseFile-class.html#ordered_metadata"><a title="polib._BaseFile.ordered_metadata" class="py-name" href="#" onclick="return doclink('link-17', 'ordered_metadata', 'link-17');">ordered_metadata</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">mdata</tt><tt class="py-op">:</tt> </tt>
+<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">            <tt class="py-name">strs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mdata</tt><tt class="py-op">:</tt> </tt>
+<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">                <tt class="py-comment"># Strip whitespace off each line in a multi-line entry</tt> </tt>
+<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">v</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line">                <tt class="py-name">strs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'%s: %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line">            <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-string">'\n'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">strs</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'\n'</tt> </tt>
+<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">e</tt> </tt>
+</div><a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.save"></a><div id="_BaseFile.save-def"><a name="L279"></a><tt class="py-lineno"> 279</tt> <a class="py-toggle" href="#" id="_BaseFile.save-toggle" onclick="return toggle('_BaseFile.save');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#save">save</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">repr_method</tt><tt class="py-op">=</tt><tt class="py-string">'__str__'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.save-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.save-expanded"><a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line"><tt class="py-docstring">        Save the po file to file *fpath* if no file handle exists for</tt> </tt>
+<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line"><tt class="py-docstring">        the object. If there's already an open file and no fpath is</tt> </tt>
+<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line"><tt class="py-docstring">        provided, then the existing file is rewritten with the modified</tt> </tt>
+<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line"><tt class="py-docstring">        data.</tt> </tt>
+<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
+<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line"><tt class="py-docstring">          - *fpath*: string, full or relative path to the file.</tt> </tt>
+<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line"><tt class="py-docstring">          - *repr_method*: string, the method to use for output.</tt> </tt>
+<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fpath</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">fpath</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">(</tt><tt class="py-string">'You must provide a file path to save() method'</tt><tt class="py-op">)</tt> </tt>
+<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">        <tt class="py-name">contents</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">repr_method</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">fpath</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line">            <tt class="py-name">fpath</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fpath</tt> </tt>
+<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">repr_method</tt> <tt class="py-op">==</tt> <tt class="py-string">'to_binary'</tt><tt class="py-op">:</tt> </tt>
+<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line">            <tt class="py-name">fhandle</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
+<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line">            <tt class="py-name">fhandle</tt> <tt class="py-op">=</tt> <tt class="py-name">codecs</tt><tt class="py-op">.</tt><tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-string">'w'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">encoding</tt><tt class="py-op">)</tt> </tt>
+<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line">        <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-name">contents</tt><tt class="py-op">)</tt> </tt>
+<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line">        <tt class="py-name">fhandle</tt><tt class="py-op">.</tt><tt class="py-name">close</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.find"></a><div id="_BaseFile.find-def"><a name="L302"></a><tt class="py-lineno"> 302</tt> <a class="py-toggle" href="#" id="_BaseFile.find-toggle" onclick="return toggle('_BaseFile.find');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#find">find</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">st</tt><tt class="py-op">,</tt> <tt class="py-param">by</tt><tt class="py-op">=</tt><tt class="py-string">'msgid'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.find-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.find-expanded"><a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line"><tt class="py-docstring">        Find entry which msgid (or property identified by the *by*</tt> </tt>
+<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line"><tt class="py-docstring">        attribute) matches the string *st*.</tt> </tt>
+<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
+<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line"><tt class="py-docstring">          - *st*: string, the string to search for</tt> </tt>
+<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line"><tt class="py-docstring">          - *by*: string, the comparison attribute</tt> </tt>
 <a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = pofile('tests/test_utf8.po')</tt> </tt>
-<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry = po.find('Thursday')</tt> </tt>
-<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry.msgstr</tt> </tt>
-<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line"><tt class="py-docstring">        'Jueves'</tt> </tt>
-<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry = po.find('Some unexistant msgid')</tt> </tt>
-<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry is None</tt> </tt>
-<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
-<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry = po.find('Jueves', 'msgstr')</tt> </tt>
-<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry.msgid</tt> </tt>
-<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line"><tt class="py-docstring">        'Thursday'</tt> </tt>
-<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-name">by</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">st</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
-<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">IndexError</tt><tt class="py-op">:</tt> </tt>
-<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
-</div><a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.ordered_metadata"></a><div id="_BaseFile.ordered_metadata-def"><a name="L327"></a><tt class="py-lineno"> 327</tt> <a class="py-toggle" href="#" id="_BaseFile.ordered_metadata-toggle" onclick="return toggle('_BaseFile.ordered_metadata');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#ordered_metadata">ordered_metadata</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.ordered_metadata-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.ordered_metadata-expanded"><a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the metadata ordered. The return</tt> </tt>
-<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line"><tt class="py-docstring">        value is list of tuples (metadata name, metadata_value).</tt> </tt>
-<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">        <tt class="py-comment"># copy the dict first</tt> </tt>
-<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">metadata</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metadata</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">        <tt class="py-name">data_order</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
-<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">            <tt class="py-string">'Project-Id-Version'</tt><tt class="py-op">,</tt> </tt>
-<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">            <tt class="py-string">'Report-Msgid-Bugs-To'</tt><tt class="py-op">,</tt> </tt>
-<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">            <tt class="py-string">'POT-Creation-Date'</tt><tt class="py-op">,</tt> </tt>
-<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">            <tt class="py-string">'PO-Revision-Date'</tt><tt class="py-op">,</tt> </tt>
-<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">            <tt class="py-string">'Last-Translator'</tt><tt class="py-op">,</tt> </tt>
-<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">            <tt class="py-string">'Language-Team'</tt><tt class="py-op">,</tt> </tt>
-<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">            <tt class="py-string">'MIME-Version'</tt><tt class="py-op">,</tt> </tt>
-<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">            <tt class="py-string">'Content-Type'</tt><tt class="py-op">,</tt> </tt>
-<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">            <tt class="py-string">'Content-Transfer-Encoding'</tt> </tt>
-<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">        <tt class="py-op">]</tt> </tt>
-<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">        <tt class="py-name">ordered_data</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">data</tt> <tt class="py-keyword">in</tt> <tt class="py-name">data_order</tt><tt class="py-op">:</tt> </tt>
-<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">metadata</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
-<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">                <tt class="py-name">ordered_data</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
-<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
-<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">        <tt class="py-comment"># the rest of the metadata won't be ordered there are no specs for this</tt> </tt>
-<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">keys</tt> <tt class="py-op">=</tt> <tt class="py-name">metadata</tt><tt class="py-op">.</tt><tt class="py-name">keys</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">        <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">keys</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">data</tt> <tt class="py-keyword">in</tt> <tt class="py-name">keys</tt><tt class="py-op">:</tt> </tt>
-<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">metadata</tt><tt class="py-op">[</tt><tt class="py-name">data</tt><tt class="py-op">]</tt> </tt>
-<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">            <tt class="py-name">ordered_data</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ordered_data</tt> </tt>
-</div><a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line"> </tt>
-<a name="_BaseFile.to_binary"></a><div id="_BaseFile.to_binary-def"><a name="L360"></a><tt class="py-lineno"> 360</tt> <a class="py-toggle" href="#" id="_BaseFile.to_binary-toggle" onclick="return toggle('_BaseFile.to_binary');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#to_binary">to_binary</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_BaseFile.to_binary-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.to_binary-expanded"><a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the mofile binary representation."""</tt> </tt>
-<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
-<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">array</tt> </tt>
-<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
-<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-name">offsets</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">        <tt class="py-name">ids</tt> <tt class="py-op">=</tt> <tt class="py-name">strs</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
-<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">        <tt class="py-name">entries</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method polib.MOFile.translated_entries()=polib.MOFile-class.html#translated_entries,Method polib.POFile.translated_entries()=polib.POFile-class.html#translated_entries"><a title="polib.MOFile.translated_entries
+<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line"><tt class="py-docstring">        **Examples**:</tt> </tt>
+<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = pofile('tests/test_utf8.po')</tt> </tt>
+<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry = po.find('Thursday')</tt> </tt>
+<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry.msgstr</tt> </tt>
+<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line"><tt class="py-docstring">        u'Jueves'</tt> </tt>
+<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry = po.find('Some unexistant msgid')</tt> </tt>
+<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry is None</tt> </tt>
+<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
+<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry = po.find('Jueves', 'msgstr')</tt> </tt>
+<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; entry.msgid</tt> </tt>
+<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line"><tt class="py-docstring">        u'Thursday'</tt> </tt>
+<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
+<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">,</tt> <tt class="py-name">by</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">st</tt><tt class="py-op">:</tt> </tt>
+<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">e</tt> </tt>
+<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
+</div><a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.ordered_metadata"></a><div id="_BaseFile.ordered_metadata-def"><a name="L329"></a><tt class="py-lineno"> 329</tt> <a class="py-toggle" href="#" id="_BaseFile.ordered_metadata-toggle" onclick="return toggle('_BaseFile.ordered_metadata');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#ordered_metadata">ordered_metadata</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.ordered_metadata-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.ordered_metadata-expanded"><a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the metadata ordered. The return</tt> </tt>
+<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line"><tt class="py-docstring">        value is list of tuples (metadata name, metadata_value).</tt> </tt>
+<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line">        <tt class="py-comment"># copy the dict first</tt> </tt>
+<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">        <tt class="py-name">metadata</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metadata</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">        <tt class="py-name">data_order</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
+<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">            <tt class="py-string">'Project-Id-Version'</tt><tt class="py-op">,</tt> </tt>
+<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">            <tt class="py-string">'Report-Msgid-Bugs-To'</tt><tt class="py-op">,</tt> </tt>
+<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">            <tt class="py-string">'POT-Creation-Date'</tt><tt class="py-op">,</tt> </tt>
+<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">            <tt class="py-string">'PO-Revision-Date'</tt><tt class="py-op">,</tt> </tt>
+<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">            <tt class="py-string">'Last-Translator'</tt><tt class="py-op">,</tt> </tt>
+<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">            <tt class="py-string">'Language-Team'</tt><tt class="py-op">,</tt> </tt>
+<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">            <tt class="py-string">'MIME-Version'</tt><tt class="py-op">,</tt> </tt>
+<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">            <tt class="py-string">'Content-Type'</tt><tt class="py-op">,</tt> </tt>
+<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">            <tt class="py-string">'Content-Transfer-Encoding'</tt> </tt>
+<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">        <tt class="py-op">]</tt> </tt>
+<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line">        <tt class="py-name">ordered_data</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">data</tt> <tt class="py-keyword">in</tt> <tt class="py-name">data_order</tt><tt class="py-op">:</tt> </tt>
+<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">                <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">metadata</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
+<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line">                <tt class="py-name">ordered_data</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
+<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
+<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">        <tt class="py-comment"># the rest of the metadata won't be ordered there are no specs for this</tt> </tt>
+<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">        <tt class="py-name">keys</tt> <tt class="py-op">=</tt> <tt class="py-name">metadata</tt><tt class="py-op">.</tt><tt class="py-name">keys</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">        <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">keys</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">data</tt> <tt class="py-keyword">in</tt> <tt class="py-name">keys</tt><tt class="py-op">:</tt> </tt>
+<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">            <tt class="py-name">value</tt> <tt class="py-op">=</tt> <tt class="py-name">metadata</tt><tt class="py-op">[</tt><tt class="py-name">data</tt><tt class="py-op">]</tt> </tt>
+<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line">            <tt class="py-name">ordered_data</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ordered_data</tt> </tt>
+</div><a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line"> </tt>
+<a name="_BaseFile.to_binary"></a><div id="_BaseFile.to_binary-def"><a name="L362"></a><tt class="py-lineno"> 362</tt> <a class="py-toggle" href="#" id="_BaseFile.to_binary-toggle" onclick="return toggle('_BaseFile.to_binary');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib._BaseFile-class.html#to_binary">to_binary</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_BaseFile.to_binary-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="_BaseFile.to_binary-expanded"><a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the mofile binary representation."""</tt> </tt>
+<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
+<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">        <tt class="py-keyword">import</tt> <tt class="py-name">array</tt> </tt>
+<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
+<a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line">        <tt class="py-name">offsets</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">        <tt class="py-name">ids</tt> <tt class="py-op">=</tt> <tt class="py-name">strs</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
+<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">        <tt class="py-name">entries</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method polib.MOFile.translated_entries()=polib.MOFile-class.html#translated_entries,Method polib.POFile.translated_entries()=polib.POFile-class.html#translated_entries"><a title="polib.MOFile.translated_entries
 polib.POFile.translated_entries" class="py-name" href="#" onclick="return doclink('link-18', 'translated_entries', 'link-18');">translated_entries</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L368"></a><tt class="py-lineno"> 368</tt>  <tt class="py-line">        <tt class="py-comment"># the keys are sorted in the .mo file</tt> </tt>
-<a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">def</tt> <tt class="py-def-name">cmp</tt><tt class="py-op">(</tt><tt class="py-param">_self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">:</tt> </tt>
-<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-number">1</tt> </tt>
-<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">:</tt> </tt>
-<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
-<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
-</div><a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">        <tt class="py-name">entries</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-name">cmp</tt><tt class="py-op">)</tt> </tt>
-<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">        <tt class="py-comment"># add metadata entry</tt> </tt>
-<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">mentry</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="polib._BaseFile.metadata_as_entry" class="py-name" href="#" onclick="return doclink('link-19', 'metadata_as_entry', 'link-12');">metadata_as_entry</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">        <tt class="py-name">mentry</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-name">mentry</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\n'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'\n'</tt> </tt>
-<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">        <tt class="py-name">entries</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">mentry</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">entries</tt> </tt>
-<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">        <tt class="py-name">entries_len</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">entries</tt><tt class="py-op">)</tt> </tt>
-<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">entries</tt><tt class="py-op">:</tt> </tt>
-<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">            <tt class="py-comment"># For each string, we need size and file offset.  Each string is</tt> </tt>
-<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># NUL terminated; the NUL does not count into the size.</tt> </tt>
-<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">msgid</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method polib._BaseEntry._decode()=polib._BaseEntry-class.html#_decode"><a title="polib._BaseEntry._decode" class="py-name" href="#" onclick="return doclink('link-20', '_decode', 'link-20');">_decode</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">)</tt> </tt>
-<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">            <tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="polib._BaseEntry._decode" class="py-name" href="#" onclick="return doclink('link-21', '_decode', 'link-20');">_decode</a></tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt><tt class="py-op">)</tt> </tt>
-<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">            <tt class="py-name">offsets</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">ids</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">msgid</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">strs</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">msgstr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">            <tt class="py-name">ids</tt>  <tt class="py-op">+=</tt> <tt class="py-name">msgid</tt>  <tt class="py-op">+</tt> <tt class="py-string">'\0'</tt> </tt>
-<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">            <tt class="py-name">strs</tt> <tt class="py-op">+=</tt> <tt class="py-name">msgstr</tt> <tt class="py-op">+</tt> <tt class="py-string">'\0'</tt> </tt>
-<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">        <tt class="py-comment"># The header is 7 32-bit unsigned integers.</tt> </tt>
-<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">keystart</tt> <tt class="py-op">=</tt> <tt class="py-number">7</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">+</tt><tt class="py-number">16</tt><tt class="py-op">*</tt><tt class="py-name">entries_len</tt> </tt>
-<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">        <tt class="py-comment"># and the values start after the keys</tt> </tt>
-<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">valuestart</tt> <tt class="py-op">=</tt> <tt class="py-name">keystart</tt> <tt class="py-op">+</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">ids</tt><tt class="py-op">)</tt> </tt>
-<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">        <tt class="py-name">koffsets</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">        <tt class="py-name">voffsets</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">        <tt class="py-comment"># The string table first has the list of keys, then the list of values.</tt> </tt>
-<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># Each entry has first the size of the string, then the file offset.</tt> </tt>
-<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">o1</tt><tt class="py-op">,</tt> <tt class="py-name">l1</tt><tt class="py-op">,</tt> <tt class="py-name">o2</tt><tt class="py-op">,</tt> <tt class="py-name">l2</tt> <tt class="py-keyword">in</tt> <tt class="py-name">offsets</tt><tt class="py-op">:</tt> </tt>
-<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">            <tt class="py-name">koffsets</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-name">l1</tt><tt class="py-op">,</tt> <tt class="py-name">o1</tt><tt class="py-op">+</tt><tt class="py-name">keystart</tt><tt class="py-op">]</tt> </tt>
-<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">            <tt class="py-name">voffsets</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-name">l2</tt><tt class="py-op">,</tt> <tt class="py-name">o2</tt><tt class="py-op">+</tt><tt class="py-name">valuestart</tt><tt class="py-op">]</tt> </tt>
-<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">        <tt class="py-name">offsets</tt> <tt class="py-op">=</tt> <tt class="py-name">koffsets</tt> <tt class="py-op">+</tt> <tt class="py-name">voffsets</tt> </tt>
-<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-string">"IIIIIII"</tt><tt class="py-op">,</tt> </tt>
-<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">                             <tt class="py-number">0x950412de</tt><tt class="py-op">,</tt>        <tt class="py-comment"># Magic number</tt> </tt>
-<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">                             <tt class="py-number">0</tt><tt class="py-op">,</tt>                 <tt class="py-comment"># Version</tt> </tt>
-<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">                             <tt class="py-name">entries_len</tt><tt class="py-op">,</tt>       <tt class="py-comment"># # of entries</tt> </tt>
-<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">                             <tt class="py-number">7</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">,</tt>               <tt class="py-comment"># start of key index</tt> </tt>
-<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">                             <tt class="py-number">7</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">+</tt><tt class="py-name">entries_len</tt><tt class="py-op">*</tt><tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-comment"># start of value index</tt> </tt>
-<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">                             <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt>              <tt class="py-comment"># size and offset of hash table</tt> </tt>
-<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">+=</tt> <tt class="py-name">array</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">"I"</tt><tt class="py-op">,</tt> <tt class="py-name">offsets</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">tostring</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">+=</tt> <tt class="py-name">ids</tt> </tt>
-<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">+=</tt> <tt class="py-name">strs</tt> </tt>
-<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">output</tt> </tt>
-</div></div><a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line"> </tt>
-<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># class POFile {{{</tt> </tt>
-<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="POFile"></a><div id="POFile-def"><a name="L417"></a><tt class="py-lineno"> 417</tt> <a class="py-toggle" href="#" id="POFile-toggle" onclick="return toggle('POFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="polib.POFile-class.html">POFile</a><tt class="py-op">(</tt><tt class="py-base-class">_BaseFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="POFile-expanded"><a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
-<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line"><tt class="py-docstring">    Po (or Pot) file reader/writer.</tt> </tt>
-<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line"><tt class="py-docstring">    POFile objects inherit the list objects methods.</tt> </tt>
-<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
-<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po = POFile()</tt> </tt>
-<a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1 = POEntry(</tt> </tt>
-<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid="Some english text",</tt> </tt>
-<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr="Un texte en anglais"</tt> </tt>
-<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
-<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1.occurrences = [('testfile', 12),('another_file', 1)]</tt> </tt>
-<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1.comment = "Some useful comment"</tt> </tt>
-<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2 = POEntry(</tt> </tt>
-<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid="Peace in some languages",</tt> </tt>
-<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr="Pace &#1587;&#1604;&#1575;&#1605; &#1513;&#1500;&#1493;&#1501; Has&#238;t&#238; &#21644;&#24179;"</tt> </tt>
-<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
-<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2.occurrences = [('testfile', 15),('another_file', 5)]</tt> </tt>
-<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2.comment = "Another useful comment"</tt> </tt>
-<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry3 = POEntry(</tt> </tt>
-<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid='Some entry with quotes " \\"',</tt> </tt>
-<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr='Un message unicode avec des quotes " \\"'</tt> </tt>
+<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line">        <tt class="py-comment"># the keys are sorted in the .mo file</tt> </tt>
+<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">cmp</tt><tt class="py-op">(</tt><tt class="py-param">_self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">:</tt> </tt>
+<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-number">1</tt> </tt>
+<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">_self</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">:</tt> </tt>
+<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt> </tt>
+<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt>
+</div><a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">        <tt class="py-name">entries</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-name">cmp</tt><tt class="py-op">)</tt> </tt>
+<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line">        <tt class="py-comment"># add metadata entry</tt> </tt>
+<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">        <tt class="py-name">mentry</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="polib._BaseFile.metadata_as_entry" class="py-name" href="#" onclick="return doclink('link-19', 'metadata_as_entry', 'link-12');">metadata_as_entry</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">        <tt class="py-name">mentry</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-name">mentry</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\n'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'\n'</tt> </tt>
+<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">        <tt class="py-name">entries</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">mentry</tt><tt class="py-op">]</tt> <tt class="py-op">+</tt> <tt class="py-name">entries</tt> </tt>
+<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">        <tt class="py-name">entries_len</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">entries</tt><tt class="py-op">)</tt> </tt>
+<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">entries</tt><tt class="py-op">:</tt> </tt>
+<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">            <tt class="py-comment"># For each string, we need size and file offset.  Each string is</tt> </tt>
+<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">            <tt class="py-comment"># NUL terminated; the NUL does not count into the size.</tt> </tt>
+<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">            <tt class="py-name">msgid</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt> </tt>
+<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgid_plural</tt><tt class="py-op">:</tt> </tt>
+<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">                <tt class="py-name">msgid</tt> <tt class="py-op">=</tt> <tt class="py-name">msgid</tt> <tt class="py-op">+</tt> <tt class="py-string">'\0'</tt> <tt class="py-op">+</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgid_plural</tt> </tt>
+<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">                <tt class="py-name">indexes</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr_plural</tt><tt class="py-op">.</tt><tt class="py-name">keys</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">                <tt class="py-name">indexes</tt><tt class="py-op">.</tt><tt class="py-name">sort</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">                <tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">index</tt> <tt class="py-keyword">in</tt> <tt class="py-name">indexes</tt><tt class="py-op">:</tt> </tt>
+<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">                    <tt class="py-name">msgstr</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr_plural</tt><tt class="py-op">[</tt><tt class="py-name">index</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">                <tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-string">'\0'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">msgstr</tt><tt class="py-op">)</tt> </tt>
+<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">                <tt class="py-name">msgstr</tt> <tt class="py-op">=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt> </tt>
+<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line"> </tt>
+<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">            <tt class="py-name">offsets</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">ids</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">msgid</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">strs</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">msgstr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">            <tt class="py-name">ids</tt>  <tt class="py-op">+=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt>  <tt class="py-op">+</tt> <tt class="py-string">'\0'</tt> </tt>
+<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line">            <tt class="py-name">strs</tt> <tt class="py-op">+=</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">msgstr</tt> <tt class="py-op">+</tt> <tt class="py-string">'\0'</tt> </tt>
+<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">        <tt class="py-comment"># The header is 7 32-bit unsigned integers.</tt> </tt>
+<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">        <tt class="py-name">keystart</tt> <tt class="py-op">=</tt> <tt class="py-number">7</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">+</tt><tt class="py-number">16</tt><tt class="py-op">*</tt><tt class="py-name">entries_len</tt> </tt>
+<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">        <tt class="py-comment"># and the values start after the keys</tt> </tt>
+<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">        <tt class="py-name">valuestart</tt> <tt class="py-op">=</tt> <tt class="py-name">keystart</tt> <tt class="py-op">+</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">ids</tt><tt class="py-op">)</tt> </tt>
+<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">        <tt class="py-name">koffsets</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line">        <tt class="py-name">voffsets</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line">        <tt class="py-comment"># The string table first has the list of keys, then the list of values.</tt> </tt>
+<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line">        <tt class="py-comment"># Each entry has first the size of the string, then the file offset.</tt> </tt>
+<a name="L410"></a><tt class="py-lineno"> 410</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">o1</tt><tt class="py-op">,</tt> <tt class="py-name">l1</tt><tt class="py-op">,</tt> <tt class="py-name">o2</tt><tt class="py-op">,</tt> <tt class="py-name">l2</tt> <tt class="py-keyword">in</tt> <tt class="py-name">offsets</tt><tt class="py-op">:</tt> </tt>
+<a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">            <tt class="py-name">koffsets</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-name">l1</tt><tt class="py-op">,</tt> <tt class="py-name">o1</tt><tt class="py-op">+</tt><tt class="py-name">keystart</tt><tt class="py-op">]</tt> </tt>
+<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line">            <tt class="py-name">voffsets</tt> <tt class="py-op">+=</tt> <tt class="py-op">[</tt><tt class="py-name">l2</tt><tt class="py-op">,</tt> <tt class="py-name">o2</tt><tt class="py-op">+</tt><tt class="py-name">valuestart</tt><tt class="py-op">]</tt> </tt>
+<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line">        <tt class="py-name">offsets</tt> <tt class="py-op">=</tt> <tt class="py-name">koffsets</tt> <tt class="py-op">+</tt> <tt class="py-name">voffsets</tt> </tt>
+<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-string">"IIIIIII"</tt><tt class="py-op">,</tt> </tt>
+<a name="L415"></a><tt class="py-lineno"> 415</tt>  <tt class="py-line">                             <tt class="py-number">0x950412de</tt><tt class="py-op">,</tt>        <tt class="py-comment"># Magic number</tt> </tt>
+<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line">                             <tt class="py-number">0</tt><tt class="py-op">,</tt>                 <tt class="py-comment"># Version</tt> </tt>
+<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">                             <tt class="py-name">entries_len</tt><tt class="py-op">,</tt>       <tt class="py-comment"># # of entries</tt> </tt>
+<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">                             <tt class="py-number">7</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">,</tt>               <tt class="py-comment"># start of key index</tt> </tt>
+<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line">                             <tt class="py-number">7</tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">+</tt><tt class="py-name">entries_len</tt><tt class="py-op">*</tt><tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-comment"># start of value index</tt> </tt>
+<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line">                             <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt>              <tt class="py-comment"># size and offset of hash table</tt> </tt>
+<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">+=</tt> <tt class="py-name">array</tt><tt class="py-op">.</tt><tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">"I"</tt><tt class="py-op">,</tt> <tt class="py-name">offsets</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">tostring</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">+=</tt> <tt class="py-name">ids</tt> </tt>
+<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">+=</tt> <tt class="py-name">strs</tt> </tt>
+<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">output</tt> </tt>
+</div></div><a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line"> </tt>
+<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
+<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"><tt class="py-comment"># class POFile {{{</tt> </tt>
+<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line"> </tt>
+<a name="POFile"></a><div id="POFile-def"><a name="L429"></a><tt class="py-lineno"> 429</tt> <a class="py-toggle" href="#" id="POFile-toggle" onclick="return toggle('POFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="polib.POFile-class.html">POFile</a><tt class="py-op">(</tt><tt class="py-base-class">_BaseFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="POFile-expanded"><a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
+<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line"><tt class="py-docstring">    Po (or Pot) file reader/writer.</tt> </tt>
+<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line"><tt class="py-docstring">    POFile objects inherit the list objects methods.</tt> </tt>
+<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
+<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po = POFile()</tt> </tt>
+<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1 = POEntry(</tt> </tt>
+<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid="Some english text",</tt> </tt>
+<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr="Un texte en anglais"</tt> </tt>
 <a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
-<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry3.comment = "Test string quoting"</tt> </tt>
-<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.append(entry1)</tt> </tt>
-<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.append(entry2)</tt> </tt>
-<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.append(entry3)</tt> </tt>
-<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.header = "Some Header"</tt> </tt>
-<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(po)</tt> </tt>
-<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line"><tt class="py-docstring">    # Some Header</tt> </tt>
-<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line"><tt class="py-docstring">    msgid ""</tt> </tt>
-<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr ""</tt> </tt>
-<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line"><tt class="py-docstring">    #. Some useful comment</tt> </tt>
-<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line"><tt class="py-docstring">    #: testfile:12 another_file:1</tt> </tt>
-<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Some english text"</tt> </tt>
-<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Un texte en anglais"</tt> </tt>
-<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line"><tt class="py-docstring">    #. Another useful comment</tt> </tt>
-<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line"><tt class="py-docstring">    #: testfile:15 another_file:5</tt> </tt>
-<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Peace in some languages"</tt> </tt>
-<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Pace &#1587;&#1604;&#1575;&#1605; &#1513;&#1500;&#1493;&#1501; Has&#238;t&#238; &#21644;&#24179;"</tt> </tt>
-<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"><tt class="py-docstring">    #. Test string quoting</tt> </tt>
-<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Some entry with quotes \\" \\""</tt> </tt>
-<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Un message unicode avec des quotes \\" \\""</tt> </tt>
-<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
-<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line"> </tt>
-<a name="POFile.__str__"></a><div id="POFile.__str__-def"><a name="L467"></a><tt class="py-lineno"> 467</tt> <a class="py-toggle" href="#" id="POFile.__str__-toggle" onclick="return toggle('POFile.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.__str__-expanded"><a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the string representation of the po file"""</tt> </tt>
-<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">        <tt class="py-name">ret</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
-<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">header</tt> <tt class="py-keyword">in</tt> <tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
-<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">header</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">','</tt><tt class="py-op">,</tt> <tt class="py-string">':'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">                <tt class="py-name">ret</tt> <tt class="py-op">+=</tt> <tt class="py-string">'#%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">header</tt> </tt>
-<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line">                <tt class="py-name">ret</tt> <tt class="py-op">+=</tt> <tt class="py-string">'# %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">header</tt> </tt>
-<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> <tt class="py-op">+</tt> <tt id="link-22" class="py-name" targets="Class polib._BaseFile=polib._BaseFile-class.html"><a title="polib._BaseFile" class="py-name" href="#" onclick="return doclink('link-22', '_BaseFile', 'link-22');">_BaseFile</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="polib.MOEntry.__str__
+<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1.occurrences = [('testfile', 12),('another_file', 1)]</tt> </tt>
+<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1.comment = "Some useful comment"</tt> </tt>
+<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2 = POEntry(</tt> </tt>
+<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid="Peace in some languages",</tt> </tt>
+<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr="Pace &#1587;&#1604;&#1575;&#1605; &#1513;&#1500;&#1493;&#1501; Has&#238;t&#238; &#21644;&#24179;"</tt> </tt>
+<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
+<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2.occurrences = [('testfile', 15),('another_file', 5)]</tt> </tt>
+<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2.comment = "Another useful comment"</tt> </tt>
+<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry3 = POEntry(</tt> </tt>
+<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid='Some entry with quotes " \\"',</tt> </tt>
+<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr='Un message unicode avec des quotes " \\"'</tt> </tt>
+<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
+<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry3.comment = "Test string quoting"</tt> </tt>
+<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.append(entry1)</tt> </tt>
+<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.append(entry2)</tt> </tt>
+<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.append(entry3)</tt> </tt>
+<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; po.header = "Some Header"</tt> </tt>
+<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(po)</tt> </tt>
+<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"><tt class="py-docstring">    # Some Header</tt> </tt>
+<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line"><tt class="py-docstring">    msgid ""</tt> </tt>
+<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr ""</tt> </tt>
+<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
+<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line"><tt class="py-docstring">    #. Some useful comment</tt> </tt>
+<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line"><tt class="py-docstring">    #: testfile:12 another_file:1</tt> </tt>
+<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Some english text"</tt> </tt>
+<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Un texte en anglais"</tt> </tt>
+<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
+<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line"><tt class="py-docstring">    #. Another useful comment</tt> </tt>
+<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line"><tt class="py-docstring">    #: testfile:15 another_file:5</tt> </tt>
+<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Peace in some languages"</tt> </tt>
+<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Pace &#1587;&#1604;&#1575;&#1605; &#1513;&#1500;&#1493;&#1501; Has&#238;t&#238; &#21644;&#24179;"</tt> </tt>
+<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
+<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line"><tt class="py-docstring">    #. Test string quoting</tt> </tt>
+<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Some entry with quotes \\" \\""</tt> </tt>
+<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Un message unicode avec des quotes \\" \\""</tt> </tt>
+<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
+<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
+<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line"> </tt>
+<a name="POFile.__str__"></a><div id="POFile.__str__-def"><a name="L479"></a><tt class="py-lineno"> 479</tt> <a class="py-toggle" href="#" id="POFile.__str__-toggle" onclick="return toggle('POFile.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.__str__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.__str__-expanded"><a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return the string representation of the po file"""</tt> </tt>
+<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">        <tt class="py-name">ret</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">header</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
+<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">header</tt> <tt class="py-keyword">in</tt> <tt class="py-name">headers</tt><tt class="py-op">:</tt> </tt>
+<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">header</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">','</tt><tt class="py-op">,</tt> <tt class="py-string">':'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
+<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">                <tt class="py-name">ret</tt> <tt class="py-op">+=</tt> <tt class="py-string">'#%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">header</tt> </tt>
+<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">                <tt class="py-name">ret</tt> <tt class="py-op">+=</tt> <tt class="py-string">'# %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">header</tt> </tt>
+<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> <tt class="py-op">+</tt> <tt id="link-20" class="py-name" targets="Class polib._BaseFile=polib._BaseFile-class.html"><a title="polib._BaseFile" class="py-name" href="#" onclick="return doclink('link-20', '_BaseFile', 'link-20');">_BaseFile</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="polib.MOEntry.__str__
 polib.POEntry.__str__
 polib.POFile.__str__
 polib._BaseEntry.__str__
-polib._BaseFile.__str__" class="py-name" href="#" onclick="return doclink('link-23', '__str__', 'link-13');">__str__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line"> </tt>
-<a name="POFile.save_as_mofile"></a><div id="POFile.save_as_mofile-def"><a name="L477"></a><tt class="py-lineno"> 477</tt> <a class="py-toggle" href="#" id="POFile.save_as_mofile-toggle" onclick="return toggle('POFile.save_as_mofile');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#save_as_mofile">save_as_mofile</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.save_as_mofile-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.save_as_mofile-expanded"><a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line"><tt class="py-docstring">        Save the binary representation of the file to *fpath*.</tt> </tt>
-<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
-<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line"><tt class="py-docstring">          - *fpath*: string, full or relative path to the file.</tt> </tt>
-<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">        <tt id="link-24" class="py-name"><a title="polib._BaseFile" class="py-name" href="#" onclick="return doclink('link-24', '_BaseFile', 'link-22');">_BaseFile</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method polib.MOFile.save()=polib.MOFile-class.html#save,Method polib._BaseFile.save()=polib._BaseFile-class.html#save"><a title="polib.MOFile.save
-polib._BaseFile.save" class="py-name" href="#" onclick="return doclink('link-25', 'save', 'link-25');">save</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-string">'to_binary'</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line"> </tt>
-<a name="POFile.percent_translated"></a><div id="POFile.percent_translated-def"><a name="L486"></a><tt class="py-lineno"> 486</tt> <a class="py-toggle" href="#" id="POFile.percent_translated-toggle" onclick="return toggle('POFile.percent_translated');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#percent_translated">percent_translated</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.percent_translated-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.percent_translated-expanded"><a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the percentage of translated</tt> </tt>
-<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line"><tt class="py-docstring">        messages.</tt> </tt>
-<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
+polib._BaseFile.__str__" class="py-name" href="#" onclick="return doclink('link-21', '__str__', 'link-13');">__str__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line"> </tt>
+<a name="POFile.save_as_mofile"></a><div id="POFile.save_as_mofile-def"><a name="L489"></a><tt class="py-lineno"> 489</tt> <a class="py-toggle" href="#" id="POFile.save_as_mofile-toggle" onclick="return toggle('POFile.save_as_mofile');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#save_as_mofile">save_as_mofile</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.save_as_mofile-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.save_as_mofile-expanded"><a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line"><tt class="py-docstring">        Save the binary representation of the file to *fpath*.</tt> </tt>
 <a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
-<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po.percent_translated()</tt> </tt>
-<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line"><tt class="py-docstring">        50</tt> </tt>
-<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = POFile()</tt> </tt>
-<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po.percent_translated()</tt> </tt>
-<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line"><tt class="py-docstring">        100</tt> </tt>
-<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line">        <tt class="py-name">total</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">total</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
-<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-number">100</tt> </tt>
-<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line">        <tt id="link-26" class="py-name" targets="Method polib.POEntry.translated()=polib.POEntry-class.html#translated"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-26', 'translated', 'link-26');">translated</a></tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="polib.MOFile.translated_entries
-polib.POFile.translated_entries" class="py-name" href="#" onclick="return doclink('link-27', 'translated_entries', 'link-18');">translated_entries</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">100.00</tt> <tt class="py-op">/</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">total</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt id="link-28" class="py-name"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-28', 'translated', 'link-26');">translated</a></tt><tt class="py-op">)</tt> </tt>
-</div><a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"> </tt>
-<a name="POFile.translated_entries"></a><div id="POFile.translated_entries-def"><a name="L507"></a><tt class="py-lineno"> 507</tt> <a class="py-toggle" href="#" id="POFile.translated_entries-toggle" onclick="return toggle('POFile.translated_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#translated_entries">translated_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.translated_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.translated_entries-expanded"><a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return a list of translated entries.</tt> </tt>
-<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
-<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
-<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.translated_entries())</tt> </tt>
-<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line"><tt class="py-docstring">        6</tt> </tt>
-<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-29', 'translated', 'link-26');">translated</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
-</div><a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line"> </tt>
-<a name="POFile.untranslated_entries"></a><div id="POFile.untranslated_entries-def"><a name="L520"></a><tt class="py-lineno"> 520</tt> <a class="py-toggle" href="#" id="POFile.untranslated_entries-toggle" onclick="return toggle('POFile.untranslated_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#untranslated_entries">untranslated_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.untranslated_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.untranslated_entries-expanded"><a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return a list of untranslated entries.</tt> </tt>
-<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
-<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
-<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.untranslated_entries())</tt> </tt>
-<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line"><tt class="py-docstring">        6</tt> </tt>
-<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-30', 'translated', 'link-26');">translated</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
-</div><a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line"> </tt>
-<a name="POFile.fuzzy_entries"></a><div id="POFile.fuzzy_entries-def"><a name="L533"></a><tt class="py-lineno"> 533</tt> <a class="py-toggle" href="#" id="POFile.fuzzy_entries-toggle" onclick="return toggle('POFile.fuzzy_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#fuzzy_entries">fuzzy_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.fuzzy_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.fuzzy_entries-expanded"><a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the list of 'fuzzy' entries.</tt> </tt>
-<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
-<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
-<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.fuzzy_entries())</tt> </tt>
-<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"><tt class="py-docstring">        2</tt> </tt>
-<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-string">'fuzzy'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">flags</tt><tt class="py-op">]</tt> </tt>
-</div><a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line"> </tt>
-<a name="POFile.obsolete_entries"></a><div id="POFile.obsolete_entries-def"><a name="L546"></a><tt class="py-lineno"> 546</tt> <a class="py-toggle" href="#" id="POFile.obsolete_entries-toggle" onclick="return toggle('POFile.obsolete_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#obsolete_entries">obsolete_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.obsolete_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.obsolete_entries-expanded"><a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the list of obsolete entries.</tt> </tt>
-<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
-<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
-<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.obsolete_entries())</tt> </tt>
-<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line"><tt class="py-docstring">        4</tt> </tt>
-<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
-</div><a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line"> </tt>
-<a name="POFile.merge"></a><div id="POFile.merge-def"><a name="L559"></a><tt class="py-lineno"> 559</tt> <a class="py-toggle" href="#" id="POFile.merge-toggle" onclick="return toggle('POFile.merge');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#merge">merge</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">refpot</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="POFile.merge-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.merge-expanded"><a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line"><tt class="py-docstring">        XXX this could not work if encodings are different, needs thinking</tt> </tt>
-<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line"><tt class="py-docstring">        and general refactoring of how polib handles encoding...</tt> </tt>
+<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword arguments**:</tt> </tt>
+<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line"><tt class="py-docstring">          - *fpath*: string, full or relative path to the file.</tt> </tt>
+<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">        <tt id="link-22" class="py-name"><a title="polib._BaseFile" class="py-name" href="#" onclick="return doclink('link-22', '_BaseFile', 'link-20');">_BaseFile</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Method polib.MOFile.save()=polib.MOFile-class.html#save,Method polib._BaseFile.save()=polib._BaseFile-class.html#save"><a title="polib.MOFile.save
+polib._BaseFile.save" class="py-name" href="#" onclick="return doclink('link-23', 'save', 'link-23');">save</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">fpath</tt><tt class="py-op">,</tt> <tt class="py-string">'to_binary'</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line"> </tt>
+<a name="POFile.percent_translated"></a><div id="POFile.percent_translated-def"><a name="L498"></a><tt class="py-lineno"> 498</tt> <a class="py-toggle" href="#" id="POFile.percent_translated-toggle" onclick="return toggle('POFile.percent_translated');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#percent_translated">percent_translated</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.percent_translated-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.percent_translated-expanded"><a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the percentage of translated</tt> </tt>
+<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line"><tt class="py-docstring">        messages.</tt> </tt>
+<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
+<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
+<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po.percent_translated()</tt> </tt>
+<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line"><tt class="py-docstring">        50</tt> </tt>
+<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = POFile()</tt> </tt>
+<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po.percent_translated()</tt> </tt>
+<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line"><tt class="py-docstring">        100</tt> </tt>
+<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line">        <tt class="py-name">total</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">total</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
+<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-number">100</tt> </tt>
+<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">        <tt id="link-24" class="py-name" targets="Method polib.POEntry.translated()=polib.POEntry-class.html#translated"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-24', 'translated', 'link-24');">translated</a></tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="polib.MOFile.translated_entries
+polib.POFile.translated_entries" class="py-name" href="#" onclick="return doclink('link-25', 'translated_entries', 'link-18');">translated_entries</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">100.00</tt> <tt class="py-op">/</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">total</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt id="link-26" class="py-name"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-26', 'translated', 'link-24');">translated</a></tt><tt class="py-op">)</tt> </tt>
+</div><a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line"> </tt>
+<a name="POFile.translated_entries"></a><div id="POFile.translated_entries-def"><a name="L519"></a><tt class="py-lineno"> 519</tt> <a class="py-toggle" href="#" id="POFile.translated_entries-toggle" onclick="return toggle('POFile.translated_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#translated_entries">translated_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.translated_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.translated_entries-expanded"><a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return a list of translated entries.</tt> </tt>
+<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
+<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
+<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.translated_entries())</tt> </tt>
+<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line"><tt class="py-docstring">        6</tt> </tt>
+<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-27', 'translated', 'link-24');">translated</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
+</div><a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line"> </tt>
+<a name="POFile.untranslated_entries"></a><div id="POFile.untranslated_entries-def"><a name="L532"></a><tt class="py-lineno"> 532</tt> <a class="py-toggle" href="#" id="POFile.untranslated_entries-toggle" onclick="return toggle('POFile.untranslated_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#untranslated_entries">untranslated_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.untranslated_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.untranslated_entries-expanded"><a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return a list of untranslated entries.</tt> </tt>
+<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
+<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
+<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.untranslated_entries())</tt> </tt>
+<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line"><tt class="py-docstring">        6</tt> </tt>
+<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="polib.POEntry.translated" class="py-name" href="#" onclick="return doclink('link-28', 'translated', 'link-24');">translated</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
+</div><a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line"> </tt>
+<a name="POFile.fuzzy_entries"></a><div id="POFile.fuzzy_entries-def"><a name="L545"></a><tt class="py-lineno"> 545</tt> <a class="py-toggle" href="#" id="POFile.fuzzy_entries-toggle" onclick="return toggle('POFile.fuzzy_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#fuzzy_entries">fuzzy_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.fuzzy_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.fuzzy_entries-expanded"><a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the list of 'fuzzy' entries.</tt> </tt>
+<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
+<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
+<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.fuzzy_entries())</tt> </tt>
+<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line"><tt class="py-docstring">        2</tt> </tt>
+<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-string">'fuzzy'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">flags</tt><tt class="py-op">]</tt> </tt>
+</div><a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line"> </tt>
+<a name="POFile.obsolete_entries"></a><div id="POFile.obsolete_entries-def"><a name="L558"></a><tt class="py-lineno"> 558</tt> <a class="py-toggle" href="#" id="POFile.obsolete_entries-toggle" onclick="return toggle('POFile.obsolete_entries');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#obsolete_entries">obsolete_entries</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.obsolete_entries-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.obsolete_entries-expanded"><a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that return the list of obsolete entries.</tt> </tt>
+<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
 <a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that merge the current pofile with the pot file</tt> </tt>
-<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line"><tt class="py-docstring">        provided. It behaves exactly as the gettext msgmerge utility:</tt> </tt>
-<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line"><tt class="py-docstring">          - comments of this file will be preserved, but extracted comments</tt> </tt>
-<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line"><tt class="py-docstring">            and occurrences will be discarded</tt> </tt>
-<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line"><tt class="py-docstring">          - any translations or comments in the file will be discarded,</tt> </tt>
-<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line"><tt class="py-docstring">            however dot comments and file positions will be preserved</tt> </tt>
-<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword argument**:</tt> </tt>
-<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line"><tt class="py-docstring">          - *refpot*: object POFile, the reference catalog.</tt> </tt>
-<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line"><tt class="py-docstring">        **Example**:</tt> </tt>
-<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
-<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; refpot = polib.pofile('tests/test_merge.pot')</tt> </tt>
-<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_merge_before.po')</tt> </tt>
-<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po.merge(refpot)</tt> </tt>
-<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; expected_po = polib.pofile('tests/test_merge_after.po')</tt> </tt>
-<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; str(po) == str(expected_po)</tt> </tt>
-<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line"><tt class="py-docstring">        True</tt> </tt>
-<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">refpot</tt><tt class="py-op">:</tt> </tt>
-<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line">            <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method polib._BaseFile.find()=polib._BaseFile-class.html#find"><a title="polib._BaseFile.find" class="py-name" href="#" onclick="return doclink('link-31', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">)</tt> </tt>
-<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">e</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">                <tt class="py-name">e</tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="polib.POEntry" class="py-name" href="#" onclick="return doclink('link-32', 'POEntry', 'link-16');">POEntry</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt> </tt>
-<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line">            <tt class="py-name">e</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Method polib.POEntry.merge()=polib.POEntry-class.html#merge,Method polib.POFile.merge()=polib.POFile-class.html#merge"><a title="polib.POEntry.merge
-polib.POFile.merge" class="py-name" href="#" onclick="return doclink('link-33', 'merge', 'link-33');">merge</a></tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">)</tt> </tt>
-<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">        <tt class="py-comment"># ok, now we must "obsolete" entries that are not in the refpot</tt> </tt>
-<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># anymore</tt> </tt>
-<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">for</tt> <tt class="py-name">entry</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
-<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">refpot</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="polib._BaseFile.find" class="py-name" href="#" onclick="return doclink('link-34', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-name">entry</tt><tt class="py-op">.</tt><tt class="py-name">msgid</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">                <tt class="py-name">entry</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
-</div></div><a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line"> </tt>
-<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line"><tt class="py-comment"># }}}</tt> </tt>
-<a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># class MOFile {{{</tt> </tt>
-<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
-<a name="MOFile"></a><div id="MOFile-def"><a name="L600"></a><tt class="py-lineno"> 600</tt> <a class="py-toggle" href="#" id="MOFile-toggle" onclick="return toggle('MOFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="polib.MOFile-class.html">MOFile</a><tt class="py-op">(</tt><tt class="py-base-class">_BaseFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="MOFile-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MOFile-expanded"><a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line">    <tt class="py-docstring">'''</tt> </tt>
-<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line"><tt class="py-docstring">    Mo file reader/writer.</tt> </tt>
-<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line"><tt class="py-docstring">    MOFile objects inherit the list objects methods.</tt> </tt>
-<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line"><tt class="py-docstring">    **Example**:</tt> </tt>
-<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo = MOFile()</tt> </tt>
-<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry1 = POEntry(</tt> </tt>
-<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid="Some english text",</tt> </tt>
-<a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr="Un texte en anglais"</tt> </tt>
-<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
-<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry2 = POEntry(</tt> </tt>
-<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid="I need my dirty cheese",</tt> </tt>
-<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr="Je veux mon sale fromage"</tt> </tt>
-<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
-<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; entry3 = MOEntry(</tt> </tt>
-<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgid='Some entry with quotes " \\"',</tt> </tt>
-<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line"><tt class="py-docstring">    ...     msgstr='Un message unicode avec des quotes " \\"'</tt> </tt>
-<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line"><tt class="py-docstring">    ... )</tt> </tt>
-<a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo.append(entry1)</tt> </tt>
-<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo.append(entry2)</tt> </tt>
-<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; mo.append(entry3)</tt> </tt>
-<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; print(mo)</tt> </tt>
-<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line"><tt class="py-docstring">    msgid ""</tt> </tt>
-<a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr ""</tt> </tt>
-<a name="L626"></a><tt class="py-lineno"> 626</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Some english text"</tt> </tt>
-<a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Un texte en anglais"</tt> </tt>
-<a name="L629"></a><tt class="py-lineno"> 629</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "I need my dirty cheese"</tt> </tt>
-<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Je veux mon sale fromage"</tt> </tt>
-<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line"><tt class="py-docstring">    msgid "Some entry with quotes \\" \\""</tt> </tt>
-<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line"><tt class="py-docstring">    msgstr "Un message unicode avec des quotes \\" \\""</tt> </tt>
-<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line"><tt class="py-docstring">    &lt;BLANKLINE&gt;</tt> </tt>
-<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line"><tt class="py-docstring">    '''</tt> </tt>
-<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"> </tt>
-<a name="MOFile.__init__"></a><div id="MOFile.__init__-def"><a name="L638"></a><tt class="py-lineno"> 638</tt> <a class="py-toggle" href="#" id="MOFile.__init__-toggle" onclick="return toggle('MOFile.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.MOFile-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fpath</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">wrapwidth</tt><tt class="py-op">=</tt><tt class="py-number">78</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="MOFile.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MOFile.__init__-expanded"><a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line"><tt class="py-docstring">        MOFile constructor.</tt> </tt>
-<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line"><tt class="py-docstring">        See _BaseFile.__construct.</tt> </tt>
-<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">        <tt id="link-35" class="py-name"><a title="polib._BaseFile" class="py-name" href="#" onclick="return doclink('link-35', '_BaseFile', 'link-22');">_BaseFile</a></tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="polib.MOFile.__init__
+<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; import polib</tt> </tt>
+<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; po = polib.pofile('tests/test_pofile_helpers.po')</tt> </tt>
+<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; len(po.obsolete_entries())</tt> </tt>
+<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line"><tt class="py-docstring">        4</tt> </tt>
+<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">e</tt> <tt class="py-keyword">for</tt> <tt class="py-name">e</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt> <tt class="py-keyword">if</tt> <tt class="py-name">e</tt><tt class="py-op">.</tt><tt class="py-name">obsolete</tt><tt class="py-op">]</tt> </tt>
+</div><a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line"> </tt>
+<a name="POFile.merge"></a><div id="POFile.merge-def"><a name="L571"></a><tt class="py-lineno"> 571</tt> <a class="py-toggle" href="#" id="POFile.merge-toggle" onclick="return toggle('POFile.merge');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="polib.POFile-class.html#merge">merge</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">refpot</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="POFile.merge-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="POFile.merge-expanded"><a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line"><tt class="py-docstring">        XXX this could not work if encodings are different, needs thinking</tt> </tt>
+<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line"><tt class="py-docstring">        and general refactoring of how polib handles encoding...</tt> </tt>
+<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line"><tt class="py-docstring">        Convenience method that merge the current pofile with the pot file</tt> </tt>
+<a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line"><tt class="py-docstring">        provided. It behaves exactly as the gettext msgmerge utility:</tt> </tt>
+<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line"><tt class="py-docstring">          - comments of this file will be preserved, but extracted comments</tt> </tt>
+<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line"><tt class="py-docstring">            and occurrences will be discarded</tt> </tt>
+<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line"><tt class="py-docstring">          - any translations or comments in the file will be discarded,</tt> </tt>
+<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line"><tt class="py-docstring">            however dot comments and file positions will be preserved</tt> </tt>
+<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line"><tt class="py-docstring">        **Keyword argument**:</tt> </tt>
+<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line"><tt class="py-docstring">          - *refpot*: object POFile, the reference catalog.</tt> </tt>