PageRenderTime 88ms CodeModel.GetById 3ms app.highlight 52ms RepoModel.GetById 14ms app.codeStats 1ms

/vendor/packages/translate-toolkit/translate/doc/api/translate.convert.po2php-pysrc.html

https://github.com/akatsoulas/kitsune
HTML | 475 lines | 442 code | 10 blank | 23 comment | 0 complexity | a5dc822d96a089fd14ca296406a1bfab 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="rephp"></a><div id="rephp-def"><a name="L35"></a><tt class="py-lineno"> 35</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>
115</div><div id="rephp-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="rephp-expanded"><a name="rephp.__init__"></a><div id="rephp.__init__-def"><a name="L36"></a><tt class="py-lineno"> 36</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-op">:</tt> </tt>
116</div><div id="rephp.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.__init__-expanded"><a name="L37"></a><tt class="py-lineno"> 37</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>
117<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputdict</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
118</div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
119<a name="rephp.convertstore"></a><div id="rephp.convertstore-def"><a name="L40"></a><tt class="py-lineno"> 40</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">inputstore</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>
120</div><div id="rephp.convertstore-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.convertstore-expanded"><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 id="link-10" class="py-name" targets="Method translate.convert.po2ical.reical.makestoredict()=translate.convert.po2ical.reical-class.html#makestoredict,Method translate.convert.po2ini.reini.makestoredict()=translate.convert.po2ini.reini-class.html#makestoredict,Method translate.convert.po2php.rephp.makestoredict()=translate.convert.po2php.rephp-class.html#makestoredict,Method translate.convert.po2prop.reprop.makestoredict()=translate.convert.po2prop.reprop-class.html#makestoredict,Method translate.convert.po2rc.rerc.makestoredict()=translate.convert.po2rc.rerc-class.html#makestoredict"><a title="translate.convert.po2ical.reical.makestoredict
123translate.convert.po2ini.reini.makestoredict
124translate.convert.po2php.rephp.makestoredict
125translate.convert.po2prop.reprop.makestoredict
126translate.convert.po2rc.rerc.makestoredict" class="py-name" href="#" onclick="return doclink('link-10', 'makestoredict', 'link-10');">makestoredict</a></tt><tt class="py-op">(</tt><tt class="py-name">inputstore</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
127translate.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>
128<a name="L44"></a><tt class="py-lineno"> 44</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>
129<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-12" 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-12', 'line', 'link-12');">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-13" 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-13', 'readlines', 'link-13');">readlines</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
130<a name="L46"></a><tt class="py-lineno"> 46</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-14" 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
131translate.convert.po2prop.reprop.convertline" class="py-name" href="#" onclick="return doclink('link-14', 'convertline', 'link-14');">convertline</a></tt><tt class="py-op">(</tt><tt id="link-15" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-15', 'line', 'link-12');">line</a></tt><tt class="py-op">)</tt> </tt>
132<a name="L47"></a><tt class="py-lineno"> 47</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>
133<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outputlines</tt> </tt>
134</div><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"> </tt>
135<a name="rephp.makestoredict"></a><div id="rephp.makestoredict-def"><a name="L50"></a><tt class="py-lineno"> 50</tt> <a class="py-toggle" href="#" id="rephp.makestoredict-toggle" onclick="return toggle('rephp.makestoredict');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2php.rephp-class.html#makestoredict">makestoredict</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">store</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>
136</div><div id="rephp.makestoredict-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.makestoredict-expanded"><a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-docstring">'''make a dictionary of the translations'''</tt> </tt>
137<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">unit</tt> <tt class="py-keyword">in</tt> <tt class="py-name">store</tt><tt class="py-op">.</tt><tt class="py-name">units</tt><tt class="py-op">:</tt> </tt>
138<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-16" class="py-name"><a title="translate.convert.po2oo.oofilteroptions.includefuzzy
139translate.convert.xliff2oo.oofilteroptions.includefuzzy" class="py-name" href="#" onclick="return doclink('link-16', 'includefuzzy', 'link-11');">includefuzzy</a></tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-17" 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-class.html#isfuzzy,Method translate.storage.cpo.pounit.isfuzzy()=translate.storage.cpo.pounit-class.html#isfuzzy,Method translate.storage.fpo.pounit.isfuzzy()=translate.storage.fpo.pounit-class.html#isfuzzy,Method translate.storage.pypo.pounit.isfuzzy()=translate.storage.pypo.pounit-class.html#isfuzzy,Method translate.storage.ts2.tsunit.isfuzzy()=translate.storage.ts2.tsunit-class.html#isfuzzy,Method translate.storage.xliff.xliffunit.isfuzzy()=translate.storage.xliff.xliffunit-class.html#isfuzzy,Method translate.storage.xliff.xliffunit.isfuzzy()=translate.storage.xliff.xliffunit-class.html#isfuzzy"><a title="translate.filters.checks.StandardUnitChecker.isfuzzy
140translate.storage.base.TranslationUnit.isfuzzy
141translate.storage.cpo.pounit.isfuzzy
142translate.storage.fpo.pounit.isfuzzy
143translate.storage.pypo.pounit.isfuzzy
144translate.storage.ts2.tsunit.isfuzzy
145translate.storage.xliff.xliffunit.isfuzzy
146translate.storage.xliff.xliffunit.isfuzzy" class="py-name" href="#" onclick="return doclink('link-17', 'isfuzzy', 'link-17');">isfuzzy</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
147<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">location</tt> <tt class="py-keyword">in</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method translate.storage.base.TranslationUnit.getlocations()=translate.storage.base.TranslationUnit-class.html#getlocations,Method translate.storage.cpo.pounit.getlocations()=translate.storage.cpo.pounit-class.html#getlocations,Method translate.storage.fpo.pounit.getlocations()=translate.storage.fpo.pounit-class.html#getlocations,Method translate.storage.html.htmlunit.getlocations()=translate.storage.html.htmlunit-class.html#getlocations,Method translate.storage.ical.icalunit.getlocations()=translate.storage.ical.icalunit-class.html#getlocations,Method translate.storage.ini.iniunit.getlocations()=translate.storage.ini.iniunit-class.html#getlocations,Method translate.storage.php.phpunit.getlocations()=translate.storage.php.phpunit-class.html#getlocations,Method translate.storage.poxliff.PoXliffUnit.getlocations()=translate.storage.poxliff.PoXliffUnit-class.html#getlocations,Method translate.storage.properties.propunit.getlocations()=translate.storage.properties.propunit-class.html#getlocations,Method translate.storage.pypo.pounit.getlocations()=translate.storage.pypo.pounit-class.html#getlocations,Method translate.storage.rc.rcunit.getlocations()=translate.storage.rc.rcunit-class.html#getlocations,Method translate.storage.subtitles.SubtitleUnit.getlocations()=translate.storage.subtitles.SubtitleUnit-class.html#getlocations,Method translate.storage.tiki.TikiUnit.getlocations()=translate.storage.tiki.TikiUnit-class.html#getlocations,Method translate.storage.ts2.tsunit.getlocations()=translate.storage.ts2.tsunit-class.html#getlocations,Method translate.storage.txt.TxtUnit.getlocations()=translate.storage.txt.TxtUnit-class.html#getlocations,Method translate.storage.xliff.xliffunit.getlocations()=translate.storage.xliff.xliffunit-class.html#getlocations"><a title="translate.storage.base.TranslationUnit.getlocations
148translate.storage.cpo.pounit.getlocations
149translate.storage.fpo.pounit.getlocations
150translate.storage.html.htmlunit.getlocations
151translate.storage.ical.icalunit.getlocations
152translate.storage.ini.iniunit.getlocations
153translate.storage.php.phpunit.getlocations
154translate.storage.poxliff.PoXliffUnit.getlocations
155translate.storage.properties.propunit.getlocations
156translate.storage.pypo.pounit.getlocations
157translate.storage.rc.rcunit.getlocations
158translate.storage.subtitles.SubtitleUnit.getlocations
159translate.storage.tiki.TikiUnit.getlocations
160translate.storage.ts2.tsunit.getlocations
161translate.storage.txt.TxtUnit.getlocations
162translate.storage.xliff.xliffunit.getlocations" class="py-name" href="#" onclick="return doclink('link-18', 'getlocations', 'link-18');">getlocations</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
163<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">                    <tt class="py-name">inputstring</tt> <tt class="py-op">=</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Variable translate.storage.base.TranslationUnit.target=translate.storage.base.TranslationUnit-class.html#target,Variable translate.storage.cpo.pounit.target=translate.storage.cpo.pounit-class.html#target,Variable translate.storage.dtd.dtdunit.target=translate.storage.dtd.dtdunit-class.html#target,Variable translate.storage.fpo.pounit.target=translate.storage.fpo.pounit-class.html#target,Variable translate.storage.lisa.LISAunit.target=translate.storage.lisa.LISAunit-class.html#target,Variable translate.storage.omegat.OmegaTUnit.target=translate.storage.omegat.OmegaTUnit-class.html#target,Variable translate.storage.php.phpunit.target=translate.storage.php.phpunit-class.html#target,Variable translate.storage.poxliff.PoXliffUnit.target=translate.storage.poxliff.PoXliffUnit-class.html#target,Variable translate.storage.properties.propunit.target=translate.storage.properties.propunit-class.html#target,Variable translate.storage.pypo.pounit.target=translate.storage.pypo.pounit-class.html#target,Variable translate.storage.rc.rcunit.target=translate.storage.rc.rcunit-class.html#target,Variable translate.storage.ts2.tsunit.target=translate.storage.ts2.tsunit-class.html#target,Variable translate.storage.txt.TxtUnit.target=translate.storage.txt.TxtUnit-class.html#target,Variable translate.storage.wordfast.WordfastUnit.target=translate.storage.wordfast.WordfastUnit-class.html#target"><a title="translate.storage.base.TranslationUnit.target
164translate.storage.cpo.pounit.target
165translate.storage.dtd.dtdunit.target
166translate.storage.fpo.pounit.target
167translate.storage.lisa.LISAunit.target
168translate.storage.omegat.OmegaTUnit.target
169translate.storage.php.phpunit.target
170translate.storage.poxliff.PoXliffUnit.target
171translate.storage.properties.propunit.target
172translate.storage.pypo.pounit.target
173translate.storage.rc.rcunit.target
174translate.storage.ts2.tsunit.target
175translate.storage.txt.TxtUnit.target
176translate.storage.wordfast.WordfastUnit.target" class="py-name" href="#" onclick="return doclink('link-19', 'target', 'link-19');">target</a></tt> </tt>
177<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">inputstring</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">0</tt><tt class="py-op">:</tt> </tt>
178<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">                        <tt class="py-name">inputstring</tt> <tt class="py-op">=</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Variable translate.storage.base.TranslationUnit.source=translate.storage.base.TranslationUnit-class.html#source,Variable translate.storage.cpo.pounit.source=translate.storage.cpo.pounit-class.html#source,Variable translate.storage.dtd.dtdunit.source=translate.storage.dtd.dtdunit-class.html#source,Variable translate.storage.fpo.pounit.source=translate.storage.fpo.pounit-class.html#source,Variable translate.storage.html.htmlunit.source=translate.storage.html.htmlunit-class.html#source,Variable translate.storage.lisa.LISAunit.source=translate.storage.lisa.LISAunit-class.html#source,Variable translate.storage.omegat.OmegaTUnit.source=translate.storage.omegat.OmegaTUnit-class.html#source,Variable translate.storage.php.phpunit.source=translate.storage.php.phpunit-class.html#source,Variable translate.storage.poxliff.PoXliffUnit.source=translate.storage.poxliff.PoXliffUnit-class.html#source,Variable translate.storage.properties.propunit.source=translate.storage.properties.propunit-class.html#source,Variable translate.storage.pypo.pounit.source=translate.storage.pypo.pounit-class.html#source,Variable translate.storage.rc.rcunit.source=translate.storage.rc.rcunit-class.html#source,Variable translate.storage.ts2.tsunit.source=translate.storage.ts2.tsunit-class.html#source,Variable translate.storage.txt.TxtUnit.source=translate.storage.txt.TxtUnit-class.html#source,Variable translate.storage.wordfast.WordfastUnit.source=translate.storage.wordfast.WordfastUnit-class.html#source"><a title="translate.storage.base.TranslationUnit.source
179translate.storage.cpo.pounit.source
180translate.storage.dtd.dtdunit.source
181translate.storage.fpo.pounit.source
182translate.storage.html.htmlunit.source
183translate.storage.lisa.LISAunit.source
184translate.storage.omegat.OmegaTUnit.source
185translate.storage.php.phpunit.source
186translate.storage.poxliff.PoXliffUnit.source
187translate.storage.properties.propunit.source
188translate.storage.pypo.pounit.source
189translate.storage.rc.rcunit.source
190translate.storage.ts2.tsunit.source
191translate.storage.txt.TxtUnit.source
192translate.storage.wordfast.WordfastUnit.source" class="py-name" href="#" onclick="return doclink('link-20', 'source', 'link-20');">source</a></tt> </tt>
193<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inputdict</tt><tt class="py-op">[</tt><tt class="py-name">location</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">inputstring</tt> </tt>
194</div><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"> </tt>
195<a name="rephp.convertline"></a><div id="rephp.convertline-def"><a name="L60"></a><tt class="py-lineno"> 60</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>
196</div><div id="rephp.convertline-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="rephp.convertline-expanded"><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt id="link-21" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-21', 'line', 'link-12');">line</a></tt> <tt class="py-op">=</tt> <tt class="py-name">unicode</tt><tt class="py-op">(</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-12');">line</a></tt><tt class="py-op">,</tt> <tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
197<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt> </tt>
198<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-comment"># handle multiline msgid if we're in one</tt> </tt>
199<a name="L64"></a><tt class="py-lineno"> 64</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>
200<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">            <tt class="py-comment"># see if there's more</tt> </tt>
201<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">endpos</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-12');">line</a></tt><tt class="py-op">.</tt><tt class="py-name">rfind</tt><tt class="py-op">(</tt><tt class="py-string">"%s;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="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.omegat.OmegaTDialect.quotechar
202translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-24', 'quotechar', 'link-24');">quotechar</a></tt><tt class="py-op">)</tt> </tt>
203<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">            <tt class="py-comment"># if there was no '; or the quote is escaped, we have to continue</tt> </tt>
204<a name="L68"></a><tt class="py-lineno"> 68</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-25" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-25', 'line', 'link-12');">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>
205<a name="L69"></a><tt class="py-lineno"> 69</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>
206<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">            <tt class="py-comment"># if we're echoing...</tt> </tt>
207<a name="L71"></a><tt class="py-lineno"> 71</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>
208<a name="L72"></a><tt class="py-lineno"> 72</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.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-26', 'line', 'link-12');">line</a></tt> </tt>
209<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-comment"># otherwise, this could be a comment</tt> </tt>
210<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">elif</tt> <tt id="link-27" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-27', 'line', 'link-12');">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-28" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-28', 'line', 'link-12');">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>
211<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">            <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-29', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-30" 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-30', 'rstripeol', 'link-30');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-31', 'line', 'link-12');">line</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt id="link-32" class="py-name"><a title="translate.convert.po2php.eol
212translate.convert.po2prop.eol
213translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-32', 'eol', 'link-9');">eol</a></tt> </tt>
214<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
215<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">            <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-12');">line</a></tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-34', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-35', 'rstripeol', 'link-30');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-36', 'line', 'link-12');">line</a></tt><tt class="py-op">)</tt> </tt>
216<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">            <tt class="py-name">equalspos</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-12');">line</a></tt><tt class="py-op">.</tt><tt id="link-38" 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
217translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-38', 'find', 'link-38');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt> </tt>
218<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">            <tt class="py-name">hashpos</tt> <tt class="py-op">=</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-12');">line</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="translate.misc.ini.LineContainer.find
219translate.storage.placeables.strelem.StringElem.find" class="py-name" href="#" onclick="return doclink('link-40', 'find', 'link-38');">find</a></tt><tt class="py-op">(</tt><tt class="py-string">"#"</tt><tt class="py-op">)</tt> </tt>
220<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">            <tt class="py-comment"># if no equals, just repeat it</tt> </tt>
221<a name="L81"></a><tt class="py-lineno"> 81</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>
222<a name="L82"></a><tt class="py-lineno"> 82</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-30');">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-12');">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
223translate.convert.po2prop.eol
224translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-44', 'eol', 'link-9');">eol</a></tt> </tt>
225<a name="L83"></a><tt class="py-lineno"> 83</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>
226<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">                <tt class="py-comment"># Assume that this is a '#' comment line</tt> </tt>
227<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">returnline</tt> <tt class="py-op">=</tt> <tt id="link-45" class="py-name"><a title="translate.misc.quote" class="py-name" href="#" onclick="return doclink('link-45', 'quote', 'link-2');">quote</a></tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="translate.misc.quote.rstripeol" class="py-name" href="#" onclick="return doclink('link-46', 'rstripeol', 'link-30');">rstripeol</a></tt><tt class="py-op">(</tt><tt id="link-47" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-47', 'line', 'link-12');">line</a></tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt id="link-48" class="py-name"><a title="translate.convert.po2php.eol
228translate.convert.po2prop.eol
229translate.storage.properties.eol" class="py-name" href="#" onclick="return doclink('link-48', 'eol', 'link-9');">eol</a></tt> </tt>
230<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">            <tt class="py-comment"># otherwise, this is a definition</tt> </tt>
231<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
232<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                <tt class="py-comment"># now deal with the current string...</tt> </tt>
233<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt id="link-49" 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-49', 'key', 'link-49');">key</a></tt> <tt class="py-op">=</tt> <tt id="link-50" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-50', 'line', 'link-12');">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">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
234<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                <tt class="py-name">lookupkey</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="translate.lang.poedit.key" class="py-name" href="#" onclick="return doclink('link-51', 'key', 'link-49');">key</a></tt><tt class="py-op">.</tt><tt id="link-52" 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-52', 'replace', 'link-52');">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>
235<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">                <tt class="py-comment"># Calculate space around the equal sign</tt> </tt>
236<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">prespace</tt> <tt class="py-op">=</tt> <tt id="link-53" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-53', 'line', 'link-12');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-54" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-54', 'line', 'link-12');">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>
237<a name="L93"></a><tt class="py-lineno"> 93</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-55" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-55', 'line', 'link-12');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</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-op">)</tt> </tt>
238<a name="L94"></a><tt class="py-lineno"> 94</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-56" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-56', 'line', 'link-12');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</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-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
239<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                <tt class="py-name">postspace</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-57', 'line', 'link-12');">line</a></tt><tt class="py-op">[</tt><tt class="py-name">equalspos</tt><tt class="py-op">+</tt><tt class="py-number">1</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-number">1</tt><tt class="py-op">]</tt> </tt>
240<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="translate.storage.omegat.OmegaTDialect.quotechar
241translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-58', 'quotechar', 'link-24');">quotechar</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-12');">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-number">1</tt><tt class="py-op">]</tt> </tt>
242<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">                <tt class="py-name">inlinecomment_pos</tt> <tt class="py-op">=</tt> <tt id="link-60" class="py-name"><a title="translate.misc.ini.LineType.line" class="py-name" href="#" onclick="return doclink('link-60', 'line', 'link-12');">line</a></tt><tt class="py-op">.</tt><tt class="py-name">rfind</tt><tt class="py-op">(</tt><tt class="py-string">"%s;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="translate.storage.omegat.OmegaTDialect.quotechar
243translate.storage.wordfast.WordfastDialect.quotechar" class="py-name" href="#" onclick="return doclink('link-61', 'quotechar', 'link-24');">quotechar</a></tt><tt class="py-op">)</tt> </tt>
244<a name="L98"></a><tt class="py-lineno"> 98</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>
245<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                    <tt class="py-name">inlinecomment</tt> <tt class="py-op">=</tt> <tt id="link-62" class="py-…

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