translation.html 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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 &mdash; searx 0.8.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.8.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="top" title="searx 0.8.0 documentation" href="../index.html" />
  22. <link rel="prev" title="Plugins" href="plugins.html" />
  23. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  24. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  25. </head>
  26. <body role="document">
  27. <div class="document">
  28. <div class="documentwrapper">
  29. <div class="bodywrapper">
  30. <div class="body" role="main">
  31. <div class="section" id="translation">
  32. <h1>Translation<a class="headerlink" href="#translation" title="Permalink to this headline">¶</a></h1>
  33. <p>run these commands in the root directory of searx</p>
  34. <div class="section" id="add-new-language">
  35. <h2>Add new language<a class="headerlink" href="#add-new-language" title="Permalink to this headline">¶</a></h2>
  36. <p><code class="docutils literal"><span class="pre">pybabel</span> <span class="pre">init</span> <span class="pre">-i</span> <span class="pre">messages.pot</span> <span class="pre">-d</span> <span class="pre">searx/translations</span> <span class="pre">-l</span> <span class="pre">it</span></code></p>
  37. </div>
  38. <div class="section" id="update-po-files">
  39. <h2>Update .po files<a class="headerlink" href="#update-po-files" title="Permalink to this headline">¶</a></h2>
  40. <p><code class="docutils literal"><span class="pre">./utils/update-translations.sh</span></code></p>
  41. <p>You may have errors here. In that case, edit the
  42. <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
  43. <code class="docutils literal"><span class="pre">pybabel-python2</span></code></p>
  44. <p>After this step, you can modify the .po files.</p>
  45. </div>
  46. <div class="section" id="compile-translations">
  47. <h2>Compile translations<a class="headerlink" href="#compile-translations" title="Permalink to this headline">¶</a></h2>
  48. <p><code class="docutils literal"><span class="pre">pybabel</span> <span class="pre">compile</span> <span class="pre">-d</span> <span class="pre">searx/translations</span></code></p>
  49. </div>
  50. <div class="section" id="transifex-stuff">
  51. <h2>Transifex stuff<a class="headerlink" href="#transifex-stuff" title="Permalink to this headline">¶</a></h2>
  52. <div class="section" id="init-project">
  53. <h3>Init Project<a class="headerlink" href="#init-project" title="Permalink to this headline">¶</a></h3>
  54. <div class="code shell highlight-python"><div class="highlight"><pre>tx set --auto-local -r searx.messagespo &#39;searx/translations/&lt;lang&gt;/LC_MESSAGES/messages.po&#39; \
  55. --source-lang en --type PO --source-file messages.pot --execute
  56. </pre></div>
  57. </div>
  58. <p><a class="reference external" href="http://docs.transifex.com/developer/client/set">http://docs.transifex.com/developer/client/set</a></p>
  59. <p><em>TODO: mapping between transifex and searx</em></p>
  60. </div>
  61. <div class="section" id="get-translations">
  62. <h3>Get translations<a class="headerlink" href="#get-translations" title="Permalink to this headline">¶</a></h3>
  63. <div class="code shell highlight-python"><div class="highlight"><pre>tx pull -a
  64. </pre></div>
  65. </div>
  66. <p><a class="reference external" href="http://docs.transifex.com/developer/client/pull">http://docs.transifex.com/developer/client/pull</a></p>
  67. </div>
  68. <div class="section" id="upload-source-file">
  69. <h3>Upload source File<a class="headerlink" href="#upload-source-file" title="Permalink to this headline">¶</a></h3>
  70. <div class="highlight-python"><div class="highlight"><pre>tx push -s
  71. </pre></div>
  72. </div>
  73. </div>
  74. <div class="section" id="upload-all-translation">
  75. <h3>Upload all Translation<a class="headerlink" href="#upload-all-translation" title="Permalink to this headline">¶</a></h3>
  76. <div class="highlight-python"><div class="highlight"><pre>tx push -s -t
  77. </pre></div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="section" id="upload-specifc-translation-only-for-admins">
  82. <h2>upload specifc Translation (only for admins)<a class="headerlink" href="#upload-specifc-translation-only-for-admins" title="Permalink to this headline">¶</a></h2>
  83. <div class="highlight-python"><div class="highlight"><pre>tx push -t -l tr
  84. </pre></div>
  85. </div>
  86. <p><a class="reference external" href="http://docs.transifex.com/developer/client/push">http://docs.transifex.com/developer/client/push</a></p>
  87. <p><em>TODO: upload empty files? (new translations)</em></p>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  94. <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
  95. <h1>Searx</h1>
  96. <ul>
  97. <li><a href="../index.html">Home</a></li>
  98. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  99. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  100. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  101. </ul>
  102. <hr />
  103. <ul>
  104. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  105. <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>
  106. <li><a href="https://gratipay.com/searx">Gratipay</a></li>
  107. </ul>
  108. </div>
  109. </div>
  110. </div>
  111. <div class="clearer"></div>
  112. </div>
  113. <div class="footer">
  114. &copy; Copyright 2015, Adam Tauber.
  115. </div>
  116. </body>
  117. </html>