grub-devel
[Top][All Lists]
Advanced

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

Re: gettext $"..."


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: gettext $"..."
Date: Sun, 11 Mar 2012 03:45:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0

On 11.03.2012 02:47, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Underscore handling.
> On 11.03.2012 02:22, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> Update to fix escaping.
>> $"<string>" as long as <string> doesn't contain $* or $@ in absence of
>> gettext should behave the same as "<string>"
>> On 11.03.2012 02:09, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> Hello, all. Following discussion with Jordan Uggla it was found out that
>>> current syntax of $"..." without variable expansion isn't enough for a
>>> meaningful i18n and committing ourselves to it by releasing a version
>>> with it would be counter-productive as later we'll need something better
>>> but won't be able to remove something mostly useless. Since the bash
>>> behaviour is unsafe due to variable expansion in translated strings. But
>>> it's the very feature that is interesting for translation. There is
>>> however a compromise by allowing in translated string only same
>>> variables as in the original.This allows translator to rearrange
>>> variables as he sees fit but in the same time makes it safe (basically
>>> it's printf with reduced syntax and named tokens and without ability to
>>> run over the end). Fortunately only betas were released with $"..."
>>> feature and no project has used it for i18n yet. Attached patch
>>> implements the described behaviour.
>>> Variables $* and $@ can't be used inside $"...".
>>> Can someone have a look, comment on approach and/or provide tests?
>>>
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: gettext.diff
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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