New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First shot on #993 for taxonomies, in particular archives. #2778

Merged
merged 38 commits into from Jun 11, 2017

Conversation

Projects
None yet
3 participants
@felixfontein
Contributor

felixfontein commented May 19, 2017

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

This PR adds functionality to the taxonomy system to be able to reference translated classifications in taxonomies, with an example how to use this for archives. See #993.

The generated archives currently look ugly due to no CSS :)

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein May 20, 2017

Contributor

Ok, basic styles are now there as well.

Contributor

felixfontein commented May 20, 2017

Ok, basic styles are now there as well.

Show outdated Hide outdated nikola/utils.py Outdated
@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein May 21, 2017

Contributor

Ok, now there's basic CSS, support for the default themes (base and bootstrap3), and support for sections, tags, categories (with explicit configuration, disabled by default) and authors (enabled by default).

Contributor

felixfontein commented May 21, 2017

Ok, now there's basic CSS, support for the default themes (base and bootstrap3), and support for sections, tags, categories (with explicit configuration, disabled by default) and authors (enabled by default).

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein May 21, 2017

Contributor

(Rebasing to master, to get rid of some annoying problems already fixed there.)

Contributor

felixfontein commented May 21, 2017

(Rebasing to master, to get rid of some annoying problems already fixed there.)

@Kwpolska

Pretty good, but I’m not a fan of variable variable names and variable variable existence.

Show outdated Hide outdated docs/template-variables.rst Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/data/themes/base/templates/index.tmpl Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/utils.py Outdated
if site.config.get('{}_TRANSLATIONS_ADD_DEFAULTS'.format(basename), add_defaults_default):
self.add_defaults(posts_per_classification_per_language)
# Use blinker to inform interested parties (plugins) that they can add
# translations themselves

This comment has been minimized.

@Kwpolska

Kwpolska May 23, 2017

Member

Got any ideas for plugins that would do that?

@Kwpolska

Kwpolska May 23, 2017

Member

Got any ideas for plugins that would do that?

This comment has been minimized.

@felixfontein

felixfontein May 23, 2017

Contributor

If someone wants a more complicated scheme (like using Google Translator to automatically translate tag/category/section/... names), they can use this hook to implement that.

@felixfontein

felixfontein May 23, 2017

Contributor

If someone wants a more complicated scheme (like using Google Translator to automatically translate tag/category/section/... names), they can use this hook to implement that.

This comment has been minimized.

@Kwpolska

Kwpolska May 24, 2017

Member

IMO it’s unnecessary.

@Kwpolska

Kwpolska May 24, 2017

Member

IMO it’s unnecessary.

This comment has been minimized.

@felixfontein

felixfontein May 24, 2017

Contributor

I don't like preventing extensibility if it is so simple and easy to achieve. (And also very efficient. This is only called once per plugin initialization.)

@felixfontein

felixfontein May 24, 2017

Contributor

I don't like preventing extensibility if it is so simple and easy to achieve. (And also very efficient. This is only called once per plugin initialization.)

Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
Show outdated Hide outdated nikola/utils.py Outdated
Show outdated Hide outdated nikola/conf.py.in Outdated
@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 1, 2017

Contributor

@Kwpolska: I think everything you mentioned is fixed.

Contributor

felixfontein commented Jun 1, 2017

@Kwpolska: I think everything you mentioned is fixed.

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 4, 2017

Contributor

(I rebased to get rid of several merge conflicts.)

Contributor

felixfontein commented Jun 4, 2017

(I rebased to get rid of several merge conflicts.)

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

If the helper would only be for feeds, I'd agree. But the whole point of the rename is that it has functions not only for feeds, but also for links to translated HTML pages!

Contributor

felixfontein commented Jun 10, 2017

If the helper would only be for feeds, I'd agree. But the whole point of the rename is that it has functions not only for feeds, but also for links to translated HTML pages!

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

(link should be renamed to feed_link, though, since that's the only function dealing only with feeds.)

Contributor

felixfontein commented Jun 10, 2017

(link should be renamed to feed_link, though, since that's the only function dealing only with feeds.)

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska Jun 10, 2017

Member

feed_ should be included in both the filename and macro names.

Member

Kwpolska commented Jun 10, 2017

feed_ should be included in both the filename and macro names.

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

Why should it be in the file name? That makes no sense at all.

Contributor

felixfontein commented Jun 10, 2017

Why should it be in the file name? That makes no sense at all.

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska Jun 10, 2017

Member

83% of the file is concerned with feeds, not translations.

Member

Kwpolska commented Jun 10, 2017

83% of the file is concerned with feeds, not translations.

@getnikola getnikola deleted a comment from codacy-bot Jun 10, 2017

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

I counted. 50 lines are related to translations, 39 lines are related to feeds for blogs with only one language.

Contributor

felixfontein commented Jun 10, 2017

I counted. 50 lines are related to translations, 39 lines are related to feeds for blogs with only one language.

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

The template generates links to other representations. These can be feeds, translations, or both.

Contributor

felixfontein commented Jun 10, 2017

The template generates links to other representations. These can be feeds, translations, or both.

Rename translation_link_helper.tmpl → feeds_translations_helper.tmpl
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

I strongly advise against the new name.

Contributor

felixfontein commented Jun 10, 2017

I strongly advise against the new name.

@getnikola getnikola deleted a comment from codacy-bot Jun 10, 2017

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 10, 2017

Contributor

That should fix the tests.

Contributor

felixfontein commented Jun 10, 2017

That should fix the tests.

@getnikola getnikola deleted a comment from codacy-bot Jun 10, 2017

@getnikola getnikola deleted a comment from codacy-bot Jun 11, 2017

@getnikola getnikola deleted a comment from codacy-bot Jun 11, 2017

@Kwpolska Kwpolska added this to the v7.8.8 milestone Jun 11, 2017

@Kwpolska Kwpolska self-assigned this Jun 11, 2017

@Kwpolska Kwpolska added the BLOCKER label Jun 11, 2017

@getnikola getnikola deleted a comment from felixfontein Jun 11, 2017

@Kwpolska Kwpolska merged commit afe6799 into master Jun 11, 2017

3 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
codacy/pr Good work! A positive pull request.
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@Kwpolska Kwpolska deleted the taxonomy-lang-refs branch Jun 11, 2017

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska Jun 11, 2017

Member

Thanks for doing this!

Member

Kwpolska commented Jun 11, 2017

Thanks for doing this!

@felixfontein

This comment has been minimized.

Show comment
Hide comment
@felixfontein

felixfontein Jun 11, 2017

Contributor

Thanks for reviews and merging :)

Contributor

felixfontein commented Jun 11, 2017

Thanks for reviews and merging :)

@gwax

This comment has been minimized.

Show comment
Hide comment
@gwax

gwax Jun 12, 2017

Contributor

@felixfontein thanks for doing this; it's an important thing to get right.

Contributor

gwax commented Jun 12, 2017

@felixfontein thanks for doing this; it's an important thing to get right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment