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

Warning "local id not found in doc" in translated docs since MyST-parser 0.19.0 #844

Open
n-peugnet opened this issue Dec 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@n-peugnet
Copy link
Contributor

n-peugnet commented Dec 16, 2023

What version of myst-parser are you using?

>=0.19.0

What version dependencies are you using?

Any version compatible with the version of MyST Parser used.

What operating system are you using?

Linux

Describe the Bug

Since MyST-parser, I get the local id not found in doc when I compile the docs in another language, but the links are correctly produced.

/home/nicolas/GoogleDrive/Projets/Club1/docs/cgu.md:48:<translated>:1: WARNING: local id not found in doc 'info/general': 'demandes-et-incidents' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/faq.md:29: WARNING: local id not found in doc 'info/general': 'identifiant' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/faq.md:37: WARNING: local id not found in doc 'services/email': 'sous-adresses' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/info/espace-personnel.md:47:<translated>:1: WARNING: local id not found in doc 'services/web': 'dossier-static' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/info/infrastructure-materielle.md:131:<translated>:1: WARNING: local id not found in doc 'info/general': 'sauvegardes' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/info/politique-de-vie-privee.md:15:<translated>:1: WARNING: local id not found in doc 'info/general': 'sauvegardes' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/outils/newsletter.md:77: WARNING: local id not found in doc 'outils/aliases': 'modifier-les-alias-de-réception' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/tutos/mes-premiers-pas-sur-le-web.md:112: WARNING: local id not found in doc 'services/web': 'index-des-fichiers' [myst.xref_missing]
/home/nicolas/GoogleDrive/Projets/Club1/docs/tutos/premiere-connexion-ssh.md:8:<translated>:1: WARNING: local id not found in doc 'info/general': 'demandes-et-incidents' [myst.xref_missing]

These happen only with links with anchors and the setting myst_heading_anchors enabled. But some of these links do not produce warnings:

$ grep -nrIE "\.md#" [^_]*
cgu.md:50:un [signalement](./info/general.md#demandes-et-incidents) est le bienvenu.
faq.md:29:Il n'y a rien de prévu actuellement pour permettre aux membres de modifier leur [identifiant CLUB1](./info/general.md#identifiant).
faq.md:39:avec une adresse principale et toutes ses [sous-adresses](services/email.md#sous-adresses).
info/politique-de-vie-privee.md:7:Nos engagement dans les [CGU](../cgu.md#nos-engagements)
info/politique-de-vie-privee.md:15:- Les [sauvegardes](./general.md#sauvegardes) sont, elles, chiffrées.
info/espace-personnel.md:48:car il permet de [publier des sites Web](../services/web.md#dossier-static).
info/infrastructure-materielle.md:131:Disque dur de 2To 5600tr/min. Non pris en charge par les [sauvegardes](./general.md#sauvegardes).
outils/newsletter.md:78:voir la section [Modifier les alias de réception](./aliases.md#modifier-les-alias-de-réception).
outils/forum.md:30:que votre mot de passe sera mis à jour si vous [modifiez celui de votre compte CLUB1](../faq.md#comment-modifier-mon-mot-de-passe-de-membre-club1-)
tutos/premiere-connexion-ssh.md:10:Si vous rencontrez un problème, la section "[](../info/general.md#demandes-et-incidents)"
tutos/mes-premiers-pas-sur-le-web.md:113:Voir les [services liés au dossier static](../services/web.md#index-des-fichiers)

These warning do not happen with untranslated version.

Expected Behavior

There should be no warnings.

To Reproduce

git clone -b issue https://github.com/club-1/docs
cd docs
make html/en

I could not make a smaller reproducer as the bug only happens chen there are a lot of files somehow. For instance on the branch no-issue I removed almost all the files but the problem does not arise.

@n-peugnet n-peugnet added the bug Something isn't working label Dec 16, 2023
@n-peugnet n-peugnet changed the title Warning local id not found in doc in translated docs since MyST-parser 1.0.0 Warning local id not found in doc in translated docs since MyST-parser 0.19.0 Dec 17, 2023
@n-peugnet n-peugnet changed the title Warning local id not found in doc in translated docs since MyST-parser 0.19.0 Warning "local id not found in doc" in translated docs since MyST-parser 0.19.0 Dec 18, 2023
@thorge
Copy link

thorge commented Jan 12, 2024

This seem to be duplicate of #839

@n-peugnet
Copy link
Contributor Author

This seem to be duplicate of #839

I don't think so, but I think you have the same as mine. This one is specifically about this issue with translated documents only. I don't have the issue with untranslated documents.

@n-peugnet
Copy link
Contributor Author

By the way @thorge, if you have a way to reproduce this issue on a smaller/simpler repository than mine, it would probably help locating the issue.

@macagua
Copy link

macagua commented Feb 22, 2024

This seem to be duplicate of #839

I don't think so, but I think you have the same as mine. This one is specifically about this issue with translated documents only. I don't have the issue with untranslated documents.

This works for me, thanks you @n-peugnet

@n-peugnet
Copy link
Contributor Author

I can not reproduce this on our latest main branch, but I can still reproduce it consistently on the issue branch.

As it is related to translations, I tested the issue branch with master...n-peugnet:MyST-Parser:add-parse-inline and sphinx-doc/sphinx#12238 and I have no warning any-more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants