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

Exclude heading anchors in translations #614

Open
lukasrad02 opened this issue Aug 16, 2024 · 0 comments
Open

Exclude heading anchors in translations #614

lukasrad02 opened this issue Aug 16, 2024 · 0 comments
Labels
[P] minor [T] bug Something isn't working

Comments

@lukasrad02
Copy link
Contributor

#525 introduced permalinks to headings within a page, displayed by a # after the heading text. These links are added to the page in a way that they are also shown in the translation editor.

I.e., a heading # Beispiel that was previously shown as Beispiel in the translation editor will now be shown as Beispiel<a id="a1">#</a>.

This causes two problems:

  1. Every first sync of a page after the update causes all headings to not be translated, as the heading in the original language has changed from the perspective of the translation editor. This makes updates tedious, but at least only once per page.
  2. DeepL does not handle these kinds of links correctly, so machine translated headings look weird (see below).

Examples for bad link handling in automatic translations:
Example where the full heading has become the permalink
Example where one single word within the heading has become the permalink

In practice, this does not seem to be an issue, as the broken translations shown above are rendered correctly (the actual heading is not a link, there is no additional #, but the permalink-# is visible on hover) and one can even remove the anchor tag from the translated heading completely without removing the permalink from the rendered page.

Nevertheless, to avoid confusion and resolve the issue regarding the first sync of existing pages, it would be nice if we could remove the <a id="a1">#</a> part from the original headings in the translation editor.

@jeriox jeriox added [T] bug Something isn't working [P] minor labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[P] minor [T] bug Something isn't working
Development

No branches or pull requests

2 participants