searxngRebrandZaclys/dev/translation.html
2023-08-11 10:34:02 +00:00

193 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Translation &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Developing in Linux Containers" href="lxcdev.html" />
<link rel="prev" title="Plugins" href="plugins.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="lxcdev.html" title="Developing in Linux Containers"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="plugins.html" title="Plugins"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Translation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="translation">
<span id="id1"></span><h1>Translation<a class="headerlink" href="#translation" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title"><a class="reference external" href="https://translate.codeberg.org/projects/searxng/"><img alt="translated" src="https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg" /></a></p>
<ul class="simple">
<li><p><a class="reference internal" href="../src/searx.babel_extract.html#searx-babel-extract"><span class="std std-ref">Custom message extractor (i18n)</span></a></p></li>
<li><p><a class="reference external" href="https://docs.weblate.org">Weblate</a></p></li>
<li><p>SearXNG <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a></p></li>
<li><p>SearXNG <a class="reference external" href="https://translate.codeberg.org/projects/searxng/searxng/#repository">Weblate repository</a></p></li>
<li><p>Weblate Client: <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html">wlc</a></p></li>
<li><p>Babel Command-Line: <a class="reference external" href="http://babel.pocoo.org/en/latest/cmdline.html">pybabel</a></p></li>
<li><p><a class="reference external" href="https://docs.weblate.org/en/latest/workflows.html">weblate workflow</a></p></li>
</ul>
</aside>
<p>Translation takes place on <a class="reference external" href="https://translate.codeberg.org/projects/searxng/">translate.codeberg.org</a>.</p>
<p>Translations which has been added by translators on the <a class="reference external" href="https://translate.codeberg.org/projects/searxng/">translate.codeberg.org</a> UI are
committed to Weblates counterpart of the SearXNG <em>origin</em> repository which is
located at <code class="docutils literal notranslate"><span class="pre">https://translate.codeberg.org/git/searxng/searxng</span></code>.</p>
<p>There is no need to clone this repository, <a class="reference internal" href="#searxng-weblate-workflow"><span class="std std-ref">SearXNGs PR workflow to be in sync with Weblate</span></a> take
care of the synchronization with the <em>origin</em>. To avoid merging commits from
the counterpart directly on the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch of <em>SearXNG origin</em>, a <em>pull
request</em> (PR) is created by this workflow.</p>
<p>Weblate monitors the <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a>, not the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch. This
branch is an <a class="reference external" href="https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---orphanltnewbranchgt">orphan branch</a>, decoupled from the master branch (we already know
orphan branches from the <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>). The <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a> contains
only the</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">translation/messages.pot</span></code> and the</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.po</span></code> files, nothing else.</p></li>
</ul>
<figure class="align-default" id="id3">
<span id="searxng-weblate-workflow"></span><img alt="../_images/translation.svg" src="../_images/translation.svg" /><figcaption>
<p><span class="caption-number">Fig. 3 </span><span class="caption-text">SearXNGs PR workflow to be in sync with Weblate</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<dl class="simple">
<dt>Sync from <em>origin</em> to <em>weblate</em>: using <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">weblate.push.translations</span></code></dt><dd><p>For each commit on the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch of SearXNG <em>origin</em> the GitHub job
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/integration.yml">babel / Update translations branch</a> checks for updated translations.</p>
</dd>
<dt>Sync from <em>weblate</em> to <em>origin</em>: using <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">weblate.translations.commit</span></code></dt><dd><p>Every Friday, the GitHub workflow <a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/translations-update.yml">babel / create PR for additons from
weblate</a> creates a PR with the
updated translation files:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">translation/messages.pot</span></code>,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.po</span></code> and</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.mo</span></code></p></li>
</ul>
</dd>
</dl>
<section id="id2">
<h2>wlc<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h2>
<p>All weblate integration is done by GitHub workflows, but if you want to use <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html">wlc</a>,
copy this content into <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html#wlc-config">wlc configuration</a> in your HOME <code class="docutils literal notranslate"><span class="pre">~/.config/weblate</span></code></p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[keys]</span>
<span class="na">https</span><span class="o">:</span><span class="s">//translate.codeberg.org/api/ = APIKEY</span>
</pre></div>
</div>
<p>Replace <code class="docutils literal notranslate"><span class="pre">APIKEY</span></code> by your <a class="reference external" href="https://translate.codeberg.org/accounts/profile/#api">API key</a>.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="plugins.html" title="previous chapter">Plugins</a>
<li>Next: <a href="lxcdev.html" title="next chapter">Developing in Linux Containers</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/translation.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>