Skip to content

Commit 8a6e44e

Browse files
authored
Merge pull request #150 from projectfluent/pages-quarantine
Update READMEs and add documentation for fluent.pygments
2 parents a21ac93 + bbd84a6 commit 8a6e44e

16 files changed

Lines changed: 355 additions & 9 deletions

File tree

_sources/index.rst.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,31 @@ python-fluent
55
The :py:mod:`python-fluent` project contains several packages to
66
bring `Project Fluent <https://projectfluent.org>`__ to Python.
77
Visit the `Github project <https://github.com/projectfluent/python-fluent>`__
8-
for the full list. Two packages in particular are of general interest
8+
for the full list. Three packages in particular are of general interest
99
and documented here.
1010

1111
fluent.syntax
1212
-------------
1313

14-
``fluent-syntax`` is the package to use for tooling, analysis, and
14+
``fluent.syntax`` is the package to use for tooling, analysis, and
1515
processing of Fluent files.
1616

1717
fluent.runtime
1818
--------------
1919

20-
``fluent-runtime`` is the reference runtime implementation for
20+
``fluent.runtime`` is the reference runtime implementation for
2121
Fluent in Python.
2222

23+
fluent.pygments
24+
---------------
25+
26+
``fluent.pygments`` can be used to add syntax highlighting for
27+
Fluent files to Sphinx documentation.
28+
2329
.. toctree::
2430
:caption: Packages
2531
:maxdepth: 1
2632

2733
fluent.syntax <https://projectfluent.org/python-fluent/fluent.syntax/>
2834
fluent.runtime <https://projectfluent.org/python-fluent/fluent.runtime/>
35+
fluent.pygments <https://projectfluent.org/python-fluent/fluent.pygments/>

fluent.pygments/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<meta http-equiv="refresh" content="0; URL=stable/">

fluent.pygments/stable/.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 5111478fe16c3a5f7b2970a0fafd09d2
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Fluent Syntax Highlighting
2+
==========================
3+
4+
The :py:mod:`fluent.pygments` library is built to do syntax highlighting
5+
for `Fluent`_ files in Sphinx.
6+
7+
8+
Installation
9+
------------
10+
11+
.. code-block:: bash
12+
13+
pip install fluent.pygments
14+
15+
16+
Usage
17+
-----
18+
19+
.. code-block:: rst
20+
21+
22+
.. code-block:: fluent
23+
24+
my-key = Localize { -brand-name }
25+
26+
Example
27+
-------
28+
29+
.. code-block:: fluent
30+
31+
### A resource comment for the whole file
32+
33+
my-key = Localize { -brand-name }
34+
-brand-name = Fluent
35+
36+
# $num is the number of strings to localize
37+
plurals = { $num ->
38+
[one] One string
39+
*[other] {$num} strings
40+
}
41+
an error ;-)
42+
Most-strings = are just simple strings.
43+
44+
.. _fluent: https://projectfluent.org/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var DOCUMENTATION_OPTIONS = {
2+
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3+
VERSION: '0.1.0',
4+
LANGUAGE: 'None',
5+
COLLAPSE_INDEX: false,
6+
BUILDER: 'html',
7+
FILE_SUFFIX: '.html',
8+
LINK_SUFFIX: '.html',
9+
HAS_SOURCE: true,
10+
SOURCELINK_SUFFIX: '.txt',
11+
NAVIGATION_WITH_KEYS: false
12+
};
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
3+
<!DOCTYPE html>
4+
5+
<html>
6+
<head>
7+
<meta charset="utf-8" />
8+
<title>Index &#8212; fluent.pygments 0.1.0 documentation</title>
9+
<link rel="stylesheet" href="/python-fluent/_static/nature.css" type="text/css" />
10+
<link rel="stylesheet" href="/python-fluent/_static/pygments.css" type="text/css" />
11+
<link rel="stylesheet" href="/python-fluent/_static/project-fluent.css" type="text/css" />
12+
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
13+
<script src="/python-fluent/_static/jquery.js"></script>
14+
<script src="/python-fluent/_static/underscore.js"></script>
15+
<script src="/python-fluent/_static/doctools.js"></script>
16+
<script src="/python-fluent/_static/language_data.js"></script>
17+
<link rel="index" title="Index" href="#" />
18+
<link rel="search" title="Search" href="search.html" />
19+
</head><body>
20+
<div class="related" role="navigation" aria-label="related navigation">
21+
<h3>Navigation</h3>
22+
<ul>
23+
<li class="right" style="margin-right: 10px">
24+
<a href="#" title="General Index"
25+
accesskey="I">index</a></li>
26+
<li class="nav-item nav-item-0"><a href="index.html">fluent.pygments 0.1.0 documentation</a> &#187;</li>
27+
</ul>
28+
</div>
29+
30+
<div class="document">
31+
<div class="documentwrapper">
32+
<div class="bodywrapper">
33+
<div class="body" role="main">
34+
35+
36+
<h1 id="index">Index</h1>
37+
38+
<div class="genindex-jumpbox">
39+
40+
</div>
41+
42+
43+
</div>
44+
</div>
45+
</div>
46+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
47+
<div class="sphinxsidebarwrapper">
48+
<h3><a href="index.html">Table of Contents</a></h3>
49+
50+
<div id="searchbox" style="display: none" role="search">
51+
<h3 id="searchlabel">Quick search</h3>
52+
<div class="searchformwrapper">
53+
<form class="search" action="search.html" method="get">
54+
<input type="text" name="q" aria-labelledby="searchlabel" />
55+
<input type="submit" value="Go" />
56+
</form>
57+
</div>
58+
</div>
59+
<script>$('#searchbox').show(0);</script>
60+
</div>
61+
</div>
62+
<div class="clearer"></div>
63+
</div>
64+
<div class="related" role="navigation" aria-label="related navigation">
65+
<h3>Navigation</h3>
66+
<ul>
67+
<li class="right" style="margin-right: 10px">
68+
<a href="#" title="General Index"
69+
>index</a></li>
70+
<li class="nav-item nav-item-0"><a href="index.html">fluent.pygments 0.1.0 documentation</a> &#187;</li>
71+
</ul>
72+
</div>
73+
<div class="footer" role="contentinfo">
74+
python-fluent documentation is licensed under the APL 2.0.
75+
</div>
76+
</body>
77+
</html>

fluent.pygments/stable/index.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html>
5+
<head>
6+
<meta charset="utf-8" />
7+
<title>Fluent Syntax Highlighting &#8212; fluent.pygments 0.1.0 documentation</title>
8+
<link rel="stylesheet" href="/python-fluent/_static/nature.css" type="text/css" />
9+
<link rel="stylesheet" href="/python-fluent/_static/pygments.css" type="text/css" />
10+
<link rel="stylesheet" href="/python-fluent/_static/project-fluent.css" type="text/css" />
11+
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
12+
<script src="/python-fluent/_static/jquery.js"></script>
13+
<script src="/python-fluent/_static/underscore.js"></script>
14+
<script src="/python-fluent/_static/doctools.js"></script>
15+
<script src="/python-fluent/_static/language_data.js"></script>
16+
<link rel="index" title="Index" href="genindex.html" />
17+
<link rel="search" title="Search" href="search.html" />
18+
</head><body>
19+
<div class="related" role="navigation" aria-label="related navigation">
20+
<h3>Navigation</h3>
21+
<ul>
22+
<li class="right" style="margin-right: 10px">
23+
<a href="genindex.html" title="General Index"
24+
accesskey="I">index</a></li>
25+
<li class="nav-item nav-item-0"><a href="#">fluent.pygments 0.1.0 documentation</a> &#187;</li>
26+
</ul>
27+
</div>
28+
29+
<div class="document">
30+
<div class="documentwrapper">
31+
<div class="bodywrapper">
32+
<div class="body" role="main">
33+
34+
<div class="section" id="fluent-syntax-highlighting">
35+
<h1>Fluent Syntax Highlighting<a class="headerlink" href="#fluent-syntax-highlighting" title="Permalink to this headline"></a></h1>
36+
<p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">fluent.pygments</span></code> library is built to do syntax highlighting
37+
for <a class="reference external" href="https://projectfluent.org/">Fluent</a> files in Sphinx.</p>
38+
<div class="section" id="installation">
39+
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
40+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip install fluent.pygments
41+
</pre></div>
42+
</div>
43+
</div>
44+
<div class="section" id="usage">
45+
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h2>
46+
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">code-block</span><span class="p">::</span> fluent
47+
48+
my-key = Localize { -brand-name }
49+
</pre></div>
50+
</div>
51+
</div>
52+
<div class="section" id="example">
53+
<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline"></a></h2>
54+
<div class="highlight-fluent notranslate"><div class="highlight"><pre><span></span><span class="cm">### A resource comment for the whole file</span><span class="p"></span>
55+
56+
<span class="no">my-key</span><span class="p"> = </span><span class="l">Localize </span><span class="p">{ -</span><span class="no">brand-name</span><span class="p"> }</span>
57+
<span class="p">-</span><span class="no">brand-name</span><span class="p"> = </span><span class="l">Fluent</span><span class="p"></span>
58+
59+
<span class="cm"># $num is the number of strings to localize</span><span class="p"></span>
60+
<span class="no">plurals</span><span class="p"> = { </span><span class="nv">$num</span><span class="p"> -&gt;</span>
61+
<span class="p"> [</span><span class="na">one</span><span class="p">] </span><span class="l">One string</span><span class="p"></span>
62+
<span class="p"> *[</span><span class="na">other</span><span class="p">] {</span><span class="nv">$num</span><span class="p">}</span><span class="l"> strings</span><span class="p"></span>
63+
<span class="p">}</span>
64+
<span class="gr">an error ;-)</span>
65+
<span class="no">Most-strings</span><span class="p"> = </span><span class="l">are just simple strings.</span><span class="p"></span>
66+
</pre></div>
67+
</div>
68+
</div>
69+
</div>
70+
71+
72+
</div>
73+
</div>
74+
</div>
75+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
76+
<div class="sphinxsidebarwrapper">
77+
<h3><a href="#">Table of Contents</a></h3>
78+
79+
<div id="searchbox" style="display: none" role="search">
80+
<h3 id="searchlabel">Quick search</h3>
81+
<div class="searchformwrapper">
82+
<form class="search" action="search.html" method="get">
83+
<input type="text" name="q" aria-labelledby="searchlabel" />
84+
<input type="submit" value="Go" />
85+
</form>
86+
</div>
87+
</div>
88+
<script>$('#searchbox').show(0);</script>
89+
</div>
90+
</div>
91+
<div class="clearer"></div>
92+
</div>
93+
<div class="related" role="navigation" aria-label="related navigation">
94+
<h3>Navigation</h3>
95+
<ul>
96+
<li class="right" style="margin-right: 10px">
97+
<a href="genindex.html" title="General Index"
98+
>index</a></li>
99+
<li class="nav-item nav-item-0"><a href="#">fluent.pygments 0.1.0 documentation</a> &#187;</li>
100+
</ul>
101+
</div>
102+
<div class="footer" role="contentinfo">
103+
python-fluent documentation is licensed under the APL 2.0.
104+
</div>
105+
</body>
106+
</html>

fluent.pygments/stable/objects.inv

253 Bytes
Binary file not shown.

fluent.pygments/stable/search.html

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html>
5+
<head>
6+
<meta charset="utf-8" />
7+
<title>Search &#8212; fluent.pygments 0.1.0 documentation</title>
8+
<link rel="stylesheet" href="/python-fluent/_static/nature.css" type="text/css" />
9+
<link rel="stylesheet" href="/python-fluent/_static/pygments.css" type="text/css" />
10+
<link rel="stylesheet" href="/python-fluent/_static/project-fluent.css" type="text/css" />
11+
12+
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
13+
<script src="/python-fluent/_static/jquery.js"></script>
14+
<script src="/python-fluent/_static/underscore.js"></script>
15+
<script src="/python-fluent/_static/doctools.js"></script>
16+
<script src="/python-fluent/_static/language_data.js"></script>
17+
<script src="_static/searchtools.js"></script>
18+
<link rel="index" title="Index" href="genindex.html" />
19+
<link rel="search" title="Search" href="#" />
20+
<script src="searchindex.js" defer></script>
21+
22+
23+
</head><body>
24+
<div class="related" role="navigation" aria-label="related navigation">
25+
<h3>Navigation</h3>
26+
<ul>
27+
<li class="right" style="margin-right: 10px">
28+
<a href="genindex.html" title="General Index"
29+
accesskey="I">index</a></li>
30+
<li class="nav-item nav-item-0"><a href="index.html">fluent.pygments 0.1.0 documentation</a> &#187;</li>
31+
</ul>
32+
</div>
33+
34+
<div class="document">
35+
<div class="documentwrapper">
36+
<div class="bodywrapper">
37+
<div class="body" role="main">
38+
39+
<h1 id="search-documentation">Search</h1>
40+
<div id="fallback" class="admonition warning">
41+
<script>$('#fallback').hide();</script>
42+
<p>
43+
Please activate JavaScript to enable the search
44+
functionality.
45+
</p>
46+
</div>
47+
<p>
48+
Searching for multiple words only shows matches that contain
49+
all words.
50+
</p>
51+
<form action="" method="get">
52+
<input type="text" name="q" aria-labelledby="search-documentation" value="" />
53+
<input type="submit" value="search" />
54+
<span id="search-progress" style="padding-left: 10px"></span>
55+
</form>
56+
57+
<div id="search-results">
58+
59+
</div>
60+
61+
</div>
62+
</div>
63+
</div>
64+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
65+
<div class="sphinxsidebarwrapper">
66+
<h3><a href="index.html">Table of Contents</a></h3>
67+
68+
</div>
69+
</div>
70+
<div class="clearer"></div>
71+
</div>
72+
<div class="related" role="navigation" aria-label="related navigation">
73+
<h3>Navigation</h3>
74+
<ul>
75+
<li class="right" style="margin-right: 10px">
76+
<a href="genindex.html" title="General Index"
77+
>index</a></li>
78+
<li class="nav-item nav-item-0"><a href="index.html">fluent.pygments 0.1.0 documentation</a> &#187;</li>
79+
</ul>
80+
</div>
81+
<div class="footer" role="contentinfo">
82+
python-fluent documentation is licensed under the APL 2.0.
83+
</div>
84+
</body>
85+
</html>

fluent.pygments/stable/searchindex.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)