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

docbook: Multiline entities not translated #488

Open
roptat opened this issue Mar 19, 2024 · 4 comments
Open

docbook: Multiline entities not translated #488

roptat opened this issue Mar 19, 2024 · 4 comments

Comments

@roptat
Copy link

roptat commented Mar 19, 2024

I'm working with a docbook file that I want to translate. The authors added a few entity definitions at the top, and they can be translated thanks to po4a. However, one of them is on multiple lines, and po4a doesn't generate an entry for it in the po file:

  <!ENTITY openssh-size          "1.7 MB">
  <!ENTITY openssh-buildsize     "45 MB (add 22 MB for tests)">
  <!ENTITY openssh-time          "0.2 SBU (Using parallelism=4;
                                  running the tests takes about 20 minutes,
                                  irrespective of processor speed)">

po4a provides translation for the first two, but not the last one.

@jnavila jnavila changed the title Multiline entities not translated docbook: Multiline entities not translated Mar 19, 2024
@Fat-Zer
Copy link
Contributor

Fat-Zer commented Mar 22, 2024

For clarity, is it XML or SGML docbook?

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Mar 22, 2024

Assuming the docbook is XML, it's a known limitation of the po4a's XML parser, see TODO list in man Locale::Po4a::Xml.

po4a parses XMLs with regexps, so it will be not trivial to do it right...

@mquinson
Copy link
Owner

In the meanwhile, the best is to put your entities on single lines, please.

@osamuaoki
Copy link
Contributor

I may be wrong but ...

If it is non-trivial to single-line these SGML entities, put them in a separate file and include them with single-line.

<!ENTITY % commondata     SYSTEM "common.ent"      > %commondata;

Just an idea ...

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

4 participants