OpenPrinting / system-config-printer

Graphical user interface for CUPS administration
GNU General Public License v2.0
156 stars 87 forks source link

Alert on Weblate: "Broken repository browser URL" #241

Closed rffontenelle closed 2 years ago

rffontenelle commented 2 years ago

Description

Here is the alert: https://translate.fedoraproject.org/projects/system-config-printer/master/#alerts For your convenience, I copied the alert below

The repository browser URL might be formatted incorrectly, because the "Source String Location" provides a invalid hyperlink to the source file.

While this does not block the translation, it makes harder for the translator to access the source file to learn the context of a given source string.

Example

For example: The image below shows a source string (this, nonpermalink), and its source string location on the right side. The hyperlink "../ppdippstr.py:116" leads to https://github.com/OpenPrinting/system-config-printer/blob/ppdippstr.py#L116, which is a invalid URL. Notice how branch is missing after "blob/" in the URL.

source-string-location

Suggestion

Assuming the current repository browser url is

https://github.com/WeblateOrg/hello/blob/{{branch}}/{{filename}}#L{{line}}

I suggest trying to add po/ to the path to compensate the "../" of "../ppdippstr.py:116"

https://github.com/WeblateOrg/hello/blob/{{branch}}/po/{{filename}}#L{{line}}

Alert message

Broken repository browser URL

This component is set up incorrectly.

The repository browser URL points to non-existing locations:

* https://github.com/OpenPrinting/system-config-printer/blob/master/../asyncipp.py#L473 (404 Client Error: Not Found for url: https://github.com/OpenPrinting/system-config-printer/blob/asyncipp.py#L473)

This can happen if the path within the translation files contains references to a parent directory, or is absolute.

Appeared a year ago, last seen 16 hours ago

zdohnal commented 2 years ago

Uff, it was a challenge to find where to set the URL. But in the end it was in 'Manage' -> 'Settings' -> 'Version Control'... It should be fixed now.

rffontenelle commented 2 years ago

I confirm it is working. Thanks!