hi, here is message I received from @c72578 on https://translate.fedoraproject.org/
Hello, Links to some source files are broken. Have a look at e.g.: https://translate.fedoraproject.org/zen/fedora-comps/master/de/? Example: "3D Printing" One of the shown links: https://pagure.io/fedora-comps/blob/master/f/comps-f25.xml.in.h#_287 -> https://pagure.io/fedora-comps/blob/master/f/comps-f25.xml.in#_287 The ".h" needs to be removed from the link. Weblate 4.1.1 Best regards Wolfgang
Hello,
Links to some source files are broken. Have a look at e.g.: https://translate.fedoraproject.org/zen/fedora-comps/master/de/?
Example: "3D Printing" One of the shown links: https://pagure.io/fedora-comps/blob/master/f/comps-f25.xml.in.h#_287 -> https://pagure.io/fedora-comps/blob/master/f/comps-f25.xml.in#_287
The ".h" needs to be removed from the link.
Weblate 4.1.1
Best regards Wolfgang
I did not see any error on provided link, has it been fixed ?
This is what is shown in the alert page:
Broken repository browser URL This component is set up incorrectly. The repository browser URL points to non-existing locations: https://pagure.io/fedora-comps/blob/main/f/po/../comps-f32.xml.in.h#_1 (404 Client Error: NOT FOUND for url: https://pagure.io/fedora-comps/blob/main/f/comps-f32.xml.in.h#_1) In case the above links work for you, they might just require authentication, and it is safe to dismiss this alert. This can happen if the path within the translation files contains references to a parent directory, or is absolute. Appeared 3 years ago, last seen 8 hours ago
Broken repository browser URL
This component is set up incorrectly.
The repository browser URL points to non-existing locations:
In case the above links work for you, they might just require authentication, and it is safe to dismiss this alert.
This can happen if the path within the translation files contains references to a parent directory, or is absolute.
Appeared 3 years ago, last seen 8 hours ago
It is currently "dismissed" by Weblate admins, so I'm not sure everyone can see it. Anyway, see above the whole alert message.
This alert happens when the source location (i.e.: the source file where the translation string was extracted from) is not found in the repository browser URL set in Weblate. Repository browser URL is an awesome feature that adds a hyperlink for the source location, which helps the translator to read the source code for the strings' context with a distance of a mouse click.
I can see the repository browser URL is correctly set, but these xml.in files that come with a file extension .h indeed break it.
.h
I tracked down this to intltool-update tool that is called by po/Makefile's comps.pot target.
intltool-update
po/Makefile code for generating comps.pot file is:
... comps.pot: $(XMLFILES) intltool-update --pot --gettext-package=comps ...
And intltool-update generates xml.in.h as an intermediary file for extracting translation strings and then populate the .pot file. That .pot file is generated using the .h-suffixed source locations. See intltool-update's Perl source code here.
xml.in.h
While this has no impact on translating or building the docs, it indeed breaks the repository browser URL feature. It would be nice to have it fixed.
Is there a way to set intltool-update to not use the .h-suffixed file as intermediary or at least not be the source file in the POT files? Alternatively, is there another tool we can use to extract translation strings from the .xml.in files, bypassing this issue caused by intltool-update?
Login to comment on this ticket.