Mathieu Lirzin <mathieu.lir...@etu.u-bordeaux.fr> skribis: > l...@gnu.org (Ludovic Courtès) writes:
[...] >>> +++ b/gnu/packages/databases.scm >>> @@ -578,7 +578,7 @@ columns, primary keys, unique constraints and >>> relationships.") >>> ("postgresql" ,postgresql))) >>> (home-page "http://search.cpan.org/dist/DBD-Pg") >>> (synopsis "DBI PostgreSQL interface") >>> - (description "") >>> + (description #f) >> >> Weird, and doesn’t 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 # #<output: file /dev/pts/0> 80] > 790: 3 [texi->plain-text "description: Project-Id-Version: guix-packages > 0.8\nReport-Msgid-Bugs-To: l...@gnu.org\nPOT-Creation-Date: 2015-07-21 > 21:35+0200\nPO-Revision-Date: 2014-12-20 22:00+0100\nLast-Translator: Rémy > Chevalier <remycheval...@laposte.net>\nLanguage-Team: French > <tra...@traduc.org>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: > text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"] > In unknown file: > ?: 2 [call-with-input-string "description: Project-Id-Version: > guix-packages 0.8\nReport-Msgid-Bugs-To: l...@gnu.org\nPOT-Creation-Date: > 2015-07-21 21:35+0200\nPO-Revision-Date: 2014-12-20 > 22:00+0100\nLast-Translator: Rémy Chevalier > <remycheval...@laposte.net>\nLanguage-Team: French > <tra...@traduc.org>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: > text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n" ...] > In texinfo.scm: > 1131: 1 [parse #<input: string 4517ea0>] > 965: 0 [loop #<input: string 4517ea0> (*fragment*) ...] > > texinfo.scm:965:23: In procedure loop: > texinfo.scm:965:23: Throw to key `parser-error' with args `(#f "Unknown > command" gnu)'. It looks as though (P_ "") returns the header of the PO file, an indeed This also happens on ‘master’ for all the supported languages: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package --show=perl-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: + l...@gnu.org POT-Creation-Date: 2015-01-27 00:07+0100 PO-Revision-Date: + 2015-02-05 09:41-0300 Last-Translator: Felipe Castro <fef...@gmail.com> + Language-Team: Esperanto <translation-team...@lists.sourceforge.net> Language: + eo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.6.10 --8<---------------cut here---------------end--------------->8--- Here’s 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: l...@gnu.org\nPOT-Creation-Date: 2015-01-27 00:07+0100\nPO-Revision-Date: 2015-02-05 09:41-0300\nLast-Translator: Felipe Castro <fef...@gmail.com>\nLanguage-Team: Esperanto <translation-team...@lists.sourceforge.net>\nLanguage: eo\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nX-Generator: Poedit 1.6.10\n") --8<---------------cut here---------------end--------------->8--- Same with the ‘gettext’ command: --8<---------------cut here---------------start------------->8--- $ TEXTDOMAINDIR=$HOME/soft/share/locale gettext guix-packages "" Project-Id-Version: guix-packages 0.8.1 Report-Msgid-Bugs-To: l...@gnu.org POT-Creation-Date: 2015-01-27 00:07+0100 PO-Revision-Date: 2015-02-05 09:41-0300 Last-Translator: Felipe Castro <fef...@gmail.com> Language-Team: Esperanto <translation-team...@lists.sourceforge.net> Language: eo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.6.10 --8<---------------cut here---------------end--------------->8--- Although libc’s manual doesn’t mention it (info "(libc) Translation with gettext"), gettext(3) states: When an empty string is used for msgid, the functions may return a nonempty string. I have changed ‘P_’ to return the empty string when passed the empty string. I left ‘_’ and ‘N_’ unchanged because they normally shouldn’t 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 <m...@openmailbox.org> > 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 ‘perl-dbd-pg’. Alex: We should maybe disable the paragraph filling code in guix.el so that it doesn’t mess up with formatting? Thank you! Ludo’.