Skip to content
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

Fix #2069 -- proper locale support for section links #2070

Merged
merged 1 commit into from Sep 15, 2015
Merged

Fix #2069 -- proper locale support for section links #2070

merged 1 commit into from Sep 15, 2015

Conversation

@Kwpolska
Copy link
Member

Kwpolska commented Sep 11, 2015

This is #2069.

cc @Aeyoun, @ralsina.

Signed-off-by: Chris Warrick kwpolska@gmail.com

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska added bug i18n labels Sep 11, 2015
@Kwpolska Kwpolska added this to the 7.7.1 milestone Sep 11, 2015
@@ -745,11 +745,16 @@ def section_color(self, lang=None):

def section_link(self, lang=None):

This comment has been minimized.

Copy link
@felixfontein

felixfontein Sep 11, 2015

Contributor

Why isn't this simply using the index_section_path path handler of the indexes plugin?

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Sep 12, 2015

Author Member

That’s a good question. I just fixed the existing code (by @Aeyoun). I looked a bit further, and it seems that the Post class does not have access to the Nikola site object, and therefore cannot talk to site.link() nor to the plugin manager.

This comment has been minimized.

Copy link
@felixfontein

felixfontein Sep 13, 2015

Contributor

Maybe we should deprecate this function and encourate people to use site.link() instead. A Post object should know as little as possible about what other plugins are producing (well, except the pages and the posts plugins).

This comment has been minimized.

Copy link
@ralsina

ralsina Sep 15, 2015

Member

+1 to just using link. We don't need to have the post access the Nikola object either, links just need to be resolved after they are written in the document, when copying to output. In the meantime, link://foo/bar IS a valid and awesome link for us ;-)

@Kwpolska Kwpolska merged commit 1c74d59 into master Sep 15, 2015
3 checks passed
3 checks passed
continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Kwpolska added a commit that referenced this pull request Sep 15, 2015
Fix #2069 -- proper locale support for section links
@Kwpolska Kwpolska deleted the fix-2069 branch Dec 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.