Compare commits

...

10 Commits

Author SHA1 Message Date
Kernc
5903058c97 TST: Fix i18n_subsites 2020-08-19 20:27:33 +02:00
Lucas Cimon
dc739069c5 Fixing i18n_subsites tests 2019-09-05 10:07:36 +02:00
ivanhercaz
2f80133a69 Update instructions to JINJA_ENVIRONMENT
JINJA_ENVIRONMENT replace JINJA_EXTENSIONS. It was changed in the
example codes but not in the how to localize templates with Jinja2.
2019-06-18 22:42:02 +01:00
Oliver Urs Lenz
b5cde0aff5 Accomodate renaming of filenames to static_content in generator context 2018-11-24 20:56:58 +01:00
lioman
6b31a491f3 fix compatibility with pelican 4+
Draft is removed in pelican 4+. Import Article as Draft instead
2018-11-15 14:43:03 +01:00
Jorge Maldonado Ventura
41058fead3 Fix documentation error from i18n_subsites 2018-07-01 17:10:57 +02:00
Mandaris
8799873565 Give information on how to set up in pelican
The plugin calls for the extension for the command “gettext” and
doesn’t write the text without it.
2017-11-15 06:03:43 -08:00
Deniz Turgut
cc0dd7f2d3 Update plugins that use JINJA_ENTENSIONS to the Pelican 3.7 setting JINJA_ENVIRONMENT
Plugins that were affected:
- assets
- i18n_subsites
- jinja2content
2016-12-15 04:18:20 -05:00
Ondrej Grover
806ae893e7 record hidden content in native lang, fixes #409
added 404 test pages for this case
2015-02-15 08:12:12 +01:00
Ondrej Grover
1e0684aa22 i18n_subsites: update test suite for Pelican 3.5.0
just add the timezone in dates
2015-02-15 07:55:43 +01:00
26 changed files with 342 additions and 108 deletions

View File

@ -53,6 +53,15 @@ dictionary must be given (but can be empty) in the ``I18N_SUBSITES`` dictionary
}
}
You must also have the following in your pelican configuration
.. code-block:: python
JINJA_ENVIRONMENT = {
'extensions': ['jinja2.ext.i18n'],
}
Default and special overrides
-----------------------------
The settings overrides may contain arbitrary settings, however, there

View File

@ -12,7 +12,10 @@ import posixpath
from copy import copy
from itertools import chain
from operator import attrgetter
from collections import OrderedDict
try:
from collections.abc import OrderedDict
except ImportError:
from collections import OrderedDict
from contextlib import contextmanager
from six.moves.urllib.parse import urlparse
@ -22,7 +25,10 @@ import locale
from pelican import signals
from pelican.generators import ArticlesGenerator, PagesGenerator
from pelican.settings import configure_settings
from pelican.contents import Draft
try:
from pelican.contents import Draft
except ImportError:
from pelican.contents import Article as Draft
# Global vars
@ -248,6 +254,10 @@ def filter_contents_translations(generator):
hiding_func = inspector.hiding_function()
untrans_policy = inspector.untranslated_policy(default='hide')
for (contents, other_contents) in inspector.contents_list_pairs():
for content in other_contents: # save any hidden native content first
if content.lang == current_lang: # in native lang
# save the native URL attr formatted in the current locale
_NATIVE_CONTENT_URL_DB[content.source_path] = content.url
for content in contents[:]: # copy for removing in loop
if content.lang == current_lang: # in native lang
# save the native URL attr formatted in the current locale
@ -266,7 +276,13 @@ def install_templates_translations(generator):
Only if the 'jinja2.ext.i18n' jinja2 extension is enabled
the translations for the current DEFAULT_LANG are installed.
'''
if 'jinja2.ext.i18n' in generator.settings['JINJA_EXTENSIONS']:
if 'JINJA_ENVIRONMENT' in generator.settings: # pelican 3.7+
jinja_extensions = generator.settings['JINJA_ENVIRONMENT'].get(
'extensions', [])
else:
jinja_extensions = generator.settings['JINJA_EXTENSIONS']
if 'jinja2.ext.i18n' in jinja_extensions:
domain = generator.settings.get('I18N_GETTEXT_DOMAIN', 'messages')
localedir = generator.settings.get('I18N_GETTEXT_LOCALEDIR')
if localedir is None:
@ -343,13 +359,19 @@ def interlink_static_files(generator):
'''Add links to static files in the main site if necessary'''
if generator.settings['STATIC_PATHS'] != []:
return # customized STATIC_PATHS
filenames = generator.context['filenames'] # minimize attr lookup
try: # minimize attr lookup
static_content = generator.context['static_content']
except KeyError:
static_content = generator.context['filenames']
relpath = relpath_to_site(generator.settings['DEFAULT_LANG'], _MAIN_LANG)
for staticfile in _MAIN_STATIC_FILES:
if staticfile.get_relative_source_path() not in filenames:
if staticfile.get_relative_source_path() not in static_content:
staticfile = copy(staticfile) # prevent override in main site
staticfile.override_url = posixpath.join(relpath, staticfile.url)
generator.add_source_path(staticfile)
try:
generator.add_source_path(staticfile, static=True)
except TypeError:
generator.add_source_path(staticfile)
def save_main_static_files(static_generator):

View File

@ -39,7 +39,7 @@ with local development when ``SITEURL == ''``.
Language buttons showing all available languages, current is active
...................................................................
The ``extra_siteurls`` dictionary is a mapping of all languages to the
The ``lang_subsites`` dictionary is a mapping of all languages to the
``SITEURL`` of the respective (sub-)sites. This template sets the
language of the current (sub-)site as active.

View File

@ -6,11 +6,13 @@ Localizing themes with Jinja2
---------------------
To enable the |ext| extension in your templates, you must add it to
``JINJA_EXTENSIONS`` in your Pelican configuration
``JINJA_ENVIRONMENT`` in your Pelican configuration
.. code-block:: python
JINJA_EXTENSIONS = ['jinja2.ext.i18n', ...]
JINJA_ENVIRONMENT = {
'extensions': ['jinja2.ext.i18n', ...]
}
Then follow the `Jinja2 templating documentation for the I18N plugin
<http://jinja.pocoo.org/docs/templates/#i18n>`_ to make your templates

View File

@ -0,0 +1,7 @@
404 stránka
===========
:slug: 404
:lang: cz
:status: hidden
Jednoduchá 404 stránka.

View File

@ -0,0 +1,7 @@
Eine 404 Seite
==============
:slug: 404
:lang: de
:status: hidden
Eine einfache 404 Seite.

View File

@ -0,0 +1,7 @@
A 404 page
==========
:slug: 404
:lang: en
:status: hidden
A simple 404 page.

View File

@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Welcome to our Testing site</title>
<title>Testing site - An untranslated article</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testing site Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/theme/style.css" />
@ -10,14 +11,16 @@
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/">Testing site <strong></strong></a></h1>
<h1><a href="http://example.com/test/">Testing site</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/pages/untranslated-page.html">Untranslated page</a></li>
<li class="active"><a href="http://example.com/test/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content" class="body">
<header>
@ -27,12 +30,15 @@
</header>
<footer class="post-info">
<abbr class="published" title="2014-07-14T00:00:00">
<time class="published" datetime="2014-07-14T00:00:00+00:00">
Mon 14 July 2014
</abbr>
</time>
<address class="vcard author">
By <a class="url fn" href="http://example.com/test/author/the-tester.html">The Tester</a>
</address>
<div class="category">
Category: <a href="http://example.com/test/category/misc.html">misc</a>
</div>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>An article without a translation.
@ -42,8 +48,8 @@ Here is a link to an <a class="reference external" href="http://example.com/test
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="cz">
<html lang="en">
<head>
<title>Welcome to our Testovací stránka</title>
<title>Testovací stránka - An untranslated article</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testovací stránka Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/cz/../theme/style.css" />
@ -10,13 +11,15 @@
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/cz/">Testovací stránka <strong></strong></a></h1>
<h1><a href="http://example.com/test/cz/">Testovací stránka</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li class="active"><a href="http://example.com/test/cz/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content" class="body">
<header>
@ -26,23 +29,26 @@
</header>
<footer class="post-info">
<abbr class="published" title="2014-07-14T00:00:00">
<time class="published" datetime="2014-07-14T00:00:00+00:00">
Mon 14 July 2014
</abbr>
</time>
<address class="vcard author">
By <a class="url fn" href="http://example.com/test/cz/author/test-testovic.html">Test Testovič</a>
</address>
<div class="category">
Category: <a href="http://example.com/test/cz/category/misc.html">misc</a>
</div>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>An article without a translation.
Here is a link to an <a class="reference external" href="http://example.com/test/cz/../pages/untranslated-page.html">untranslated page</a></p>
Here is a link to an <a class="reference external" href="http://example.com/test/pages/untranslated-page.html">untranslated page</a></p>
</div><!-- /.entry-content -->
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Testovací stránka</title><link href="http://example.com/test/cz/" rel="alternate"></link><link href="http://example.com/test/feeds_all.atom.xml" rel="self"></link><id>http://example.com/test/cz/</id><updated>2014-09-15T00:00:00+00:00</updated><entry><title>Přeložený článek</title><link href="http://example.com/test/cz/translated-article.html" rel="alternate"></link><updated>2014-09-15T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-09-15:test/cz/translated-article.html</id><summary type="html">&lt;p&gt;Jednoduchý článek s překlady.
Zde je odkaz na &lt;a class="reference external" href="http://example.com/test/cz/../images/img.png"&gt;nějaký obrázek&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>Ein übersetzter Artikel</title><link href="http://example.com/test/cz/../de/translated-article.html" rel="alternate"></link><updated>2014-09-14T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-09-14:test/cz/../de/translated-article.html</id><summary type="html">&lt;p&gt;Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur &lt;a class="reference external" href="http://example.com/test/cz/../images/img.png"&gt;einigem Bild&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>A translated article</title><link href="http://example.com/test/cz/../translated-article.html" rel="alternate"></link><updated>2014-09-13T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-09-13:test/cz/../translated-article.html</id><summary type="html">&lt;p&gt;A simple article with a translation.
Here is a link to &lt;a class="reference external" href="http://example.com/test/cz/../images/img.png"&gt;some image&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>An untranslated article</title><link href="http://example.com/test/cz/an-untranslated-article-en.html" rel="alternate"></link><updated>2014-07-14T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-07-14:test/cz/an-untranslated-article-en.html</id><summary type="html">&lt;p&gt;An article without a translation.
Here is a link to an &lt;a class="reference external" href="http://example.com/test/cz/../pages/untranslated-page.html"&gt;untranslated page&lt;/a&gt;&lt;/p&gt;
</summary></entry></feed>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Testovací stránka</title><link href="http://example.com/test/cz/" rel="alternate"></link><link href="http://example.com/test/feeds_all.atom.xml" rel="self"></link><id>http://example.com/test/cz/</id><updated>2014-09-15T00:00:00+00:00</updated><entry><title>Přeložený článek</title><link href="http://example.com/test/cz/translated-article.html" rel="alternate"></link><published>2014-09-15T00:00:00+00:00</published><updated>2014-09-15T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-09-15:/test/cz/translated-article.html</id><content type="html">&lt;p&gt;Jednoduchý článek s překlady.
Zde je odkaz na &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;nějaký obrázek&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category></entry><entry><title>Ein übersetzter Artikel</title><link href="http://example.com/test/de/translated-article.html" rel="alternate"></link><published>2014-09-14T00:00:00+00:00</published><updated>2014-09-14T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-09-14:/test/de/translated-article.html</id><content type="html">&lt;p&gt;Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;einigem Bild&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category></entry><entry><title>A translated article</title><link href="http://example.com/test/translated-article.html" rel="alternate"></link><published>2014-09-13T00:00:00+00:00</published><updated>2014-09-13T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-09-13:/test/translated-article.html</id><content type="html">&lt;p&gt;A simple article with a translation.
Here is a link to &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;some image&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category></entry><entry><title>An untranslated article</title><link href="http://example.com/test/cz/an-untranslated-article-en.html" rel="alternate"></link><published>2014-07-14T00:00:00+00:00</published><updated>2014-07-14T00:00:00+00:00</updated><author><name>Test Testovič</name></author><id>tag:example.com,2014-07-14:/test/cz/an-untranslated-article-en.html</id><content type="html">&lt;p&gt;An article without a translation.
Here is a link to an &lt;a class="reference external" href="http://example.com/test/pages/untranslated-page.html"&gt;untranslated page&lt;/a&gt;&lt;/p&gt;
</content><category term="misc"></category></entry></feed>

View File

@ -3,6 +3,7 @@
<head>
<title>Welcome to our Testovací stránka</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testovací stránka Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/cz/../theme/style.css" />
@ -10,9 +11,10 @@
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/cz/">Testovací stránka <strong></strong></a></h1>
<h1><a href="http://example.com/test/cz/">Testovací stránka</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/cz/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content">
<h2>All articles</h2>
@ -21,33 +23,33 @@
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="http://example.com/test/cz/translated-article.html" rel="bookmark" title="Permalink to Přeložený článek">Přeložený článek</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2014-09-15T00:00:00"> Mon 15 September 2014 </abbr>
<time class="published" datetime="2014-09-15T00:00:00+00:00"> Mon 15 September 2014 </time>
<address class="vcard author">By
<a class="url fn" href="http://example.com/test/cz/author/test-testovic.html">Test Testovič</a>
</address>
</footer><!-- /.post-info -->
<div class="entry-content"> <p>Jednoduchý článek s překlady.
Zde je odkaz na <a class="reference external" href="http://example.com/test/cz/../images/img.png">nějaký obrázek</a>.</p>
Zde je odkaz na <a class="reference external" href="http://example.com/test/images/img.png">nějaký obrázek</a>.</p>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="http://example.com/test/cz/an-untranslated-article-en.html" rel="bookmark" title="Permalink to An untranslated article">An untranslated article</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2014-07-14T00:00:00"> Mon 14 July 2014 </abbr>
<time class="published" datetime="2014-07-14T00:00:00+00:00"> Mon 14 July 2014 </time>
<address class="vcard author">By
<a class="url fn" href="http://example.com/test/cz/author/test-testovic.html">Test Testovič</a>
</address>
</footer><!-- /.post-info -->
<div class="entry-content"> <p>An article without a translation.
Here is a link to an <a class="reference external" href="http://example.com/test/cz/../pages/untranslated-page.html">untranslated page</a></p>
Here is a link to an <a class="reference external" href="http://example.com/test/pages/untranslated-page.html">untranslated page</a></p>
</div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
</section><!-- /#content -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="cz">
<head>
<title>Testovací stránka - 404 stránka</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testovací stránka Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/cz/../theme/style.css" />
<link rel="alternate" hreflang="de" href="http://example.com/test/cz/../de/pages/404.html">
<link rel="alternate" hreflang="en" href="http://example.com/test/cz/../pages/404.html">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/cz/">Testovací stránka</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/cz/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<h1>404 stránka</h1>
Translations:
<a href="http://example.com/test/cz/../de/pages/404.html" hreflang="de">de</a>
<a href="http://example.com/test/cz/../pages/404.html" hreflang="en">en</a>
<p>Jednoduchá 404 stránka.</p>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>
</html>

View File

@ -1,51 +1,60 @@
<!DOCTYPE html>
<html lang="cz">
<head>
<title>Welcome to our Testovací stránka</title>
<title>Testovací stránka - Přeložený článek</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testovací stránka Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/cz/../theme/style.css" />
<link rel="alternate" hreflang="de" href="http://example.com/test/cz/../de/translated-article.html">
<link rel="alternate" hreflang="en" href="http://example.com/test/cz/../translated-article.html">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/cz/">Testovací stránka <strong></strong></a></h1>
<h1><a href="http://example.com/test/cz/">Testovací stránka</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li class="active"><a href="http://example.com/test/cz/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content" class="body">
<header>
<h2 class="entry-title">
<a href="http://example.com/test/cz/translated-article.html" rel="bookmark"
title="Permalink to Přeložený článek">Přeložený článek</a></h2>
Translations:
<a href="http://example.com/test/cz/../de/translated-article.html">de</a>
<a href="http://example.com/test/cz/../translated-article.html">en</a>
Translations:
<a href="http://example.com/test/cz/../de/translated-article.html" hreflang="de">de</a>
<a href="http://example.com/test/cz/../translated-article.html" hreflang="en">en</a>
</header>
<footer class="post-info">
<abbr class="published" title="2014-09-15T00:00:00">
<time class="published" datetime="2014-09-15T00:00:00+00:00">
Mon 15 September 2014
</abbr>
</time>
<address class="vcard author">
By <a class="url fn" href="http://example.com/test/cz/author/test-testovic.html">Test Testovič</a>
</address>
<div class="category">
Category: <a href="http://example.com/test/cz/category/misc.html">misc</a>
</div>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>Jednoduchý článek s překlady.
Zde je odkaz na <a class="reference external" href="http://example.com/test/cz/../images/img.png">nějaký obrázek</a>.</p>
Zde je odkaz na <a class="reference external" href="http://example.com/test/images/img.png">nějaký obrázek</a>.</p>
</div><!-- /.entry-content -->
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="de">
<html lang="en">
<head>
<title>Willkommen Sie zur unserer Testseite</title>
<title>Testseite - An untranslated article</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testseite Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/de/../theme/style.css" />
@ -10,13 +11,15 @@
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/de/">Testseite <strong></strong></a></h1>
<h1><a href="http://example.com/test/de/">Testseite</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li class="active"><a href="http://example.com/test/de/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content" class="body">
<header>
@ -26,12 +29,15 @@
</header>
<footer class="post-info">
<abbr class="published" title="2014-07-14T00:00:00">
<time class="published" datetime="2014-07-14T00:00:00+00:00">
Mo 14 Juli 2014
</abbr>
</time>
<address class="vcard author">
By <a class="url fn" href="http://example.com/test/de/author/der-tester.html">Der Tester</a>
</address>
<div class="category">
Category: <a href="http://example.com/test/de/category/misc.html">misc</a>
</div>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>An article without a translation.
@ -41,8 +47,8 @@ Here is a link to an <a class="reference external" href="http://example.com/test
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Testseite</title><link href="http://example.com/test/de/" rel="alternate"></link><link href="http://example.com/test/feeds_all.atom.xml" rel="self"></link><id>http://example.com/test/de/</id><updated>2014-09-15T00:00:00+00:00</updated><entry><title>Přeložený článek</title><link href="http://example.com/test/de/../cz/translated-article.html" rel="alternate"></link><updated>2014-09-15T00:00:00+00:00</updated><author><name>Der Tester</name></author><id>tag:example.com,2014-09-15:test/de/../cz/translated-article.html</id><summary type="html">&lt;p&gt;Jednoduchý článek s překlady.
Zde je odkaz na &lt;a class="reference external" href="http://example.com/test/de/../images/img.png"&gt;nějaký obrázek&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>Ein übersetzter Artikel</title><link href="http://example.com/test/de/translated-article.html" rel="alternate"></link><updated>2014-09-14T00:00:00+00:00</updated><author><name>Der Tester</name></author><id>tag:example.com,2014-09-14:test/de/translated-article.html</id><summary type="html">&lt;p&gt;Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur &lt;a class="reference external" href="http://example.com/test/de/../images/img.png"&gt;einigem Bild&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>A translated article</title><link href="http://example.com/test/de/../translated-article.html" rel="alternate"></link><updated>2014-09-13T00:00:00+00:00</updated><author><name>Der Tester</name></author><id>tag:example.com,2014-09-13:test/de/../translated-article.html</id><summary type="html">&lt;p&gt;A simple article with a translation.
Here is a link to &lt;a class="reference external" href="http://example.com/test/de/../images/img.png"&gt;some image&lt;/a&gt;.&lt;/p&gt;
</summary></entry></feed>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Testseite</title><link href="http://example.com/test/de/" rel="alternate"></link><link href="http://example.com/test/feeds_all.atom.xml" rel="self"></link><id>http://example.com/test/de/</id><updated>2014-09-15T00:00:00+00:00</updated><entry><title>Přeložený článek</title><link href="http://example.com/test/cz/translated-article.html" rel="alternate"></link><published>2014-09-15T00:00:00+00:00</published><updated>2014-09-15T00:00:00+00:00</updated><author><name>Der Tester</name></author><id>tag:example.com,2014-09-15:/test/cz/translated-article.html</id><content type="html">&lt;p&gt;Jednoduchý článek s překlady.
Zde je odkaz na &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;nějaký obrázek&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category></entry><entry><title>Ein übersetzter Artikel</title><link href="http://example.com/test/de/translated-article.html" rel="alternate"></link><published>2014-09-14T00:00:00+00:00</published><updated>2014-09-14T00:00:00+00:00</updated><author><name>Der Tester</name></author><id>tag:example.com,2014-09-14:/test/de/translated-article.html</id><content type="html">&lt;p&gt;Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;einigem Bild&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category></entry><entry><title>A translated article</title><link href="http://example.com/test/translated-article.html" rel="alternate"></link><published>2014-09-13T00:00:00+00:00</published><updated>2014-09-13T00:00:00+00:00</updated><author><name>Der Tester</name></author><id>tag:example.com,2014-09-13:/test/translated-article.html</id><content type="html">&lt;p&gt;A simple article with a translation.
Here is a link to &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;some image&lt;/a&gt;.&lt;/p&gt;
</content><category term="misc"></category></entry></feed>

View File

@ -3,6 +3,7 @@
<head>
<title>Willkommen Sie zur unserer Testseite</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testseite Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/de/../theme/style.css" />
@ -10,9 +11,10 @@
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/de/">Testseite <strong></strong></a></h1>
<h1><a href="http://example.com/test/de/">Testseite</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/de/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content">
<h2>All articles</h2>
@ -21,21 +23,21 @@
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="http://example.com/test/de/translated-article.html" rel="bookmark" title="Permalink to Ein übersetzter Artikel">Ein übersetzter Artikel</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2014-09-14T00:00:00"> So 14 September 2014 </abbr>
<time class="published" datetime="2014-09-14T00:00:00+00:00"> So 14 September 2014 </time>
<address class="vcard author">By
<a class="url fn" href="http://example.com/test/de/author/der-tester.html">Der Tester</a>
</address>
</footer><!-- /.post-info -->
<div class="entry-content"> <p>Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur <a class="reference external" href="http://example.com/test/de/../images/img.png">einigem Bild</a>.</p>
Hier ist ein Link zur <a class="reference external" href="http://example.com/test/images/img.png">einigem Bild</a>.</p>
</div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
</section><!-- /#content -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="de">
<head>
<title>Testseite - Eine 404 Seite</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testseite Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/de/../theme/style.css" />
<link rel="alternate" hreflang="cz" href="http://example.com/test/de/../cz/pages/404.html">
<link rel="alternate" hreflang="en" href="http://example.com/test/de/../pages/404.html">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/de/">Testseite</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/de/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<h1>Eine 404 Seite</h1>
Translations:
<a href="http://example.com/test/de/../cz/pages/404.html" hreflang="cz">cz</a>
<a href="http://example.com/test/de/../pages/404.html" hreflang="en">en</a>
<p>Eine einfache 404 Seite.</p>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>
</html>

View File

@ -1,18 +1,22 @@
<!DOCTYPE html>
<html lang="de">
<html lang="en">
<head>
<title>Untranslated page</title>
<title>Testseite - Untranslated page</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testseite Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/de/../theme/style.css" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/de/">Testseite <strong></strong></a></h1>
<h1><a href="http://example.com/test/de/">Testseite</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/de/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<h1>Untranslated page</h1>
@ -22,8 +26,8 @@
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,51 +1,60 @@
<!DOCTYPE html>
<html lang="de">
<head>
<title>Willkommen Sie zur unserer Testseite</title>
<title>Testseite - Ein übersetzter Artikel</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testseite Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/de/../theme/style.css" />
<link rel="alternate" hreflang="cz" href="http://example.com/test/de/../cz/translated-article.html">
<link rel="alternate" hreflang="en" href="http://example.com/test/de/../translated-article.html">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/de/">Testseite <strong></strong></a></h1>
<h1><a href="http://example.com/test/de/">Testseite</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li class="active"><a href="http://example.com/test/de/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content" class="body">
<header>
<h2 class="entry-title">
<a href="http://example.com/test/de/translated-article.html" rel="bookmark"
title="Permalink to Ein übersetzter Artikel">Ein übersetzter Artikel</a></h2>
Translations:
<a href="http://example.com/test/de/../cz/translated-article.html">cz</a>
<a href="http://example.com/test/de/../translated-article.html">en</a>
Translations:
<a href="http://example.com/test/de/../cz/translated-article.html" hreflang="cz">cz</a>
<a href="http://example.com/test/de/../translated-article.html" hreflang="en">en</a>
</header>
<footer class="post-info">
<abbr class="published" title="2014-09-14T00:00:00">
<time class="published" datetime="2014-09-14T00:00:00+00:00">
So 14 September 2014
</abbr>
</time>
<address class="vcard author">
By <a class="url fn" href="http://example.com/test/de/author/der-tester.html">Der Tester</a>
</address>
<div class="category">
Category: <a href="http://example.com/test/de/category/misc.html">misc</a>
</div>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur <a class="reference external" href="http://example.com/test/de/../images/img.png">einigem Bild</a>.</p>
Hier ist ein Link zur <a class="reference external" href="http://example.com/test/images/img.png">einigem Bild</a>.</p>
</div><!-- /.entry-content -->
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Testing site</title><link href="http://example.com/test/" rel="alternate"></link><link href="http://example.com/test/feeds_all.atom.xml" rel="self"></link><id>http://example.com/test/</id><updated>2014-09-15T00:00:00+00:00</updated><entry><title>Přeložený článek</title><link href="http://example.com/test/cz/translated-article.html" rel="alternate"></link><updated>2014-09-15T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-09-15:test/cz/translated-article.html</id><summary type="html">&lt;p&gt;Jednoduchý článek s překlady.
<feed xmlns="http://www.w3.org/2005/Atom"><title>Testing site</title><link href="http://example.com/test/" rel="alternate"></link><link href="http://example.com/test/feeds_all.atom.xml" rel="self"></link><id>http://example.com/test/</id><updated>2014-09-15T00:00:00+00:00</updated><entry><title>Přeložený článek</title><link href="http://example.com/test/cz/translated-article.html" rel="alternate"></link><published>2014-09-15T00:00:00+00:00</published><updated>2014-09-15T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-09-15:/test/cz/translated-article.html</id><content type="html">&lt;p&gt;Jednoduchý článek s překlady.
Zde je odkaz na &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;nějaký obrázek&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>Ein übersetzter Artikel</title><link href="http://example.com/test/de/translated-article.html" rel="alternate"></link><updated>2014-09-14T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-09-14:test/de/translated-article.html</id><summary type="html">&lt;p&gt;Ein einfacher Artikel mit einer Übersetzung.
</content><category term="misc"></category></entry><entry><title>Ein übersetzter Artikel</title><link href="http://example.com/test/de/translated-article.html" rel="alternate"></link><published>2014-09-14T00:00:00+00:00</published><updated>2014-09-14T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-09-14:/test/de/translated-article.html</id><content type="html">&lt;p&gt;Ein einfacher Artikel mit einer Übersetzung.
Hier ist ein Link zur &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;einigem Bild&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>A translated article</title><link href="http://example.com/test/translated-article.html" rel="alternate"></link><updated>2014-09-13T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-09-13:test/translated-article.html</id><summary type="html">&lt;p&gt;A simple article with a translation.
</content><category term="misc"></category></entry><entry><title>A translated article</title><link href="http://example.com/test/translated-article.html" rel="alternate"></link><published>2014-09-13T00:00:00+00:00</published><updated>2014-09-13T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-09-13:/test/translated-article.html</id><content type="html">&lt;p&gt;A simple article with a translation.
Here is a link to &lt;a class="reference external" href="http://example.com/test/images/img.png"&gt;some image&lt;/a&gt;.&lt;/p&gt;
</summary></entry><entry><title>An untranslated article</title><link href="http://example.com/test/an-untranslated-article.html" rel="alternate"></link><updated>2014-07-14T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-07-14:test/an-untranslated-article.html</id><summary type="html">&lt;p&gt;An article without a translation.
</content><category term="misc"></category></entry><entry><title>An untranslated article</title><link href="http://example.com/test/an-untranslated-article.html" rel="alternate"></link><published>2014-07-14T00:00:00+00:00</published><updated>2014-07-14T00:00:00+00:00</updated><author><name>The Tester</name></author><id>tag:example.com,2014-07-14:/test/an-untranslated-article.html</id><content type="html">&lt;p&gt;An article without a translation.
Here is a link to an &lt;a class="reference external" href="http://example.com/test/pages/untranslated-page.html"&gt;untranslated page&lt;/a&gt;&lt;/p&gt;
</summary></entry></feed>
</content><category term="misc"></category></entry></feed>

View File

@ -3,6 +3,7 @@
<head>
<title>Welcome to our Testing site</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testing site Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/theme/style.css" />
@ -10,10 +11,11 @@
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/">Testing site <strong></strong></a></h1>
<h1><a href="http://example.com/test/">Testing site</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/pages/untranslated-page.html">Untranslated page</a></li>
<li><a href="http://example.com/test/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content">
<h2>All articles</h2>
@ -22,7 +24,7 @@
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="http://example.com/test/translated-article.html" rel="bookmark" title="Permalink to A translated article">A translated article</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2014-09-13T00:00:00"> Sat 13 September 2014 </abbr>
<time class="published" datetime="2014-09-13T00:00:00+00:00"> Sat 13 September 2014 </time>
<address class="vcard author">By
<a class="url fn" href="http://example.com/test/author/the-tester.html">The Tester</a>
</address>
@ -34,7 +36,7 @@ Here is a link to <a class="reference external" href="http://example.com/test/im
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="http://example.com/test/an-untranslated-article.html" rel="bookmark" title="Permalink to An untranslated article">An untranslated article</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2014-07-14T00:00:00"> Mon 14 July 2014 </abbr>
<time class="published" datetime="2014-07-14T00:00:00+00:00"> Mon 14 July 2014 </time>
<address class="vcard author">By
<a class="url fn" href="http://example.com/test/author/the-tester.html">The Tester</a>
</address>
@ -47,8 +49,8 @@ Here is a link to an <a class="reference external" href="http://example.com/test
</section><!-- /#content -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Testing site - A 404 page</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testing site Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/theme/style.css" />
<link rel="alternate" hreflang="cz" href="http://example.com/test/cz/pages/404.html">
<link rel="alternate" hreflang="de" href="http://example.com/test/de/pages/404.html">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/">Testing site</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/pages/untranslated-page.html">Untranslated page</a></li>
<li><a href="http://example.com/test/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<h1>A 404 page</h1>
Translations:
<a href="http://example.com/test/cz/pages/404.html" hreflang="cz">cz</a>
<a href="http://example.com/test/de/pages/404.html" hreflang="de">de</a>
<p>A simple 404 page.</p>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>
</html>

View File

@ -1,19 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Untranslated page</title>
<title>Testing site - Untranslated page</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testing site Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/theme/style.css" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/">Testing site <strong></strong></a></h1>
<h1><a href="http://example.com/test/">Testing site</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li class="active"><a href="http://example.com/test/pages/untranslated-page.html">Untranslated page</a></li>
<li><a href="http://example.com/test/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<h1>Untranslated page</h1>
@ -23,8 +27,8 @@
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -1,41 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Welcome to our Testing site</title>
<title>Testing site - A translated article</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="http://example.com/test/feeds_all.atom.xml" type="application/atom+xml" rel="alternate" title="Testing site Full Atom Feed" />
<link rel="stylesheet" href="http://example.com/test/theme/style.css" />
<link rel="alternate" hreflang="cz" href="http://example.com/test/cz/translated-article.html">
<link rel="alternate" hreflang="de" href="http://example.com/test/de/translated-article.html">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://example.com/test/">Testing site <strong></strong></a></h1>
<h1><a href="http://example.com/test/">Testing site</a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
<li><a href="http://example.com/test/pages/untranslated-page.html">Untranslated page</a></li>
<li class="active"><a href="http://example.com/test/category/misc.html">misc</a></li>
</ul></nav><!-- /#menu -->
<section id="content" class="body">
<header>
<h2 class="entry-title">
<a href="http://example.com/test/translated-article.html" rel="bookmark"
title="Permalink to A translated article">A translated article</a></h2>
Translations:
<a href="http://example.com/test/cz/translated-article.html">cz</a>
<a href="http://example.com/test/de/translated-article.html">de</a>
Translations:
<a href="http://example.com/test/cz/translated-article.html" hreflang="cz">cz</a>
<a href="http://example.com/test/de/translated-article.html" hreflang="de">de</a>
</header>
<footer class="post-info">
<abbr class="published" title="2014-09-13T00:00:00">
<time class="published" datetime="2014-09-13T00:00:00+00:00">
Sat 13 September 2014
</abbr>
</time>
<address class="vcard author">
By <a class="url fn" href="http://example.com/test/author/the-tester.html">The Tester</a>
</address>
<div class="category">
Category: <a href="http://example.com/test/category/misc.html">misc</a>
</div>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>A simple article with a translation.
@ -45,8 +54,8 @@ Here is a link to <a class="reference external" href="http://example.com/test/im
</section>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="https://www.python.org/">Python</a>.
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>

View File

@ -32,7 +32,7 @@ PLUGIN_PATHS = ['../../']
PLUGINS = ['i18n_subsites']
THEME = 'localized_theme'
JINJA_EXTENSIONS = ['jinja2.ext.i18n']
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
from blinker import signal
tmpsig = signal('tmpsig')

View File

@ -136,4 +136,4 @@ class TestFullRun(unittest.TestCase):
self.temp_path], env={'PAGER': ''},
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
self.assertFalse(out, 'non-empty `diff` stdout:\n{}'.format(out))
self.assertFalse(err, 'non-empty `diff` stderr:\n{}'.format(out))
self.assertFalse(err, 'non-empty `diff` stderr:\n{}'.format(err))