Skip to content

Are the trans block in copyright.html correct ? #1873

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

Closed
Carreau opened this issue Jun 12, 2024 · 1 comment · Fixed by #1874
Closed

Are the trans block in copyright.html correct ? #1873

Carreau opened this issue Jun 12, 2024 · 1 comment · Fixed by #1874

Comments

@Carreau
Copy link
Collaborator

Carreau commented Jun 12, 2024

{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}

We can see both that:

  • a tags are in the trans block – I don't believe they should as translation should not be able to change the structure of the html page.
  • {{ copyright }} is outside the a tag, I think it should be inside.
Carreau added a commit to Carreau/pydata-sphinx-theme that referenced this issue Jun 12, 2024
I think it is a mistake to include a tags.

Note that with the exception of the `©`, the two translate blocks are
almost identical, so I would also be for including the © inside the html
copyright to have the same translatable strings.

Closes pydata#1873
@12rambau
Copy link
Collaborator

The translation information for copyrights are directly coming from Sphinx itself. What I see here looks a lot like the original layout.html Sphinx template: https://github.com/sphinx-doc/sphinx/blob/568e26c797b9152bb9b2443c926aec314f0652de/sphinx/themes/basic/layout.html#L187

I think we mostly reproduced what was done for single copyrights without questioning it too much.

@Carreau Carreau changed the title Are the trans block in copyright.html correct Are the trans block in copyright.html correct ? Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants