FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 01-31-2012, 06:53 AM
Raphael Hertzog
 
Default Translating copyright info in --version commands?

Hello,

we have lots of translatable strings containing just copyright
information. I'm not quite sure why those strings are translatable but
I can imagine that it was meant so that translators can add themselves
to the list. In practice, none of the translators have been doing this.

On the other hand, some translators have used this opportunity to replace
"(C)" by the UTF-8 character "©".

I always find it a pity that those strings are tagged as translatable.
Instead of properly updating the copyright information, I tend to leave
the strings alone to avoid useless churn on translators.

I would like to fix this. Here are some suggestions.

1/ The easiest solution (but not so clean one):
Drop the _g() and leave the strings as is.

2/ Replace all those printf() calls by a new function which takes as
input all the copyright holders (together with the associated years)
and let it output the full copyright string. If it detects
an UTF-8 locale (with nl_langinfo), it would use "Copyright © " +
<argument>, otherwise it uses the ASCII variant "Copyright (C) " +
<argument>.

copyright("2006-2009 Guillem Jover", "2008-2012 Raphael Hertzog", NULL);

3/ Like 2 but on top of this, we add the possibility for translators to add
themselves. For this, the copyright() function would call
pgettext("translator-copyright", "") to retrieve the data, it would
split on new lines and do the same work than for normal copyright
holders.

(Or this could be moved to a separate function)
(I have not checked whether pgettext() works with an empty string but I
would expect so, otherwise it's still possible to use a fake marker and
to skip it if we detect it)


What do you think?

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120131075339.GA14509@rivendell.home.ouaza.com">h ttp://lists.debian.org/20120131075339.GA14509@rivendell.home.ouaza.com
 
Old 01-31-2012, 11:49 AM
Guillem Jover
 
Default Translating copyright info in --version commands?

Hi!

On Tue, 2012-01-31 at 08:53:39 +0100, Raphael Hertzog wrote:
> we have lots of translatable strings containing just copyright
> information. I'm not quite sure why those strings are translatable but
> I can imagine that it was meant so that translators can add themselves
> to the list. In practice, none of the translators have been doing this.

The copyright string was printed together with the license one
initially, I changed that so that there would be less text to
translate in commit 41d48bb4a2628f71f3958d0bf7b31ea3ed5e4052.

Before that I don't think this had anything to do with translators
copyrights. But...

> On the other hand, some translators have used this opportunity to replace
> "(C)" by the UTF-8 character "©".

... this was one reason for me to keep the pure copyright strings
marked, but not the only one, the “Copyright” string itself can be
translated in some locales, the years written in a different script,
words order changed, and names written with correct spelling.

> I always find it a pity that those strings are tagged as translatable.
> Instead of properly updating the copyright information, I tend to leave
> the strings alone to avoid useless churn on translators.
>
> I would like to fix this. Here are some suggestions.
[...]

The more complicated copyright() framework would not catter for the
above possibilities.

> What do you think?

This is something that has annoyed me for some time, but for other
reasons too. Even if I added myself to two --version output strings
long time ago, I've refreained from doing so again, because I find this
information belongs in the file comment header, so duplicating it in
the --version output is more stuff to keep in mind, and can get easily
out of sync, it does not really belong in the --version output IMO and
I find it annoying there (the license information too for that matter).
It's not even consistent in all dpkg tools, some do print it some don't.
As you said it's annoying for translators. And lastly, at least for the
C code, it would not be accurate anyway, as the copyright of the
command would include the copyrights of at least all other C files that
end up in the binary. This makes sense in a GUI app on the About dialog
or on an initial screen on a TUI app, but I don't think it belongs in a
CLI app.

So my preferred solution would be to just get rid of those strings
altogether, if someone wants to see the copyright, they should check
the source code. I've had a patch around to do just that (attached),
but I've not applied it more out of courtesy than anything else.

To me the same applies to man pages, but I left those alone at the
time.

thanks,
guillem
 
Old 01-31-2012, 01:39 PM
Raphael Hertzog
 
Default Translating copyright info in --version commands?

Hi,

On Tue, 31 Jan 2012, Guillem Jover wrote:
> So my preferred solution would be to just get rid of those strings
> altogether, if someone wants to see the copyright, they should check
> the source code. I've had a patch around to do just that (attached),
> but I've not applied it more out of courtesy than anything else.

Go ahead, it's fine with me.

However someone referred me to section 2.c of GPL-2 which says that we
have to add/keep such messages for interactive applications so maybe we
should keep them for dselect only...

> To me the same applies to man pages, but I left those alone at the
> time.

I have no objection to do the same on the manual pages. In fact, it
was never very clear whether the copyright/authors sections of the manual
page documented the authors of the program or the authors of the manual
page itself.

I can prepare this part of the patch (so that you can concentrate on
multi-arch instead).

Let's just agree on what we want to keep. I suggest to have this single
section at the end of every manual page:

----
.SH COPYRIGHT
This is free software; see the GNU General Public Licence version 2 or
later for copying conditions. There is NO WARRANTY.
----

Do you want anything else in this boilerplate section?

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120131143933.GI18080@rivendell.home.ouaza.com">h ttp://lists.debian.org/20120131143933.GI18080@rivendell.home.ouaza.com
 
Old 02-01-2012, 12:11 AM
Guillem Jover
 
Default Translating copyright info in --version commands?

On Tue, 2012-01-31 at 15:39:33 +0100, Raphael Hertzog wrote:
> On Tue, 31 Jan 2012, Guillem Jover wrote:
> > So my preferred solution would be to just get rid of those strings
> > altogether, if someone wants to see the copyright, they should check
> > the source code. I've had a patch around to do just that (attached),
> > but I've not applied it more out of courtesy than anything else.
>
> Go ahead, it's fine with me.

Ok, I'm including it on the push I'm doing right now.

> However someone referred me to section 2.c of GPL-2 which says that we
> have to add/keep such messages for interactive applications so maybe we
> should keep them for dselect only...

Yes, as I mentioned for TUI apps, which I had already preserved on the
attached patch (in dselect/main.cc:refreshmenu()).

> > To me the same applies to man pages, but I left those alone at the
> > time.
>
> I have no objection to do the same on the manual pages. In fact, it
> was never very clear whether the copyright/authors sections of the manual
> page documented the authors of the program or the authors of the manual
> page itself.

Right.

> I can prepare this part of the patch (so that you can concentrate on
> multi-arch instead).

Sure.

> Let's just agree on what we want to keep. I suggest to have this single
> section at the end of every manual page:
>
> ----
> .SH COPYRIGHT
> This is free software; see the GNU General Public Licence version 2 or
> later for copying conditions. There is NO WARRANTY.
> ----
>
> Do you want anything else in this boilerplate section?

Well the license should also go into the file comment header, and I
don't really see the point in duplicating it in a visible section,
which does not seem to be common either on other man pages. But if
you really really want to have it then at least it should be named
LICENSE.

regards,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120201011121.GA10763@gaara.hadrons.org">http://lists.debian.org/20120201011121.GA10763@gaara.hadrons.org
 
Old 02-03-2012, 09:31 AM
Raphael Hertzog
 
Default Translating copyright info in --version commands?

On Wed, 01 Feb 2012, Guillem Jover wrote:
> > I can prepare this part of the patch (so that you can concentrate on
> > multi-arch instead).
>
> Sure.

The suggested patch is attached (and it's queued here).

> Well the license should also go into the file comment header, and I
> don't really see the point in duplicating it in a visible section,
> which does not seem to be common either on other man pages. But if
> you really really want to have it then at least it should be named
> LICENSE.

Ok, moved everything to file comment headers.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/
 

Thread Tools




All times are GMT. The time now is 10:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org