guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texinfo in descriptions?


From: Alex Kost
Subject: Re: Texinfo in descriptions?
Date: Sun, 30 Aug 2015 18:19:24 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mathieu Lirzin (2015-08-30 15:24 +0300) wrote:

> Alex Kost <address@hidden> writes:
>
>> Mathieu Lirzin (2015-08-28 00:04 +0300) wrote:
>>
>>> Here is a first attempt.  It doesn't feel right to me but fornow I don't
>>> know what to do without duplicating code or reorganizing the world.  The
>>> problem is that translations are handle in (guix ui) so we need to
>>> regenerate texi->plain-text.
>>
>> I don't understand what you mean by 'regenerate texi->plain-text'.
>
> Maybe the correct expression should have been "reiterate
> texi->plain-text".  What I meant was that the process of converting from
> texinfo to plain-text need to be done in (guix ui) too, because
> translated package description are texinfo fragment.

Ah, now I understand what you mean.

>>> -  (define (description->recutils str)
>>> -    (let ((str (P_ str)))
>>> +  (define (description->recutils str)
>>> +    (let ((str (texi->plain-text (P_ str))))
>>
>> IIUC there is no need to use 'texi->plain-text' here.  Instead you can
>> replace 'package-description' with 'package-description-string' in the
>> body of 'package->recutils'.  Or did I miss anything?
>
> That was my first solution before realizing that this will lead to a
> problem that this unrealistic example illustrates.
>
>   ;; with fr_FR.UTF-8 locale
>
>   (package-description foo)
>   => "socks @code{foo}."
>
>   (package-description-string foo)
>   => "socks `foo'.\n\n"
>
>   (N_ (package-description foo))
>   => "chaussettes @code{foo}."
>
>   (N_ (package-description-string foo))
>   => "socks `foo'.\n\n"
>
> In the last evaluation gettext was unable to find the translated string
> corresponding to msgid "socks `foo'.\n\n".

Now I see, thanks for the explanation!  Honestly I don't know
how/when/where this translation stuff happens, so I don't have any
useful comments.

>> Also I think the same replacement should be done in (guix scripts
>> lint) ...
>
> I think more can be done in (guix scripts lint).  For example checking
> if invoking 'package-description-string' fails which would indicate that
> the markup is not correctly used.

Indeed.

>> ... and (guix scripts package).
>
> This script uses 'package-description' to search in it.  IIUC it was
> suggested by Ludo to search using the raw Texinfo fragment and to
> display using the plain-text version.
> <https://lists.gnu.org/archive/html/guix-devel/2015-07/msg00609.html>
>
> Thank you very much for your reply, :)

It wasn't a very useful reply, isn't it :-)  Sorry for the noize.

-- 
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]