sh_cpl/docs/build/html/cpl_translation.html

226 lines
20 KiB
HTML
Raw Normal View History

2022-12-04 00:50:24 +01:00
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Translation reference &mdash; Common Python Library documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
2023-02-20 15:55:20 +01:00
<link rel="prev" title="cpl_query.iterable package" href="cpl_query.iterable.html" />
2022-12-04 00:50:24 +01:00
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Common Python Library
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction to the CPL Docs</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing to CPL</a></li>
<li class="toctree-l1"><a class="reference internal" href="cpl_cli.html">CLI reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="cpl_core.html">API reference</a></li>
2023-02-20 15:55:20 +01:00
<li class="toctree-l1"><a class="reference internal" href="cpl_discord.html">cpl_discord package</a></li>
2022-12-04 00:50:24 +01:00
<li class="toctree-l1"><a class="reference internal" href="cpl_query.html">Query reference</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Translation reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#module-cpl_translation.translate_pipe">cpl_translation.translate_pipe</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-cpl_translation.translation_service">cpl_translation.translation_service</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-cpl_translation.translation_service_abc">cpl_translation.translation_service_abc</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-cpl_translation.translation_settings">cpl_translation.translation_settings</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Common Python Library</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Translation reference</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/cpl_translation.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="translation-reference">
<h1>Translation reference<a class="headerlink" href="#translation-reference" title="Permalink to this heading"></a></h1>
<section id="module-cpl_translation.translate_pipe">
<span id="cpl-translation-translate-pipe"></span><h2>cpl_translation.translate_pipe<a class="headerlink" href="#module-cpl_translation.translate_pipe" title="Permalink to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="cpl_translation.translate_pipe.TranslatePipe">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">cpl_translation.translate_pipe.</span></span><span class="sig-name descname"><span class="pre">TranslatePipe</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translation</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#cpl_translation.translation_service_abc.TranslationServiceABC" title="cpl_translation.translation_service_abc.TranslationServiceABC"><span class="pre">TranslationServiceABC</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translate_pipe.TranslatePipe" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="cpl_core.pipes.html#cpl_core.pipes.pipe_abc.PipeABC" title="cpl_core.pipes.pipe_abc.PipeABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">PipeABC</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translate_pipe.TranslatePipe.transform">
<span class="sig-name descname"><span class="pre">transform</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">any</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translate_pipe.TranslatePipe.transform" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
<section id="module-cpl_translation.translation_service">
<span id="cpl-translation-translation-service"></span><h2>cpl_translation.translation_service<a class="headerlink" href="#module-cpl_translation.translation_service" title="Permalink to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="cpl_translation.translation_service.TranslationService">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">cpl_translation.translation_service.</span></span><span class="sig-name descname"><span class="pre">TranslationService</span></span><a class="headerlink" href="#cpl_translation.translation_service.TranslationService" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#cpl_translation.translation_service_abc.TranslationServiceABC" title="cpl_translation.translation_service_abc.TranslationServiceABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">TranslationServiceABC</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service.TranslationService.load">
<span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lang</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service.TranslationService.load" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service.TranslationService.load_by_settings">
<span class="sig-name descname"><span class="pre">load_by_settings</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#cpl_translation.translation_settings.TranslationSettings" title="cpl_translation.translation_settings.TranslationSettings"><span class="pre">TranslationSettings</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service.TranslationService.load_by_settings" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service.TranslationService.set_default_lang">
<span class="sig-name descname"><span class="pre">set_default_lang</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lang</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service.TranslationService.set_default_lang" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service.TranslationService.set_lang">
<span class="sig-name descname"><span class="pre">set_lang</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lang</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service.TranslationService.set_lang" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service.TranslationService.translate">
<span class="sig-name descname"><span class="pre">translate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#cpl_translation.translation_service.TranslationService.translate" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
<section id="module-cpl_translation.translation_service_abc">
<span id="cpl-translation-translation-service-abc"></span><h2>cpl_translation.translation_service_abc<a class="headerlink" href="#module-cpl_translation.translation_service_abc" title="Permalink to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="cpl_translation.translation_service_abc.TranslationServiceABC">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">cpl_translation.translation_service_abc.</span></span><span class="sig-name descname"><span class="pre">TranslationServiceABC</span></span><a class="headerlink" href="#cpl_translation.translation_service_abc.TranslationServiceABC" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">ABC</span></code></p>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service_abc.TranslationServiceABC.load">
<em class="property"><span class="pre">abstract</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lang</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service_abc.TranslationServiceABC.load" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service_abc.TranslationServiceABC.load_by_settings">
<em class="property"><span class="pre">abstract</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">load_by_settings</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#cpl_translation.translation_settings.TranslationSettings" title="cpl_translation.translation_settings.TranslationSettings"><span class="pre">TranslationSettings</span></a></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service_abc.TranslationServiceABC.load_by_settings" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service_abc.TranslationServiceABC.set_default_lang">
<em class="property"><span class="pre">abstract</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_default_lang</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lang</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service_abc.TranslationServiceABC.set_default_lang" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service_abc.TranslationServiceABC.set_lang">
<em class="property"><span class="pre">abstract</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">set_lang</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lang</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_service_abc.TranslationServiceABC.set_lang" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_service_abc.TranslationServiceABC.translate">
<em class="property"><span class="pre">abstract</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">translate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#cpl_translation.translation_service_abc.TranslationServiceABC.translate" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
<section id="module-cpl_translation.translation_settings">
<span id="cpl-translation-translation-settings"></span><h2>cpl_translation.translation_settings<a class="headerlink" href="#module-cpl_translation.translation_settings" title="Permalink to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="cpl_translation.translation_settings.TranslationSettings">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">cpl_translation.translation_settings.</span></span><span class="sig-name descname"><span class="pre">TranslationSettings</span></span><a class="headerlink" href="#cpl_translation.translation_settings.TranslationSettings" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="cpl_core.configuration.html#cpl_core.configuration.configuration_model_abc.ConfigurationModelABC" title="cpl_core.configuration.configuration_model_abc.ConfigurationModelABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">ConfigurationModelABC</span></code></a></p>
<dl class="py property">
<dt class="sig sig-object py" id="cpl_translation.translation_settings.TranslationSettings.default_language">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">default_language</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#cpl_translation.translation_settings.TranslationSettings.default_language" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_translation.translation_settings.TranslationSettings.from_dict">
<span class="sig-name descname"><span class="pre">from_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">settings</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_translation.translation_settings.TranslationSettings.from_dict" title="Permalink to this definition"></a></dt>
<dd><p>Converts attributes to dict</p>
2023-02-20 15:55:20 +01:00
<dl class="simple">
<dt>Parameter:</dt><dd><p>settings: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
</dd>
</dl>
2022-12-04 00:50:24 +01:00
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="cpl_translation.translation_settings.TranslationSettings.languages">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">languages</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#cpl_translation.translation_settings.TranslationSettings.languages" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
2023-02-20 15:55:20 +01:00
<a href="cpl_query.iterable.html" class="btn btn-neutral float-left" title="cpl_query.iterable package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
2022-12-04 00:50:24 +01:00
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021 - 2023, Sven Heidemann.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>