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

Weblate: Set a repository browser URL for po4a-doc #473

Closed
rffontenelle opened this issue Feb 17, 2024 · 5 comments
Closed

Weblate: Set a repository browser URL for po4a-doc #473

rffontenelle opened this issue Feb 17, 2024 · 5 comments

Comments

@rffontenelle
Copy link
Contributor

rffontenelle commented Feb 17, 2024

The po4a-doc translation component in Weblate has a broken repository browser. Since it was not set for the po4a-doc component, it inherited from po4a component. po4a component has {{filename|parentdir|parentdir}} to skip two parent directories, which probably explains the error in po4a-doc.

Current situation: a string from po4a-doc component with "source string location" lib/Locale/Po4a/TeX.pm:52 results in a link https://github.com/mquinson/po4a/blob/master/Po4a/TeX.pm#L52 (notice how lib/Locale are missing)

To solve this:

  1. Go to https://hosted.weblate.org/settings/po4a/po4a-doc/#vcs
  2. In Repository browser config, fill in with:
    https://github.com/mquinson/po4a/blob/{{branch}}/{{filename}}#L{{line}}
@mquinson
Copy link
Owner

Thanks a lot for the detailed report, you rock!

I think it's fixed now, but I'd prefer if you could double check before we close the bug. Feel free to close it yourself if I managed to follow your precious instructions.

Thanks again,

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Feb 18, 2024

Besides that the line numbers in references are still not correct, but AFAIR that's a po4a's POD passer's issue and not that trivial to fix...

@rffontenelle
Copy link
Contributor Author

@Fat-Zer you outran me on that. :)

Indeed, Weblate reads the line number from the source location written in the PO/POT file. So the issue is while extracting them.

@rffontenelle
Copy link
Contributor Author

FWIW, from Perl's Pod::Parser CPAN page:

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

@mquinson
Copy link
Owner

Ok, closing that bug if it's fixed. The fact that the pod parser is obsolete is another (known) story.

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

No branches or pull requests

3 participants