PageRenderTime 52ms CodeModel.GetById 3ms app.highlight 38ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/python2.6/site-packages/translate/doc/api/translate.convert.po2php-pysrc.html

https://github.com/mozilla/playdoh-lib
HTML | 531 lines | 498 code | 10 blank | 23 comment | 0 complexity | 99865ce61deaa1efa572822a5dbf78ea MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1<?xml version="1.0" encoding="ascii"?>
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3          "DTD/xhtml1-transitional.dtd">
  4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5<head>
  6  <title>translate.convert.po2php</title>
  7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8  <script type="text/javascript" src="epydoc.js"></script>
  9</head>
 10
 11<body bgcolor="white" text="black" link="blue" vlink="#204080"
 12      alink="#204080">
 13<!-- ==================== NAVIGATION BAR ==================== -->
 14<table class="navbar" border="0" width="100%" cellpadding="0"
 15       bgcolor="#a0c0ff" cellspacing="0">
 16  <tr valign="middle">
 17  <!-- Home link -->
 18      <th>&nbsp;&nbsp;&nbsp;<a
 19        href="translate-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
 20
 21  <!-- Tree link -->
 22      <th>&nbsp;&nbsp;&nbsp;<a
 23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 24
 25  <!-- Index link -->
 26      <th>&nbsp;&nbsp;&nbsp;<a
 27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 28
 29  <!-- Help link -->
 30      <th>&nbsp;&nbsp;&nbsp;<a
 31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 32
 33  <!-- Project homepage -->
 34      <th class="navbar" align="right" width="100%">
 35        <table border="0" cellpadding="0" cellspacing="0">
 36          <tr><th class="navbar" align="center"
 37            ><a class="navbar" target="_top" href="http://translate.sourceforge.net/wiki/toolkit/index">Translate Toolkit</a></th>
 38          </tr></table></th>
 39  </tr>
 40</table>
 41<table width="100%" cellpadding="0" cellspacing="0">
 42  <tr valign="top">
 43    <td width="100%">
 44      <span class="breadcrumbs">
 45        <a href="translate-module.html">Package&nbsp;translate</a> ::
 46        <a href="translate.convert-module.html">Package&nbsp;convert</a> ::
 47        Module&nbsp;po2php
 48      </span>
 49    </td>
 50    <td>
 51      <table cellpadding="0" cellspacing="0">
 52        <!-- hide/show private -->
 53        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 54    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 55        <tr><td align="right"><span class="options"
 56            >[<a href="frames.html" target="_top">frames</a
 57            >]&nbsp;|&nbsp;<a href="translate.convert.po2php-pysrc.html"
 58            target="_top">no&nbsp;frames</a>]</span></td></tr>
 59      </table>
 60    </td>
 61  </tr>
 62</table>
 63<h1 class="epydoc">Source Code for <a href="translate.convert.po2php-module.html">Module translate.convert.po2php</a></h1>
 64<pre class="py-src">
 65<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
 66<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>
 67<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>
 68<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright 2002-2008 Zuza Software Foundation</tt> </tt>
 69<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
 70<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This file is part of translate.</tt> </tt>
 71<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
 72<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># translate is free software; you can redistribute it and/or modify</tt> </tt>
 73<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># it under the terms of the GNU General Public License as published by</tt> </tt>
 74<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># the Free Software Foundation; either version 2 of the License, or</tt> </tt>
 75<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># (at your option) any later version.</tt> </tt>
 76<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
 77<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># translate is distributed in the hope that it will be useful,</tt> </tt>
 78<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
 79<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</tt> </tt>
 80<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># GNU General Public License for more details.</tt> </tt>
 81<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt>
 82<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You should have received a copy of the GNU General Public License</tt> </tt>
 83<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># along with translate; if not, write to the Free Software</tt> </tt>
 84<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</tt> </tt>
 85<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
 86<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"> </tt>
 87<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">"""convert Gettext PO localization files to PHP localization files</tt> </tt>
 88<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 89<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring">see: http://translate.sourceforge.net/wiki/toolkit/po2php for examples and</tt> </tt>
 90<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">usage instructions</tt> </tt>
 91<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 92<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
 93<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package translate=translate-module.html,Method translate.storage.base.TranslationStore.translate()=translate.storage.base.TranslationStore-class.html#translate,Method translate.storage.placeables.strelem.StringElem.translate()=translate.storage.placeables.strelem.StringElem-class.html#translate,Method translate.storage.placeables.terminology.TerminologyPlaceable.translate()=translate.storage.placeables.terminology.TerminologyPlaceable-class.html#translate,Method translate.storage.tmx.tmxfile.translate()=translate.storage.tmx.tmxfile-class.html#translate"><a title="translate
 94translate.storage.base.TranslationStore.translate
 95translate.storage.placeables.strelem.StringElem.translate
 96translate.storage.placeables.terminology.TerminologyPlaceable.translate
 97translate.storage.tmx.tmxfile.translate" class="py-name" href="#" onclick="return doclink('link-0', 'translate', 'link-0');">translate</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Package translate.misc=translate.misc-module.html,Module translate.storage.xml_extract.misc=translate.storage.xml_extract.misc-module.html"><a title="translate.misc
 98translate.storage.xml_extract.misc" class="py-name" href="#" onclick="return doclink('link-1', 'misc', 'link-1');">misc</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module translate.misc.quote=translate.misc.quote-module.html"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-2', 'quote', 'link-2');">quote</a></tt> </tt>
 99<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="translate
100translate.storage.base.TranslationStore.translate
101translate.storage.placeables.strelem.StringElem.translate
102translate.storage.placeables.terminology.TerminologyPlaceable.translate
103translate.storage.tmx.tmxfile.translate" class="py-name" href="#" onclick="return doclink('link-3', 'translate', 'link-0');">translate</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Package translate.storage=translate.storage-module.html"><a title="translate.storage" class="py-name" href="#" onclick="return doclink('link-4', 'storage', 'link-4');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Module translate.storage.po=translate.storage.po-module.html"><a title="translate.storage.po" class="py-name" href="#" onclick="return doclink('link-5', 'po', 'link-5');">po</a></tt> </tt>
104<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name"><a title="translate
105translate.storage.base.TranslationStore.translate
106translate.storage.placeables.strelem.StringElem.translate
107translate.storage.placeables.terminology.TerminologyPlaceable.translate
108translate.storage.tmx.tmxfile.translate" class="py-name" href="#" onclick="return doclink('link-6', 'translate', 'link-0');">translate</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="translate.storage" class="py-name" href="#" onclick="return doclink('link-7', 'storage', 'link-4');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Module translate.storage.php=translate.storage.php-module.html"><a title="translate.storage.php" class="py-name" href="#" onclick="return doclink('link-8', 'php', 'link-8');">php</a></tt> </tt>
109<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
110<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable translate.convert.po2php.eol=translate.convert.po2php-module.html#eol,Variable translate.convert.po2prop.eol=translate.convert.po2prop-module.html#eol,Variable translate.storage.properties.eol=translate.storage.properties-module.html#eol"><a title="translate.convert.po2php.eol
111translate.convert.po2prop.eol
112translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-9', 'eol', 'link-9');">eol</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"\n"</tt> </tt>
113<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"> </tt>
114<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
115<a name="rephp"></a><div id="rephp-def"><a name="L36"></a><tt class="py-lineno"> 36</tt> <a class="py-toggle" href="#" id="rephp-toggle" onclick="return toggle('rephp');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="translate.convert.po2php.rephp-class.html">rephp</a><tt class="py-op">:</tt> </tt>
116</div><div id="rephp-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="rephp-expanded"><a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
117<a name="rephp.__init__"></a><div id="rephp.__init__-def"><a name="L38"></a><tt class="py-lineno"> 38</tt> <a class="py-toggle" href="#" id="rephp.__init__-toggle" onclick="return toggle('rephp.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2php.rephp-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">templatefile</tt><tt class="py-op">,</tt> <tt class="py-param">inputstore</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
118</div><div id="rephp.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.__init__-expanded"><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">templatefile</tt> <tt class="py-op">=</tt> <tt class="py-name">templatefile</tt> </tt>
119<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputstore</tt> <tt class="py-op">=</tt> <tt class="py-name">inputstore</tt> </tt>
120<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inmultilinemsgid</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
121<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inecho</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
122<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inarray</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
123<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">equaldel</tt> <tt class="py-op">=</tt> <tt class="py-string">"="</tt> </tt>
124<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">enddel</tt> <tt class="py-op">=</tt> <tt class="py-string">";"</tt> </tt>
125<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prename</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
126<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Variable translate.storage.catkeys.CatkeysDialect.quotechar=translate.storage.catkeys.CatkeysDialect-class.html#quotechar,Variable translate.storage.omegat.OmegaTDialect.quotechar=translate.storage.omegat.OmegaTDialect-class.html#quotechar,Variable translate.storage.wordfast.WordfastDialect.quotechar=translate.storage.wordfast.WordfastDialect-class.html#quotechar"><a title="translate.storage.catkeys.CatkeysDialect.quotechar
127translate.storage.omegat.OmegaTDialect.quotechar
128translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-10', 'quotechar', 'link-10');">quotechar</a></tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
129</div><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
130<a name="rephp.convertstore"></a><div id="rephp.convertstore-def"><a name="L49"></a><tt class="py-lineno"> 49</tt> <a class="py-toggle" href="#" id="rephp.convertstore-toggle" onclick="return toggle('rephp.convertstore');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2php.rephp-class.html#convertstore">convertstore</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">includefuzzy</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
131</div><div id="rephp.convertstore-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.convertstore-expanded"><a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Variable translate.convert.po2oo.oofilteroptions.includefuzzy=translate.convert.po2oo.oofilteroptions-class.html#includefuzzy,Variable translate.convert.xliff2oo.oofilteroptions.includefuzzy=translate.convert.xliff2oo.oofilteroptions-class.html#includefuzzy"><a title="translate.convert.po2oo.oofilteroptions.includefuzzy
132translate.convert.xliff2oo.oofilteroptions.includefuzzy" class="py-name" href="#" onclick="return doclink('link-11', 'includefuzzy', 'link-11');">includefuzzy</a></tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="translate.convert.po2oo.oofilteroptions.includefuzzy
133translate.convert.xliff2oo.oofilteroptions.includefuzzy" class="py-name" href="#" onclick="return doclink('link-12', 'includefuzzy', 'link-11');">includefuzzy</a></tt> </tt>
134<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputstore</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method translate.convert.csv2po.csv2po.makeindex()=translate.convert.csv2po.csv2po-class.html#makeindex,Method translate.convert.po2oo.reoo.makeindex()=translate.convert.po2oo.reoo-class.html#makeindex,Method translate.convert.xliff2oo.reoo.makeindex()=translate.convert.xliff2oo.reoo-class.html#makeindex,Method translate.storage.base.TranslationStore.makeindex()=translate.storage.base.TranslationStore-class.html#makeindex,Method translate.storage.dtd.dtdfile.makeindex()=translate.storage.dtd.dtdfile-class.html#makeindex"><a title="translate.convert.csv2po.csv2po.makeindex
135translate.convert.po2oo.reoo.makeindex
136translate.convert.xliff2oo.reoo.makeindex
137translate.storage.base.TranslationStore.makeindex
138translate.storage.dtd.dtdfile.makeindex" class="py-name" href="#" onclick="return doclink('link-13', 'makeindex', 'link-13');">makeindex</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
139<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">outputlines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
140<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-14" class="py-name" targets="Variable translate.misc.ini.LineType.line=translate.misc.ini.LineType-class.html#line"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-14', 'line', 'link-14');">line</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">templatefile</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method translate.misc.wStringIO.StringIO.readlines()=translate.misc.wStringIO.StringIO-class.html#readlines"><a title="translate.misc.wStringIO.StringIO.readlines" class="py-name" href="#" onclick="return doclink('link-15', 'readlines', 'link-15');">readlines</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
141<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">            <tt class="py-name">outputstr</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method translate.convert.po2php.rephp.convertline()=translate.convert.po2php.rephp-class.html#convertline,Method translate.convert.po2prop.reprop.convertline()=translate.convert.po2prop.reprop-class.html#convertline"><a title="translate.convert.po2php.rephp.convertline
142translate.convert.po2prop.reprop.convertline" class="py-name" href="#" onclick="return doclink('link-16', 'convertline', 'link-16');">convertline</a></tt><tt class="py-op">(</tt><tt id="link-17" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-17', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> </tt>
143<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">            <tt class="py-name">outputlines</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">outputstr</tt><tt class="py-op">)</tt> </tt>
144<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outputlines</tt> </tt>
145</div><a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"> </tt>
146<a name="rephp.convertline"></a><div id="rephp.convertline-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="rephp.convertline-toggle" onclick="return toggle('rephp.convertline');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2php.rephp-class.html#convertline">convertline</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">line</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
147</div><div id="rephp.convertline-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.convertline-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt id="link-18" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-18', 'line', 'link-14');">line</a></tt> <tt class="py-op">=</tt> <tt class="py-name">unicode</tt><tt class="py-op">(</tt><tt id="link-19" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-19', 'line', 'link-14');">line</a></tt><tt class="py-op">,</tt> <tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
148<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
149<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-comment"># handle multiline msgid if we're in one</tt> </tt>
150<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inmultilinemsgid</tt><tt class="py-op">:</tt> </tt>
151<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">            <tt class="py-comment"># see if there's more</tt> </tt>
152<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">endpos</tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-20', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt class="py-name">rfind</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">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="translate.storage.catkeys.CatkeysDialect.quotechar
153translate.storage.omegat.OmegaTDialect.quotechar
154translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-21', 'quotechar', 'link-10');">quotechar</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">enddel</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
155<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">            <tt class="py-comment"># if there was no '; or the quote is escaped, we have to continue</tt> </tt>
156<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">endpos</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0</tt> <tt class="py-keyword">and</tt> <tt id="link-22" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-22', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">endpos</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-string">'\\'</tt><tt class="py-op">:</tt> </tt>
157<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inmultilinemsgid</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
158<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">            <tt class="py-comment"># if we're echoing...</tt> </tt>
159<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inecho</tt><tt class="py-op">:</tt> </tt>
160<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">                <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-23', 'line', 'link-14');">line</a></tt> </tt>
161<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-comment"># otherwise, this could be a comment</tt> </tt>
162<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">elif</tt> <tt id="link-24" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-24', 'line', 'link-14');">line</a></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-op">[</tt><tt class="py-op">:</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'//'</tt> <tt class="py-keyword">or</tt> <tt id="link-25" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-25', 'line', 'link-14');">line</a></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-op">[</tt><tt class="py-op">:</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'/*'</tt><tt class="py-op">:</tt> </tt>
163<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">            <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-26" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-26', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Function translate.misc.quote.rstripeol()=translate.misc.quote-module.html#rstripeol"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-27', 'rstripeol', 'link-27');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-28', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-29" class="py-name"><a title="translate.convert.po2php.eol
164translate.convert.po2prop.eol
165translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-29', 'eol', 'link-9');">eol</a></tt> </tt>
166<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt id="link-30" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-30', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt id="link-31" class="py-name" targets="Method translate.misc.ini.LineContainer.find()=translate.misc.ini.LineContainer-class.html#find,Method translate.storage.placeables.strelem.StringElem.find()=translate.storage.placeables.strelem.StringElem-class.html#find"><a title="translate.misc.ini.LineContainer.find
167translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-31', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'array('</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
168<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inarray</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
169<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prename</tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-32', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-33" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-33', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="translate.misc.ini.LineContainer.find
170translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-34', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</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 class="py-op">+</tt> <tt class="py-string">"-&gt;"</tt> </tt>
171<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">equaldel</tt> <tt class="py-op">=</tt> <tt class="py-string">"=&gt;"</tt> </tt>
172<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">enddel</tt> <tt class="py-op">=</tt> <tt class="py-string">","</tt> </tt>
173<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">            <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-35', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-36', 'rstripeol', 'link-27');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-37" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-37', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-38" class="py-name"><a title="translate.convert.po2php.eol
174translate.convert.po2prop.eol
175translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-38', 'eol', 'link-9');">eol</a></tt> </tt>
176<a name="L80"></a><tt class="py-lineno"> 80</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">inarray</tt> <tt class="py-keyword">and</tt> <tt id="link-39" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-39', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="translate.misc.ini.LineContainer.find
177translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-40', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">');'</tt><tt class="py-op">)</tt> <tt class="py-op">!=</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
178<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inarray</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
179<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">equaldel</tt> <tt class="py-op">=</tt> <tt class="py-string">"="</tt> </tt>
180<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">enddel</tt> <tt class="py-op">=</tt> <tt class="py-string">";"</tt> </tt>
181<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prename</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
182<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-41', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-42', 'rstripeol', 'link-27');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-43', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-44" class="py-name"><a title="translate.convert.po2php.eol
183translate.convert.po2prop.eol
184translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-44', 'eol', 'link-9');">eol</a></tt> </tt>
185<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
186<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt id="link-45" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-45', 'line', 'link-14');">line</a></tt> <tt class="py-op">=</tt> <tt id="link-46" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-46', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-47', 'rstripeol', 'link-27');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-48" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-48', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> </tt>
187<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">            <tt class="py-name">equalspos</tt> <tt class="py-op">=</tt> <tt id="link-49" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-49', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="translate.misc.ini.LineContainer.find
188translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-50', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">equaldel</tt><tt class="py-op">)</tt> </tt>
189<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">            <tt class="py-name">hashpos</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-51', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="translate.misc.ini.LineContainer.find
190translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-52', 'find', 'link-31');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">"#"</tt><tt class="py-op">)</tt> </tt>
191<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">            <tt class="py-comment"># if no equals, just repeat it</tt> </tt>
192<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">equalspos</tt> <tt class="py-op">==</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
193<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-53', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-54', 'rstripeol', 'link-27');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-55', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-56" class="py-name"><a title="translate.convert.po2php.eol
194translate.convert.po2prop.eol
195translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-56', 'eol', 'link-9');">eol</a></tt> </tt>
196<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-number">0</tt> <tt class="py-op">&lt;=</tt> <tt class="py-name">hashpos</tt> <tt class="py-op">&lt;</tt> <tt class="py-name">equalspos</tt><tt class="py-op">:</tt> </tt>
197<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                <tt class="py-comment"># Assume that this is a '#' comment line</tt> </tt>
198<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-57', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-58', 'rstripeol', 'link-27');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-59" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-59', 'line', 'link-14');">line</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt id="link-60" class="py-name"><a title="translate.convert.po2php.eol
199translate.convert.po2prop.eol
200translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-60', 'eol', 'link-9');">eol</a></tt> </tt>
201<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">            <tt class="py-comment"># otherwise, this is a definition</tt> </tt>
202<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
203<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                <tt class="py-comment"># now deal with the current string...</tt> </tt>
204<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt id="link-61" class="py-name" targets="Variable translate.lang.poedit.key=translate.lang.poedit-module.html#key"><a title="translate.lang.poedit.key" class="py-name" href="#" onclick="return doclink('link-61', 'key', 'link-61');">key</a></tt> <tt class="py-op">=</tt> <tt id="link-62" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-62', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">equalspos</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
205<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                <tt class="py-name">lookupkey</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">prename</tt> <tt class="py-op">+</tt> <tt id="link-63" class="py-name"><a title="translate.lang.poedit.key" class="py-name" href="#" onclick="return doclink('link-63', 'key', 'link-61');">key</a></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 id="link-64" class="py-name" targets="Method translate.misc.multistring.multistring.replace()=translate.misc.multistring.multistring-class.html#replace"><a title="translate.misc.multistring.multistring.replace" class="py-name" href="#" onclick="return doclink('link-64', 'replace', 'link-64');">replace</a></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>
206<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                <tt class="py-comment"># Calculate space around the equal sign</tt> </tt>
207<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">prespace</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-65', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-66" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-66', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">equalspos</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt class="py-name">equalspos</tt><tt class="py-op">]</tt> </tt>
208<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                <tt class="py-name">postspacestart</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-67" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-67', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</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 class="py-name">equaldel</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
209<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                <tt class="py-name">postspaceend</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-68" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-68', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</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 class="py-name">equaldel</tt><tt class="py-op">)</tt><tt class="py-op">:</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>
210<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">                <tt class="py-name">postspace</tt> <tt class="py-op">=</tt> <tt id="link-69" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-69', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</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 class="py-name">equaldel</tt><tt class="py-op">)</tt><tt class="py-op">:</tt><tt class="py-name">equalspos</tt><tt class="py-op">+</tt><tt class="py-op">(</tt><tt class="py-name">postspacestart</tt><tt class="py-op">-</tt><tt class="py-name">postspaceend</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">self</tt><tt class="py-op">.</tt><tt class="py-name">equaldel</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
211<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="translate.storage.catkeys.CatkeysDialect.quotechar
212translate.storage.omegat.OmegaTDialect.quotechar
213translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-70', 'quotechar', 'link-10');">quotechar</a></tt> <tt class="py-op">=</tt> <tt id="link-71" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-71', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</tt><tt class="py-op">+</tt><tt class="py-op">(</tt><tt class="py-name">postspacestart</tt><tt class="py-op">-</tt><tt class="py-name">postspaceend</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">self</tt><tt class="py-op">.</tt><tt class="py-name">equaldel</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>
214<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                <tt class="py-name">inlinecomment_pos</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-72', 'line', 'link-14');">line</a></tt><tt class="py-op">.</tt><tt class="py-name">rfind</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">self</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="translate.storage.catkeys.CatkeysDialect.quotechar
215translate.storage.omegat.OmegaTDialect.quotechar
216translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-73', 'quotechar', 'link-10');">quotechar</a></tt><tt class="py-op">,</tt> </tt>
217<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">                                                         <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">enddel</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
218<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">inlinecomment_pos</tt> <tt class="py-op">&gt;</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
219<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                    <tt class="py-name">inlinecomment</tt> <tt class="py-op">=</tt> <tt id="link-74" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-74', 'line', 'link-14');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">inlinecomment_pos</tt><tt class="py-op">+</tt><tt class="py-number">2</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
220<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
221<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                    <tt class="py-name">inlinecomment</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
222<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">lookupkey</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputstore</tt><tt class="py-op">.</tt><tt class="py-name">locationindex</tt><tt class="py-op">:</tt> </tt>
223<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                    <tt class="py-name">unit</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputstore</tt><tt class="py-op">.</tt><tt class="py-name">locationindex</tt><tt class="py-op">[</tt><tt class="py-name">lookupkey</tt><tt class="py-op">]</tt> </tt>
224<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name" targets="Method translate.filters.checks.StandardUnitChecker.isfuzzy()=translate.filters.checks.StandardUnitChecker-class.html#isfuzzy,Method translate.storage.base.TranslationUnit.isfuzzy()=translate.storage.base.TranslationUnit-cla

Large files files are truncated, but you can click here to view the full file