[Patch] Smart quotes - Unleashed :)

From: Bobby Weinmann <bobby.weinmann_at_gmail.com>
Date: Sun Apr 06 2008 - 05:19:29 CEST

It has been a huge pain in many respects, but here it is:

By default, this will follow the view's language setting, BUT, in the
preferences menu, you can set a custom quoting style for Outer
(double) quotes and Inner (single) quotes. If you set the custom
setting, it will stay even if you switch languages. This is what I
had in mind during all that flaming ;)

Caveats/Notes:
* This is GTK only, ATM. Someone else needs to port the graphical
parts to Windows and Cocoa (although from the other post I read, Cocoa
developers have gone the way of the dodo).
* France's French doesn't have a non-breaking space. This should be
just a matter of inserting U+00A0 before the quote in
considerSmartQuotes(). I.e. replacing the ASCII quote with 2 chars.
(Stupid French).
* There is the ability to add a variation for a specific country.
Switzerland was the primary example of this, and the only one I
implemented, but I did not test that I did it right. (Stupid Swiss)
* I tried to add the languages spelled out in the Wikipedia article:
http://en.wikipedia.org/wiki/Quotation_mark%2C_non-English_usage,
however, please double check it (and fix it). You need only edit
xap_EncodingManager.cpp. XAP_LangInfo maps the language to the
quoting styles.
* If your language uses apostrophes AND inner smart quotes which are
NOT apostrophes: nothing I can do for you.
* There could be other bugs.

I tried switching to Hebrew, German and English and those 3 seemed to
work. Custom quotes also seemed to work.

Please let me know if I have neglected to insult your country/culture
and you feel it should be insulted. :)

Enjoy your feature,
Bobby

Received on Sun Apr 6 05:20:28 2008

This archive was generated by hypermail 2.1.8 : Sun Apr 06 2008 - 05:20:29 CEST