PageRenderTime 55ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://github.com/TriggeredMessaging/playdoh-lib
HTML | 489 lines | 456 code | 10 blank | 23 comment | 0 complexity | 89810edbca5d11b0d1b24f967349598a MD5 | raw file
Possible License(s): GPL-2.0

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.po2tiki</title>
  7. <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8. <script type="text/javascript" src="epydoc.js"></script>
  9. </head>
  10. <body bgcolor="white" text="black" link="blue" vlink="#204080"
  11. alink="#204080">
  12. <!-- ==================== NAVIGATION BAR ==================== -->
  13. <table class="navbar" border="0" width="100%" cellpadding="0"
  14. bgcolor="#a0c0ff" cellspacing="0">
  15. <tr valign="middle">
  16. <!-- Home link -->
  17. <th>&nbsp;&nbsp;&nbsp;<a
  18. href="translate-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
  19. <!-- Tree link -->
  20. <th>&nbsp;&nbsp;&nbsp;<a
  21. href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
  22. <!-- Index link -->
  23. <th>&nbsp;&nbsp;&nbsp;<a
  24. href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
  25. <!-- Help link -->
  26. <th>&nbsp;&nbsp;&nbsp;<a
  27. href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
  28. <!-- Project homepage -->
  29. <th class="navbar" align="right" width="100%">
  30. <table border="0" cellpadding="0" cellspacing="0">
  31. <tr><th class="navbar" align="center"
  32. ><a class="navbar" target="_top" href="http://translate.sourceforge.net/wiki/toolkit/index">Translate Toolkit</a></th>
  33. </tr></table></th>
  34. </tr>
  35. </table>
  36. <table width="100%" cellpadding="0" cellspacing="0">
  37. <tr valign="top">
  38. <td width="100%">
  39. <span class="breadcrumbs">
  40. <a href="translate-module.html">Package&nbsp;translate</a> ::
  41. <a href="translate.convert-module.html">Package&nbsp;convert</a> ::
  42. Module&nbsp;po2tiki
  43. </span>
  44. </td>
  45. <td>
  46. <table cellpadding="0" cellspacing="0">
  47. <!-- hide/show private -->
  48. <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
  49. onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
  50. <tr><td align="right"><span class="options"
  51. >[<a href="frames.html" target="_top">frames</a
  52. >]&nbsp;|&nbsp;<a href="translate.convert.po2tiki-pysrc.html"
  53. target="_top">no&nbsp;frames</a>]</span></td></tr>
  54. </table>
  55. </td>
  56. </tr>
  57. </table>
  58. <h1 class="epydoc">Source Code for <a href="translate.convert.po2tiki-module.html">Module translate.convert.po2tiki</a></h1>
  59. <pre class="py-src">
  60. <a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
  61. <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>
  62. <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>
  63. <a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Copyright 2008 Mozilla Corporation, Zuza Software Foundation</tt> </tt>
  64. <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>
  65. <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>
  66. <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>
  67. <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>
  68. <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>
  69. <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>
  70. <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>
  71. <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>
  72. <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>
  73. <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>
  74. <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>
  75. <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>
  76. <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>
  77. <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>
  78. <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>
  79. <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>
  80. <a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt>
  81. <a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring">""" Convert .po files to TikiWiki's language.php files. """</tt> </tt>
  82. <a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> </tt>
  83. <a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
  84. <a name="L25"></a><tt class="py-lineno">25</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
  85. translate.storage.base.TranslationStore.translate
  86. translate.storage.placeables.strelem.StringElem.translate
  87. translate.storage.placeables.terminology.TerminologyPlaceable.translate
  88. translate.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.storage=translate.storage-module.html"><a title="translate.storage" class="py-name" href="#" onclick="return doclink('link-1', 'storage', 'link-1');">storage</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Module translate.storage.tiki=translate.storage.tiki-module.html"><a title="translate.storage.tiki" class="py-name" href="#" onclick="return doclink('link-2', 'tiki', 'link-2');">tiki</a></tt> </tt>
  89. <a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="translate
  90. translate.storage.base.TranslationStore.translate
  91. translate.storage.placeables.strelem.StringElem.translate
  92. translate.storage.placeables.terminology.TerminologyPlaceable.translate
  93. translate.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"><a title="translate.storage" class="py-name" href="#" onclick="return doclink('link-4', 'storage', 'link-1');">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>
  94. <a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> </tt>
  95. <a name="po2tiki"></a><div id="po2tiki-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="po2tiki-toggle" onclick="return toggle('po2tiki');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="translate.convert.po2tiki.po2tiki-class.html">po2tiki</a><tt class="py-op">:</tt> </tt>
  96. </div><div id="po2tiki-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="po2tiki-expanded"><a name="po2tiki.convertstore"></a><div id="po2tiki.convertstore-def"><a name="L29"></a><tt class="py-lineno">29</tt> <a class="py-toggle" href="#" id="po2tiki.convertstore-toggle" onclick="return toggle('po2tiki.convertstore');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2tiki.po2tiki-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">thepofile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
  97. </div><div id="po2tiki.convertstore-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="po2tiki.convertstore-expanded"><a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-docstring">"""Converts a given (parsed) po file to a tiki file.</tt> </tt>
  98. <a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
  99. <a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> @param thepofile: a pofile pre-loaded with input data</tt> </tt>
  100. <a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
  101. <a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-name">thetargetfile</tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="translate.storage.tiki" class="py-name" href="#" onclick="return doclink('link-6', 'tiki', 'link-2');">tiki</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Class translate.storage.tiki.TikiStore=translate.storage.tiki.TikiStore-class.html"><a title="translate.storage.tiki.TikiStore" class="py-name" href="#" onclick="return doclink('link-7', 'TikiStore', 'link-7');">TikiStore</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
  102. <a name="L35"></a><tt class="py-lineno">35</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">thepofile</tt><tt class="py-op">.</tt><tt class="py-name">units</tt><tt class="py-op">:</tt> </tt>
  103. <a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method translate.storage.base.TranslationUnit.isblank()=translate.storage.base.TranslationUnit-class.html#isblank,Method translate.storage.cpo.pounit.isblank()=translate.storage.cpo.pounit-class.html#isblank,Method translate.storage.fpo.pounit.isblank()=translate.storage.fpo.pounit-class.html#isblank,Method translate.storage.php.phpunit.isblank()=translate.storage.php.phpunit-class.html#isblank,Method translate.storage.properties.propunit.isblank()=translate.storage.properties.propunit-class.html#isblank,Method translate.storage.pypo.pounit.isblank()=translate.storage.pypo.pounit-class.html#isblank,Method translate.storage.rc.rcunit.isblank()=translate.storage.rc.rcunit-class.html#isblank"><a title="translate.storage.base.TranslationUnit.isblank
  104. translate.storage.cpo.pounit.isblank
  105. translate.storage.fpo.pounit.isblank
  106. translate.storage.php.phpunit.isblank
  107. translate.storage.properties.propunit.isblank
  108. translate.storage.pypo.pounit.isblank
  109. translate.storage.rc.rcunit.isblank" class="py-name" href="#" onclick="return doclink('link-8', 'isblank', 'link-8');">isblank</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method translate.storage.base.TranslationUnit.isheader()=translate.storage.base.TranslationUnit-class.html#isheader,Method translate.storage.cpo.pounit.isheader()=translate.storage.cpo.pounit-class.html#isheader,Method translate.storage.fpo.pounit.isheader()=translate.storage.fpo.pounit-class.html#isheader,Method translate.storage.mo.mounit.isheader()=translate.storage.mo.mounit-class.html#isheader,Method translate.storage.poxliff.PoXliffUnit.isheader()=translate.storage.poxliff.PoXliffUnit-class.html#isheader,Method translate.storage.pypo.pounit.isheader()=translate.storage.pypo.pounit-class.html#isheader"><a title="translate.storage.base.TranslationUnit.isheader
  110. translate.storage.cpo.pounit.isheader
  111. translate.storage.fpo.pounit.isheader
  112. translate.storage.mo.mounit.isheader
  113. translate.storage.poxliff.PoXliffUnit.isheader
  114. translate.storage.pypo.pounit.isheader" class="py-name" href="#" onclick="return doclink('link-9', 'isheader', 'link-9');">isheader</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
  115. <a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> <tt class="py-name">newunit</tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="translate.storage.tiki" class="py-name" href="#" onclick="return doclink('link-10', 'tiki', 'link-2');">tiki</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Class translate.storage.tiki.TikiUnit=translate.storage.tiki.TikiUnit-class.html"><a title="translate.storage.tiki.TikiUnit" class="py-name" href="#" onclick="return doclink('link-11', 'TikiUnit', 'link-11');">TikiUnit</a></tt><tt class="py-op">(</tt><tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Variable translate.storage.base.TranslationUnit.source=translate.storage.base.TranslationUnit-class.html#source,Variable translate.storage.catkeys.CatkeysUnit.source=translate.storage.catkeys.CatkeysUnit-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
  116. translate.storage.catkeys.CatkeysUnit.source
  117. translate.storage.cpo.pounit.source
  118. translate.storage.dtd.dtdunit.source
  119. translate.storage.fpo.pounit.source
  120. translate.storage.html.htmlunit.source
  121. translate.storage.lisa.LISAunit.source
  122. translate.storage.omegat.OmegaTUnit.source
  123. translate.storage.php.phpunit.source
  124. translate.storage.poxliff.PoXliffUnit.source
  125. translate.storage.properties.propunit.source
  126. translate.storage.pypo.pounit.source
  127. translate.storage.rc.rcunit.source
  128. translate.storage.ts2.tsunit.source
  129. translate.storage.txt.TxtUnit.source
  130. translate.storage.wordfast.WordfastUnit.source" class="py-name" href="#" onclick="return doclink('link-12', 'source', 'link-12');">source</a></tt><tt class="py-op">)</tt> </tt>
  131. <a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> <tt class="py-name">newunit</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method translate.storage.base.TranslationUnit.settarget()=translate.storage.base.TranslationUnit-class.html#settarget,Method translate.storage.catkeys.CatkeysUnit.settarget()=translate.storage.catkeys.CatkeysUnit-class.html#settarget,Method translate.storage.cpo.pounit.settarget()=translate.storage.cpo.pounit-class.html#settarget,Method translate.storage.dtd.dtdunit.settarget()=translate.storage.dtd.dtdunit-class.html#settarget,Method translate.storage.fpo.pounit.settarget()=translate.storage.fpo.pounit-class.html#settarget,Method translate.storage.lisa.LISAunit.settarget()=translate.storage.lisa.LISAunit-class.html#settarget,Method translate.storage.lisa.LISAunit.settarget()=translate.storage.lisa.LISAunit-class.html#settarget,Method translate.storage.omegat.OmegaTUnit.settarget()=translate.storage.omegat.OmegaTUnit-class.html#settarget,Method translate.storage.php.phpunit.settarget()=translate.storage.php.phpunit-class.html#settarget,Method translate.storage.poxliff.PoXliffUnit.settarget()=translate.storage.poxliff.PoXliffUnit-class.html#settarget,Method translate.storage.properties.propunit.settarget()=translate.storage.properties.propunit-class.html#settarget,Method translate.storage.pypo.pounit.settarget()=translate.storage.pypo.pounit-class.html#settarget,Method translate.storage.rc.rcunit.settarget()=translate.storage.rc.rcunit-class.html#settarget,Method translate.storage.ts2.tsunit.settarget()=translate.storage.ts2.tsunit-class.html#settarget,Method translate.storage.txt.TxtUnit.settarget()=translate.storage.txt.TxtUnit-class.html#settarget,Method translate.storage.wordfast.WordfastUnit.settarget()=translate.storage.wordfast.WordfastUnit-class.html#settarget,Method translate.storage.xliff.xliffunit.settarget()=translate.storage.xliff.xliffunit-class.html#settarget"><a title="translate.storage.base.TranslationUnit.settarget
  132. translate.storage.catkeys.CatkeysUnit.settarget
  133. translate.storage.cpo.pounit.settarget
  134. translate.storage.dtd.dtdunit.settarget
  135. translate.storage.fpo.pounit.settarget
  136. translate.storage.lisa.LISAunit.settarget
  137. translate.storage.lisa.LISAunit.settarget
  138. translate.storage.omegat.OmegaTUnit.settarget
  139. translate.storage.php.phpunit.settarget
  140. translate.storage.poxliff.PoXliffUnit.settarget
  141. translate.storage.properties.propunit.settarget
  142. translate.storage.pypo.pounit.settarget
  143. translate.storage.rc.rcunit.settarget
  144. translate.storage.ts2.tsunit.settarget
  145. translate.storage.txt.TxtUnit.settarget
  146. translate.storage.wordfast.WordfastUnit.settarget
  147. translate.storage.xliff.xliffunit.settarget" class="py-name" href="#" onclick="return doclink('link-13', 'settarget', 'link-13');">settarget</a></tt><tt class="py-op">(</tt><tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Variable translate.storage.base.TranslationUnit.target=translate.storage.base.TranslationUnit-class.html#target,Variable translate.storage.catkeys.CatkeysUnit.target=translate.storage.catkeys.CatkeysUnit-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
  148. translate.storage.catkeys.CatkeysUnit.target
  149. translate.storage.cpo.pounit.target
  150. translate.storage.dtd.dtdunit.target
  151. translate.storage.fpo.pounit.target
  152. translate.storage.lisa.LISAunit.target
  153. translate.storage.omegat.OmegaTUnit.target
  154. translate.storage.php.phpunit.target
  155. translate.storage.poxliff.PoXliffUnit.target
  156. translate.storage.properties.propunit.target
  157. translate.storage.pypo.pounit.target
  158. translate.storage.rc.rcunit.target
  159. translate.storage.ts2.tsunit.target
  160. translate.storage.txt.TxtUnit.target
  161. translate.storage.wordfast.WordfastUnit.target" class="py-name" href="#" onclick="return doclink('link-14', 'target', 'link-14');">target</a></tt><tt class="py-op">)</tt> </tt>
  162. <a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-name">locations</tt> <tt class="py-op">=</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-15" 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
  163. translate.storage.cpo.pounit.getlocations
  164. translate.storage.fpo.pounit.getlocations
  165. translate.storage.html.htmlunit.getlocations
  166. translate.storage.ical.icalunit.getlocations
  167. translate.storage.ini.iniunit.getlocations
  168. translate.storage.php.phpunit.getlocations
  169. translate.storage.poxliff.PoXliffUnit.getlocations
  170. translate.storage.properties.propunit.getlocations
  171. translate.storage.pypo.pounit.getlocations
  172. translate.storage.rc.rcunit.getlocations
  173. translate.storage.subtitles.SubtitleUnit.getlocations
  174. translate.storage.tiki.TikiUnit.getlocations
  175. translate.storage.ts2.tsunit.getlocations
  176. translate.storage.txt.TxtUnit.getlocations
  177. translate.storage.xliff.xliffunit.getlocations" class="py-name" href="#" onclick="return doclink('link-15', 'getlocations', 'link-15');">getlocations</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
  178. <a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">locations</tt><tt class="py-op">:</tt> </tt>
  179. <a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt class="py-name">newunit</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method translate.storage.base.TranslationUnit.addlocations()=translate.storage.base.TranslationUnit-class.html#addlocations"><a title="translate.storage.base.TranslationUnit.addlocations" class="py-name" href="#" onclick="return doclink('link-16', 'addlocations', 'link-16');">addlocations</a></tt><tt class="py-op">(</tt><tt class="py-name">locations</tt><tt class="py-op">)</tt> </tt>
  180. <a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> <tt class="py-comment"># If a word is "untranslated" but the target isn't empty and isn't the same as the source</tt> </tt>
  181. <a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># it's been translated and we switch it. This is an assumption but should remain true as long</tt> </tt>
  182. <a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># as these scripts are used.</tt> </tt>
  183. <a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">newunit</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="translate.storage.base.TranslationUnit.getlocations
  184. translate.storage.cpo.pounit.getlocations
  185. translate.storage.fpo.pounit.getlocations
  186. translate.storage.html.htmlunit.getlocations
  187. translate.storage.ical.icalunit.getlocations
  188. translate.storage.ini.iniunit.getlocations
  189. translate.storage.php.phpunit.getlocations
  190. translate.storage.poxliff.PoXliffUnit.getlocations
  191. translate.storage.properties.propunit.getlocations
  192. translate.storage.pypo.pounit.getlocations
  193. translate.storage.rc.rcunit.getlocations
  194. translate.storage.subtitles.SubtitleUnit.getlocations
  195. translate.storage.tiki.TikiUnit.getlocations
  196. translate.storage.ts2.tsunit.getlocations
  197. translate.storage.txt.TxtUnit.getlocations
  198. translate.storage.xliff.xliffunit.getlocations" class="py-name" href="#" onclick="return doclink('link-17', 'getlocations', 'link-15');">getlocations</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-op">[</tt><tt class="py-string">"untranslated"</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="translate.storage.base.TranslationUnit.source
  199. translate.storage.catkeys.CatkeysUnit.source
  200. translate.storage.cpo.pounit.source
  201. translate.storage.dtd.dtdunit.source
  202. translate.storage.fpo.pounit.source
  203. translate.storage.html.htmlunit.source
  204. translate.storage.lisa.LISAunit.source
  205. translate.storage.omegat.OmegaTUnit.source
  206. translate.storage.php.phpunit.source
  207. translate.storage.poxliff.PoXliffUnit.source
  208. translate.storage.properties.propunit.source
  209. translate.storage.pypo.pounit.source
  210. translate.storage.rc.rcunit.source
  211. translate.storage.ts2.tsunit.source
  212. translate.storage.txt.TxtUnit.source
  213. translate.storage.wordfast.WordfastUnit.source" class="py-name" href="#" onclick="return doclink('link-18', 'source', 'link-12');">source</a></tt> <tt class="py-op">!=</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="translate.storage.base.TranslationUnit.target
  214. translate.storage.catkeys.CatkeysUnit.target
  215. translate.storage.cpo.pounit.target
  216. translate.storage.dtd.dtdunit.target
  217. translate.storage.fpo.pounit.target
  218. translate.storage.lisa.LISAunit.target
  219. translate.storage.omegat.OmegaTUnit.target
  220. translate.storage.php.phpunit.target
  221. translate.storage.poxliff.PoXliffUnit.target
  222. translate.storage.properties.propunit.target
  223. translate.storage.pypo.pounit.target
  224. translate.storage.rc.rcunit.target
  225. translate.storage.ts2.tsunit.target
  226. translate.storage.txt.TxtUnit.target
  227. translate.storage.wordfast.WordfastUnit.target" class="py-name" href="#" onclick="return doclink('link-19', 'target', 'link-14');">target</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">unit</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="translate.storage.base.TranslationUnit.target
  228. translate.storage.catkeys.CatkeysUnit.target
  229. translate.storage.cpo.pounit.target
  230. translate.storage.dtd.dtdunit.target
  231. translate.storage.fpo.pounit.target
  232. translate.storage.lisa.LISAunit.target
  233. translate.storage.omegat.OmegaTUnit.target
  234. translate.storage.php.phpunit.target
  235. translate.storage.poxliff.PoXliffUnit.target
  236. translate.storage.properties.propunit.target
  237. translate.storage.pypo.pounit.target
  238. translate.storage.rc.rcunit.target
  239. translate.storage.ts2.tsunit.target
  240. translate.storage.txt.TxtUnit.target
  241. translate.storage.wordfast.WordfastUnit.target" class="py-name" href="#" onclick="return doclink('link-20', 'target', 'link-14');">target</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">""</tt><tt class="py-op">:</tt> </tt>
  242. <a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"> <tt class="py-name">newunit</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-op">]</tt> </tt>
  243. <a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-name">newunit</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method translate.storage.base.TranslationUnit.addlocation()=translate.storage.base.TranslationUnit-class.html#addlocation,Method translate.storage.cpo.pounit.addlocation()=translate.storage.cpo.pounit-class.html#addlocation,Method translate.storage.fpo.pounit.addlocation()=translate.storage.fpo.pounit-class.html#addlocation,Method translate.storage.html.htmlunit.addlocation()=translate.storage.html.htmlunit-class.html#addlocation,Method translate.storage.ical.icalunit.addlocation()=translate.storage.ical.icalunit-class.html#addlocation,Method translate.storage.ini.iniunit.addlocation()=translate.storage.ini.iniunit-class.html#addlocation,Method translate.storage.php.phpunit.addlocation()=translate.storage.php.phpunit-class.html#addlocation,Method translate.storage.pypo.pounit.addlocation()=translate.storage.pypo.pounit-class.html#addlocation,Method translate.storage.tiki.TikiUnit.addlocation()=translate.storage.tiki.TikiUnit-class.html#addlocation,Method translate.storage.ts2.tsunit.addlocation()=translate.storage.ts2.tsunit-class.html#addlocation,Method translate.storage.txt.TxtUnit.addlocation()=translate.storage.txt.TxtUnit-class.html#addlocation,Method translate.storage.xliff.xliffunit.addlocation()=translate.storage.xliff.xliffunit-class.html#addlocation,Method translate.storage.xliff.xliffunit.addlocation()=translate.storage.xliff.xliffunit-class.html#addlocation"><a title="translate.storage.base.TranslationUnit.addlocation
  244. translate.storage.cpo.pounit.addlocation
  245. translate.storage.fpo.pounit.addlocation
  246. translate.storage.html.htmlunit.addlocation
  247. translate.storage.ical.icalunit.addlocation
  248. translate.storage.ini.iniunit.addlocation
  249. translate.storage.php.phpunit.addlocation
  250. translate.storage.pypo.pounit.addlocation
  251. translate.storage.tiki.TikiUnit.addlocation
  252. translate.storage.ts2.tsunit.addlocation
  253. translate.storage.txt.TxtUnit.addlocation
  254. translate.storage.xliff.xliffunit.addlocation
  255. translate.storage.xliff.xliffunit.addlocation" class="py-name" href="#" onclick="return doclink('link-21', 'addlocation', 'link-21');">addlocation</a></tt><tt class="py-op">(</tt><tt class="py-string">"translated"</tt><tt class="py-op">)</tt> </tt>
  256. <a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> </tt>
  257. <a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> <tt class="py-name">thetargetfile</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method translate.storage.base.TranslationStore.addunit()=translate.storage.base.TranslationStore-class.html#addunit,Method translate.storage.cpo.pofile.addunit()=translate.storage.cpo.pofile-class.html#addunit,Method translate.storage.lisa.LISAfile.addunit()=translate.storage.lisa.LISAfile-class.html#addunit,Method translate.storage.lisa.LISAfile.addunit()=translate.storage.lisa.LISAfile-class.html#addunit,Method translate.storage.ts2.tsfile.addunit()=translate.storage.ts2.tsfile-class.html#addunit"><a title="translate.storage.base.TranslationStore.addunit
  258. translate.storage.cpo.pofile.addunit
  259. translate.storage.lisa.LISAfile.addunit
  260. translate.storage.lisa.LISAfile.addunit
  261. translate.storage.ts2.tsfile.addunit" class="py-name" href="#" onclick="return doclink('link-22', 'addunit', 'link-22');">addunit</a></tt><tt class="py-op">(</tt><tt class="py-name">newunit</tt><tt class="py-op">)</tt> </tt>
  262. <a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">thetargetfile</tt> </tt>
  263. </div></div><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> </tt>
  264. <a name="convertpo"></a><div id="convertpo-def"><a name="L52"></a><tt class="py-lineno">52</tt> <a class="py-toggle" href="#" id="convertpo-toggle" onclick="return toggle('convertpo');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2tiki-module.html#convertpo">convertpo</a><tt class="py-op">(</tt><tt class="py-param">inputfile</tt><tt class="py-op">,</tt> <tt class="py-param">outputfile</tt><tt class="py-op">,</tt> <tt class="py-param">template</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
  265. </div><div id="convertpo-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="convertpo-expanded"><a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"> <tt class="py-docstring">"""Converts from po file format to tiki.</tt> </tt>
  266. <a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
  267. <a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> @param inputfile: file handle of the source</tt> </tt>
  268. <a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> @param outputfile: file handle to write to</tt> </tt>
  269. <a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"><tt class="py-docstring"> @param template: unused</tt> </tt>
  270. <a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
  271. <a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> <tt class="py-name">inputstore</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="translate.storage.po" class="py-name" href="#" onclick="return doclink('link-23', 'po', 'link-5');">po</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Class translate.storage.cpo.pofile=translate.storage.cpo.pofile-class.html,Class translate.storage.fpo.pofile=translate.storage.fpo.pofile-class.html,Class translate.storage.pocommon.pofile=translate.storage.pocommon.pofile-class.html,Class translate.storage.pypo.pofile=translate.storage.pypo.pofile-class.html"><a title="translate.storage.cpo.pofile
  272. translate.storage.fpo.pofile
  273. translate.storage.pocommon.pofile
  274. translate.storage.pypo.pofile" class="py-name" href="#" onclick="return doclink('link-24', 'pofile', 'link-24');">pofile</a></tt><tt class="py-op">(</tt><tt class="py-name">inputfile</tt><tt class="py-op">)</tt> </tt>
  275. <a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">inputstore</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method translate.storage.base.TranslationStore.isempty()=translate.storage.base.TranslationStore-class.html#isempty,Method translate.storage.cpo.pofile.isempty()=translate.storage.cpo.pofile-class.html#isempty"><a title="translate.storage.base.TranslationStore.isempty
  276. translate.storage.cpo.pofile.isempty" class="py-name" href="#" onclick="return doclink('link-25', 'isempty', 'link-25');">isempty</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
  277. <a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
  278. <a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"> <tt class="py-name">convertor</tt> <tt class="py-op">=</tt> <tt id="link-26" class="py-name" targets="Module translate.convert.po2tiki=translate.convert.po2tiki-module.html,Class translate.convert.po2tiki.po2tiki=translate.convert.po2tiki.po2tiki-class.html"><a title="translate.convert.po2tiki
  279. translate.convert.po2tiki.po2tiki" class="py-name" href="#" onclick="return doclink('link-26', 'po2tiki', 'link-26');">po2tiki</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
  280. <a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"> <tt class="py-name">outputstore</tt> <tt class="py-op">=</tt> <tt class="py-name">convertor</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method translate.convert.csv2po.csv2po.convertstore()=translate.convert.csv2po.csv2po-class.html#convertstore,Method translate.convert.dtd2po.dtd2po.convertstore()=translate.convert.dtd2po.dtd2po-class.html#convertstore,Method translate.convert.oo2po.oo2po.convertstore()=translate.convert.oo2po.oo2po-class.html#convertstore,Method translate.convert.oo2xliff.oo2xliff.convertstore()=translate.convert.oo2xliff.oo2xliff-class.html#convertstore,Method translate.convert.php2po.php2po.convertstore()=translate.convert.php2po.php2po-class.html#convertstore,Method translate.convert.po2csv.po2csv.convertstore()=translate.convert.po2csv.po2csv-class.html#convertstore,Method translate.convert.po2dtd.po2dtd.convertstore()=translate.convert.po2dtd.po2dtd-class.html#convertstore,Method translate.convert.po2dtd.redtd.convertstore()=translate.convert.po2dtd.redtd-class.html#convertstore,Method translate.convert.po2html.po2html.convertstore()=translate.convert.po2html.po2html-class.html#convertstore,Method translate.convert.po2ical.reical.convertstore()=translate.convert.po2ical.reical-class.html#convertstore,Method translate.convert.po2ini.reini.convertstore()=translate.convert.po2ini.reini-class.html#convertstore,Method translate.convert.po2oo.reoo.convertstore()=translate.convert.po2oo.reoo-class.html#convertstore,Method translate.convert.po2php.rephp.convertstore()=translate.convert.po2php.rephp-class.html#convertstore,Method translate.convert.po2prop.reprop.convertstore()=translate.convert.po2prop.reprop-class.html#convertstore,Method translate.convert.po2rc.rerc.convertstore()=translate.convert.po2rc.rerc-class.html#convertstore,Method translate.convert.po2sub.resub.convertstore()=translate.convert.po2sub.resub-class.html#convertstore,Method translate.convert.po2tiki.po2tiki.convertstore()=translate.convert.po2tiki.po2tiki-class.html#convertstore,Method translate.convert.po2ts.po2ts.convertstore()=translate.convert.po2ts.po2ts-class.html#convertstore,Method translate.convert.po2txt.po2txt.convertstore()=translate.convert.po2txt.po2txt-class.html#convertstore,Method translate.convert.po2web2py.po2pydict.convertstore()=translate.convert.po2web2py.po2pydict-class.html#convertstore,Method translate.convert.po2xliff.po2xliff.convertstore()=translate.convert.po2xliff.po2xliff-class.html#convertstore,Method translate.convert.prop2po.prop2po.convertstore()=translate.convert.prop2po.prop2po-class.html#convertstore,Method translate.convert.tiki2po.tiki2po.convertstore()=translate.convert.tiki2po.tiki2po-class.html#convertstore,Method translate.convert.txt2po.txt2po.convertstore()=translate.convert.txt2po.txt2po-class.html#convertstore,Method translate.convert.web2py2po.web2py2po.convertstore()=translate.convert.web2py2po.web2py2po-class.html#convertstore,Method translate.convert.xliff2oo.reoo.convertstore()=translate.convert.xliff2oo.reoo-class.html#convertstore,Method translate.convert.xliff2po.xliff2po.convertstore()=translate.convert.xliff2po.xliff2po-class.html#convertstore,Method translate.tools.phppo2pypo.phppo2pypo.convertstore()=translate.tools.phppo2pypo.phppo2pypo-class.html#convertstore,Method translate.tools.pocompile.POCompile.convertstore()=translate.tools.pocompile.POCompile-class.html#convertstore,Method translate.tools.podebug.podebug.convertstore()=translate.tools.podebug.podebug-class.html#convertstore,Method translate.tools.posegment.segment.convertstore()=translate.tools.posegment.segment-class.html#convertstore,Method translate.tools.pypo2phppo.pypo2phppo.convertstore()=translate.tools.pypo2phppo.pypo2phppo-class.html#convertstore"><a title="translate.convert.csv2po.csv2po.convertstore
  281. translate.convert.dtd2po.dtd2po.convertstore
  282. translate.convert.oo2po.oo2po.convertstore
  283. translate.convert.oo2xliff.oo2xliff.convertstore
  284. translate.convert.php2po.php2po.convertstore
  285. translate.convert.po2csv.po2csv.convertstore
  286. translate.convert.po2dtd.po2dtd.convertstore
  287. translate.convert.po2dtd.redtd.convertstore
  288. translate.convert.po2html.po2html.convertstore
  289. translate.convert.po2ical.reical.convertstore
  290. translate.convert.po2ini.reini.convertstore
  291. translate.convert.po2oo.reoo.convertstore
  292. translate.convert.po2php.rephp.convertstore
  293. translate.convert.po2prop.reprop.convertstore
  294. translate.convert.po2rc.rerc.convertstore
  295. translate.convert.po2sub.resub.convertstore
  296. translate.convert.po2tiki.po2tiki.convertstore
  297. translate.convert.po2ts.po2ts.convertstore
  298. translate.convert.po2txt.po2txt.convertstore
  299. translate.convert.po2web2py.po2pydict.convertstore
  300. translate.convert.po2xliff.po2xliff.convertstore
  301. translate.convert.prop2po.prop2po.convertstore
  302. translate.convert.tiki2po.tiki2po.convertstore
  303. translate.convert.txt2po.txt2po.convertstore
  304. translate.convert.web2py2po.web2py2po.convertstore
  305. translate.convert.xliff2oo.reoo.convertstore
  306. translate.convert.xliff2po.xliff2po.convertstore
  307. translate.tools.phppo2pypo.phppo2pypo.convertstore
  308. translate.tools.pocompile.POCompile.convertstore
  309. translate.tools.podebug.podebug.convertstore
  310. translate.tools.posegment.segment.convertstore
  311. translate.tools.pypo2phppo.pypo2phppo.convertstore" class="py-name" href="#" onclick="return doclink('link-27', 'convertstore', 'link-27');">convertstore</a></tt><tt class="py-op">(</tt><tt class="py-name">inputstore</tt><tt class="py-op">)</tt> </tt>
  312. <a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"> <tt class="py-name">outputfile</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method translate.misc.stdiotell.StdIOWrapper.write()=translate.misc.stdiotell.StdIOWrapper-class.html#write,Method translate.misc.wStringIO.StringIO.write()=translate.misc.wStringIO.StringIO-class.html#write,Method translate.misc.xmlwrapper.XMLWrapper.write()=translate.misc.xmlwrapper.XMLWrapper-class.html#write"><a title="translate.misc.stdiotell.StdIOWrapper.write
  313. translate.misc.wStringIO.StringIO.write
  314. translate.misc.xmlwrapper.XMLWrapper.write" class="py-name" href="#" onclick="return doclink('link-28', 'write', 'link-28');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">outputstore</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
  315. <a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
  316. </div><a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"> </tt>
  317. <a name="main"></a><div id="main-def"><a name="L67"></a><tt class="py-lineno">67</tt> <a class="py-toggle" href="#" id="main-toggle" onclick="return toggle('main');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="translate.convert.po2tiki-module.html#main">main</a><tt class="py-op">(</tt><tt class="py-param">argv</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
  318. </div><div id="main-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="main-expanded"><a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"> <tt class="py-docstring">"""Will convert from .po to tiki style .php"""</tt> </tt>
  319. <a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"> <tt class="py-keyword">from</tt> <tt id="link-29" class="py-name"><a title="translate
  320. translate.storage.base.TranslationStore.translate
  321. translate.storage.placeables.strelem.StringElem.translate
  322. translate.storage.placeables.terminology.TerminologyPlaceable.translate
  323. translate.storage.tmx.tmxfile.translate" class="py-name" href="#" onclick="return doclink('link-29', 'translate', 'link-0');">translate</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Package translate.convert=translate.convert-module.html,Module translate.convert.convert=translate.convert.convert-module.html,Function translate.convert.factory.convert()=translate.convert.factory-module.html#convert"><a title="translate.convert
  324. translate.convert.convert
  325. translate.convert.factory.convert" class="py-name" href="#" onclick="return doclink('link-30', 'convert', 'link-30');">convert</a></tt> <tt class="py-keyword">import</tt> <tt id="link-31" class="py-name"><a title="translate.convert
  326. translate.convert.convert
  327. translate.convert.factory.convert" class="py-name" href="#" onclick="return doclink('link-31', 'convert', 'link-30');">convert</a></tt> </tt>
  328. <a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"> <tt class="py-keyword">from</tt> <tt id="link-32" class="py-name"><a title="translate
  329. translate.storage.base.TranslationStore.translate
  330. translate.storage.placeables.strelem.StringElem.translate
  331. translate.storage.placeables.terminology.TerminologyPlaceable.translate
  332. translate.storage.tmx.tmxfile.translate" class="py-name" href="#" onclick="return doclink('link-32', 'translate', 'link-0');">translate</a></tt><tt class="py-op">.</tt><tt id="link-33" 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
  333. translate.storage.xml_extract.misc" class="py-name" href="#" onclick="return doclink('link-33', 'misc', 'link-33');">misc</a></tt> <tt class="py-keyword">import</tt> <tt id="link-34" class="py-name" targets="Module translate.misc.stdiotell=translate.misc.stdiotell-module.html"><a title="translate.misc.stdiotell" class="py-name" href="#" onclick="return doclink('link-34', 'stdiotell', 'link-34');">stdiotell</a></tt> </tt>
  334. <a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt> <tt class="py-op">=</tt> <tt id="link-35" class="py-name"><a title="translate.misc.stdiotell" class="py-name" href="#" onclick="return doclink('link-35', 'stdiotell', 'link-34');">stdiotell</a></tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Class translate.misc.stdiotell.StdIOWrapper=translate.misc.stdiotell.StdIOWrapper-class.html"><a title="translate.misc.stdiotell.StdIOWrapper" class="py-name" href="#" onclick="return doclink('link-36', 'StdIOWrapper', 'link-36');">StdIOWrapper</a></tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">)</tt> </tt>
  335. <a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"> </tt>
  336. <a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"> <tt id="link-37" class="py-name" targets="Variable translate.convert.odf2xliff.formats=translate.convert.odf2xliff-module.html#formats,Variable translate.convert.po2prop.formats=translate.convert.po2prop-module.html#formats,Variable translate.convert.prop2po.formats=translate.convert.prop2po-module.html#formats,Variable translate.convert.xliff2odf.formats=translate.convert.xliff2odf-module.html#formats"><a title="translate.convert.odf2xliff.formats
  337. translate.convert.po2prop.formats
  338. translate.convert.prop2po.formats
  339. translate.convert.xliff2odf.formats" class="py-name" href="#" onclick="return doclink('lin…

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