Re: Fwd: Smart quotes patch

From: Tomas Frydrych <tf_at_o-hand.com>
Date: Wed Feb 06 2008 - 09:18:06 CET

Martin Sevior wrote:
>
> On Tue, 2008-02-05 at 18:12 +0100, Ryan Pavlik wrote:
>> Bobby Weinmann wrote:
>>> Sorry - I originally replied just to Tomas.
>>>
>>> I don't know how much I can do for localization, since I don't know
>>> their rules. I don't know why that would be a problem for English
>>> support? The GUI I provided allows you to turn it off, so you'd have
>>> the same functionality as it exists today. This could even be the
>>> default, but at least English users _could_ have smart quotes.
>>>
>> I can't speak for all the developers, but for instance, the grammar
>> parser plugin disables itself when text is marked in a language that we
>> don't have a parser for (right now, everything but English.) I'd
>> imagine that the best chances of a useful enhancement tries to do the
>> "right thing" and also the thing the user expects to happen (hence why
>> there's no autocorrect).
> <snip>
>
> Ah yes this is could be a solution. You can interrogate the character
> property "LANG" with
>
> getView()->getCharFormat(const gchar *** props, true)
>
> at the current point. If the language is one like English where standard
> curly quotes are employed, use the algorithm. In time maybe someone else
> will implement the below base-line curly quotes for those languages that
> need them.

This should be pretty easy to implement properly; I think all we need is
to add tokens to the XAP string tables for LQUOTE, RQUOTE, LDOUBLEQUOTE
and RDOUBLEQUOTE, and instead of having the characters hardcoded, we can
do a normal XAPString lookup. Then we can leave it to the translators to
prescribe different characters than the default where desired.

Tomas
Received on Wed Feb 6 09:18:55 2008

This archive was generated by hypermail 2.1.8 : Wed Feb 06 2008 - 09:18:55 CET