Welcome to palaso.org
Website of the Payap Language Software Development Group
Restoring spell-check dictionaries in WeSay when FLEx is installed
Author chris.hirt | 21.03.2011 | Category OurWord, Linux, FLEx, Chorus, Palaso Library, Spelling, Typesetting, Solid, Blogroll, WeSay, Developers, Dictionary, Uncategorized
Recently we discovered that spell-check dictionaries were not showing up in the WeSay config tool when FLEx was also installed. FLEx’s bundles Enchant (spell checker service) in its installer while WeSay requires you to install Enchant separately. The problem actually occurs on machines where FLEx was installed before WeSay, because of the way Enchant looks for installed dictionaries: Enchant looks for dictionaries in the same directory as the libenchant.dll , which is in the PATH. Eventually, we will include a solution in the WeSay installer, but until that is fixed, this .reg file will tell Enchant where the common installed dictionaries are located. Note: change the downloaded file to the extention .reg and double click it to add the registry value to Windows.
Buy Designer Replica Celine Handbags
Buy Discounted Replica Burberry Online
Buy Replica Yves Saint Laurent Handbag Online
Buy Designer Replica Ysl Shoes Online
Buy Replica Chanel Handbag Online
Buy Cheap Fake Miu Miu Shoes
Buy Cheap Replica Dg Handbag Online
Buy Discounted Hermes Handbag
Discounted Designer Replica Jimmy Choo
Buy Fake 3.1 Phillip Lim Handbag Online
Cheap Designer Replica Dg Handbag
Buy Cheap Thomas Wylde Handbag
Discounted Designer Replica Dolce Gabbana Shoes
Buy Discounted Fake Miu Miu Handbags Online
Buy Discounted Alexander Mcqueen Handbag
Buy Discounted Jimmy Choo Shoes
Discounted Miu Miu Shoes Online
Buy Cheap Hermes Handbags
Buy Discounted Replica Bottega Veneta Handbags Online
Cheap Replica Dolce Gabbana Shoes
Discounted Replica Cartier Handbags
Buy Discounted Fake Alexander Wang Handbags
Discounted Fake Christian Dior Handbags
Buy Discounted Lancel Handbag Online
Cheap Fake Tory Burch Shoes
Cheap Prada Handbag
Buy Designer Replica Bottega Veneta Handbags
Buy Discounted Fake Giuseppe Zanotti Shoes
Buy Designer Replica Marc Jacobs Handbag
Cheap Dior Shoes Online
Buy Cheap Replica Ysl Handbags
Replica Cartier
Buy Replica Coach Handbag Online
Buy Fake Shoes
Replica Christian Dior Handbag
Discounted Dolce Gabbana Handbag
Buy Cheap Replica Loewe Handbags
Buy Cheap Replica Burberry Handbag
Buy Cheap Replica Mulberry Handbags Online
Buy Designer Replica Tory Burch Shoes
Buy Cheap Designer Replica Miu Miu Online
Buy Prada Shoes Online
Buy Fake Mulberry Handbag
Fake Christian Louboutin
Cheap Alexander Mcqueen Handbag Online
Cheap Designer Replica Bottega Veneta Handbags Online
Buy Discounted Replica Bottega Veneta Handbags
Buy Discounted Anya Hindmarch Handbags Online
Buy 3.1 Phillip Lim Handbag
Discounted Designer Replica Loewe
Cheap Lv Handbags
Discounted Prada Shoes Online
Buy Cartier Online
Buy Cheap Marc Jacobs Handbags Online
Buy Discounted Replica Salvatore Ferragamo Online
Buy Cheap Shoes
Buy Cheap Designer Replica Marc Jacobs Handbags Online
Buy Fake Loewe Online
Cheap Fake Versace Handbag
Buy Cheap Designer Replica Dg Online
Discounted Balenciaga Handbag
Buy Discounted Fake Dg Shoes
Cheap Replica Gucci Handbag Online
Cheap Christian Louboutin
Buy Cheap Ysl Online
Buy Cheap Burberry
Cheap Anya Hindmarch Handbag Online
Buy Discounted Fake Hermes Handbag Online
Cheap Fake 3.1 Phillip Lim Handbags
Burberry Handbag
Cheap Fake Thomas Wylde Handbag Online
Discounted Designer Replica Givenchy Handbag Online
Buy Discounted Designer Replica Yves Saint Laurent Shoes
Buy Cheap Replica Vivienne Westwood
Buy Designer Replica Thomas Wylde Handbags Online
Buy Fake Yves Saint Laurent
Cheap Fake Dolce Gabbana Handbags
Fake Alexander Mcqueen Shoes
Discounted Designer Replica Alexander Wang Handbag
Discounted Replica Thomas Wylde Handbag Online
Buy Fake Celine Handbags
Cheap Giuseppe Zanotti
Cheap Replica Versace Handbag
Fake Manolo Blahnik
Buy Cheap Designer Replica Lancel Handbag
Discounted Replica Mulberry Handbag
Buy Discounted Designer Replica Christian Dior Handbag
Buy Discounted Designer Replica Jimmy Choo Shoes Online
Cheap Replica Hermes Handbag Online
More on xml pretty printing
Author Tim | 26.01.2011 | Category OurWord, Linux, FLEx, Chorus, Palaso Library, Spelling, Typesetting, Solid, Blogroll, WeSay, Developers, Dictionary, Uncategorized
Recently we had a problem with Chorus turning our pretty printed Xml LIFT files into a single line after a merge.
In trying to fix this we thought that the best strategy from a line-diff version control perspective was to maintain the formatting of the two parent files where entries are unchanged.
However we discovered that there is no easy way to read white space within an element node. This is a problem because WeSay writes LIFT with a new line for each attribute. So, on read:
<entry id='alpha'> <lexical-unit> <form lang='a'> <text>form alpha</text> </form </lexical-unit></entry>
becomes:
<entry id='alpha'> <lexical-unit> <form lang='a'> <text>form alpha</text> </form </lexical-unit></entry>
So the formatting within the element tag is lost.
As we thought about it some more we realized that WeSay at least reformats everything on the first Lift merge. So for the time being we will simply make that formatting the standard for Chorus as well.
Buy Fake Valentino Handbag
Buy Cheap Fake Loewe Handbag
Buy Cheap Fake Versace Online
Discounted Replica Dolce Gabbana Shoes
Designer Replica Chanel Handbags
Buy Designer Replica Louis Vuitton
Buy Dolce Gabbana Handbag
Cheap Fake Coach Handbags
Discounted Designer Replica Louis Vuitton Handbags
Discounted Replica Givenchy Online
Buy Fake Valentino Handbags Online
Buy Discounted Replica Louis Vuitton Handbags Online
Discounted Christian Louboutin
Cheap Mulberry Handbags
Cheap Designer Replica Fendi
Discounted Loewe Handbags
Cheap Jimmy Choo Handbag
Discounted Fake Yves Saint Laurent Handbags Online
Replica Dolce Gabbana Handbag Online
Discounted Ysl Handbags Online
Buy Fake Alexander Wang Handbag
Buy Discounted Replica Ysl Online
Cheap Chloe Handbags
Buy Cheap Fake Lv
Discounted Fake Jimmy Choo Handbag Online
Buy Cheap Designer Replica Coach
Buy Designer Replica Loewe
Cheap Louis Vuitton Shoes
Buy Discounted Fake Marc Jacobs Handbags
Discounted Replica Jimmy Choo Handbag Online
Designer Replica Miu Miu Shoes Online
Buy Discounted Designer Replica Dolce Gabbana Online
Buy Discounted Designer Replica Marni Handbags
Buy Cheap Alexander Mcqueen Shoes
Cartier Handbags
Buy Cheap Dg Handbag Online
Buy Fake Bottega Veneta Handbags
Designer Replica Hermes Handbag
Cheap Fake Loewe Handbag
Chanel Handbag Online
Buy Replica Louis Vuitton Handbags
Buy Cheap Fake Alexander Wang Online
Fake 3.1 Phillip Lim Handbags
Discounted Fake Miu Miu Handbag
Cheap Fake Alexander Wang
Buy Discounted Replica Lancel Handbag
Discounted Replica Balenciaga Online
Buy Replica Manolo Blahnik Shoes
Cheap Replica Valentino
Buy Cheap Fake Burberry Handbag
Designer Replica Bally
Buy Marni Handbag Online
Cheap Fake Givenchy Handbag Online
Buy Cheap Replica Christian Dior Handbags Online
Buy Cheap Fake Salvatore Ferragamo Handbag Online
Replica Jimmy Choo Shoes
Discounted Hermes Handbag
Buy Replica Thomas Wylde Handbags
Buy Discounted Fake Salvatore Ferragamo Handbags Online
Buy Discounted Fake Marni Handbags Online
Discounted Givenchy Handbags
Buy Designer Replica Prada Handbags Online
Discounted Replica Givenchy
Discounted Designer Replica Marni Handbags Online
Cheap Fake Coach Online
Cheap Replica Tory Burch Online
Buy Discounted Replica Lv Handbag Online
Buy Cheap Versace Handbags
Discounted Fake Thomas Wylde Online
Salvatore Ferragamo Handbag
Buy Fake Lancel Online
Fake Chloe Handbag Online
Fake Louis Vuitton Shoes Online
Buy Fake Dolce Gabbana
Buy Bally Handbags Online
Buy Anya Hindmarch
Cheap Replica Ysl Handbag
Buy Discounted Replica Marni Online
Discounted Replica Louis Vuitton Handbags
Buy Fake Burberry
Buy Cheap Designer Replica Bally Handbag Online
Discounted Designer Replica Fendi Handbags
Cheap Salvatore Ferragamo Shoes
Discounted Designer Replica Lancel
Buy Discounted Replica Tory Burch Shoes
Buy Discounted Designer Replica Coach Handbags Online
Buy Discounted Fake Lv Handbag Online
Buy Discounted Replica Marni Handbag Online
Buy Cheap Fake Dolce Gabbana Handbags Online
New Writing System UI
Author John Hatton | 04.01.2010 | Category Palaso Library, Developers
This posting will be of interest only to developers currently using, or considering using our .net Palaso Library, which provides components to do many common language software tasks. This post will look at just one of those, setting up set of Writings Systems.
Well, each year ‘round this time I take a break from my normal obligations and do something interesting, or learn something new. Alas, this year, I did neither. Instead, I squandered the time doing some long “unfinished business”. A couple of years ago, we added to Palaso some pretty nice support for LDML, the standard XML format for writing systems. Writing systems? BORING. I know, I know. Anyhow, the GUI that we had was just the minimum, and not helpful enough to actually ship in our flagship product, WeSay. So WeSay limps along on an older, pre-LDML system. Early in 2009 I did a UI design of what we really need, but, alas, noon actually implemented it. My teammates mentioned they were a bit peeved at me for not letting that bare-bones GUI ship.
adobe acrobat 9 pro
buy adobe acrobat 8
Adobe CS4 Master Collection mac
Buy Corel Draw X4
Adobe Photoshop CS4 Extended
ptc mathcad
buy microsoft office 2007
autodesk autocad 2009
autodesk autocad 64 bit
Microsoft Windows 7 Ultimate
turbo tax 2006
The only interesting thing to me about writing systems, especially user interfaces for them, is that we keep finding it so hard to get them right! I’ve seen half a dozen attempts in the last 10 years, just within the confines of SIL & friends. Here’s why, in my opinion: The vast majority of users and languages have pretty simple needs in this area. The rest, well, they’re pretty complicated (like the dictionary we worked with in South East Asia which has to handle scripts of Thailand, Burma, China, a Romanization, and IPA). Yet all the UI’s we’ve done have catered to both of these equally, and so most people were blocked, they need to call in more geeky help to get past this part of setting up their software. The key insight to fixing this, I think, is that people in typical situation will be shocked by the complexity needed in the non-typical situations. And those who have it hard, well they’ll expect things to be non-trivial. So this latest attempt uses progressive disclosure to keep things simple for most people.
|
In this post, I’m not going to talk about a lot of the really cool, problem-solving parts of this system which aren’t new. The non UI parts, the ones my colleagues actually give a hoot a about. I don’t think we ever did blog about them, though, so tag-your-it, Cambell |
The Writing System Repository Pane
Here’s the equivalent in the latest Palaso system:
There are two main parts to this design. First, the tree on the left organizes your repository in a hopefully easy to understand way, while at the same time giving you shortcuts to what you most likely want to do next. That is, it:
- Shows you the writings systems in your repository, grouped by language
- Makes suggestions about other writing systems you may wish to add to existing languages (e.g. IPA).
- Make suggestions about other languages you may be working on, based on what your Operating System thinks (here, Icelandic and Arabic on my machine).
As a developer, you can control which kinds of suggestions make sense for your application, to keep things simple. For WeSay, for example, we offer voice writing systems, but phonetic transcription and dialects are pretty unlikely. So we’d set up the Suggestor accordingly:
You might have noticed that there are no suggestions under English. Again, this it to keep things simple for the majority of users. We do that by specifying:
Note, even without those suggestions, someone could still make multiple Writing Systems for English easily enough, if they need to.
The Identifiers Tab
The second leg of the design is an Identfiers Tab which stays as simple as possible. As you know, there’s more to life that the good ‘ol “Ethnologue Code” (Now a’ days ISO 639-3). In addition to that, we need to help people come up with a proper RFC5646 identifier, including handling situations common in linguistics which aren’t spelled out by that standard. This is the job of the Identifiers tab.
For the simple (and normal) case, we don’t need to say any more than what the language is. Notice how in the image above, the Identifiers tab has just two controls.
After adding a simple writing system for a language, the next most common thing for users to need is a way to write the language phonetically or phonemically, using the International Phonetic Alphabet. Clicking the provided button just under the Aarri label gives:
Notice in the upper left, this new writing system has been grouped underneath the plain ‘ol Aari one. And on the right, notice that the “Special” combo now says “IPA Transcription”. If we want to specify phonetic vs. phonemic, we can do that with the “Purpose” combo.
If we need a new dialect, clicking the provided button brings up a dialog asking us to type in the name of the dialect. I entered “Foo”, and now we get:
Notice, with the “Special” combo set to “Script/Variant/Region”, we get the more control over the Writing system and its RFC5646 identifier (displayed in the upper right).
Ok, that’s mostly what I wanted to show. When you click “Add Language”, of course, you get searchable list of known languages. And under that More button in the lower left, you get these rarely needed commands:
There’s still some work that could be done (notice Region doesn’t offer a list), but my New Year’s break is over, so that’s it for now. The Palaso Library lives in Mercurial, at http://projects.palaso.org/projects/show/palaso.
jh
Get Discounted Adobe Cs4 Master Collection Online
Download Low Price Oem Adobe Photoshop Cs3 Extended
Purchase Cheap Cakewalk Sonar 8 Producer Edition
Download Cheap Oem Adobe Cs4 Master Collection Online
Discounted Oem Rosetta Stone Version 3 Chinese All Levels Set
Get Low Price Parallels Desktop 3 (build 5584) For Mac
Buy Discounted Rosetta Stone Version 3 Chinese All Levels Set Online
Where Can I Purchase Discounted Adobe Cs4 Production Premium
Download Cheap Oem Adobe Photoshop Cs3 Extended For Mac
Get Discounted Microsoft Windows Vista Ultimate
Get Low Price Rosetta Stone Version 3 English All Levels Set
Download Microsoft Windows 7 Enterprise
Purchase Oem Rosetta Stone Version 3 Arabic All Levels Set
Download Low Price G-data Internetsecurity 2008 Online
Download Microsoft Windows Server 2008
Buy Cheap Oem Adobe Acrobat 8 Pro Online
Get Discounted Oem Microsoft Windows Vista Ultimate
Get Discounted Rosetta Stone Version 3 Arabic All Levels Set For Mac
Get Low Price Oem Abbyy Finereader 8 Pro Multilang
Cheap Oem Autodesk Autocad Lt 2008
Buy Autodesk Autocad 2008
Cheap Oem Microsoft Mappoint Europe 2009 Online
Discounted Microsoft Windows 7 Enterprise Online
Best Price For Microsoft Windows Server 2008
Download Oem Microsoft Mappoint Europe 2009
Get Oem Microsoft Windows Vista Ultimate
Purchase Discounted Cakewalk Sonar 8 Producer Edition Online
Low Price Oem Solidworks 2009
Cheap Oem Solidworks 2009 Online
Buy Cheap Microsoft Office 2003 Pro With Business Contact Manager For Outlook
Purchase Cheap Adobe Cs4 Production Premium Online
Download Low Price Oem Microsoft Office Xp Pro
Buy Discounted Adobe Creative Suite 4 Design Premium For Mac
Best Price For Rosetta Stone Version 3 Arabic All Levels Set
Get Cheap Rosetta Stone Version 3 English All Levels Set
Get Oem Adobe Photoshop Cs2 9
Download Discounted Adobe Cs4 Master Collection
Purchase Discounted Oem Adobe Creative Suite 3 Master Collection For Mac
Where To Purchase Cheap Cakewalk Sonar 8 Producer Edition
Low Price Adobe Dreamweaver Cs3
Get Cheap Oem Adobe Creative Suite 3 Master Collection For Mac
Purchase Low Price Microsoft Office 2007 Enterprise
Cheap Microsoft Windows Server 2008 Online
Buy Abbyy Finereader 9 Pro Multilang Online
Get Discounted Oem Adobe Cs4 Production Premium
Get Low Price Oem Adobe Cs4 Master Collection
Buy Rosetta Stone Version 3 Dutch All Levels Set Online
Get Oem Rosetta Stone Version 3 Chinese All Levels Set Online
Cheap Microsoft Office 2003 Pro With Business Contact Manager For Outlook
Purchase Low Price Oem Adobe Creative Suite 3 Master Collection
Purchase Oem Adobe Cs4 Master Collection Online
Get Low Price Oem Rosetta Stone Version 3 Chinese All Levels Set For Mac
Buy Oem Adobe Photoshop Cs2 9
Buy Cheap Oem Microsoft Windows Vista Ultimate Online
Buy Oem G-data Internetsecurity 2008 Online
Where Can I Purchase Cheap Adobe Cs4 Production Premium
Where Can I Buy Discounted Autodesk Autocad Lt 2008
Get Discounted Oem Adobe Creative Suite 3 Master Collection For Mac
Download Cheap Adobe Creative Suite 3 Design Premium Online
Purchase Discounted Microsoft Windows Server 2008 Microsoft Sql Server 2008 Online
Purchase Microsoft Office 2003 Pro With Business Contact Manager For Outlook Online
Download Oem Rosetta Stone Version 3 Arabic All Levels Set For Mac
Download Cheap Adobe Acrobat 8 Pro
Oem Adobe Acrobat 8 Pro Online
Get Cheap Rosetta Stone Version 3 Chinese All Levels Set Online
Discounted Oem Rosetta Stone Version 3 Chinese All Levels Set For Mac
Purchase Low Price Oem Microsoft Windows Vista Business Online
Get Discounted Oem Microsoft Windows 7 Online
Buy Cheap Oem Rosetta Stone Version 3 Dutch All Levels Set
Discounted Adobe Cs4 Master Collection
Buy Low Price Rosetta Stone Version 3 Arabic All Levels Set For Mac
Get Cheap Oem Microsoft Windows 7 Enterprise
Where To Buy Discounted G-data Internetsecurity 2008
Buy Rosetta Stone Version 3 Arabic All Levels Set
Purchase Discounted Adobe Dreamweaver Cs3 Online
Download Discounted Microsoft Windows 7 Enterprise
Get Low Price Abbyy Finereader 9 Pro Multilang
Get Discounted Adobe Dreamweaver Cs3 Online
Buy Low Price Oem Microsoft Windows Server 2008 Microsoft Sql Server 2008
Get Discounted Oem Microsoft Windows 7 Enterprise Online
Get Low Price Adobe Creative Suite 3 Master Collection For Mac Online
Get Low Price Abbyy Finereader 9 Pro Multilang Online
Oem Microsoft Windows 7
Download Cheap Oem Rosetta Stone Version 3 Arabic All Levels Set For Mac Online
Download Adobe Creative Suite 3 Design Premium
Get Oem Adobe Cs4 Production Premium Online
Purchase Discounted Oem Microsoft Windows Vista Business Online
Where To Buy Discounted Microsoft Windows Server 2008 Microsoft Sql Server 2008
Purchase Discounted Oem Adobe Cs4 Master Collection For Mac
Purchase Oem Adobe Photoshop Cs2 9 Online
Low Price Oem Adobe Photoshop Cs2 9 Online
Buy Oem Adobe Creative Suite 3 Master Collection For Mac Online
Buy Cheap Oem Adobe Creative Suite 3 Master Collection
Download Cheap Microsoft Windows Vista Business
Buy Cheap Oem Microsoft Office 2007 Enterprise Online
Buy Cheap Oem Rosetta Stone Version 3 Chinese All Levels Set
Cheap Microsoft Office Xp Pro Online
G-data Internetsecurity 2008 Online
Purchase Cheap Microsoft Office Xp Pro
Discounted Oem Microsoft Windows Server 2008 Online
Get Discounted Oem Rosetta Stone Version 3 Arabic All Levels Set For Mac Online
Purchase Adobe Acrobat 8 Pro Online
Download G-data Internetsecurity 2008
Download Low Price Oem Rosetta Stone Version 3 French All Levels Set For Mac Online
Download Discounted Rosetta Stone Version 3 French All Levels Set For Mac Online
Get Cheap Adobe Photoshop Cs2 9
Get Low Price Adobe Dreamweaver Cs3 Online
Buy Discounted Adobe Photoshop Cs2 9 Online
Download Discounted G-data Internetsecurity 2008
Get Low Price Oem Microsoft Mappoint Europe 2009 Online
Buy Cheap Microsoft Windows Server 2008 Microsoft Sql Server 2008
Purchase Oem Microsoft Mappoint Europe 2009
Get Discounted Oem Microsoft Windows Server 2008
Purchase Autodesk Autocad 2009 Online
Get Cheap Oem Rosetta Stone Version 3 Chinese All Levels Set
Get Discounted Oem Rosetta Stone Version 3 Chinese All Levels Set For Mac Online
Get Discounted Oem Rosetta Stone Version 3 Chinese All Levels Set For Mac
Download Cheap Oem Microsoft Windows 7 Online
Get Discounted Solidworks 2009 Online
Buy Cheap Oem Rosetta Stone Version 3 Chinese All Levels Set Online
Purchase Discounted Oem Abbyy Finereader 9 Pro Multilang
Buy Cheap Oem Abbyy Finereader 9 Pro Multilang
Download Low Price Rosetta Stone Version 3 Arabic All Levels Set Online
Cheap Adobe Cs4 Master Collection For Mac
Git notes
Author admin | 23.06.2008 | Category Developers, WeSay
Now that I’ve used git for a couple weeks, I thought I’d make a few notes of commands I’ve found helpful.
To make a local branch for development
git checkout -b name_of_new_branch
To commit changes to the local repository (although I usually use the visual gittk for this)
git commit -a
To commit changes back to subversion
git svn dcommit
To uncommit
git reset HEAD~1
To keep a local branch up to date with subversion (use git stash to hide away local uncommitted changes for later)
git svn rebase
To move the master branch up to trunk
git checkout master
git svn rebase
to handle conflicts with merge
git mergetool path_to_file_needing_merge
or
git mergetool -t toolname path_to_file_needing_merge
To remove untracked files (like the temps that get created during a merge resolve)
git clean -n to see what it would do
git clean -f -d (-d if you want to remove untracked directories as well)
Git, Subversion and a CRLF mess
Author admin | 23.06.2008 | Category Developers, WeSay
When initializing from WeSay’s Subversion repository, (git svn init -t tags -b branches -T trunk http://www.wesay.org/code/WeSay) I found that I was then told that I had a ton of files that had changed. Turns out on Windows, git has core.autocrlf = true by default — a good thing. But git-svn apparently doesn’t take this into account and if you have crlf’s stored in the svn repository, they will be pushed into the git repository as well. So for now we have a repository that has crlf’s in it instead of just lf’s which get translated depending on the platform. Setting core.autocrlf to false and then doing a hard reset will make this work for now, although not as nicely as we would like. (git config core.autocrlf=false; git reset –hard)
Merging with git
Author admin | 12.06.2008 | Category Developers, WeSay
Git still doesn’t have good unicode support so to merge unicode files that git has labeled binary, I wanted to use a visual merger. Finally figured out how to do it — add the following lines to config:
[merge] tool = tortoise [mergetool "tortoise"] cmd = \"TortoiseMerge.exe\" /base:\"$BASE\" /theirs:\"$REMOTE\" /mine:\"$LOCAL\" /merged:\"$MERGED\" [mergetool "p4"] cmd = \"p4merge.exe\" \"$BASE\" \"$REMOTE\" \"$LOCAL\" \"$MERGED\"
If you don’t have TortoiseMerge.exe in your path then you can replace that with the full path (c:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe).
Upgrading user settings in C#
Author Tim | 10.06.2008 | Category Developers, WeSay
In the course of development we found it necessary to migrate an old user setting into a new one and to then remove it. This brought with it a few problems which I hope to shed some light on below.
In order to get the value of the old setting we used the Property.Settings.GetPreviousVersion() method. Initially we were getting a SettingsPropertyNotFoundException() although the setting was verifiably present in the user.config file. As it turns out we had removed the Property from the Settings designer which removed the Property in the Property.Settings class. In order for Settings to be found, they have to have a property that is tagged with the [UserScopedSettingAttribute] attribute. This tells the GetPreviousVersion() method to look for the setting in user.config. So far so good…
At this point however, the base.Upgrade() method is called to move old settings into the new file. This causes the old, unwanted setting to be moved in right along with all the old settings that we want to keep around. In order to avoid this behavior the [NoSettingsVersionUpgrade] attribute must also be used for the unwanted Property.
public override void Upgrade()
{
string lastConfigFilePath = (string) GetPreviousVersion(”LastConfigFilePath”);
base.Upgrade(); // bring forward our properties that are the
// same (but also will bring forward LastConfigFilePath)
}
[UserScopedSettingAttribute]
[DebuggerNonUserCode]
[DefaultSettingValueAttribute(”")]
[Obsolete(”Please use MruConfigFilePaths instead”)]
[NoSettingsVersionUpgrade]
public string LastConfigFilePath
{
get
{
throw new NotSupportedException(”LastConfigFilePath is obsolete”);
}
set
{
throw new NotSupportedException(”LastConfigFilePath is obsolete”);
}
}
An enchant provider for LIFT
Author admin | 13.05.2008 | Category Developers, WeSay
We wanted to allow users to edit their dictionary and use that same dictionary for spell checking. Since WeSay uses LIFT as the file format for the dictionary and keeps that file up to date, all we needed was an enchant provider that can read LIFT files.
I took the spell checking engine I had written a while back, Ascens, and refactored it so that it could read files of various formats. Currently it supports line based and XML based formats. For line based formats, the words are entered one per line. For XML based formats, an XPath expression determines what text from within the file should be selected to constitute correctly spelled words.
Ascens looks for a settings file with the same name as the language identifier that is passed to enchant. Within the settings file, the location of the dictionary and the type of the dictionary are specified. If the type is xml then the xpath expression should be defined.
The following is an example settings file for Ascens referring to a Lift file:
# This is the settings file for Ascens
[Dictionary]
# Type is either xml or line
# for xml you also need to set the XPath
#Type=line
Type=xml
# path to the dictionary
# (can be absolute or relative to the directory that this file is in)
#Path=c:\documents and settings\user\my documents\dictionaries\fr_FR.dic
#Path=fr_FR.dic
Path=..\..\..\My Documents\WeSay\French\French.lift
# XPath gives the Xpath that selects the words to be used as dictionary
# it must all be on a single line
XPath=//entry[not(citation-form/form[@lang='fr'])]/lexical-unit/form[@lang='fr']/text | //entry/citation-form/form[@lang='fr']/text
# this xpath selects the forms with the language id of 'fr' from the
# citation form when there is one and from the lexical unit when
# there is no citation form (it will not select both)
Enchant looks for user Ascens settings files in the following locations:
- The
ascenssubdirectory of the value found in the registry atHKEY_CURRENT_USER\Software\Enchant\Config\Data_Dir, if there is one. %APPDATA%\enchant\ascens, where%APPDATA%is shorthand for theC:\Users\<username>\AppData\Roaming\folder (Windows Vista) or theC:\Documents and Settings\<username>\Application Data\folder (Windows XP/2000).- The
enchant\ascenssubdirectory of the directory value found in the registry atHKEY_CURRENT_USER\Software\Enchant\Config\Home_Dir, if there is one. %USERPROFILE%\enchant\ascens, where%USERPROFILE%is shorthand for theC:\Users\<username>folder (Windows Vista) or theC:\Documents and Settings\<username>folder (Windows XP/2000).
Enchant looks for shared Ascens settings files in the following locations:
- Using the value found in the registry at
HKEY_CURRENT_USER\Software\Enchant\ascens\Data_Dir, if there is one. Otherwise, using the value found in the registry atHKEY_LOCAL_MACHINE\Software\Enchant\ascens\Data_Dir, if there is one. <enchant>\share\enchant\ascens, where<enchant>is the location oflibenchant.dll.
WeSay Tests on Mono Status
Author admin | 22.04.2008 | Category Developers, WeSay
One step toward getting WeSay to run on the OLPC is to verify that it can run with Mono.
We already reported all the System.Windows.Forms bugs that we could find by running MWF on Windows as documented here. The next step has been to run all the tests under Mono. As you can see from the diagram (that actually lives on our whiteboard) at left, we have found and fixed and reported quite a few bugs that have made the number of failing tests plummet. We’re still not there yet, but I’m making good progress.
Formatting dictionaries with CSS
Author admin | 26.02.2008 | Category Typesetting, Dictionary, Developers
In evaluating CSS as a stylesheet language for formatting dictionaries, I started putting PrinceXML through its paces. I tried what I considered to be
the hardest dictionary layout and while I think I have matched many of the features. The sidenotes are just not going to happen without specialized support for them in CSS. (The closest I could get was a float but of course if you have more than one within a line, they just write on top of each other). That result is here. I then switched to a more typical layout which had no problems at all. That result is here. You can get all the files to reproduce this exercise here.
Types of style
There are really a number items which contribute to the style of a dictionary:- Selection of fields
- Order of fields
- Textual markup - characters or text that is added before, after, or around items to distinguish a field from surrounding text
- Character styles - font changes
- Paragraph styles
- Page layout - columns
CSS3 Selectors
Another interesting behavior of CSS 3 is that you cannot select the first element having a class containing the word ‘pronunciation’:.pronunciation:first-of-type
You can only use the :first-of-type selector to select the first element with a particular name so a general div and span with class attributes would have to be converted to xml named elements instead. There is a way around this, given that our document will be generated from another format and that is to actually add classes first-of-type and last-of-type. Then the data becomes:
<span class="pronunciation
first-of-type">...</span><span
class="pronunciation">...</span><span class="pronunciation
last-of-type">...</span>
<span class="pronunciation first-of-type last-of-type">...</span>
Column-span
The only other problem I ran into was that Prince does not yet support the column-span property. This ended up not being a big problem since I just wanted the heading to span both columns and was able to work around this by making the first page of the section have a 12cm top margin and to float the heading into this space.Categories
- Blogroll (2)
- Chorus (2)
- Developers (19)
- Dictionary (5)
- FLEx (3)
- Linux (4)
- OurWord (3)
- Palaso Library (3)
- Solid (13)
- Spelling (5)
- Typesetting (3)
- Uncategorized (3)
- WeSay (40)
Archives
- March 2011
- January 2011
- June 2010
- February 2010
- January 2010
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- January 2009
- August 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007