| 
				
			 | 
			
			
				@@ -43,58 +43,65 @@ 
			 | 
		
	
		
			
			| 
				43
			 | 
			
				43
			 | 
			
			
				 <p>run these commands in the root directory of searx</p> 
			 | 
		
	
		
			
			| 
				44
			 | 
			
				44
			 | 
			
			
				 <div class="section" id="add-new-language"> 
			 | 
		
	
		
			
			| 
				45
			 | 
			
				45
			 | 
			
			
				 <h2>Add new language<a class="headerlink" href="#add-new-language" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
			| 
				46
			 | 
			
				
			 | 
			
			
				-<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> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				46
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>pybabel init -i messages.pot -d searx/translations -l it 
			 | 
		
	
		
			
			| 
				
			 | 
			
				47
			 | 
			
			
				+</pre></div> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				48
			 | 
			
			
				+</div> 
			 | 
		
	
		
			
			| 
				47
			 | 
			
				49
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				48
			 | 
			
				50
			 | 
			
			
				 <div class="section" id="update-po-files"> 
			 | 
		
	
		
			
			| 
				49
			 | 
			
				51
			 | 
			
			
				 <h2>Update .po files<a class="headerlink" href="#update-po-files" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
			| 
				50
			 | 
			
				
			 | 
			
			
				-<p><code class="docutils literal"><span class="pre">./utils/update-translations.sh</span></code></p> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				52
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>./utils/update-translations.sh 
			 | 
		
	
		
			
			| 
				
			 | 
			
				53
			 | 
			
			
				+</pre></div> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				54
			 | 
			
			
				+</div> 
			 | 
		
	
		
			
			| 
				51
			 | 
			
				55
			 | 
			
			
				 <p>You may have errors here. In that case, edit the 
			 | 
		
	
		
			
			| 
				52
			 | 
			
				56
			 | 
			
			
				 <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 
			 | 
		
	
		
			
			| 
				53
			 | 
			
				
			 | 
			
			
				-<code class="docutils literal"><span class="pre">pybabel-python2</span></code></p> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				57
			 | 
			
			
				+<code class="docutils literal"><span class="pre">pybabel-python2</span></code> or <code class="docutils literal"><span class="pre">pybabel2</span></code></p> 
			 | 
		
	
		
			
			| 
				54
			 | 
			
				58
			 | 
			
			
				 <p>After this step, you can modify the .po files.</p> 
			 | 
		
	
		
			
			| 
				55
			 | 
			
				59
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				56
			 | 
			
				60
			 | 
			
			
				 <div class="section" id="compile-translations"> 
			 | 
		
	
		
			
			| 
				57
			 | 
			
				61
			 | 
			
			
				 <h2>Compile translations<a class="headerlink" href="#compile-translations" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
			| 
				58
			 | 
			
				
			 | 
			
			
				-<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> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				62
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>pybabel compile -d searx/translations 
			 | 
		
	
		
			
			| 
				
			 | 
			
				63
			 | 
			
			
				+</pre></div> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				64
			 | 
			
			
				+</div> 
			 | 
		
	
		
			
			| 
				59
			 | 
			
				65
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				60
			 | 
			
				66
			 | 
			
			
				 <div class="section" id="transifex-stuff"> 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				67
			 | 
			
			
				 <h2>Transifex stuff<a class="headerlink" href="#transifex-stuff" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
			| 
				62
			 | 
			
				68
			 | 
			
			
				 <div class="section" id="init-project"> 
			 | 
		
	
		
			
			| 
				63
			 | 
			
				69
			 | 
			
			
				 <h3>Init Project<a class="headerlink" href="#init-project" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
			| 
				64
			 | 
			
				
			 | 
			
			
				-<div class="code shell highlight-python"><div class="highlight"><pre>tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				70
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				71
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				72
			 | 
			
			
				+tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \ 
			 | 
		
	
		
			
			| 
				65
			 | 
			
				73
			 | 
			
			
				 --source-lang en --type PO --source-file messages.pot --execute 
			 | 
		
	
		
			
			| 
				66
			 | 
			
				74
			 | 
			
			
				 </pre></div> 
			 | 
		
	
		
			
			| 
				67
			 | 
			
				75
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				68
			 | 
			
				
			 | 
			
			
				-<p><a class="reference external" href="http://docs.transifex.com/developer/client/set">http://docs.transifex.com/developer/client/set</a></p> 
			 | 
		
	
		
			
			| 
				69
			 | 
			
				
			 | 
			
			
				-<p><em>TODO: mapping between transifex and searx</em></p> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				76
			 | 
			
			
				+<p><a class="reference external" href="http://docs.transifex.com/client/init/">http://docs.transifex.com/client/init/</a></p> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				77
			 | 
			
			
				+<p><a class="reference external" href="http://docs.transifex.com/client/set/">http://docs.transifex.com/client/set/</a></p> 
			 | 
		
	
		
			
			| 
				70
			 | 
			
				78
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				71
			 | 
			
				79
			 | 
			
			
				 <div class="section" id="get-translations"> 
			 | 
		
	
		
			
			| 
				72
			 | 
			
				80
			 | 
			
			
				 <h3>Get translations<a class="headerlink" href="#get-translations" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				81
			 | 
			
			
				 <div class="code shell highlight-python"><div class="highlight"><pre>tx pull -a 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				82
			 | 
			
			
				 </pre></div> 
			 | 
		
	
		
			
			| 
				75
			 | 
			
				83
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				
			 | 
			
			
				-<p><a class="reference external" href="http://docs.transifex.com/developer/client/pull">http://docs.transifex.com/developer/client/pull</a></p> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				84
			 | 
			
			
				+<p><a class="reference external" href="http://docs.transifex.com/client/pull">http://docs.transifex.com/client/pull</a></p> 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				85
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				86
			 | 
			
			
				 <div class="section" id="upload-source-file"> 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				87
			 | 
			
			
				 <h3>Upload source File<a class="headerlink" href="#upload-source-file" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
			| 
				80
			 | 
			
				
			 | 
			
			
				-<div class="highlight-python"><div class="highlight"><pre>tx push -s 
			 | 
		
	
		
			
			| 
				
			 | 
			
				88
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>tx push -s 
			 | 
		
	
		
			
			| 
				81
			 | 
			
				89
			 | 
			
			
				 </pre></div> 
			 | 
		
	
		
			
			| 
				82
			 | 
			
				90
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				83
			 | 
			
				91
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				84
			 | 
			
				92
			 | 
			
			
				 <div class="section" id="upload-all-translation"> 
			 | 
		
	
		
			
			| 
				85
			 | 
			
				93
			 | 
			
			
				 <h3>Upload all Translation<a class="headerlink" href="#upload-all-translation" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
			| 
				86
			 | 
			
				
			 | 
			
			
				-<div class="highlight-python"><div class="highlight"><pre>tx push -s -t 
			 | 
		
	
		
			
			| 
				
			 | 
			
				94
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>tx push -s -t 
			 | 
		
	
		
			
			| 
				87
			 | 
			
				95
			 | 
			
			
				 </pre></div> 
			 | 
		
	
		
			
			| 
				88
			 | 
			
				96
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				89
			 | 
			
				97
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				90
			 | 
			
				98
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				91
			 | 
			
				
			 | 
			
			
				-<div class="section" id="upload-specifc-translation-only-for-admins"> 
			 | 
		
	
		
			
			| 
				92
			 | 
			
				
			 | 
			
			
				-<h2>upload specifc Translation (only for admins)<a class="headerlink" href="#upload-specifc-translation-only-for-admins" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
			| 
				93
			 | 
			
				
			 | 
			
			
				-<div class="highlight-python"><div class="highlight"><pre>tx push -t -l tr 
			 | 
		
	
		
			
			| 
				
			 | 
			
				99
			 | 
			
			
				+<div class="section" id="upload-specifc-translation"> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				100
			 | 
			
			
				+<h2>upload specifc Translation<a class="headerlink" href="#upload-specifc-translation" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				101
			 | 
			
			
				+<div class="code shell highlight-python"><div class="highlight"><pre>tx push -t -l tr 
			 | 
		
	
		
			
			| 
				94
			 | 
			
				102
			 | 
			
			
				 </pre></div> 
			 | 
		
	
		
			
			| 
				95
			 | 
			
				103
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				96
			 | 
			
				
			 | 
			
			
				-<p><a class="reference external" href="http://docs.transifex.com/developer/client/push">http://docs.transifex.com/developer/client/push</a></p> 
			 | 
		
	
		
			
			| 
				97
			 | 
			
				
			 | 
			
			
				-<p><em>TODO: upload empty files? (new translations)</em></p> 
			 | 
		
	
		
			
			| 
				
			 | 
			
				104
			 | 
			
			
				+<p><a class="reference external" href="http://docs.transifex.com/client/push">http://docs.transifex.com/client/push</a></p> 
			 | 
		
	
		
			
			| 
				98
			 | 
			
				105
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				99
			 | 
			
				106
			 | 
			
			
				 </div> 
			 | 
		
	
		
			
			| 
				100
			 | 
			
				107
			 | 
			
			
				  
			 |