translation.html 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Translation &#8212; searx 0.10.0 documentation</title>
  7. <link rel="stylesheet" href="../_static/style.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '0.10.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <link rel="index" title="Index" href="../genindex.html" />
  22. <link rel="search" title="Search" href="../search.html" />
  23. <link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
  24. <link rel="prev" title="Plugins" href="plugins.html" />
  25. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  26. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  27. </head>
  28. <body role="document">
  29. <div class="document">
  30. <div class="documentwrapper">
  31. <div class="bodywrapper">
  32. <div class="body" role="main">
  33. <div class="section" id="translation">
  34. <h1>Translation<a class="headerlink" href="#translation" title="Permalink to this headline">¶</a></h1>
  35. <p>run these commands in the root directory of searx</p>
  36. <div class="section" id="add-new-language">
  37. <h2>Add new language<a class="headerlink" href="#add-new-language" title="Permalink to this headline">¶</a></h2>
  38. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">pybabel</span> <span class="n">init</span> <span class="o">-</span><span class="n">i</span> <span class="n">messages</span><span class="o">.</span><span class="n">pot</span> <span class="o">-</span><span class="n">d</span> <span class="n">searx</span><span class="o">/</span><span class="n">translations</span> <span class="o">-</span><span class="n">l</span> <span class="n">it</span>
  39. </pre></div>
  40. </div>
  41. </div>
  42. <div class="section" id="update-po-files">
  43. <h2>Update .po files<a class="headerlink" href="#update-po-files" title="Permalink to this headline">¶</a></h2>
  44. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">utils</span><span class="o">/</span><span class="n">update</span><span class="o">-</span><span class="n">translations</span><span class="o">.</span><span class="n">sh</span>
  45. </pre></div>
  46. </div>
  47. <p>You may have errors here. In that case, edit the
  48. <code class="docutils literal"><span class="pre">update-translations.sh</span></code> script to change <code class="docutils literal"><span class="pre">pybabel</span></code> to
  49. <code class="docutils literal"><span class="pre">pybabel-python2</span></code> or <code class="docutils literal"><span class="pre">pybabel2</span></code></p>
  50. <p>After this step, you can modify the .po files.</p>
  51. </div>
  52. <div class="section" id="compile-translations">
  53. <h2>Compile translations<a class="headerlink" href="#compile-translations" title="Permalink to this headline">¶</a></h2>
  54. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">pybabel</span> <span class="nb">compile</span> <span class="o">-</span><span class="n">d</span> <span class="n">searx</span><span class="o">/</span><span class="n">translations</span>
  55. </pre></div>
  56. </div>
  57. </div>
  58. <div class="section" id="transifex-stuff">
  59. <h2>Transifex stuff<a class="headerlink" href="#transifex-stuff" title="Permalink to this headline">¶</a></h2>
  60. <div class="section" id="init-project">
  61. <h3>Init Project<a class="headerlink" href="#init-project" title="Permalink to this headline">¶</a></h3>
  62. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">init</span> <span class="c1"># Transifex instance: https://www.transifex.com/asciimoo/searx/</span>
  63. <span class="n">tx</span> <span class="nb">set</span> <span class="o">--</span><span class="n">auto</span><span class="o">-</span><span class="n">local</span> <span class="o">-</span><span class="n">r</span> <span class="n">searx</span><span class="o">.</span><span class="n">messagespo</span> <span class="s1">&#39;searx/translations/&lt;lang&gt;/LC_MESSAGES/messages.po&#39;</span> \
  64. <span class="o">--</span><span class="n">source</span><span class="o">-</span><span class="n">lang</span> <span class="n">en</span> <span class="o">--</span><span class="nb">type</span> <span class="n">PO</span> <span class="o">--</span><span class="n">source</span><span class="o">-</span><span class="n">file</span> <span class="n">messages</span><span class="o">.</span><span class="n">pot</span> <span class="o">--</span><span class="n">execute</span>
  65. </pre></div>
  66. </div>
  67. <p><a class="reference external" href="http://docs.transifex.com/client/init/">http://docs.transifex.com/client/init/</a></p>
  68. <p><a class="reference external" href="http://docs.transifex.com/client/set/">http://docs.transifex.com/client/set/</a></p>
  69. </div>
  70. <div class="section" id="get-translations">
  71. <h3>Get translations<a class="headerlink" href="#get-translations" title="Permalink to this headline">¶</a></h3>
  72. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">pull</span> <span class="o">-</span><span class="n">a</span>
  73. </pre></div>
  74. </div>
  75. <p><a class="reference external" href="http://docs.transifex.com/client/pull">http://docs.transifex.com/client/pull</a></p>
  76. </div>
  77. <div class="section" id="upload-source-file">
  78. <h3>Upload source File<a class="headerlink" href="#upload-source-file" title="Permalink to this headline">¶</a></h3>
  79. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">s</span>
  80. </pre></div>
  81. </div>
  82. </div>
  83. <div class="section" id="upload-all-translation">
  84. <h3>Upload all Translation<a class="headerlink" href="#upload-all-translation" title="Permalink to this headline">¶</a></h3>
  85. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">s</span> <span class="o">-</span><span class="n">t</span>
  86. </pre></div>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="section" id="upload-specifc-translation">
  91. <h2>upload specifc Translation<a class="headerlink" href="#upload-specifc-translation" title="Permalink to this headline">¶</a></h2>
  92. <div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">t</span> <span class="o">-</span><span class="n">l</span> <span class="n">tr</span>
  93. </pre></div>
  94. </div>
  95. <p><a class="reference external" href="http://docs.transifex.com/client/push">http://docs.transifex.com/client/push</a></p>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  102. <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
  103. <h1>Searx</h1>
  104. <ul>
  105. <li><a href="../index.html">Home</a></li>
  106. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  107. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  108. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  109. </ul>
  110. <hr />
  111. <ul>
  112. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  113. <li><a href="https://flattr.com/submit/auto?user_id=asciimoo&url=https://github.com/asciimoo/searx&title=searx&language=&tags=github&category=software">Flattr</a></li>
  114. <li><a href="https://gratipay.com/searx">Gratipay</a></li>
  115. </ul>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="clearer"></div>
  120. </div>
  121. <div class="footer">
  122. &copy; Copyright 2015-2016, Adam Tauber.
  123. </div>
  124. </body>
  125. </html>