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

Conversation

Projects
None yet
4 participants
@Kwpolska
Member

Kwpolska commented Sep 11, 2015

This is #2069.

cc @Aeyoun, @ralsina.

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

Fix #2069 -- proper locale support for section links
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.

@felixfontein

felixfontein Sep 11, 2015

Contributor

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

@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.

@Kwpolska

Kwpolska Sep 12, 2015

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.

@Kwpolska

Kwpolska Sep 12, 2015

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.

@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).

@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.

@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 ;-)

@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

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

Merge pull request #2070 from getnikola/fix-2069
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