Re: Fwd: Smart quotes patch

From: Martin Sevior <martines_at_unimelb.edu.au>
Date: Tue Feb 05 2008 - 23:43:46 CET

On Tue, 2008-02-05 at 18:12 +0100, Ryan Pavlik wrote:
> Bobby Weinmann wrote:
> > Sorry - I originally replied just to Tomas.
> >
> > I did not test undo/redo. I didn't know about it, but I can take a
> > look. While I am a developer, I am a complete newbie to the Abiword
> > codebase.
> >
> > If, in theory, the developers are not averse to supporting smart
> > quotes, I will work on it.
> >
> > 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.
> >
> > Smart quotes are implemented in terms of a function
> > considerSmartQuoteCandidateAt() which could be overridden by different
> > languages to provide their own rules. I will, time permitting, google
> > the rules for the languages I can at least recognize: Hebrew, French,
> > Spanish, German and Arabic. If I can't support all languages, are you
> > not interested in any?
> >
> 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.

I agree that curly quotes for English is better than no smart quotes as
long as it works.

For me the show-stopper is the undo/redo behaviour.

Cheers

Martin
Received on Wed Feb 6 00:34:52 2008

This archive was generated by hypermail 2.1.8 : Wed Feb 06 2008 - 00:34:52 CET