PHP wrapper around po4a
by Pedro Padron
Hi there!
I have created a simple PHP class that can be used as a wrapper around po4a.
It allows you to run a build directly from a PHP app, without having to
create a config file (the wrapper creates it based on the supplied
parameters).
Here's an example: https://gist.github.com/1084693
It may seem too much trouble instead of just using a config file and running
from the command line, but in an existing php codebase it was quite useful
for me.
source code is available at: http://github.com/w3p/php-po4a
releases at: pear.w3p.com.br
I just need to ask one thing: since po4a is GPL, even a wrapper around it
must be GPL too?
--
Pedro Padron
Tecnologia & Desenvolvimento | W3P Projetos Web
+55 11 7518 6664
+55 11 2609 1989
http://www.w3p.com.br/
13 years, 2 months
po4a for HTML
by Peter Krefting
Hi!
I am trying to translate a set of help file documents in HTML using po4a,
and it is working fairly well. I am using the "xhtml" format, but I am
having some problems:
- How do I provide a context (msgctx) for strings? There are some strings
that have different translations depending on context. In my case, for
instance, the word "Forward" in the context of moving in a web browser
history and in the context of sending an email message to another recipient.
- How do I add attributes that are to be translated? I would like to
translate the "content" attribute of the <META> tag, to translate things
like keywords and description.
- How do I mark paragraphs that are not to be translated?
Currently I have solved the first problem by having one PO file per HTML
file, but that doesn't scale, especially not when paragraphs get moved
between the files, and it does mean that I have to translate the common
parts of the document several times. The second problem I have solved by
applying a post-translation sed script, but that doesn't scale very well.
--
\\// Peter - http://www.softwolves.pp.se/
13 years, 2 months
Make i18n bugs normal severity?
by Neil Williams
I'm beginning to think that because podebconf-report-po has to be
called by the maintainer prior to upload, the resulting bugs are at the
invitation of the maintainer and probably shouldn't be wishlist but
normal.
It's a small point but it could be worth adjusting the default template
to recommend normal severity.
--
Neil Williams
=============
http://www.linux.codehelp.co.uk/
13 years, 2 months
[po4a-Bugs][313322] latex format can not recognize custom environments
by po4a-bugs@alioth.debian.org
Bugs item #313322, was changed at 31/08/2011 13:45 by Nicolas FRANÇOIS
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=313322&gro...
>Status: Closed
Priority: 3
Submitted By: Cristian Consonni (cristiancantoro-guest)
Assigned to: Nobody (None)
Summary: latex format can not recognize custom environments
Category: None
Group: None
>Resolution: Works For Me
Initial Comment:
I don't know if this is more a feature request than a bug report, anyway I was creating a po file with po4a-gettextize and got the following
$ po4a-gettextize -f latex -m mbe1intro.tex -p olo.po
mbe1intro.tex:101: (po4a::tex)
ambiente «myVerbatim2» sconosciuto
\begin{myVerbatim2}
[...]
this is the definition of the environment:
\DefineVerbatimEnvironment%
{myVerbatim2}%
{Verbatim}%
{fontfamily=courier,fontseries=b,frame=single,rulecolor=\color{blue}}
The problem was resolved by commenting all the occurrences of the environment.
Cristian
p.s: the original tex file has been downloaded from:
[1]http://www.csulb.edu/~woollett/mbe1intro.tex
----------------------------------------------------------------------
>Comment By: Nicolas FRANÇOIS (nekral-guest)
Date: 01/09/2011 21:18
Message:
the -o verbatim option can be used.
The difference with -o no_wrap is in the evaluation of the content. So it seems you really want a verbatim here.
----------------------------------------------------------------------
Comment By: Cristian Consonni (cristiancantoro-guest)
Date: 01/09/2011 20:20
Message:
@Nicola François:
adding te followig lines:
% po4a: verbatim environment myVerbatim2
% po4a: verbatim environment myVerbatim2s
% po4a: verbatim environment myVerbatim2f
% po4a: verbatim environment myVerbatim4
% po4a: verbatim environment myVerbatim
% po4a: verbatim environment myVerbatim1
solves the problem.
Anyway the command:
$ po4a-gettextize -f latex -m mbe1intro.tex -p olo.po -o no_wrap="myVerbatim2,myVerbatim2s,myVerbatim4,myVerbatim,myVerbatim1,myVerbatim2f"
gives:
mbe1intro.tex:1143: (po4a::tex)
simbolo "]" solitario in «(((to_atan2(e, y, x), totan(e, v), totan2(e, v), mstate(), mattrib(), mclean(),
fll(x), nyquist(ns, fs), sample(expr, var, ns, dvar), vf(flist, dvar),
current_small(), setsmall(val), _chop_fabsspectrum(glist, nlw, ymax, »
You can also find the original file attached.
----------------------------------------------------------------------
Comment By: David Prévot (taffit)
Date: 31/08/2011 23:10
Message:
Hi,
By the way I already had a few issues using inline comments, and better results declaring customization in an extra file.
e.g.: $ po4a-gettextize -f latex -m mbe1intro.tex -p olo.po -o definitions="custom"
where the custom files contains lines like:
% po4a: environment myVerbatim2
Regards
David
----------------------------------------------------------------------
Comment By: Nicolas FRANÇOIS (nekral-guest)
Date: 31/08/2011 22:50
Message:
Hello,
This is intended to be supported.
Did you try any of the TeX module options? (e.g. -o no_wrap="myVerbatim2")
Or did you try to define the environment in the TeX file for po4a. For example:
% po4a: environment myVerbatim2
or
% po4a: verbatim environment myVerbatim2
(see man Locale::Po4a::TeX for more info)
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=313322&gro...
13 years, 2 months
[po4a-Bugs][313322] latex format can not recognize custom environments
by po4a-bugs@alioth.debian.org
Bugs item #313322, was changed at 2011-08-31 13:45 by Cristian Consonni
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=313322&gro...
Status: Open
Priority: 3
Submitted By: Cristian Consonni (cristiancantoro-guest)
Assigned to: Nobody (None)
Summary: latex format can not recognize custom environments
Category: None
Group: None
Resolution: None
Initial Comment:
I don't know if this is more a feature request than a bug report, anyway I was creating a po file with po4a-gettextize and got the following
$ po4a-gettextize -f latex -m mbe1intro.tex -p olo.po
mbe1intro.tex:101: (po4a::tex)
ambiente «myVerbatim2» sconosciuto
\begin{myVerbatim2}
[...]
this is the definition of the environment:
\DefineVerbatimEnvironment%
{myVerbatim2}%
{Verbatim}%
{fontfamily=courier,fontseries=b,frame=single,rulecolor=\color{blue}}
The problem was resolved by commenting all the occurrences of the environment.
Cristian
p.s: the original tex file has been downloaded from:
[1]http://www.csulb.edu/~woollett/mbe1intro.tex
----------------------------------------------------------------------
Comment By: Cristian Consonni (cristiancantoro-guest)
Date: 2011-09-01 20:20
Message:
@Nicola François:
adding te followig lines:
% po4a: verbatim environment myVerbatim2
% po4a: verbatim environment myVerbatim2s
% po4a: verbatim environment myVerbatim2f
% po4a: verbatim environment myVerbatim4
% po4a: verbatim environment myVerbatim
% po4a: verbatim environment myVerbatim1
solves the problem.
Anyway the command:
$ po4a-gettextize -f latex -m mbe1intro.tex -p olo.po -o no_wrap="myVerbatim2,myVerbatim2s,myVerbatim4,myVerbatim,myVerbatim1,myVerbatim2f"
gives:
mbe1intro.tex:1143: (po4a::tex)
simbolo "]" solitario in «(((to_atan2(e, y, x), totan(e, v), totan2(e, v), mstate(), mattrib(), mclean(),
fll(x), nyquist(ns, fs), sample(expr, var, ns, dvar), vf(flist, dvar),
current_small(), setsmall(val), _chop_fabsspectrum(glist, nlw, ymax, »
You can also find the original file attached.
----------------------------------------------------------------------
Comment By: David Prévot (taffit)
Date: 2011-08-31 23:10
Message:
Hi,
By the way I already had a few issues using inline comments, and better results declaring customization in an extra file.
e.g.: $ po4a-gettextize -f latex -m mbe1intro.tex -p olo.po -o definitions="custom"
where the custom files contains lines like:
% po4a: environment myVerbatim2
Regards
David
----------------------------------------------------------------------
Comment By: Nicolas FRANÇOIS (nekral-guest)
Date: 2011-08-31 22:50
Message:
Hello,
This is intended to be supported.
Did you try any of the TeX module options? (e.g. -o no_wrap="myVerbatim2")
Or did you try to define the environment in the TeX file for po4a. For example:
% po4a: environment myVerbatim2
or
% po4a: verbatim environment myVerbatim2
(see man Locale::Po4a::TeX for more info)
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=410622&aid=313322&gro...
13 years, 2 months