Giter VIP home page Giter VIP logo

po4a's People

Contributors

bexelbie avatar ciampix avatar codehelp avatar comradekingu avatar danilopiazza avatar davidprevot avatar eevan78 avatar elchevive avatar elric avatar emptty42 avatar fat-zer avatar frans-spiesschaert avatar gemmaro avatar jibec avatar jnavila avatar jonassmedegaard avatar jvprat avatar milotype avatar mquinson avatar nabetaro avatar nekral avatar noritada avatar osamuaoki avatar rffontenelle avatar roblub avatar santossi avatar toddy15 avatar urbalazs avatar weblate avatar yurchor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

po4a's Issues

[doc] po4a(7) man page: a line sounds wierd

Also next line sounds wierd (not sure what exactly was meant there):

doc/po4a.7.pod:760

It is also possible to customize a module or new / derivative / modified modules by putting a module in F<lib/Locale/Po4a/>, and adding F to the paths specified by the PERLLIB or PERL5LIB environment.

Reported on #22 before.

TexInfo should take care of the non-ascii accentuated letters

As noted in #122, the translator has to produce such a po file:

msgid ""
"How to compile Bash for more than one kind of system from the same source "
"tree."
msgstr ""
"C@'omo compilar Bash para m@'as de un tipo de sistema desde el mismo @'arbol "
"de fuentes."

It'd be great if po4a could produce @'o and @'a in the generated document when encountering respectively ò and à.

The full list of accents supported by texinfo seem to be here: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Inserting-Accents.html

It could be even better to specify the @documentencoding to relevant value. See https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040documentencoding.html#g_t_0040documentencoding

Adding PO file headers to translated documents

First reported on Alioth on 27/09/2004 by me:

the po-debiandoc tool writes the PO-file header in the generated
SGML file (enclosed in <!-- ... -->, of course), so that these
useful informations are contained in this file.
It would be really nice if po4a-translate did something similar.


(Reported by Denis on the mailing list)

[doc] po4a(7) man page: one more typo

one more typo:
doc/po4a.7.pod:751

once before editing the PO files to update them and once afterward to get a
completely updated translated document.

Reported on #22 before.

PO validity check for 0.52 breaks on Windows

During my evaluation of po4a 0.52 I've encountered a regression over 0.51, possibly introduced in 1107d64 in lib/Locale/Po4a/Po.pm:258. When running e.g. po4a-translate through Strawberry Perl on Windows, the command in $cmd is eventually passed to cmd.exe which doesn't understand the POSIX-style environment variable declaration. The result is a message such as this:

Invalid po file doc/src/some/file.po:
'LC_ALL' is not recognized as an internal or external command,
operable program or batch file.

Connect po4a to a translation platform

Hi, I see some "zanata.xml" files about a project in "translate.zanata.org". But the content is out of date (last update is from september 2016).

I suggest to use this other translation platform: https://hosted.weblate.org

You'll ask Michal to create two component:
Bin: https://github.com/mquinson/po4a/tree/master/po/bin
=> is this core software? If so, I suggest to name this component "po4a"
Pod: https://github.com/mquinson/po4a/tree/master/po/pod
=> is is "Plain Old Documentation"? If so, I suggest to name this component "documentation"

you may connect a either the github git repo or the alioth git repo.

Cannot change install directory

Use of uninitialized value $Text::WrapI18N::charmap in pattern match (m//) at /usr/local/lib/perl5/site_perl/5.26.1/Text/WrapI18N.pm line 137. Use of uninitialized value $Text::WrapI18N::charmap in pattern match (m//) at /usr/local/lib/perl5/site_perl/5.26.1/Text/WrapI18N.pm line 155. Can't exec "/usr/bin/locale": No such file or directory at /usr/local/lib/perl5/site_perl/5.26.1/Text/WrapI18N.pm line 134.
I cannot change the install directory. When I try to build, this error shows. How do I change it to /usr/local so locale runs correctly?

Text generic verbatim option

Should we add a verbatim option to the text processor that forces all lines to be treated was non-rewrappable?

texinfo: newline in @url in @itemize breaks everything after it

Hi!

we use po4a (0.56) to translate the Guix manual and found that a recent addition to our manual completely broke the translated files after it:

@url{https://example.org,
example}

works perfectly fine

@itemize
@item See @url{https://example.org,
example}
@end itemize

breaks everything, like this:

@itemize
@item See @url{https://example.org,
@c ===========================================================================
@c
@c This file was generated with po4a. Translate the source file.
@c
@c ===========================================================================
@c Adapted from http://www.gnu.org/philosophy/philosophy.html.
@c See <https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00425.html>,
@c for a discussion of what follows.
@c See <https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00933.html>.
@c TODO: It would be good with badges on the website that tracks these
@c branches.  Or maybe even a status page.
@c Debbugs bug: https://debbugs.gnu.org/db/15/15361.html
example} @end itemize @example git clone
https://git.savannah.gnu.org/git/guix.git @end example When building Guix
from a checkout, the following packages are required in addition to those
mentioned in the installation instructions (@pxref{Prérequis}).  @itemize

etc (which is the rest of the translated file).

po4a-update eats characters not in charset without asking

First reported by Yves Rütschlé on Alioth, on 06/11/2004:

If you translate a PO file into some language
using iso8859-1, but forget to precise the charset in the
header of the PO file, and don't give the charset to
po4a-update either, then po4a-update proceeds to remove all
accentuated characters from the file.

I am not sure what the best way to handle this would be;
presumably, one could do some heuristic ("there are many
strange characters in there, probably this isn't ascii") and
ask for confirmation that you do actually want to filter out
strange characters. Fact is, most of the time you won't want
to.

Comment by Yves Rütschlé on 12/11/2014:

A related problem: when the master document's charset is not
ascii, po4a-updatepo seems to happily ignore the PO's
charset specification and change it (to UTF-8 in my case,
which I am not sure where it comes from, as I think the
input document was iso-8859-1 just like the PO), along with
all the characters in the PO. In other words, po4a-update
silently:
- changes the charset I have specified in the PO
- changes all the non-ascii characters in some way
("in some way", because I don't think it ended up in UTF-8
either).

I'm so in love with French accents right now.

Suppress "The amount of entries differ between files: Y is not X"

I'd like to suppress "The amount of entries differ between files: Y is not X" where Y > X, when invoking po4a-translate.

Here is the use case:

  1. po4a-updatepo allows updating one PO file with many original (untranslated) files, e. g. po4a-updatepo -f xhtml -M utf8 -m _site/en/about.html -m _site/en/archive.html -m _site/en/contact.html -m _site/en/index.html -m _site/en/posts/2015-08-12-spqr.html -m _site/en/posts/2015-10-07-rosa-rosa-rosam.html -m _site/en/posts/2015-11-28-carpe-diem.html -m _site/en/posts/2015-12-07-tu-quoque.html -p po/ru.po.
  2. Then I use po4a-tranlate to translate individual files. I think this is the only way to do so (according to the man page). Anyway, in my case I can only translate one file at a time.
  3. Unfortunately, the number of to-be-translated strings in the original file is much less than in the PO file. Hence the confusing message.

Having a single PO file for many original (untranslated) file is a very useful feature for translators (more context), also it de-duplicates common strings in many files, especially useful in static WWW sites where each page follows the same template with headers, footers, etc.

Example PO:

#. type: Attribute 'lang' of: <html>
#: _site/en/about.html:2 _site/en/archive.html:2 _site/en/contact.html:2
#: _site/en/index.html:2 _site/en/posts/2015-08-12-spqr.html:2
#: _site/en/posts/2015-10-07-rosa-rosa-rosam.html:2
#: _site/en/posts/2015-11-28-carpe-diem.html:2
#: _site/en/posts/2015-12-07-tu-quoque.html:2
msgid "en"
msgstr "ru"
#...
#. type: Content of: <html><body><main><h1>
#: _site/en/archive.html:23
msgid "Archives"
msgstr "Архив"
#...
#. type: Content of: <html><body><footer>
#: _site/en/about.html:33 _site/en/archive.html:49 _site/en/contact.html:28
#: _site/en/index.html:59 _site/en/posts/2015-08-12-spqr.html:41
#: _site/en/posts/2015-10-07-rosa-rosa-rosam.html:43
#: _site/en/posts/2015-11-28-carpe-diem.html:41
#: _site/en/posts/2015-12-07-tu-quoque.html:43
msgid ""
"Site proudly generated by <a href=\"http://jaspervdj.be/hakyll\">Hakyll</a>"
msgstr ""
"Сайт создан с помощью <a href=\"http://jaspervdj.be/hakyll\">Hakyll</a>"

When will v0.56 be released?

I'd like to use the changes introduced for asciidoc for the debian packaging of git manpages, but for that the dependency to a released version of po4a is necessary.

WML module removes comments at the beginning of a file

While rewriting the test suite, I discovered that the output of 22-wml.t actually fails the test. This has not been discovered earlier, because the test command to check the output was incorrect. :-(

It used "compare-po.pl" instead of a normal "diff", so the content of the files have not been compared at all, because compare-po.pl skips everything up until the first "msgid", which is not found in the output file. Therefore, effectively zero lines are compared.

This is now fixed, but it discovered a long standing bug in the WML module.

The test has been marked as TODO.

Minor issue in po4a-build.conf(5) or in po4a-build itself

The documentation for DOCBOOKDIR seems a bit erroneous:

doc/po4a-build.conf.5.pod says:

=item DOCBOOKDIR

Similar to XMLDIR but only used to prepare the translated DocBook files. If
your package wants to use .sgml files, please discuss how these should be
built on the po4a-devel mailing list.

 # pattern to find the .docbook files
 DOCBOOKDIR=""

So According to first paragraph it is expected that its value should something like: DOCBOOKDIR="share/docbook"
But according to comment it the example it should be "share/docbook/*.docbook" (or whatever extension).

Also according to the content of po4a-build:

if [ -n "$XMLDIR" ]; then
	for file in $XMLDIR/*.xml; do
		LOCAL=`basename $file`
		wrap_langs "[type:docbook]" "$file" "\$lang:$XMLDIR/\$lang/$LOCAL"
	done
fi
if [ -n "$DOCBOOKDIR" ]; then
	for file in $DOCBOOKDIR; do
		LOCAL=`basename $file`
		wrap_langs "[type:docbook]" "$file" "\$lang:$BASEDIR/\$lang/$LOCAL"
	done
fi

So DOCBOOKDIR is expected to match the second one variant.

All in all I suggest to either update the script to make it behave according to docs or to fix up the docs themself.

markdown parser fails to preserve fenced code blocks

Hi,

Markdown (mode of Text) parser wreaks havoc on fenced code blocks.

Please consider adopting my slight fork addressing that, available at https://salsa.debian.org/js/po4a

(sorry for the slight inconvenience of not offering it here: I will not push code to Github - only engage in issue trackers - due to their terms of service potentially watering down copyleft licensed code).

Several lists of modules are not consistent

I have the feeling that the list of modules are not consistent nor accurate. I'd really appreciate if someone could double check that. We have one on the website, one in the README.md and one in the doc somewhere (can't remember where exactly).

Also, one should check whether these lists are accurate wrt to the actual list of modules that we have under lib/Locale/Po4a. Some modules (such as the text module) serve as an umbrella to several sub-types (such as fortune for the text module). It'd be excellent if the lists could show that too.

Thanks in advance,

Website not displayed in Brazilian Portuguese by default

The website po4a.org is not automatically being displayed in my native language, Brazilian Portuguese (pt_BR), even though my browser is correctly set to Brazilian Portuguese and the documentation is 100% translated and available for selection. When Portuguese (pt, from Portugal) translation is available, pages are being displayed in this language; on the other side, when there is no Portuguese translation, English page is displayed.

I can only see pages in Brazilian Portuguese if I select such language ("Português (Brasil)") in the bottom of the website, then the URL gets suffixed with '.pt_BR' (e.g. index.php.pt_BR). Even when I do this, every link I click will return to the original language (as explained in the above paragraph).

An example: I access: https://po4a.org/man/index.php. I see this page in Portuguese from Portugal (msguntypot(1) has description "atualização de ficheiros PO quando um erro de digitação foi corrigido no ficheiro POT" -- "ficheiro" is (for me) clearly a Portuguese translation). If I select "Português (Brasil)" from bottom of the page, it changes to Brazilian Portuguese and the URL changes to https://po4a.org/man/index.php.pt_BR; on the other side, the main page of the website (https://po4a.org/) I see in English (there is no Portuguese translation), changing to Brazilian Portuguese when I click in the "Português (Brasil)" from bottom of the page.

Environment:

  • Distro: Arch Linux 64-bit
  • Browser: Chromium, Firefox (Brazilian Portuguese UI installed, also preferred language)

Can this please be fixed?

Implement suppression POT files to remove strings from translations (like pot_in, but more user-friendly)

Initially reported on Alioth by Michael Terry (03/05/2009):

It would be nice if I could mark some paragraphs as untranslatable.

For example, say I have a docbook flie that lists a number of file paths
as part of the documentation. These paths (like ~/.cache) show up to 
be translated, but I don't want them to be.

Maybe some format-specific comment that po4a understands? 
In the docbook example, the paragraph being preceded by 
<!-- po4a: ignore --> or something.

Comment by Denis Barbier (29/07/2010):

You are right, that would be nice. The parser can cope with 
comments only if they are embedded within a paragraph, 
which means that in XML one has to write 
<para><!-- Hey translator -->Foo bar</para> 
to have this comment printed into PO files.
One could indeed define special comments, e.g. 
<para><!-- po4a: ignore -->Foo bar</para> to have a paragraph 
copied verbatim into translated documents. Note that these comments 
will not be removed from translated documents, I believe that this is fine.

You can test by editing Locale/Po4a/Xml.pm like this: replace
if ($translate ne "")
by
if ($translate ne "" && !(defined($comments) && $comments =~ m/^\s*po4a:\s*ignore/s))
I will commit this change unless you report problems with it.

Comment by Michael Terry (29/07/2010):

That would be fine. I'd also be interested in similar syntax for man pages too.

Comment by me (30/03/2017):

Just for the record, this feature is now implemented in the man module 
(see section "Hiding text from po4a" from Locale::Po4a::Man(3pm))

Comment by me (30/03/2017):

Just to be sure: in which modules would you need this feature, Michael?

Implementing it in Sgml may be particularly challenging so I'd prefer 
not to do that if you don't really need it. Is it enough if it works in Man?

Thanks for your patience,

[doc] po4a(7) man page: last section refers to SGML a lot

The last section «Educating developers about translation» refers to SGML a lot, I suppose it should be replace by a more generic term, e.g. «documentation», because it supposed to be a general section, isn't it?

doc/po4a.7.pod:1076

In the po4a project, translated documents are not source files anymore. Since
SGML files are habitually source files, it's an easy mistake. That's why all
files present this header:

doc/po4a.7.pod:1183

One of my dreams would be to integrate somehow po4a to Gtranslator or
Lokalize. When an SGML file is opened, the strings are automatically extracted.
When it's saved a translated SGML file can be written to disk. If we manage
to do an MS Word (TM) module (or at least RTF) professional translators may
even use it.

Reported on #22 before.

Split mode doesn't work on Windows

Hi,
I was trying to run po4a with Strawberry Perl 5.28.0.1 on Windows 7 x64.
I have set up the PERLLIB variable and call the po4a like this:

C:\Users\7\Downloads\po4a-master>perl po4a \doc\po4a.cfg
Split mode, creating a temporary POT

(289 entries)
Can't move \tmp\po4aaWPS.pot to /doc/original/POT/usr_01.txt.pot: No such file or directory.

Temporary POT is created in C:\tmp but it's name is po4aO__T.pot.
I have attached my configuration file.

po4a-cfg.zip

Opinion Sought

I am looking at making some changes to AsciiDoc parsing and adding a Yaml parser. Both of these formats may have modules in CPAN that support them or other tooling that could be used.

What is our opinion of introducing either additional perl or non-perl depdencies?

For example, Yaml::XS requires a C-library. Asciidoctor is ... well asciidoctor and could be a dependency.

HTML test does no longer pass

From po4a-0.54/debian/rules [1] notice that after same problem on packing it on Fedora ... rm t/09-html.t also fixes the build for me .

[1]

# Remove HTML test, which does no longer pass
# and probably should be removed upstream, too.
override_dh_auto_test:
    rm t/09-html.t

po4-translate doesn't preserve the spaces under some circumstances

When we translate with po4a-translate -f texinfo -m ./bashref.texi -p ./bashref.es.po -l ./bashref.es.texi on long lines from @menu some words lose the separation space they had in the PO file. We're using po4a-translate Version 0.47. You can find more info on our issue tracker.

The following...

msgid ""
"How to compile Bash for more than one kind of system from the same source tree."
msgstr ""
"C@'omo compilar Bash para m@'as de un tipo de sistema desde el mismo @'arbol de "
"fuentes."

produces (see that @'arbolde, it should be @'arbol de)...

* Compilando para M@'ultiples Arquitecturas::  C@'omo compilar Bash para 
                                                 m@'as de un tipo de sistema 
                                                 desde el mismo @'arbolde 
                                                 fuentes.

We are using GNU Texinfo for the documentation, the problem only appears on @menu sections.

please release to CPAN

Hi,

I release got involved in a development team using a mixture of Linux, macOS and Windows computers, and learned that it is not easy to install po4a on at least macOS.

Please consider releasing this project to CPAN, to expand deployment options.

po4a.org

The site still lists the alioth server as the dev list host.

Support for ITS (Internationalization Tag Set)

ITS is a standard from the W3C on how to make XML translatable. It would be interesting to support this.

A good starting point is itstools (code on github). The project seems rather dormant right now, but they provide a large amount of tests that we could borrow. Plus, this tool seem to be used by the whole Gnome community...

po file content should be also checked in the tests

in #62, we came to the conclusion that the po files that are produced during the tests are not part of the test. I kinda think that this is bad, and that we should also check that the po file looks as expected after the test.

But comparing it is not straightforward: we probably want to ignore the differences in the header and the ones about the location in the file. So I'm not completely sure of what we want to see here, and I'm seeking feedback about what you guys think of it.

Thanks, Mt.

Complex regular subexpression recursion limit (32766) exceeded

When trying to gettextize the org.texi manual on my machine (Linux bzg 4.4.0-83-generic #106-Ubuntu SMP i686 i686 i686 GNU/Linux) with this command:

~$ po4a-gettextize -f texinfo -M utf8 -m org.texi -p org.texi.fr.po

I get this error:

Complex regular subexpression recursion limit (32766) exceeded at
/usr/share/perl5/Locale/Po4a/TeX.pm line 697

suggesting that the perl regexp at line 697 of TeX.pm is causing trouble:

    # detect \begin and \end (if they are not commented)
    if ($buffer =~ /^((?:.*?\n)?                # $1 is
                      (?:[^%]                   # either not a %
                        |                       # or
                         (?<!\\)(?:\\\\)*\\%)*? # a % preceded by an odd nb of \
                     )                          # $2 is a \begin{ with the end of the line
                      (${RE_ESCAPE}(?:begin|end)\{.*)$/sx
        and length $1) {
        my ($begin, $end) = ($1, $2);
        my ($t1, $t2) = ("", "");
        if (is_closed($begin)) {
            ($t1, @env) = translate_buffer($self, $begin, $no_wrap, @env);
            ($t2, @env) = translate_buffer($self, $end,   $no_wrap, @env);

            print STDERR "($t1$t2,@env)\n"
                if ($debug{'translate_buffer'});
            return ($t1.$t2, @env);
        }
    }

First reported here on the emacs-devel mailing list here.

Please push a new version

Apart from the bug in literal paragraphs (which can be overriden by just putting the right formatting in the translated string), there is an urgent need for a tagged up to date version of po4a able to correctly manage empty attributes in asciidoc.

Right now, the lack of proper version is preventing from proposing a patch series for the translation of manpages of the Git project.

Thank you.

Extract each bullet point in Markdown nested bullet lists into its own string

A few months ago I've mentioned "(vague) plans for other improvements in Markdown bullet list handling" I've mentioned a few months ago on #7 (comment). The design discussion there was resolved and #7 was rightfully closed so it's time to follow-up with this.

Single-level Markdown bullet lists are handled properly but as soon as one adds a second, nested level, string extraction starts to get suboptimal. Our translators at Tails have complained about the additional work it causes for them e.g. when strings become fuzzy.

I've pushed a test case to https://github.com/intrigeri/po4a/tree/mdwn-nested-bullet-lists that demonstrates the problem.

issue with <?hard-pagebreak?> in docbook

Hi,

I'm having some troubles with a docbook file: the attached file produces wrong content for the last script in the po file: it doesn't contain any line break, although the original file has some. It seems that po4a is not able to properly translate this content either. It might be related to the <?hard-pagebreak?>, since without it, the gettext file is generated properly.

LANG=fr_FR.UTF-8 po4a-updatepo -f docbook -m hostreqs.txt -p hostreqs.fr.po

generates:

#.  ANY additional lines in the script cause a pdf rendering problem
#. type: Content of: <sect1><screen><userinput><literal>
msgid ""
"<userinput>cat &gt; version-check.sh &lt;&lt; \"EOF\" <literal>#!/bin/bash # "
"Simple script to list version numbers of critical development tools export "
"LC_ALL=C bash --version | head -n1 | cut -d\" \" -f2-4 MYSH=$(readlink -f /"
"bin/sh)  echo \"/bin/sh -&gt; $MYSH\" echo $MYSH | grep -q bash || echo "
"\"ERROR: /bin/sh does not point to bash\" unset MYSH echo -n \"Binutils: \"; "
"ld --version | head -n1 | cut -d\" \" -f3- bison --version | head -n1 if [ -"
"h /usr/bin/yacc ]; then echo \"/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"
"\"; elif [ -x /usr/bin/yacc ]; then echo yacc is `/usr/bin/yacc --version | "
"head -n1` else echo \"yacc not found\" fi bzip2 --version 2&gt;&amp;1 &lt; /"
"dev/null | head -n1 | cut -d\" \" -f1,6- echo -n \"Coreutils: \"; chown --"
"version | head -n1 | cut -d\")\" -f2 diff --version | head -n1 find --"
"version | head -n1 gawk --version | head -n1 if [ -h /usr/bin/awk ]; then "
"echo \"/usr/bin/awk -&gt; `readlink -f /usr/bin/awk`\"; elif [ -x /usr/bin/"
"awk ]; then echo awk is `/usr/bin/awk --version | head -n1` else echo \"awk "
"not found\" fi gcc --version | head -n1 g++ --version | head -n1 ldd --"
"version | head -n1 | cut -d\" \" -f2- # glibc version grep --version | head -"
"n1 gzip --version | head -n1 cat /proc/version m4 --version | head -n1 make "
"--version | head -n1 patch --version | head -n1 echo Perl `perl -V:version` "
"python3 --version sed --version | head -n1 tar --version | head -n1 makeinfo "
"--version | head -n1 # texinfo version xz --version | head -n1"
msgstr ""

#. type: Content of: <sect1><screen>
#: lfs-en/chapter02/hostreqs.xml:211
#, no-wrap
msgid ""
"echo 'int main(){}' &gt; dummy.c &amp;&amp; g++ -o dummy dummy.c\n"
"if [ -x dummy ]\n"
"  then echo \"g++ compilation OK\";\n"
"  else echo \"g++ compilation failed\"; fi\n"
"rm -f dummy.c dummy</literal>\n"
"EOF\n"
"\n"
"bash version-check.sh</userinput>"
msgstr ""

Thanks!

Build issue "Died at Po4aBuilder.pm line 161"

Hi.
I tried to build rpm package with a new version of po4a - 54.

When I used source file, then I see this issue with missing Meta file issue 115.

So I try with tarball and when build I see this:

+ perl Build.PL installdirs=vendor
DEBUG util.py:499:  Created MYMETA.yml and MYMETA.json
DEBUG util.py:499:  Creating new 'Build' script for 'po4a' version '0.54'
DEBUG util.py:499:  + ./Build
DEBUG util.py:499:  Created META.yml and META.json
DEBUG util.py:497:  BUILDSTDERR: Unknown format type: pod.
DEBUG util.py:497:  BUILDSTDERR: List of valid formats:
DEBUG util.py:497:  BUILDSTDERR:   - asciidoc: AsciiDoc format.
DEBUG util.py:497:  BUILDSTDERR:   - dia: uncompressed Dia diagrams.
DEBUG util.py:497:  BUILDSTDERR:   - docbook: DocBook XML.
DEBUG util.py:497:  BUILDSTDERR:   - guide: Gentoo Linux's XML documentation format.
DEBUG util.py:497:  BUILDSTDERR:   - ini: INI format.
DEBUG util.py:497:  BUILDSTDERR:   - kernelhelp: Help messages of each kernel compilation option.
DEBUG util.py:497:  BUILDSTDERR:   - latex: LaTeX format.
DEBUG util.py:497:  BUILDSTDERR:   - man: Good old manual page format.
DEBUG util.py:497:  BUILDSTDERR:   - pod: Perl Online Documentation format.
DEBUG util.py:497:  BUILDSTDERR:   - rubydoc: Ruby Documentation (RD) format.
DEBUG util.py:497:  BUILDSTDERR:   - sgml: either DebianDoc or DocBook DTD.
DEBUG util.py:497:  BUILDSTDERR:   - texinfo: The info page format.
DEBUG util.py:497:  BUILDSTDERR:   - tex: generic TeX documents (see also latex).
DEBUG util.py:497:  BUILDSTDERR:   - text: simple text document.
DEBUG util.py:497:  BUILDSTDERR:   - wml: WML documents.
DEBUG util.py:497:  BUILDSTDERR:   - xhtml: XHTML documents.
DEBUG util.py:497:  BUILDSTDERR:   - xml: generic XML documents (see also docbook).
DEBUG util.py:497:  BUILDSTDERR:   - yaml: YAML documents.
DEBUG util.py:497:  BUILDSTDERR: Died at Po4aBuilder.pm line 161.
DEBUG util.py:497:  BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.zBgf15 (%build)
DEBUG util.py:497:  BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.zBgf15 (%build)
DEBUG util.py:499:  RPM build errors:
DEBUG util.py:640:  Child return code was: 1
INFO util.py:556:  EXCEPTION: [Error()]

Dont know how to build it correctly. Any ideas?

Here is full build log
Here is spec

Maybe I missed something required to build?

Markdown should process lists in paragraphs (and needs tests)

Markdown is the standardless standard :), however I thin k we should by default (or with an option) allow this to be valid and parsed without wrapping:

List Header
* item 1
* item 2
* item 3

This should generate a no-wrap entry in the pot, I think. Ideally, it should probably generate separate entries for each line, like a proper bulleted list.

[doc] po4a(7) man page: possibly incorrect line

doc/po4a.7.pod:508 says:

If you prefer to kill the first translation instead when the second one was actually better, remove the second one from where it is and put the first one in the place of the second one.

Isn't here a mistake and it should be something like:

If you prefer to kill the first translation instead when the second one was actually better, remove the second one from where it is and replace the first one with it.

Or just:

If you prefer to kill the first translation instead when the second one was actually better, replace the the first one with the second.

It shouldn't be necessary to remove the second again as far as they are exactly the same

Translate or not a text block by po-debiandoc modules

The text block below is part of po4a.7.pod since po4a version 0.13.5 or before, and it is stated that the po-debiandoc introduces to PO files.

AFAIK, the po-debiandoc tool is deprecated and unavailable for some time (I particularly didn't came across with it before), so I can't tell where it gets this text block and if it was translatable or not.

Does anyone can tell whether this should be translated or not?

... That's why the PO files produced by the po-debiandoc module
contain the following header:

 #
 #  ADVISES TO DEVELOPERS:
 #    - you do not need to manually edit POT or PO files.
 #    - this file contains the translation of your debconf templates.
 #      Do not replace the translation of your program with this !!
 #        (or your translators will get very upset)
 #
 #  ADVISES TO TRANSLATORS:
 #    If you are not familiar with the PO format, gettext documentation
 #     is worth reading, especially sections dedicated to this format.
 #    For example, run:
 #         info -n '(gettext)PO Files'
 #         info -n '(gettext)Header Entry'
 #
 #    Some information specific to po-debconf are available at
 #            /usr/share/doc/po-debconf/README-trans
 #         or http://www.debian.org/intl/l10n/po-debconf/README-trans
 #

markdown parser inserts additional newline characters into fenced code blocks

To reproduce

  1. create an original document
$ cat <<EOF > code.md
\`\`\`bash
one
two
three
\`\`\`
EOF
  1. gettextize
$ po4a-gettextize --format text --option markdown --master code.md --po code.po

contents of a resulting file:

$ cat code.po
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-05-05 00:18+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Code fence info string
#: code.md:1
#, no-wrap
msgid "bash"
msgstr ""

#. type: Plain text
#: code.md:1
#, no-wrap
msgid ""
"one\n"
"\n"
"two\n"
"\n"
"three\n"
"\n"
msgstr ""
  1. fill msgstr by simply copying msgid to msgstr
$ cat code.po
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-05-05 00:18+0900\n"
"PO-Revision-Date: 2019-05-05 00:27+0900\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Code fence info string
#: code.md:1
#, no-wrap
msgid "bash"
msgstr "bash"

#. type: Plain text
#: code.md:1
#, no-wrap
msgid ""
"one\n"
"\n"
"two\n"
"\n"
"three\n"
"\n"
msgstr ""
"one\n"
"\n"
"two\n"
"\n"
"three\n"
"\n"
  1. translate
po4a-translate --format text --option markdown --master code.md --po code.po --localized localized_code.md

contents of a resulting file:

```bash
one

two

three

```

Expected result

$ cat code.po
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2019-05-05 00:18+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Code fence info string
#: code.md:1
#, no-wrap
msgid "bash"
msgstr ""

#. type: Plain text
#: code.md:1
#, no-wrap
msgid ""
"one\n"
"two\n"
"three\n"
msgstr ""
```bash
one
two
three
```

Environment info

  • OS: macOS Mojave 10.14.4
  • po4a version: 0.55

Release tarball for 0.53?

Hi,

At MacPorts we were building po4a from tarballs released on alioth. Now that po4a moved to GitHub, should we switch to GitHub-generated archives and ignore the following warning, or will a properly generated tarball be uploaded somewhere?

/opt/local/bin/perl5.26 Build.PL installdirs=core --config cc="/usr/bin/clang" --config ld="/usr/bin/clang"
WARNING: the following files are missing in your kit:
	META.yml
Please inform the author.

Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'po4a' version '0.53'

Included files should be searched in the path of the master

(reported on 07/08/2004 on Alioth by myself, and manually migrated on 02/06/2018)

If you want to handle a file being in another directory, all included ones are
not found because they are searched in the current directory instead of 
where the master file is.

Comment by Jordi Vilalta on 09/08/2004:

Could this be fixed together with the generalized way to include files for all the 
modules?

Comment by me on 10/08/2004:

Could be hacked in the meanwhile ;)

Adding new LaTeX commands

I started using po4a for the translation of my LaTeX documentation files. For my first try I got reasonably good results.

But now I got the following error:

po4a po4a.conf
documentation_administrator.tex:64: (po4a::tex)
               Unbekannte Umgebung: »lstlisting«

I tried to add the following two lines within /usr/share/perl5/Locale/Po4a/LaTeX.pm

register_generic_command("menu,{_}");
register_generic_command("lstlisting,{}");

But it did not change anything.

How can I add new LaTeX commands to po4a?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.