all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Lirzin <mathieu.lirzin@etu.u-bordeaux.fr>
Cc: guix-devel@gnu.org, Alex Kost <alezost@gmail.com>
Subject: Re: Texinfo in descriptions?
Date: Sun, 06 Sep 2015 15:51:34 +0200	[thread overview]
Message-ID: <87egib7j15.fsf@gnu.org> (raw)
In-Reply-To: <87si6uynpz.fsf@etu.u-bordeaux.fr> (Mathieu Lirzin's message of "Fri, 04 Sep 2015 21:43:36 +0200")

Mathieu Lirzin <mathieu.lirzin@etu.u-bordeaux.fr> skribis:

> ludo@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: ludo@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 <remychevalier@laposte.net>\nLanguage-Team: French <traduc@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: ludo@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 <remychevalier@laposte.net>\nLanguage-Team: French <traduc@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:
+ 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 <fefcas@gmail.com>
+ Language-Team: Esperanto <translation-team-eo@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: ludo@gnu.org\nPOT-Creation-Date: 2015-01-27 00:07+0100\nPO-Revision-Date: 2015-02-05 09:41-0300\nLast-Translator: Felipe Castro <fefcas@gmail.com>\nLanguage-Team: Esperanto <translation-team-eo@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: 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 <fefcas@gmail.com>
Language-Team: Esperanto <translation-team-eo@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 <mthl@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’.

  reply	other threads:[~2015-09-06 13:51 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 11:17 [PATCH] gnu packages: Clean up synopses and descriptions Alex Kost
2015-07-16  9:40 ` Eric Bavier
2015-07-16 15:55   ` Alex Kost
2015-07-16 19:08     ` Ludovic Courtès
2015-07-17 12:41       ` Alex Kost
2015-07-17 21:24         ` Ludovic Courtès
2015-07-18 10:07           ` Alex Kost
2015-07-16 11:52 ` Mathieu Lirzin
2015-07-16 15:50   ` Ludovic Courtès
2015-07-16 21:33     ` Mathieu Lirzin
2015-07-17 21:18       ` Texinfo in descriptions? Ludovic Courtès
2015-07-21 21:37         ` Mathieu Lirzin
2015-07-22 13:35           ` Ludovic Courtès
2015-07-22 21:24             ` Ludovic Courtès
2015-07-22 22:08               ` Andreas Enge
2015-07-23  9:49                 ` Mathieu Lirzin
2015-07-23 13:57                   ` Ludovic Courtès
2015-07-23 15:09                     ` Daniel Pimentel
2015-07-23 18:00                       ` Andreas Enge
2015-08-25 22:09                     ` Mathieu Lirzin
2015-08-26  7:57                       ` Andy Wingo
2015-08-27 19:48                         ` Mathieu Lirzin
2015-07-23 13:54                 ` Ludovic Courtès
2015-08-27 21:04               ` Mathieu Lirzin
2015-08-28 21:47                 ` Mathieu Lirzin
2015-08-30 17:23                   ` Ludovic Courtès
2015-08-30 19:06                     ` Alex Kost
2015-08-30 20:42                     ` Mathieu Lirzin
2015-08-31 21:21                       ` Ludovic Courtès
2015-09-01 16:41                         ` Mathieu Lirzin
2015-09-02 21:27                         ` Mathieu Lirzin
2015-09-03 22:12                           ` Ludovic Courtès
2015-09-04 19:43                             ` Mathieu Lirzin
2015-09-06 13:51                               ` Ludovic Courtès [this message]
2015-09-06 20:10                                 ` Alex Kost
2015-09-06 21:31                                   ` Ludovic Courtès
2015-09-07 15:50                                     ` Alex Kost
2015-09-07 15:59                                       ` Ludovic Courtès
2015-08-30 10:10                 ` Alex Kost
2015-08-30 12:24                   ` Mathieu Lirzin
2015-08-30 15:19                     ` Alex Kost
2015-07-17 12:35     ` [PATCHES] gnu packages: Clean up synopses and descriptions Alex Kost
2015-07-17 21:07       ` Mathieu Lirzin
2015-07-17 21:30       ` Ludovic Courtès
2015-07-18 10:08         ` Alex Kost
2015-07-18 21:13           ` Andreas Enge
2015-07-19  9:58             ` Alex Kost
2015-07-16 16:03   ` [PATCH] " Alex Kost
2015-07-16 20:02     ` Mathieu Lirzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egib7j15.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mathieu.lirzin@etu.u-bordeaux.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.