Fwd: Smart quotes patch

From: Bobby Weinmann <bobby.weinmann_at_gmail.com>
Date: Tue Feb 05 2008 - 17:04:52 CET

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?

In closing, I'd just like to say that I have long been impressed with
Abiword. It was the first Linux Word Processor I could type Hebrew
in.

Thanks,
Bobby

On Feb 5, 2008 3:07 AM, Tomas Frydrych <tf@o-hand.com> wrote:
>
> Martin Sevior wrote:
> > Hi Bobby,
> > Thank you very much for your patch. It's great to get
> > contributions like this out of the blue. My recollection was that the
> > previous implementation of Smart Quotes had serious trouble when
> > interacting with undo/redo. (I believe that there were oscillations
> > between to smart and back again.)
>
> There are other issues with the current code, notably typographic quotes
> need to be localized (e.g., in many languages the opening quote is
> expected to be below the base line).
>
> Tomas
>
>
> >
> > Have you tested your patch with undo/redo? Did you see this sort of
> > effect?
> >
> > Cheers
> >
> > Martin
> >
> > On Mon, 2008-02-04 at 20:43 -0500, Bobby Weinmann wrote:
> >> I have attached a diff to fix/implement smart quotes. I used svn
> >> diff, so if I did it wrong, please let me know.
> >>
> >> All I did was change rule #7 (see fl_DocLayout.cpp) so that quotes in
> >> isolation are changed to opening quotes.
> >>
> >> I added GUI support for GTK+. I could do Windows myself, but I would
> >> need help for Cocoa and anything else that is currently supported.
> >>
> >> I am willing to do more, but I wanted to see if smart quotes would be
> >> rejected outright. I think it works well, but I don't know how the
> >> regular developers feel.
> >>
> >> In particular, I was thinking of:
> >> * An option to always convert backtick to left-single-quote and
> >> apostrophe to right-single-quote. This would allow easy manual entry
> >> of smart quotes which are tricky because a word can sometimes start
> >> with an apostrophe (like, "go get 'em")
> >> * Allow smart quotes to be turned off just for single-quotes (like OOo
> >> and Word).
> >> * Add a toolbar button to toggle between smart quotes and ASCII quotes.
> >>
> >> Bobby
> >
>
>
Received on Tue Feb 5 17:13:02 2008

This archive was generated by hypermail 2.1.8 : Tue Feb 05 2008 - 17:13:02 CET