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

Isso comments don't work properly in multilingual sites #3215

Closed
mardy opened this Issue Jan 27, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@mardy
Copy link

mardy commented Jan 27, 2019

Isso uses the #isso-thread element as the key to load comments for a post. In the base-jinja template, Nikola is setting it to post.permalink:

comments_helper.tmpl:

{% macro comment_link(link, identifier) %}
    {% if comment_system_id %}
        <a href="{{ link }}#isso-thread">Comments</a>
    {% endif %}
{% endmacro %}

post_header.tmpl:

                <p class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }}

but in multilingual sites, the permalink also contains the language id, so if I enter a comment in the English version of the site, the comment won't be visible in the Italian version (and vice versa).

@mardy mardy added the bug label Jan 27, 2019

@Kwpolska

This comment has been minimized.

Copy link
Member

Kwpolska commented Jan 27, 2019

I would consider that expected, desired, sensible behavior. People who read your post in language X expect comments in that language and might not even speak languages Y and Z, so these comments would be confusing to them.

@mardy

This comment has been minimized.

Copy link
Author

mardy commented Jan 28, 2019

Well, right now a post written in English also appears in the Italian version of the site (untranslated). The same logic should be applied to comments: if people see the post in English, they would expect to be able to read the comments, too.

@Kwpolska Kwpolska added wontfix and removed bug labels Jan 28, 2019

@Kwpolska

This comment has been minimized.

Copy link
Member

Kwpolska commented Jan 28, 2019

Feel free to change your site’s templates to your liking. We can’t change it, because that would mean comments potentially disappearing on users’ sites.

@Kwpolska Kwpolska closed this Jan 28, 2019

@mardy

This comment has been minimized.

Copy link
Author

mardy commented Jan 28, 2019

Fair enough. For those who find the same issue, here's the way I fixed it:

https://gitlab.com/mardy/mardy.it/commit/23841c860b38ffcf745386dd409337cc6e67f555

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