On Wed, 18 Mar 2015, Edmond Orignac wrote:
I have just tried inserting the LANG=C in the commands used by dtprintinfo
using the latest CVS source. This allows dtprintinfo to work with the fr_FR,
it_IT, es_ES and de_DE locales at least on Linux.
There is still a message:
Unexpected legend column: File(s) != Files
due to a hardcoded if (strcmp(tmp, "Files"))
but it does not prevent the listing of the files in the queue.
I am attaching the patch.
Nice - but I need the patch in git's format-patch format :)
-jon
On 18/03/2015 02:21, Jon Trulson wrote:
On Mon, 16 Mar 2015, Edmond Orignac wrote:
I have found a problem with dtprintinfo when using CUPS with a locale
other than "C". If the locale is set to fr_FR.ISO8859-1 the CUPS lpq
message "no entries" is translated into "aucune entrée" and if it is set
to it_IT.ISO8859-1 the message "no entries" becomes "nessuna voce". The
code
in programs/dtprintinfo/objects/PrintObj/ParseJobs.C (line 933)
will then fail to recognize that the print queue is empty and will
exit with the error message
*** STDERR(1): (/usr/dt/bin/dtexec) /usr/dt/bin/dtprintinfo: PID 4650:
sam. mars 14 19:02:32 2015
Unexpected legend column: aucune != Rank
Unexpected legend column: entrée != Owner
i. e. the "aucune entrée" message is treated as the legend line in the
lines 978 and following.
One possible workaround could be to set explicitly the environment to
LANG=C with a command "LANG=C lpq" in the lines 874 and 876.
This seems a reasonable approach, the somewhat more complicated
approach would be to internationalize those strings and use the proper
message catalogs to retrieve them. But there seem to be a lot of
hardcoded strings in that module.
Have you tried adding LANG=C as you suggest? If it works, send a
patch and I'll apply it.
--
Jon Trulson
"Don't believe everything you read on the internet."
--Abraham Lincoln
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel