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

po4a-translate hangs on unusual .texi markup #313

Open
trofi opened this issue Aug 21, 2021 · 1 comment
Open

po4a-translate hangs on unusual .texi markup #313

trofi opened this issue Aug 21, 2021 · 1 comment

Comments

@trofi
Copy link

trofi commented Aug 21, 2021

The hangup is observed and worked around in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50144 downstream.

How to reproduce: I'm attaching reproducer.tar.gz with 1.3MB guix.texi.

It's enough to run:

$ po4a-translate -d -M UTF-8 -L UTF-8 -k 0 -f texinfo  -m guix.texi -p guix-manual.de.po -l a.tmp
po4a::transtractor::process: Read PO file guix-manual.de.po
po4a::transtractor::process: Read document guix.texi
po4a::transtractor::process: Call parse()
... <hung> ...

If we apply doc workaround we get quick processing:

--- a/guix.texi
+++ b/guix.texi
@@ -11671,2 +11671 @@ which will be searched for packages.  It accepts as valid arguments:
-@item the URL of a repository as expected by the @code{opam repository
-      add} command (for instance, the URL equivalent of the above
+@item the URL of a repository as expected by the @code{opam repository add} command (for instance, the URL equivalent of the above
$ time po4a-translate -d -M UTF-8 -L UTF-8 -k 0 -f texinfo  -m guix.texi -p guix-manual.de.po -l a.tmp
po4a::transtractor::process: Read PO file guix-manual.de.po
po4a::transtractor::process: Read document guix.texi
po4a::transtractor::process: Call parse()
po4a::transtractor::process: Done parse()
Your input po file guix-manual.de.po seems outdated (The amount of entries differ between files: 0 is not 10507
). Please consider running po4a-updatepo to refresh it.

real    0m4,070s
user    0m3,959s
sys     0m0,013s

Could po4a-translate fail finish faster in this case?

Thanks!

@trofi trofi changed the title po4a-translate hangs on unusual .text markup po4a-translate hangs on unusual .texi markup Aug 21, 2021
@mquinson
Copy link
Owner

Hello,

unfortunately, the texinfo parser of po4a is really really experimental for now, and I don't see how to improve it myself. I guess that someone would have to write a new, simpler one.

As a maintainer of po4a, I would be glad to help and assist someone tackling this task, but that's not something I can find the time to do myself anytime soon.

Sorry about this sorry state,
Mt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants