diff --git a/i18n_subsites/i18n_subsites.py b/i18n_subsites/i18n_subsites.py index dc27799d4..2a80abb66 100644 --- a/i18n_subsites/i18n_subsites.py +++ b/i18n_subsites/i18n_subsites.py @@ -104,6 +104,8 @@ def prepare_site_db_and_overrides(): overrides['THEME_STATIC_DIR'] = posixpath.join( relpath, _MAIN_SETTINGS['THEME_STATIC_DIR']) overrides['THEME_STATIC_PATHS'] = [] + if 'FEED_DOMAIN' not in overrides: + overrides['FEED_DOMAIN'] = posixpath.join(_MAIN_SETTINGS['FEED_DOMAIN'], lang) # to change what is perceived as translations overrides['DEFAULT_LANG'] = lang diff --git a/i18n_subsites/test_data/output/an-untranslated-article.html b/i18n_subsites/test_data/output/an-untranslated-article.html index f2f649499..a42e4440c 100644 --- a/i18n_subsites/test_data/output/an-untranslated-article.html +++ b/i18n_subsites/test_data/output/an-untranslated-article.html @@ -4,7 +4,8 @@ Testing site - An untranslated article - + + diff --git a/i18n_subsites/test_data/output/cz/an-untranslated-article-en.html b/i18n_subsites/test_data/output/cz/an-untranslated-article-en.html index 4673ee512..c1cd678df 100644 --- a/i18n_subsites/test_data/output/cz/an-untranslated-article-en.html +++ b/i18n_subsites/test_data/output/cz/an-untranslated-article-en.html @@ -4,7 +4,8 @@ Testovací stránka - An untranslated article - + + diff --git a/i18n_subsites/test_data/output/cz/feeds_all.atom.xml b/i18n_subsites/test_data/output/cz/feeds/all.atom.xml similarity index 79% rename from i18n_subsites/test_data/output/cz/feeds_all.atom.xml rename to i18n_subsites/test_data/output/cz/feeds/all.atom.xml index 7415e1fc9..071cce115 100644 --- a/i18n_subsites/test_data/output/cz/feeds_all.atom.xml +++ b/i18n_subsites/test_data/output/cz/feeds/all.atom.xml @@ -1,5 +1,5 @@ -Testovací stránkahttp://example.com/test/cz/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00Test Testovičtag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. +Testovací stránkahttp://example.com/test/cz/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00Test Testovičtag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. Zde je odkaz na <a class="reference external" href="http://example.com/test/images/img.png">nějaký obrázek</a>.</p> Ein übersetzter Artikel2014-09-14T00:00:00+00:002014-09-14T00:00:00+00:00Test Testovičtag:example.com,2014-09-14:/test/de/translated-article.html<p>Ein einfacher Artikel mit einer Übersetzung. Hier ist ein Link zur <a class="reference external" href="http://example.com/test/images/img.png">einigem Bild</a>.</p> diff --git a/i18n_subsites/test_data/output/cz/feeds/misc.atom.xml b/i18n_subsites/test_data/output/cz/feeds/misc.atom.xml new file mode 100644 index 000000000..2c83dceb4 --- /dev/null +++ b/i18n_subsites/test_data/output/cz/feeds/misc.atom.xml @@ -0,0 +1,6 @@ + +Testovací stránka - mischttp://example.com/test/cz/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00Test Testovičtag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. +Zde je odkaz na <a class="reference external" href="http://example.com/test/images/img.png">nějaký obrázek</a>.</p> +An untranslated article2014-07-14T00:00:00+00:002014-07-14T00:00:00+00:00Test Testovičtag:example.com,2014-07-14:/test/cz/an-untranslated-article-en.html<p>An article without a translation. +Here is a link to an <a class="reference external" href="http://example.com/test/pages/untranslated-page.html">untranslated page</a></p> + \ No newline at end of file diff --git a/i18n_subsites/test_data/output/cz/index.html b/i18n_subsites/test_data/output/cz/index.html index c5fca3220..ee8a08a0e 100644 --- a/i18n_subsites/test_data/output/cz/index.html +++ b/i18n_subsites/test_data/output/cz/index.html @@ -4,7 +4,7 @@ Welcome to our Testovací stránka - + diff --git a/i18n_subsites/test_data/output/cz/pages/404.html b/i18n_subsites/test_data/output/cz/pages/404.html index 884203bcc..1e7807114 100644 --- a/i18n_subsites/test_data/output/cz/pages/404.html +++ b/i18n_subsites/test_data/output/cz/pages/404.html @@ -4,7 +4,7 @@ Testovací stránka - 404 stránka - + @@ -37,4 +37,4 @@

404 stránka

- + \ No newline at end of file diff --git a/i18n_subsites/test_data/output/cz/translated-article.html b/i18n_subsites/test_data/output/cz/translated-article.html index 5a5e5458c..339dd6b26 100644 --- a/i18n_subsites/test_data/output/cz/translated-article.html +++ b/i18n_subsites/test_data/output/cz/translated-article.html @@ -4,7 +4,8 @@ Testovací stránka - Přeložený článek - + + diff --git a/i18n_subsites/test_data/output/de/drafts/an-untranslated-article-en.html b/i18n_subsites/test_data/output/de/drafts/an-untranslated-article-en.html index f01dc3105..d183a4801 100644 --- a/i18n_subsites/test_data/output/de/drafts/an-untranslated-article-en.html +++ b/i18n_subsites/test_data/output/de/drafts/an-untranslated-article-en.html @@ -4,7 +4,8 @@ Testseite - An untranslated article - + + diff --git a/i18n_subsites/test_data/output/de/feeds_all.atom.xml b/i18n_subsites/test_data/output/de/feeds/all.atom.xml similarity index 73% rename from i18n_subsites/test_data/output/de/feeds_all.atom.xml rename to i18n_subsites/test_data/output/de/feeds/all.atom.xml index 8d845fe07..7b4f18294 100644 --- a/i18n_subsites/test_data/output/de/feeds_all.atom.xml +++ b/i18n_subsites/test_data/output/de/feeds/all.atom.xml @@ -1,5 +1,5 @@ -Testseitehttp://example.com/test/de/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00Der Testertag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. +Testseitehttp://example.com/test/de/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00Der Testertag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. Zde je odkaz na <a class="reference external" href="http://example.com/test/images/img.png">nějaký obrázek</a>.</p> Ein übersetzter Artikel2014-09-14T00:00:00+00:002014-09-14T00:00:00+00:00Der Testertag:example.com,2014-09-14:/test/de/translated-article.html<p>Ein einfacher Artikel mit einer Übersetzung. Hier ist ein Link zur <a class="reference external" href="http://example.com/test/images/img.png">einigem Bild</a>.</p> diff --git a/i18n_subsites/test_data/output/de/feeds/misc.atom.xml b/i18n_subsites/test_data/output/de/feeds/misc.atom.xml new file mode 100644 index 000000000..7138c9ef0 --- /dev/null +++ b/i18n_subsites/test_data/output/de/feeds/misc.atom.xml @@ -0,0 +1,4 @@ + +Testseite - mischttp://example.com/test/de/2014-09-14T00:00:00+00:00Ein übersetzter Artikel2014-09-14T00:00:00+00:002014-09-14T00:00:00+00:00Der Testertag:example.com,2014-09-14:/test/de/translated-article.html<p>Ein einfacher Artikel mit einer Übersetzung. +Hier ist ein Link zur <a class="reference external" href="http://example.com/test/images/img.png">einigem Bild</a>.</p> + \ No newline at end of file diff --git a/i18n_subsites/test_data/output/de/index.html b/i18n_subsites/test_data/output/de/index.html index fc43ae1b0..c8dd0d3f5 100644 --- a/i18n_subsites/test_data/output/de/index.html +++ b/i18n_subsites/test_data/output/de/index.html @@ -4,7 +4,7 @@ Willkommen Sie zur unserer Testseite - + diff --git a/i18n_subsites/test_data/output/de/pages/404.html b/i18n_subsites/test_data/output/de/pages/404.html index 642566079..7266df5b0 100644 --- a/i18n_subsites/test_data/output/de/pages/404.html +++ b/i18n_subsites/test_data/output/de/pages/404.html @@ -4,7 +4,7 @@ Testseite - Eine 404 Seite - + diff --git a/i18n_subsites/test_data/output/de/pages/untranslated-page-en.html b/i18n_subsites/test_data/output/de/pages/untranslated-page-en.html index 2df5ff994..0d4d66688 100644 --- a/i18n_subsites/test_data/output/de/pages/untranslated-page-en.html +++ b/i18n_subsites/test_data/output/de/pages/untranslated-page-en.html @@ -4,7 +4,7 @@ Testseite - Untranslated page - + diff --git a/i18n_subsites/test_data/output/de/translated-article.html b/i18n_subsites/test_data/output/de/translated-article.html index 9393b953d..ee5e25b70 100644 --- a/i18n_subsites/test_data/output/de/translated-article.html +++ b/i18n_subsites/test_data/output/de/translated-article.html @@ -4,7 +4,8 @@ Testseite - Ein übersetzter Artikel - + + diff --git a/i18n_subsites/test_data/output/feeds_all.atom.xml b/i18n_subsites/test_data/output/feeds/all.atom.xml similarity index 97% rename from i18n_subsites/test_data/output/feeds_all.atom.xml rename to i18n_subsites/test_data/output/feeds/all.atom.xml index c6c090856..992845e11 100644 --- a/i18n_subsites/test_data/output/feeds_all.atom.xml +++ b/i18n_subsites/test_data/output/feeds/all.atom.xml @@ -1,5 +1,5 @@ -Testing sitehttp://example.com/test/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00The Testertag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. +Testing sitehttp://example.com/test/2014-09-15T00:00:00+00:00Přeložený článek2014-09-15T00:00:00+00:002014-09-15T00:00:00+00:00The Testertag:example.com,2014-09-15:/test/cz/translated-article.html<p>Jednoduchý článek s překlady. Zde je odkaz na <a class="reference external" href="http://example.com/test/images/img.png">nějaký obrázek</a>.</p> Ein übersetzter Artikel2014-09-14T00:00:00+00:002014-09-14T00:00:00+00:00The Testertag:example.com,2014-09-14:/test/de/translated-article.html<p>Ein einfacher Artikel mit einer Übersetzung. Hier ist ein Link zur <a class="reference external" href="http://example.com/test/images/img.png">einigem Bild</a>.</p> diff --git a/i18n_subsites/test_data/output/feeds/misc.atom.xml b/i18n_subsites/test_data/output/feeds/misc.atom.xml new file mode 100644 index 000000000..80f064c94 --- /dev/null +++ b/i18n_subsites/test_data/output/feeds/misc.atom.xml @@ -0,0 +1,6 @@ + +Testing site - mischttp://example.com/test/2014-09-13T00:00:00+00:00A translated article2014-09-13T00:00:00+00:002014-09-13T00:00:00+00:00The Testertag:example.com,2014-09-13:/test/translated-article.html<p>A simple article with a translation. +Here is a link to <a class="reference external" href="http://example.com/test/images/img.png">some image</a>.</p> +An untranslated article2014-07-14T00:00:00+00:002014-07-14T00:00:00+00:00The Testertag:example.com,2014-07-14:/test/an-untranslated-article.html<p>An article without a translation. +Here is a link to an <a class="reference external" href="http://example.com/test/pages/untranslated-page.html">untranslated page</a></p> + \ No newline at end of file diff --git a/i18n_subsites/test_data/output/index.html b/i18n_subsites/test_data/output/index.html index c45568707..fb88a6eca 100644 --- a/i18n_subsites/test_data/output/index.html +++ b/i18n_subsites/test_data/output/index.html @@ -4,7 +4,7 @@ Welcome to our Testing site - + diff --git a/i18n_subsites/test_data/output/pages/404.html b/i18n_subsites/test_data/output/pages/404.html index 4695f3cd6..aa1fccc29 100644 --- a/i18n_subsites/test_data/output/pages/404.html +++ b/i18n_subsites/test_data/output/pages/404.html @@ -4,7 +4,7 @@ Testing site - A 404 page - + diff --git a/i18n_subsites/test_data/output/pages/untranslated-page.html b/i18n_subsites/test_data/output/pages/untranslated-page.html index 3ff02dfc6..fc1537210 100644 --- a/i18n_subsites/test_data/output/pages/untranslated-page.html +++ b/i18n_subsites/test_data/output/pages/untranslated-page.html @@ -4,7 +4,7 @@ Testing site - Untranslated page - + diff --git a/i18n_subsites/test_data/output/translated-article.html b/i18n_subsites/test_data/output/translated-article.html index 45be1bb8c..548edd7bb 100644 --- a/i18n_subsites/test_data/output/translated-article.html +++ b/i18n_subsites/test_data/output/translated-article.html @@ -4,7 +4,8 @@ Testing site - A translated article - + + diff --git a/i18n_subsites/test_data/pelicanconf.py b/i18n_subsites/test_data/pelicanconf.py index 55018f271..b644ef498 100644 --- a/i18n_subsites/test_data/pelicanconf.py +++ b/i18n_subsites/test_data/pelicanconf.py @@ -12,9 +12,8 @@ DEFAULT_LANG = 'en' LOCALE = 'en_US.UTF-8' -# Generate only one feed -FEED_ALL_ATOM = 'feeds_all.atom.xml' -CATEGORY_FEED_ATOM = None +FEED_ALL_ATOM = 'feeds/all.atom.xml' +CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml' TRANSLATION_FEED_ATOM = None AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None