From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Texinfo in descriptions? Date: Sun, 06 Sep 2015 15:51:34 +0200 Message-ID: <87egib7j15.fsf@gnu.org> References: <87wpy0nygt.fsf@gmail.com> <87y4ige2ux.fsf@openmailbox.org> <87wpy0t83c.fsf@gnu.org> <87r3o7pz3h.fsf@openmailbox.org> <87y4ietrdz.fsf_-_@gnu.org> <874mkx8a5o.fsf@openmailbox.org> <87wpxs9ux0.fsf@gnu.org> <87h9ov51j9.fsf@gnu.org> <87a8tcfnox.fsf@openmailbox.org> <87a8tbf5lu.fsf@openmailbox.org> <87613wlmgv.fsf@gnu.org> <87zj18ik3d.fsf@openmailbox.org> <87egij2lyi.fsf@gnu.org> <87oahk8qbh.fsf@openmailbox.org> <87bndjxicp.fsf@gnu.org> <87si6uynpz.fsf@etu.u-bordeaux.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYaM9-0005ad-Hj for guix-devel@gnu.org; Sun, 06 Sep 2015 09:51:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYaM8-0007LT-5J for guix-devel@gnu.org; Sun, 06 Sep 2015 09:51:41 -0400 In-Reply-To: <87si6uynpz.fsf@etu.u-bordeaux.fr> (Mathieu Lirzin's message of "Fri, 04 Sep 2015 21:43:36 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mathieu Lirzin Cc: guix-devel@gnu.org, Alex Kost Mathieu Lirzin skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >>> +++ b/gnu/packages/databases.scm >>> @@ -578,7 +578,7 @@ columns, primary keys, unique constraints and relat= ionships.") >>> ("postgresql" ,postgresql))) >>> (home-page "http://search.cpan.org/dist/DBD-Pg") >>> (synopsis "DBI PostgreSQL interface") >>> - (description "") >>> + (description #f) >> >> Weird, and doesn=E2=80=99t really match the commit log. Maybe this hunk= can be >> removed? > > I get an error with "guix package -s perl-dbd-pg" without this change [...] > In guix/ui.scm: > 859: 4 [package->recutils # # 80] > 790: 3 [texi->plain-text "description: Project-Id-Version: guix-packages= 0.8\nReport-Msgid-Bugs-To: ludo@gnu.org\nPOT-Creation-Date: 2015-07-21 21:= 35+0200\nPO-Revision-Date: 2014-12-20 22:00+0100\nLast-Translator: R=C3=A9m= y Chevalier \nLanguage-Team: French \nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset= =3DUTF-8\nContent-Transfer-Encoding: 8bit\n"] > In unknown file: > ?: 2 [call-with-input-string "description: Project-Id-Version: guix-pa= ckages 0.8\nReport-Msgid-Bugs-To: ludo@gnu.org\nPOT-Creation-Date: 2015-07-= 21 21:35+0200\nPO-Revision-Date: 2014-12-20 22:00+0100\nLast-Translator: R= =C3=A9my Chevalier \nLanguage-Team: French \nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; = charset=3DUTF-8\nContent-Transfer-Encoding: 8bit\n" ...] > In texinfo.scm: > 1131: 1 [parse #] > 965: 0 [loop # (*fragment*) ...] > > texinfo.scm:965:23: In procedure loop: > texinfo.scm:965:23: Throw to key `parser-error' with args `(#f "Unknown c= ommand" gnu)'. It looks as though (P_ "") returns the header of the PO file, an indeed This also happens on =E2=80=98master=E2=80=99 for all the supported languag= es: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package --show=3Dperl-dbd-pg name: perl-dbd-pg version: 3.5.1 outputs: out systems: x86_64-linux i686-linux armhf-linux mips64el-linux dependencies: perl-dbi-1.631 perl-dbi-1.631 postgresql-9.3.8 location: gnu/packages/databases.scm:562:2 homepage: http://search.cpan.org/dist/DBD-Pg license: GPL 1+ synopsis: DBI PostgreSQL interface description: Project-Id-Version: guix-packages 0.8.1 Report-Msgid-Bugs-To: + ludo@gnu.org POT-Creation-Date: 2015-01-27 00:07+0100 PO-Revision-Date: + 2015-02-05 09:41-0300 Last-Translator: Felipe Castro + Language-Team: Esperanto Lang= uage: + eo MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 + Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.6.10 --8<---------------cut here---------------end--------------->8--- Here=E2=80=99s a reduced case (where bindtextdomain is passed by $localedir= ): --8<---------------cut here---------------start------------->8--- $ echo $LANGUAGE eo $ ./pre-inst-env guile -c '(bindtextdomain "guix-packages" "/home/ludo/soft= /share/locale") (setlocale LC_ALL "") (pk (gettext "" "guix-packages"))' ;;; ("Project-Id-Version: guix-packages 0.8.1\nReport-Msgid-Bugs-To: ludo@g= nu.org\nPOT-Creation-Date: 2015-01-27 00:07+0100\nPO-Revision-Date: 2015-02= -05 09:41-0300\nLast-Translator: Felipe Castro \nLanguage= -Team: Esperanto \nLanguage: eo\= nMIME-Version: 1.0\nContent-Type: text/plain; charset=3DUTF-8\nContent-Tran= sfer-Encoding: 8bit\nX-Generator: Poedit 1.6.10\n") --8<---------------cut here---------------end--------------->8--- Same with the =E2=80=98gettext=E2=80=99 command: --8<---------------cut here---------------start------------->8--- $ TEXTDOMAINDIR=3D$HOME/soft/share/locale gettext guix-packages "" Project-Id-Version: guix-packages 0.8.1 Report-Msgid-Bugs-To: ludo@gnu.org POT-Creation-Date: 2015-01-27 00:07+0100 PO-Revision-Date: 2015-02-05 09:41-0300 Last-Translator: Felipe Castro Language-Team: Esperanto Language: eo MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.6.10 --8<---------------cut here---------------end--------------->8--- Although libc=E2=80=99s manual doesn=E2=80=99t mention it (info "(libc) Tra= nslation with gettext"), gettext(3) states: When an empty string is used for msgid, the functions may return a nonempty string. I have changed =E2=80=98P_=E2=80=99 to return the empty string when passed = the empty string. I left =E2=80=98_=E2=80=99 and =E2=80=98N_=E2=80=99 unchanged beca= use they normally shouldn=E2=80=99t end up being passed the empty string. >> Could you look into it? > > Here is "something" that seems to work. The idea is to append > "description: " to package description before 'stexi->plain-text' fills > the text. Sounds reasonable. > From 88f95bf594ded0e63b842e23bc06cbcd250d9660 Mon Sep 17 00:00:00 2001 > From: Mathieu Lirzin > Date: Fri, 7 Aug 2015 00:10:43 +0200 > Subject: [PATCH] ui: Add package-description-string. > > Provide support for Texinfo's markup in package description. > > * guix/ui.scm (%text-width): New parameter. > (texi->plain-text): New variable. > (package->recutils): Use them. > (package-description-string): New variable. > * emacs/guix-main.scm (%package-param-alist): Use it. > * gnu/packages/databases.scm (perl-dbd-pg): Adapt to Texinfo's markup. > * gnu/packages/perl.scm (perl-devel-globaldestruction) > (perl-devel-lexalias, perl-exporter-lite): Likewise. > * gnu/packages/python.scm (python2-empy): Likewise. Looks good. OK to commit after removing the change for =E2=80=98perl-dbd-p= g=E2=80=99. Alex: We should maybe disable the paragraph filling code in guix.el so that it doesn=E2=80=99t mess up with formatting? Thank you! Ludo=E2=80=99.